From 33ea792760bd3832a15f23c3f5bcb9a726f32e7f Mon Sep 17 00:00:00 2001 From: Torwent Date: Tue, 6 Feb 2024 19:16:02 +0100 Subject: [PATCH] docs: several fixes to things that were causing parsing errors --- optional/handlers/consumablehandler.simba | 16 +-- optional/handlers/rsfishinghandler.simba | 18 +-- optional/interfaces/mainscreen/anvil.simba | 7 +- .../interfaces/mainscreen/craftscreen.simba | 14 +-- optional/interfaces/mainscreen/driftnet.simba | 12 +- .../interfaces/mainscreen/fairyring.simba | 48 ++++---- .../mainscreen/furniturebuilder.simba | 2 +- optional/interfaces/mainscreen/lectern.simba | 4 + .../interfaces/mainscreen/silverscreen.simba | 14 +-- osr/basescript.simba | 20 ++-- osr/basestats.simba | 4 +- osr/dotfilters.simba | 8 +- osr/finders/itemfinder/itemfinder.simba | 2 +- osr/handlers/consumablehandler.simba | 45 +++----- osr/interfaces/gametabs/magic.simba | 18 +-- osr/interfaces/gametabs/worldhopper.simba | 29 +++-- osr/interfaces/mainscreen/collectbox.simba | 2 +- osr/interfaces/mainscreen/mainscreen.simba | 24 ++-- osr/interfaces/minimap.simba | 20 ++-- osr/interfaces/xpdrop.simba | 8 +- osr/mm2ms.simba | 18 +-- osr/walker/objects/walkerobjects.simba | 42 +++---- osr/walker/walker.simba | 20 ++-- tools/codetester.simba | 3 +- tools/getobject.simba | 3 +- tools/getpos.simba | 3 +- tools/map_maker.simba | 3 +- tools/monster_maker.simba | 5 +- tools/polygon_maker.simba | 3 +- tools/webber.simba | 3 +- utils/api.simba | 18 +-- utils/biometrics.simba | 24 ++-- utils/cacheparser.simba | 45 ++++---- utils/color.simba | 4 +- utils/data/data.simba | 106 ++++++++---------- utils/forms/scriptform.simba | 12 +- utils/geometry/tpointarray.simba | 4 +- utils/input/mousezoom.simba | 20 ++-- utils/items/consumables.simba | 2 +- utils/items/items.simba | 6 +- utils/math.simba | 4 +- utils/recorder/recorder.simba | 1 + 42 files changed, 316 insertions(+), 348 deletions(-) diff --git a/optional/handlers/consumablehandler.simba b/optional/handlers/consumablehandler.simba index 9a37cf22..b0960d3b 100644 --- a/optional/handlers/consumablehandler.simba +++ b/optional/handlers/consumablehandler.simba @@ -51,7 +51,7 @@ function TConsumableHandler.Setup(Item: TRSItem): TRSConsumable; Used internally to add a TRSConumable to TConsumableHandler.ConsumableArray. -### Example +Example: ```pascal FoodHandler.Setup('Shark'); ``` @@ -345,7 +345,7 @@ function TRSInventory.Consume(consumableType: ERSConsumable): Boolean; overload; Methods used to consume consumables. -### Example +Example: ```pascal Inventory.Consume(ERSConsumable.FOOD); ``` @@ -457,7 +457,7 @@ function TRSInventory.CountConsumable(consumableType: ERSConsumable): Int32; Method used to count each slot that has a consumable of **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountConsumable(ERSConsumable.FOOD); ``` @@ -477,7 +477,7 @@ function TRSInventory.CountEachConsumable(consumableType: ERSConsumable): TInteg Method used to count each type of consumable of **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountEachConsumable(ERSConsumable.FOOD); ``` @@ -503,7 +503,7 @@ function TRSInventory.CountPoints(consumableType: ERSConsumable): Int32; overloa Method used to count the total points value of a **Consumable** or **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountPoints(ERSConsumable.FOOD); //Assumind you have 3 sharks in your inventory, 60 will be printed. ``` @@ -539,7 +539,7 @@ function TRSInventory.HasEnoughConsumable(consumableType: ERSConsumable): Boolea Method used to figure out if we are low on a type of consumable. -### Example +Example: ```pascal if not Inventory.HasEnoughConsumable(ERSConsumable.FOOD) then Bank.WithdrawItem(['Shark', 5, False], False); @@ -564,7 +564,7 @@ function TRSBank.FindConsumable(consumableType: ERSConsumable): Boolean; overloa Method used to find already setup consumables in the bank. Can be used directly but in most cases is used internally. -### Example +Example: ```pascal WriteLn Bank.FindConsumable(ERSConsumable.FOOD); ``` @@ -683,7 +683,7 @@ function TRSBank.WithdrawConsumable(consumableType: ERSConsumable): Boolean; Method used to withdraw a consumable type. -### Example +Example: ```pascal FoodHandler.MinInvPoints := 100; diff --git a/optional/handlers/rsfishinghandler.simba b/optional/handlers/rsfishinghandler.simba index b1da2569..b6f37d43 100644 --- a/optional/handlers/rsfishinghandler.simba +++ b/optional/handlers/rsfishinghandler.simba @@ -183,7 +183,7 @@ function TRSFishingHandler.GetMMShoreLine(): TPointArray; Get the shore lines on the minimap. -### Example +Example: ```pascal ShowOnClient(TRSFishingHandler.GetMMShoreLine()); ``` @@ -215,7 +215,7 @@ function TRSFishingHandler.GetMSShoreLine(): TPointArray; Get the shore lines on the mainscreen. -### Example +Example: ```pascal ShowOnClient(TRSFishingHandler.GetMSShoreLine()); ``` @@ -247,7 +247,7 @@ function TRSFishingHandler.FindWaterDirection(): TRectangle; Finds the adjacent tile that is directly close to the player that has water. -### Example +Example: ```pascal ShowOnClient(TRSFishingHandler.FindWaterDirection(), False); ``` @@ -287,7 +287,7 @@ function TRSFishingHandler.FindSpot(): Boolean; overload; Find fishing spots on the mainscreen. Optionally return at ATPA of the found spots. -### Example +Example: ```pascal var atpa: T2DPointArray; @@ -370,7 +370,7 @@ function TRSFishingHandler.WaitSpot(): Boolean; overload; Wait for fishing spots on the mainscreen. Optionally return at ATPA of the found spots. -### Example +Example: ```pascal var atpa: T2DPointArray; @@ -457,7 +457,7 @@ function TRSFishingHandler.SpotMoved(): Boolean; overload; Check if TRSFishingHandler.CurrentSpot moved. -### Example +Example: ```pascal WriteLn TRSFishingHandler.SpotMoved(); ``` @@ -552,7 +552,7 @@ To determine if we are still fishing it does the following: - Check if TRSFishingHandler.Timer has reached it's end. The time lasts anywhere between 40 seconds and 70 seconds randomly and it's reset everytime this is called and we earned XP. -### Example +Example: ```pascal WriteLn TRSFishingHandler.CheckFishing(); ``` @@ -601,7 +601,7 @@ function TRSFishingHandler.FacingWater(): Boolean; Check if we have water directly north, west, south or east of us. -### Example +Example: ```pascal WriteLn TRSFishingHandler.FacingWater(); ``` @@ -628,7 +628,7 @@ function TRSFishingHandler.ClickSpot(): Boolean; overload; Click the closest fishing spot to the player and switches TRSFishingHandler to "IsFishing". We can check if we are still fishing with TRSFishingHandler.CheckFishing(). -### Example +Example: ```pascal TRSFishingHandler.ClickSpot(); ``` diff --git a/optional/interfaces/mainscreen/anvil.simba b/optional/interfaces/mainscreen/anvil.simba index 8f3732a2..1189e821 100644 --- a/optional/interfaces/mainscreen/anvil.simba +++ b/optional/interfaces/mainscreen/anvil.simba @@ -1,5 +1,6 @@ (* # Anvil +Anvil interface. *) {$DEFINE WL_ANVIL_INCLUDED} @@ -28,7 +29,7 @@ function TRSAnvil.GetSlots: TBoxArray; Returns the all available anvil slots. -### Example +Example: ```pascal Debug(Anvil.GetSlots()); ``` @@ -179,7 +180,7 @@ function TRSAnvil.IsOpen(waitTime: Int32; interval: Int32 = -1): Boolean; overlo Returns true/false whether the anvil interface is open or not. -### Example +Example: ```pascal WriteLn Anvil.IsOpen(); ``` @@ -209,7 +210,7 @@ function TRSAnvil.Close(chance: Double = BioHash): Boolean; overload; Closes the anvil interface, depending on `pressEscape` the function will either click the button or press escape. -### Example +Example: ```pascal WriteLn Anvil.Close; ``` diff --git a/optional/interfaces/mainscreen/craftscreen.simba b/optional/interfaces/mainscreen/craftscreen.simba index 498f0c46..aa56dafe 100644 --- a/optional/interfaces/mainscreen/craftscreen.simba +++ b/optional/interfaces/mainscreen/craftscreen.simba @@ -118,7 +118,7 @@ function TRSCraftScreen.IsOpen(): Boolean; Returns true if the gold crafting screen is visible. -### Example +Example: ```pascal if CraftScreen.IsOpen() then CraftScreen.ClickItem(ERSCraftItem.GOLD_BRACELET, -1); @@ -140,7 +140,7 @@ function TRSCraftScreen.IsOpen(WaitTime: Int32): Boolean; Returns true if the gold crafting screen is visible within "WaitTime". -### Example +Example: ```pascal if CraftScreen.IsOpen(2000) then Writeln('Crafting screen has been opened within 2 seconds'); @@ -160,7 +160,7 @@ function TRSCraftScreen.Close(PressEscape: Boolean = False): Boolean; Closes the gold crafting screen. Depending on `PressEscape` the function will either click the button or press backspace. -### Example +Example: ```pascal if CraftScreen.Close() then Writeln('Closed the gold crafting screen'); @@ -183,7 +183,7 @@ function TRSCraftScreen.SetQuantity(Amount: Int32): Boolean; Sets the interface quantity to the set amount. Acceptable parameters include 1,5,10,X (custom amount) and -1 for 'All'. -### Example +Example: ```pascal CraftScreen.SetQuantity(-1); ``` @@ -227,7 +227,7 @@ function TRSCraftScreen.CanCraftItem(CraftItem: ERSCraftItem): Boolean; Returns if the given ERSCraftItem can be crafted. -### Example +Example: ```pascal if CraftScreen.CanCraftItem(ERSCraftItem.RUBY_RING) then CraftScreen.ClickItem(ERSCraftItem.RUBY_RING, 5); @@ -253,7 +253,7 @@ function TRSCraftScreen.IsItemHighlighted(CraftItem: ERSCraftItem): Boolean; Returns if the given ERSCraftItem is highlighted on the crafting interface. -### Example +Example: ```pascal if CraftScreen.IsItemHighlighted(ERSCraftItem.GOLD_BRACELET) then Keyboard.PressKey(VK_SPACE); @@ -280,7 +280,7 @@ interface. If the item is highlighted (previously crafted) and UseSpaceBar is s then the spacebar is used, if not then the interface item is clicked. Returns false if the given ERSCraftItem is not found on the interface. -### Example +Example: ```pascal if CraftScreen.CraftItem(ERSCraftItem.RUBY_AMULET, 5) then Writeln('Beginning crafting...'); diff --git a/optional/interfaces/mainscreen/driftnet.simba b/optional/interfaces/mainscreen/driftnet.simba index f6c458ee..eade8478 100644 --- a/optional/interfaces/mainscreen/driftnet.simba +++ b/optional/interfaces/mainscreen/driftnet.simba @@ -1,3 +1,7 @@ +(* +# DriftNet +DriftNet interface by Reldnahc. +*) {$DEFINE RELD_DRIFTNET_INCLUDED} {$IFNDEF WL_OSR} {$I WaspLib/osr.simba} @@ -17,7 +21,7 @@ function TRSDriftNet.BankOverlayOpen(): Boolean; Returns True if the bank loot overlay is activated -### Example +Example: ```pascal if DriftNet.BankOverlayOpen() then Driftnet.GetButton(ERSDriftNetButton.OVERLAY_CONFIRM).Click(); @@ -36,7 +40,7 @@ function TRSDriftNet.DestroyOverlayOpen(): Boolean; Returns True if the destroy loot overlay is activated -### Example +Example: ```pascal if DriftNet.DestroyOverlayOpen() then Driftnet.GetButton(ERSDriftNetButton.OVERLAY_CANCEL).Click(); @@ -55,7 +59,7 @@ function TRSDriftNet.HasOverlay(): Boolean; Returns True if either overlay is activated -### Example +Example: ```pascal if DriftNet.HasOverlay() then Driftnet.GetButton(ERSDriftNetButton.OVERLAY_CONFIRM).Click(); @@ -160,7 +164,7 @@ function TRSDriftNet.GetButton(): TRSButton; Returns a specific button if its available -### Example +Example: ```pascal if not DriftNet.HasOverlay() then Driftnet.GetButton(ERSDriftNetButton.BANK_ALL).Click(); diff --git a/optional/interfaces/mainscreen/fairyring.simba b/optional/interfaces/mainscreen/fairyring.simba index 16c594d6..0a663705 100644 --- a/optional/interfaces/mainscreen/fairyring.simba +++ b/optional/interfaces/mainscreen/fairyring.simba @@ -95,7 +95,7 @@ function TRSFairyRing.IsOpen(): Boolean; Returns true/false whether the FairyRing interface is open or not. -### Example +Example: ```pascal WriteLn FairyRing.IsOpen(); ``` @@ -115,7 +115,7 @@ function TRSFairyRing.Close(chance: Double = BioHash): Boolean; overload; Closes the FairyRing interface, depending on `pressEscape` the function will either click the button or press escape. -### Example +Example: ```pascal WriteLn FairyRing.Close(); ``` @@ -142,7 +142,7 @@ function TRSFairyRing.HandleItem(): Boolean; Magically finds, caches for next usages and equips dramen or lunar staff with the minimum tab opening possible. If no item is found, we will assume the user has the elite lumbridge and draynor diary complete for next uses. -### Example +Example: ```pascal if FairyRing.HandleItem() then WriteLn FairyRing.Item; @@ -246,7 +246,7 @@ function TRSFairyRing.Open(): Boolean; Attempts to open the closest fairy ring RSObject. -### Example +Example: ```pascal WriteLn FairyRing.Open(); ``` @@ -278,7 +278,7 @@ function TRSFairyRing.WalkOpen(): Boolean; Attempts to walk to if needed and open the closest fairy ring RSObject. -### Example +Example: ```pascal WriteLn FairyRing.WalkOpen(); ``` @@ -310,7 +310,7 @@ function TRSFairyRing.IsLetterValid(letter: Char; dial: ERSFairyRingDial): Boole Checks if the **letter** passed on is valid for the given **dial**. -### Example +Example: ```pascal WriteLn FairyRing.IsLetterValid('z', ERSFairyRingDial.LEFT); ``` @@ -328,7 +328,7 @@ function TRSFairyRing.IsCodeValid(code: String): Boolean; Checks if the a given **code** is a valid fairy ring code. -### Example +Example: ```pascal WriteLn FairyRing.IsCodeValid('abc'); ``` @@ -356,7 +356,7 @@ function TRSFairyRing.GetDials(): TBoxArray; Returns the fairy ring dials boxes -### Example +Example: ```pascal Debug(FairyRing.GetDials()); ``` @@ -376,7 +376,7 @@ function TRSFairyRing.GetDial(dial: ERSFairyRingDial): TBox; Returns the box of a fairy ring dial. -### Example +Example: ```pascal Debug(FairyRing.GetDial(ERSFairyRingDial.MIDDLE)); ``` @@ -395,7 +395,7 @@ function TRSFairyRing.GetLetterBox(dial: ERSFairyRingDial): TBox; Returns the current letter box of a fairy ring dial. -### Example +Example: ```pascal Debug(FairyRing.GetLetterBox(ERSFairyRingDial.MIDDLE)); ``` @@ -417,7 +417,7 @@ function TRSFairyRing.GetLetter(dial: ERSFairyRingDial): Char; Returns the letter of a fairy ring dial. -### Example +Example: ```pascal WriteLn FairyRing.GetLetter(ERSFairyRingDial.RIGHT); ``` @@ -449,7 +449,7 @@ function TRSFairyRing.GetCurrentCode(): String; Returns the full current fairy ring code set in the dials. -### Example +Example: ```pascal WriteLn FairyRing.GetCurrentCode(); ``` @@ -471,7 +471,7 @@ function TRSFairyRing.GetRightRotationBox(dial: ERSFairyRingDial): TBox; Returns the left or right rotation box of the given **dial**. -### Example +Example: ```pascal Debug(FairyRing.GetLeftRotationBox(ERSFairyRingDial.LEFT)); ``` @@ -498,7 +498,7 @@ function TRSFairyRing.SpinRight(dial: ERSFairyRingDial; skipWait: Boolean = Fals Spins the given **dial** left or right. By default it waits for the rotation to finish but it can be skipped with **skipWait**. -### Example +Example: ```pascal WriteLn FairyRing.SpinLeft(ERSFairyRingDial.LEFT); ``` @@ -538,7 +538,7 @@ function TRSFairyRing.SetDial(letter: Char; dial: ERSFairyRingDial; skipWait: Bo Spins the dial so that the current selected letter is the specified one. -### Example +Example: ```pascal WriteLn FairyRing.SetDial('c', ERSFairyRingDial.LEFT); ``` @@ -600,7 +600,7 @@ function TRSFairyRing.DialCode(code: String; attempts: Int32 = 3): Boolean; Dials in a full code on the fairy ring. Codes casing is ignored. **attempts** is a helper parameter and shouldn't be touched if you don't know what you are doing. -### Example +Example: ```pascal WriteLn FairyRing.DialCode('cip'); ``` @@ -641,7 +641,7 @@ function TRSFairyRing.GetTeleportButton(): TBox; Returns the box of the teleport button. -### Example +Example: ```pascal Debug(FairyRing.GetTeleportButton()); ``` @@ -663,7 +663,7 @@ function TRSFairyRing.ClickTeleportButton(): Boolean; Clicks the fairy ring the teleport button. -### Example +Example: ```pascal WriteLn FairyRing.ClickTeleportButton(); ``` @@ -686,7 +686,7 @@ function TRSFairyRing.GetLogCodes(): TStringArray; overload; Returns the visible codes in the fairy ring travel log. -### Example +Example: ```pascal WriteLn FairyRing.GetLogCodes(); ``` @@ -754,7 +754,7 @@ function TRSFairyRing.FindLogCode(code: String): Boolean; overload; Finds the code specified in the travel log. Codes casing is ignored. -### Example +Example: ```pascal WriteLn FairyRing.FindLogCode('cip'); ``` @@ -828,7 +828,7 @@ function TRSFairyRing.ClickLogCode(code: String): Boolean; Finds and clicks the code specified in the travel log. Codes casing is ignored. -### Example +Example: ```pascal WriteLn FairyRing.ClickLogCode('cip'); ``` @@ -858,7 +858,7 @@ function TRSFairyRing.HandleInterface(code: String): Boolean; Completely handles the fairy ring interface to set a code and teleport. Will use both the log and the dials depending on the user biohash. -### Example +Example: ```pascal WriteLn FairyRing.HandleInterface('cip'); ``` @@ -888,7 +888,7 @@ If the fairy ring interface is not open, the **RSObject** will be used to find t If the code is on the right click context menu, it will be used. You can also optional pass in "Zanaris" or "BKS" to go to zanaris. -### Example +Example: ```pascal WriteLn FairyRing.Teleport('cip'); ``` @@ -936,7 +936,7 @@ If the fairy ring is not visible, we will walk to it. If the code is on the right click context menu, it will be used. You can also optional pass in "Zanaris" or "BKS" to go to zanaris. -### Example +Example: ```pascal WriteLn FairyRing.Teleport('cip'); ``` diff --git a/optional/interfaces/mainscreen/furniturebuilder.simba b/optional/interfaces/mainscreen/furniturebuilder.simba index 49e10d0e..ce5e8fac 100644 --- a/optional/interfaces/mainscreen/furniturebuilder.simba +++ b/optional/interfaces/mainscreen/furniturebuilder.simba @@ -105,7 +105,7 @@ function TRSFurnitureBuilder.Close(UseKeyboard: Boolean = False): Boolean; Closes the furniture builder, Depending on `UseKeyboard` the function will either click the button or press backspace. -### Example +Example: ```pascal WriteLn FurnitureBuilder.Close(); ``` diff --git a/optional/interfaces/mainscreen/lectern.simba b/optional/interfaces/mainscreen/lectern.simba index c67b7342..037f5253 100644 --- a/optional/interfaces/mainscreen/lectern.simba +++ b/optional/interfaces/mainscreen/lectern.simba @@ -1,3 +1,7 @@ +(* +# Lectern +Lectern interface. +*) {$DEFINE WL_LECTERN_INCLUDED} {$IFNDEF WL_OSR} {$I WaspLib/osr.simba} diff --git a/optional/interfaces/mainscreen/silverscreen.simba b/optional/interfaces/mainscreen/silverscreen.simba index 635793cb..8b736daf 100644 --- a/optional/interfaces/mainscreen/silverscreen.simba +++ b/optional/interfaces/mainscreen/silverscreen.simba @@ -70,7 +70,7 @@ function TRSSilverScreen.IsOpen(): Boolean; Returns true if the silver crafting screen is visible. -### Example +Example: ```pascal if SilverScreen.IsOpen() then SilverScreen.ClickItem('Unstrung symbol', -1); @@ -92,7 +92,7 @@ function TRSSilverScreen.IsOpen(WaitTime: Int32): Boolean; Returns true if the silver crafting screen is visible within "WaitTime". -### Example +Example: ```pascal if SilverScreen.IsOpen(2000) then Writeln('Silver screen has been opened within 2 seconds'); @@ -112,7 +112,7 @@ function TRSSilverScreen.Close(PressEscape: Boolean = False): Boolean; Closes the silver crafting screen. Depending on `PressEscape` the function will either click the button or press backspace. -### Example +Example: ```pascal if SilverScreen.Close() then Writeln('Closed the silver crafting screen'); @@ -135,7 +135,7 @@ function TRSSilverScreen.SetQuantity(Amount: Int32): Boolean; Sets the interface quantity to the set amount. Acceptable parameters include 1,5,10,X (custom amount) and -1 for 'All'. -### Example +Example: ```pascal SilverScreen.SetQuantity(-1); ``` @@ -180,7 +180,7 @@ function TRSSilverScreen.CanCraftItem(Item: TRSItem; out ItemBox: TBox): Boolean Returns if the given TRSItem can be crafted. If so then a TBox of the disired item is returned. -### Example +Example: ```pascal if SilverScreen.CanCraftItem('Topaz bracelet', ItmBox) then Mouse.Move(ItmBox); @@ -211,7 +211,7 @@ function TRSSilverScreen.IsItemHighlighted(Item: TRSItem): Boolean; Returns if the given TRSItem is highlighted on the silver crafting interface. -### Example +Example: ```pascal if SilverScreen.IsItemHighlighted('Unstrun symbol') then Keyboard.PressKey(VK_SPACE); @@ -238,7 +238,7 @@ Sets the desired quantity then crafts on the given TRSItem on the silver screen If the item is highlighted (previously crafted) and UseSpaceBar is set to true, then the spacebar is used, if not then the interface item is clicked. Returns false if 'Item' is not found on the interface. -### Example +Example: ```pascal if SilverScreen.CraftItem('Jade amulet (u)', 10) then Writeln('Beginning crafting...'); diff --git a/osr/basescript.simba b/osr/basescript.simba index a0bceab0..a43b13cb 100644 --- a/osr/basescript.simba +++ b/osr/basescript.simba @@ -32,7 +32,7 @@ The variables that are part of **TBaseScript** are the following: TBaseScript can be used as is or inherited from to extend it's functionality. -### Example +Example: ```pascal TBaseWalkerScript = record(TBaseScript) RSW: TRSWalker; @@ -91,7 +91,7 @@ Internal method used to build our text progress report. To set custom messages simply override this method and pass in each line of you report into the Result array. Keep in mind that editing this will probably mess up the HUD report so if you customize this you should also customize **TBaseScript.BuildHUDReport()**. -### Example +Example: ```pascal function TBaseScript.BuildTextReport(): TStringArray; override; var @@ -275,7 +275,7 @@ If **maxActions** and/or **maxTime** are not 0 that will make Can be used as is or overriden to do additional tasks. -### Example +Example: ```pascal var Script: TBaseScript; @@ -381,7 +381,7 @@ function TBaseScript.DoAntiban(checkBreaks: Boolean = True; checkSleeps: Boolean Method used to call Antiban.DoAntiban(checkBreaks, checkSleeps). -### Example +Example: ```pascal Script.DoAntiban(); ``` @@ -417,7 +417,7 @@ Method used to check if we reached the TBaseScript goals and it's time to stop i This doesn't stop the script. This simply returns true/false when called and it's up to you to stop the script. ``` -### Example +Example: ```pascal if Script.ShouldStop() then TerminateScript(); @@ -535,7 +535,7 @@ This is likely required if you want to chain several scripts together. Consider taking a look at script_chainer.simba: https://github.com/Torwent/wasp-mini/blob/master/script_chainer.simba ``` -### Example +Example: ```pascal Script1.Init(); repeat @@ -596,7 +596,7 @@ pre-hover the bank. This function simply returns true/false and doesn't actualy hover the bank. ``` -### Example +Example: ```pascal if Script.ShouldHoverBank() then Script.HoverBank(); @@ -621,7 +621,7 @@ function TBaseBankScript.HoverBank(): Boolean; Moves the mouse to the closest RSObjects.Banks -### Example +Example: ```pascal BankScript.HoverBank(); ``` @@ -640,7 +640,7 @@ function TBaseBankScript.Withdraw(item: TRSBankWithdrawItem): Boolean; Withdraws **item** from the bank. -### Example +Example: ```pascal item := TRSBankItem.Setup('Shark', 1, True); if Bank.IsOpen() then @@ -814,7 +814,7 @@ function TBaseBankScript.HandleCollectBox(items: TRSItemArray): Boolean; Collects **items** from the collectbox. -### Example +Example: ```pascal if CollectBox.IsOpen() then BankScript.HandleCollectBox(); diff --git a/osr/basestats.simba b/osr/basestats.simba index 47203728..92567164 100644 --- a/osr/basestats.simba +++ b/osr/basestats.simba @@ -64,7 +64,7 @@ function BaseStats.GetCurrentLevel(Skill: ERSSkill): Int32; static; Similar to TRSStats.GetCurrentLevel() but uses the cached values. -### Example +Example: ```pascal WriteLn BaseStats.GetCurrentLevel(ERSSkill.PRAYER); ``` @@ -86,7 +86,7 @@ procedure BaseStats.IncrementLevel(skill: ERSSkill); static; Internal method to update cached levels. This is automatically called by Chat.LeveledUp(). -### Example +Example: ```pascal WriteLn BaseStats.GetCurrentLevel(ERSSkill.PRAYER); BaseStats.IncrementLevel(ERSSkill.PRAYER); diff --git a/osr/dotfilters.simba b/osr/dotfilters.simba index 741f874b..d59b3636 100644 --- a/osr/dotfilters.simba +++ b/osr/dotfilters.simba @@ -227,7 +227,7 @@ function TRSMinimap.GetCircle(Loc: TPoint; Radius: Int32; Offset: TPoint = [0, 0 ``` Returns a circle in the Minimap, **Loc** being the middle point of the circle. -### Example +Example: ```pascal var P: TPoint; @@ -261,7 +261,7 @@ function TRSMinimap.GetCircleArray(Locs: TPointArray; Radius: Int32; Offset: TPo ``` Returns an array of circles in the minimap. -### Example +Example: ```pascal var P: TPoint; @@ -298,7 +298,7 @@ function TRSMinimap.GetDotInCircle(Dot: ERSMinimapDot; Loc, Radius: Int32; Offse Functions to get the **ERSMinimapDots** in a circle. Returns only the first dot found. This is useful to know if a minimap dot is within range for example. -### Example +Example: ```pascal var Bitmap: TMufasaBitmap; @@ -355,7 +355,7 @@ function TRSMinimap.GetDotArrayInCircle(Dot: ERSMinimapDot; Loc: TPoint; Radius: Functions to get the **ERSMinimapDots** in a circle. Returns all dots found. This is useful to know if minimap dots are within range for example. -### Example +Example: ```pascal var P: TPoint; diff --git a/osr/finders/itemfinder/itemfinder.simba b/osr/finders/itemfinder/itemfinder.simba index a117585d..7155d851 100644 --- a/osr/finders/itemfinder/itemfinder.simba +++ b/osr/finders/itemfinder/itemfinder.simba @@ -20,7 +20,7 @@ end; ## ItemFinder Wrappers The following wrappers are set by WaspLib for more consistent usage of itemfinder. -### Example +Example: ```pascal Name: cake(3) => ItemID: 1891 Name: cake(2) => ItemID: 1893 diff --git a/osr/handlers/consumablehandler.simba b/osr/handlers/consumablehandler.simba index 9a37cf22..9f92ab46 100644 --- a/osr/handlers/consumablehandler.simba +++ b/osr/handlers/consumablehandler.simba @@ -1,6 +1,5 @@ (* # ConsumableHandlers - ConsumableHandlers are responsible for handle all kinds of consumables in WaspLib. For a list of the consumable types check `ERSConsumable`, there's a TConsumableHandler for each one. *) @@ -21,7 +20,7 @@ type Timer, Delay: TCountDown; IsSetup: Boolean; end; - +``` Consumable handler is the record responsible to handle `TRSConsumables `_. This will handle caching all found consumables to this point, bank withdraw amounts, timer if the last consumable had a timer, etc. *) @@ -38,7 +37,6 @@ This will handle caching all found consumables to this point, bank withdraw amou ```pascal PConsumableHandler = ^TConsumableHandler; ``` - Wrapper type of a TConsumableHandler pointer. *) PConsumableHandler = ^TConsumableHandler; @@ -48,10 +46,9 @@ Wrapper type of a TConsumableHandler pointer. ```pascal function TConsumableHandler.Setup(Item: TRSItem): TRSConsumable; ``` - Used internally to add a TRSConumable to TConsumableHandler.ConsumableArray. -### Example +Example: ```pascal FoodHandler.Setup('Shark'); ``` @@ -76,7 +73,6 @@ end; ```pascal function TConsumableHandler.FindInBank(): TRSConsumableArray; ``` - Returns an TRSConsumableArray of all TRSConsumables of **TConsumableHandler.consumableType** found in the bank window. *) function TConsumableHandler.FindInBank(): TRSConsumableArray; @@ -108,7 +104,6 @@ end; ```pascal function TConsumableHandler.FindInInventory(): TRSConsumableArray; ``` - Returns an TRSConsumableArray of all TRSConsumables of **TConsumableHandler.ConsumableType** found in the inventory. *) function TConsumableHandler.FindInInventory(): TRSConsumableArray; @@ -138,7 +133,6 @@ end; ```pascal function TConsumableHandler.NeedToConsume(): Boolean; ``` - Returns an **True** if there's a timer setup and it has ran out. *) function TConsumableHandler.NeedToConsume(): Boolean; @@ -155,7 +149,6 @@ end; ```pascal procedure TConsumableHandler.Setup(consumableType: ERSConsumable); overload; ``` - Overloaded function used to setup TConsumableHandler.ConsumableArray by TConsumableHandler.ConsumableType. This will use TConsumableHandler.FindInInventory() or TConsumableHandler.FindInBank() by that order to setup found TRSConsumables. @@ -210,10 +203,11 @@ AttackBoostHandler: TConsumableHandler; DefenceBoostHandler: TConsumableHandler; RangingBoostHandler: TConsumableHandler; MagicBoostHandler: TConsumableHandler; + CONSUMABLE_HANDLER_ARRAY: array [ERSConsumable] of PConsumableHandler := [ -@FoodHandler, @PrayerHandler, @EnergyHandler, @PoisonHandler, @VenomHandler, -@AntifireHandler, @BoostHandler, @StrengthBoostHandler, @AttackBoostHandler, -@DefenceBoostHandler, @RangingBoostHandler, @MagicBoostHandler + @FoodHandler, @PrayerHandler, @EnergyHandler, @PoisonHandler, @VenomHandler, + @AntifireHandler, @BoostHandler, @StrengthBoostHandler, @AttackBoostHandler, + @DefenceBoostHandler, @RangingBoostHandler, @MagicBoostHandler ]; ``` @@ -243,7 +237,6 @@ Global handler variables. This handlers are the ones responsible for handling co ```pascal function TConsumableHandler.GetHandler(consumableType: ERSConsumable): PConsumableHandler; static; ``` - Static method to return a pointer to the right handler for each consumableType passed in. *) function TConsumableHandler.GetHandler(consumableType: ERSConsumable): PConsumableHandler; static; @@ -257,7 +250,6 @@ end; ```pascal function TRSInventory.FindItems(Items: TRSConsumableArray; out FoundItems: TRSConsumableArray; out Slots: TIntegerArray): Boolean; overload; ``` - Method used to find consumables in the inventory. Can be used directly but in most cases is used internally. *) function TRSInventory.FindConsumable(consumables: TRSConsumableArray; out foundConsumable: TRSConsumableArray): TIntegerArray; @@ -303,7 +295,6 @@ end; function TRSInventory.FindConsumable(consumableType: ERSConsumable; out FoundConsumables: TRSConsumableArray; out Slots: TIntegerArray): Boolean; function TRSInventory.FindConsumable(consumableType: ERSConsumable): Boolean; overload; ``` - Method used to find already setup consumables in the inventory. Can be used directly but in most cases is used internally. *) function TRSInventory.FindConsumable(consumableType: ERSConsumable; out foundConsumables: TRSConsumableArray): TIntegerArray; overload; @@ -342,10 +333,9 @@ end; function TRSInventory.Consume(consumableType: ERSConsumable; out Slots: TIntegerArray): Boolean; function TRSInventory.Consume(consumableType: ERSConsumable): Boolean; overload; ``` - Methods used to consume consumables. -### Example +Example: ```pascal Inventory.Consume(ERSConsumable.FOOD); ``` @@ -454,10 +444,9 @@ end; ```pascal function TRSInventory.CountConsumable(consumableType: ERSConsumable): Int32; ``` - Method used to count each slot that has a consumable of **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountConsumable(ERSConsumable.FOOD); ``` @@ -474,10 +463,9 @@ end; ```pascal function TRSInventory.CountEachConsumable(consumableType: ERSConsumable): TIntegerArray; ``` - Method used to count each type of consumable of **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountEachConsumable(ERSConsumable.FOOD); ``` @@ -500,10 +488,9 @@ end; function TRSInventory.CountPoints(Consumable: TRSConsumable): Int32; function TRSInventory.CountPoints(consumableType: ERSConsumable): Int32; overload; ``` - Method used to count the total points value of a **Consumable** or **consumableType**. -### Example +Example: ```pascal WriteLn Inventory.CountPoints(ERSConsumable.FOOD); //Assumind you have 3 sharks in your inventory, 60 will be printed. ``` @@ -536,10 +523,9 @@ end; ```pascal function TRSInventory.HasEnoughConsumable(consumableType: ERSConsumable): Boolean; ``` - Method used to figure out if we are low on a type of consumable. -### Example +Example: ```pascal if not Inventory.HasEnoughConsumable(ERSConsumable.FOOD) then Bank.WithdrawItem(['Shark', 5, False], False); @@ -561,10 +547,9 @@ function TRSBank.FindConsumable(ConsumableArray: TRSConsumableArray): Boolean; o function TRSBank.FindConsumable(consumableType: ERSConsumable; out Consumable: TRSConsumable): Boolean; overload; function TRSBank.FindConsumable(consumableType: ERSConsumable): Boolean; overload; ``` - Method used to find already setup consumables in the bank. Can be used directly but in most cases is used internally. -### Example +Example: ```pascal WriteLn Bank.FindConsumable(ERSConsumable.FOOD); ``` @@ -609,7 +594,6 @@ end; ```pascal function TRSBank.CountPoints(Consumable: TRSConsumable): Int32; ``` - Method used to count the points of the first dose/portion of a consumable found in bank. This prioritizes higher dosage visible ones first and returns only just that one. *) @@ -635,7 +619,6 @@ end; function TRSBank.WithdrawConsumableAmount(consumableType: ERSConsumable): Int32; function TRSBank.WithdrawConsumableAmount(consumableType: ERSConsumable; consumable: TRSConsumable): Int32; overload; ``` - Method used to return the amount we need to withdraw to meet the TRSConsumable.MinInvPoints. *) function TRSBank.WithdrawConsumableAmount(consumableType: ERSConsumable): Int32; @@ -680,13 +663,11 @@ end; ```pascal function TRSBank.WithdrawConsumable(consumableType: ERSConsumable): Boolean; ``` - Method used to withdraw a consumable type. -### Example +Example: ```pascal FoodHandler.MinInvPoints := 100; - Bank.WithdrawConsumable(ERSConsumable.FOOD); //This will withdraw FOODs until we have 100 points value of food in our inventory. ``` *) diff --git a/osr/interfaces/gametabs/magic.simba b/osr/interfaces/gametabs/magic.simba index 6d83d779..0b77bc7b 100644 --- a/osr/interfaces/gametabs/magic.simba +++ b/osr/interfaces/gametabs/magic.simba @@ -45,7 +45,7 @@ function TRSMagic.GetFilterButton(): TRSButton; Returns the filter button in the magic tab. -### Example +Example: ```pascal Debug([Magic.GetFilterButton()]); ``` @@ -73,7 +73,7 @@ function TRSMagic.FiltersIsOpen(): Boolean; Returns true/false if the filters interface of the magic tab is open. -### Example +Example: ```pascal WriteLn Magic.FiltersIsOpen(); ``` @@ -92,7 +92,7 @@ function TRSMagic.OpenFilters(): Boolean; Attempts to open the filters interface of the magic tab. Returns true on success. -### Example +Example: ```pascal WriteLn Magic.OpenFilters(); ``` @@ -111,7 +111,7 @@ function TRSMagic.CloseFilters(): Boolean; Attempts to close the filters interface of the magic tab. Returns true on success. -### Example +Example: ```pascal WriteLn Magic.CloseFilters(); ``` @@ -131,7 +131,7 @@ function TRSMagic.GetBookSpellCount(): Int32; Returns the number of spells declared in SRL for the current spellbook. -### Example +Example: ```pascal WriteLn Magic.GetBookSpellCount(); ``` @@ -156,7 +156,7 @@ function TRSMagic.CountSpells(): Int32; Returns the number of spells that exist in your magic tab. -### Example +Example: ```pascal WriteLn Magic.CountSpells(); if Magic.GetBookSpellCount() <> Magic.CountSpells() then @@ -195,7 +195,7 @@ function TRSMagic.GetFilterButtons(): TRSButtonArray; Returns the buttons of the magic tab filter interface. -### Example +Example: ```pascal Debug(Magic.GetFilterButtons()); ``` @@ -233,7 +233,7 @@ function TRSMagic.IsFiltered(): Boolean; Returns wether the spells are currently filtered or not. Can work with the filter interface open or closed as long as the magic tab is open. -### Example +Example: ```pascal WriteLn Magic.IsFiltered(); ``` @@ -254,7 +254,7 @@ function TRSMagic.DisableFilters(): Boolean; Attempts to disable magic spell filters. -### Example +Example: ```pascal WriteLn Magic.DisableFilters(); ``` diff --git a/osr/interfaces/gametabs/worldhopper.simba b/osr/interfaces/gametabs/worldhopper.simba index 583fbb2d..a384b53e 100644 --- a/osr/interfaces/gametabs/worldhopper.simba +++ b/osr/interfaces/gametabs/worldhopper.simba @@ -1,15 +1,9 @@ (* -# TRSWorldHopper +# WorldHopper Made by @Yolandi, modified by @Torwent. World hopper is resposible for hopping worlds with the logged in world hopper in the logout tab. - -```pascal -type TRSWorldHopper = record(TSRLBaseRecord) class var -SILVER, YELLOW: Int32; -ReadyTime: UInt64; -end; *) {$DEFINE YOLANDI_WORLDHOPPER_INCLUDED} {$IFNDEF WL_OSR} @@ -17,6 +11,17 @@ end; {$ENDIF} type +(* +## type TRSWorldHopper +```pascal +type + TRSWorldHopper = record(TRSInterface) + SILVER, YELLOW: Int32; + ReadyTime: UInt64; + end; +``` +WorldHopper record. +*) TRSWorldHopper = record(TRSInterface) SILVER, YELLOW: Int32; ReadyTime: UInt64; @@ -65,7 +70,7 @@ procedure TRSWorldHopper.Scroll(down: Boolean); Scroll one page up or down of the world hopper. -### Example +Example: ```pascal TRSWorldHopper.Scroll(True); ``` @@ -88,7 +93,7 @@ procedure TRSWorldHopper.ClickWorld(ocrBounds: TBox); Click a world in the world hopper. -### Example +Example: ```pascal TRSWorldHopper.ReadWorlds(ocrBounds); TRSWorldHopper.ClickWorld(ocrBounds[0]); @@ -110,7 +115,7 @@ function TRSWorldHopper.GetCurrentWorld(): Int32; Returns the current world we are on. -### Example +Example: ```pascal WriteLn TRSWorldHopper.GetCurrentWorld(); ``` @@ -133,7 +138,7 @@ function TRSWorldHopper.ReadWorlds(): TIntegerArray; overload; Returns currently visible worlds. -### Example +Example: ```pascal WriteLn TRSWorldHopper.ReadWorlds(); ``` @@ -243,7 +248,7 @@ function TRSWorldHopper.Hop(targetWorlds: TIntegerArray): Boolean; Hops to a different world from the specified **targetWorlds**. -### Example +Example: ```pascal WriteLn TRSWorldHopper.Hop([303, 304, 305]); ``` diff --git a/osr/interfaces/mainscreen/collectbox.simba b/osr/interfaces/mainscreen/collectbox.simba index 119e7bf4..3f8f14ab 100644 --- a/osr/interfaces/mainscreen/collectbox.simba +++ b/osr/interfaces/mainscreen/collectbox.simba @@ -189,7 +189,7 @@ function TRSCollectBox.Close(UseKeyboard: Boolean = False): Boolean; Closes the CollectBox, Depending on `UseKeyboard` the function will either click the button or press backspace. -### Example +Example: ```pascal WriteLn CollectBox.Close; ``` diff --git a/osr/interfaces/mainscreen/mainscreen.simba b/osr/interfaces/mainscreen/mainscreen.simba index d4caad42..c7e4baf5 100644 --- a/osr/interfaces/mainscreen/mainscreen.simba +++ b/osr/interfaces/mainscreen/mainscreen.simba @@ -55,7 +55,7 @@ function TRSMainScreen.IsVisible(cuboid: TCuboidEx; useCenter: Boolean = True): Checks if the given TPoint, TPointArray, TBox, TRectangle or TCuboid is visible in the MainScreen. It will return true if it's not behind an interface otherwise returns false. -### Example +Example: ```pascal Writeln MainScreen.IsVisible(P); ``` @@ -281,7 +281,7 @@ procedure TRSMainScreen.DebugAdjacentTiles; Debugs MainScreen.GetAdjacentTiles. -### Example +Example: ```pascal MainScreen.DebugAdjacentTiles; ``` @@ -308,7 +308,7 @@ function TRSMainScreen.InMultiCombat: Boolean; Returns true if we are in multi combat false if not. -### Example +Example: ```pascal Writeln MainScreen.InMultiCombat; ``` @@ -344,7 +344,7 @@ function TRSMainScreen.FindGrave: Boolean; Returns true if we died and there's a grave available somewhere, false otherwise. -### Example +Example: ```pascal Writeln MainScreen.FindGrave; ``` @@ -382,7 +382,7 @@ function TRSMainScreen.LoadingPOH: Boolean; Returns true if we are loading a poh. -### Example +Example: ```pascal Writeln MainScreen.LoadingPOH; ``` @@ -401,7 +401,7 @@ function TRSMainScreen.WaitLoadingPOH: Boolean; Waits for the POH loading screen returns true if we find a loading screen and successfully wait for it to finish. -### Example +Example: ```pascal Writeln MainScreen.WaitLoadingPOH; ``` @@ -430,7 +430,7 @@ function TRSMainScreen.FindEnemyHitsplats(): Boolean; Returns the hitsplats on screen that don't belong to the player. -### Example +Example: ```pascal Debug(MainScreen.FindEnemyHitsplats()); ``` @@ -472,7 +472,7 @@ function TRSMainScreen.InCombat: Boolean; Returns true if we are currently in combat. With slow attack speed between you and the enemy this might return false negatives. -### Example +Example: ```pascal Writeln MainScreen.InCombat; ``` @@ -490,7 +490,7 @@ function TRSMainScreen.WaitInCombat(waitTime: Int32; interval: Int32 = -1): Bool Waits the specified **waitTime** until we are in combat. -### Example +Example: ```pascal MainScreen.WaitInCombat(5000); ``` @@ -511,7 +511,7 @@ function TRSMainScreen.WaitNotInCombat(waitTime: Int32; interval: Int32 = -1): B Waits the specified **waitTime** until we are nto in combat. -### Example +Example: ```pascal MainScreen.WaitNotInCombat(5000); ``` @@ -537,7 +537,7 @@ function TRSMainScreen.FindArrow: Boolean; overload; Returns true if there's a yellow arrow on screen. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. -### Example +Example: ```pascal Writeln MainScreen.FindArrow; ``` @@ -570,7 +570,7 @@ function TRSMainScreen.WaitArrow(WaitTime: Int32 = 600; Interval: Int32 = -1): B Waits **WaitTime** for a yellow arrow to appear on MainScreen. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. -### Example +Example: ```pascal Writeln MainScreen.WaitArrow; ``` diff --git a/osr/interfaces/minimap.simba b/osr/interfaces/minimap.simba index 99a84d93..b8a8db3c 100644 --- a/osr/interfaces/minimap.simba +++ b/osr/interfaces/minimap.simba @@ -107,7 +107,7 @@ procedure TRSMinimap.WaitMoving(doAntiban: Boolean = True); Gives **Minimap.WaitPlayerMoving** the ability to perform antiban tasks while moving. -### Example +Example: ```pascal Minimap.WaitMoving(); ``` @@ -145,7 +145,7 @@ function TRSMinimap.OnGroundLevel(threshold: Int32 = 3300): Boolean; This works by counting the amount of black in the minimap and might give false positives/negatives if there's more than 3500 black pixels on the minimap. A **threshold** can be set for this counting, the default being 3300. -### Example +Example: ```pascal WriteLn Minimap.OnGroundLevel(); ``` @@ -175,7 +175,7 @@ function TRSMinimap.InPOH(); This might give false positives if you are upstairs or in a place with few colors on the minimap. It might also give false negatives if the POH is crowded. -### Example +Example: ```pascal WriteLn Minimap.InPOH(); ``` @@ -209,7 +209,7 @@ function TRSMinimap.FindRedArrow(): Boolean; overload; Returns true if there's a red arrow on minimap. If a TPointArray is passed as a parameter it will return with the location of the arrow. -### Example +Example: ```pascal Writeln Minimap.FindRedArrow(); ``` @@ -238,7 +238,7 @@ function TRSMinimap.FindYellowArrow(): Boolean; overload; Returns true if there's a yellow arrow on minimap. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. -### Example +Example: ```pascal Writeln Minimap.FindYellowArrow(); ``` @@ -267,7 +267,7 @@ function TRSMainScreen.FindArrow(): Boolean; overload; Returns true if there's a red or yellow arrow on screen. If a TPointArray is passed as a parameter it will return with the location of the arrow. -### Example +Example: ```pascal Writeln MainScreen.FindArrow(); ``` @@ -293,7 +293,7 @@ function TRSMinimap.WaitRedArrow(waitTime: Int32 = 600; interval: Int32 = -1): B Waits **waitTime** for a Red arrow to appear on Minimap. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. -### Example +Example: ```pascal Writeln Minimap.WaitRedArrow(); ``` @@ -323,7 +323,7 @@ function TRSMinimap.WaitYellowArrow(waitTime: Int32 = 600; interval: Int32 = -1) Waits **waitTime** for a yellow arrow to appear on Minimap. If a TPointArray is passed as a parameter it will return with the location of the arrow tip. -### Example +Example: ```pascal Writeln Minimap.WaitYellowArrow(); ``` @@ -353,7 +353,7 @@ function TRSMinimap.WaitArrow(waitTime: Int32 = 600; interval: Int32 = -1): Bool Waits **waitTime** for a yellow or red arrow to appear on Minimap. If a TPointArray is passed as a parameter it will return with the location of the arrow. -### Example +Example: ```pascal Writeln Minimap.WaitArrow(); ``` @@ -381,7 +381,7 @@ function TRSMinimap.HasDotUnder(): Boolean; Checks if the player has a dot under it. This will include all types of ERSMinimapDot. -### Example +Example: ```pascal Writeln Minimap.HasDotUnder(); ``` diff --git a/osr/interfaces/xpdrop.simba b/osr/interfaces/xpdrop.simba index 3d46a806..06bb213a 100644 --- a/osr/interfaces/xpdrop.simba +++ b/osr/interfaces/xpdrop.simba @@ -13,6 +13,7 @@ Methods to interact with the XP Drops. XP_COLORS is the constant holding all possible XPDrop colors. ```pascal XP_COLORS: TIntegerArray = [$FFFFFF, $FFC8C8, $FF00FF, $C8FFC8, $64FF64, $40FFFF, $1F98FF, $C8C8FF]; +``` *) const XP_COLORS: TIntegerArray = [ @@ -38,9 +39,7 @@ type ```pascal procedure TRSXPDrop.Setup; ``` - Setups the XPDrop. - ```{note} This is automatically called on the **XPDrop** variable. ``` @@ -91,7 +90,6 @@ end; ```pascal function TRSXPDrop.IsOpen: Boolean; ``` - Returns true if the XP Drops are on. *) function TRSXPDrop.IsOpen: Boolean; @@ -208,7 +206,7 @@ function TRSXPDrop.FindDrop: Boolean; Returns true if a XPDrop is found. -### Example +Example: ```pascal WriteLn XPDrop.FindDrop; ``` @@ -227,7 +225,7 @@ function TRSXPDrop.WaitDrop: Boolean; Waits **WaitTime** until an XPDrop is found. -### Example +Example: ```pascal WriteLn XPDrop.WaitDrop(1000); ``` diff --git a/osr/mm2ms.simba b/osr/mm2ms.simba index 873aff2b..30869b68 100644 --- a/osr/mm2ms.simba +++ b/osr/mm2ms.simba @@ -103,7 +103,7 @@ procedure TMM2MS.SetupZoom; Wrapper procedure to easily setup MM2MS.ZoomLevel. -### Example +Example: ```pascal MM2MS.SetupZoom; WriteLn MM2MS.ZoomLevel; @@ -188,7 +188,7 @@ function TRSMinimap.PointWithinZoom(tpa: TPointArray): Boolean; overload; Method used to know if a point is within reach of the Zoom rectangle without adjusting the zoom level. Check TRSMinimap.GetZoomRectangle for information on the Zoom rectangle. -### Example +Example: ```pascal WriteLn Minimap.PointWithinZoom([620, 100]); ``` @@ -231,7 +231,7 @@ function TRSMinimap.FacePoint(p: TPoint; randomness: Int32 = 0): Boolean; This method will rotate the camera so that **P** is within the zoom rectangle without adjusting the zoom level. -### Example +Example: ```pascal WriteLn Minimap.FacePoint([620, 100]); //keep in mind this example uses a static point, you will probably never do this. ``` @@ -293,7 +293,7 @@ TODO: THIS NEEDS TO BE REWORKED. IT'S NOT RELIABLE RIGHT NOW. This function gives us a zoom level where **P** would be visible in the MainScreen. -### Example +Example: ```pascal p := Minimap.GetDots(ERSMinimapDot.ITEM)[0]; //find an item dot and returns it's coodinates. Options.SetZoomLevel(Minimap.ZoomToVisiblePoint(p)); @@ -377,7 +377,7 @@ This is perfect to to get an accurate bounding polygon of objects and NPCs which The example below will show you how it could be used to retrieve an accurate player bounding polygon. -### Example +Example: ```pascal P := Minimap.GetDots(ERSMinimapDot.PLAYER)[0]; //find a player dot and returns it's coodinates. offset := [2 , 2]; //Minimap dots are actually returned with a slight offset of -2, -2 when converting them to the mainscreen. @@ -422,7 +422,7 @@ This is perfect to to get an accurate bounding polygon of objects and NPCs which The example below will show you how it could be used to retrieve an accurate player bounding polygon. -### Example +Example: ```pascal P := Minimap.GetDots(ERSMinimapDot.PLAYER)[0]; //find a player dot and returns it's coodinates. offset := [2 , 2]; //Minimap dots are actually returned with a slight offset of -2, -2 when converting them to the mainscreen. @@ -454,7 +454,7 @@ function TRSMinimap.GetTileArrayMS(locArray: TPointArray; tile: Vector3; offset: Gives you an array of rectangles of several tiles and they can be multiple tiles each. For an explanation of parameters check Minimap.GetTileMS. -### Example +Example: ```pascal tpa := Minimap.GetDots(ERSMinimapDot.NPC); //find all npc dots and returns their coodinates. Debug(Minimap.GetTileArrayMS(P, [2, 3, 0])); //This will draw a recangle that is 2 by 3 tiles in the mainscreen where each NPC is. @@ -496,7 +496,7 @@ function TRSMinimap.GetCuboidArrayMSEx(locArray: TPointArray; shapeArray: TRSMai Gives you an array of mainscreen polygons. Read **Minimap.GetCuboidMS** for more information. -### Example +Example: ```pascal tpa := Minimap.GetDots(ERSMinimapDot.Player); //find all player dots and returns their coodinates. Debug(Minimap.GetCuboidArrayMS(tpa, [2, 3, 5], [2, 2])); //This will draw a polygon that is 2 by 3 tiles and height 5 in the mainscreen where each NPC is. @@ -532,7 +532,7 @@ function TRSMinimap.GetCuboidArrayMS(locArray: TPointArray; tile: Vector3; offse Gives you an array of mainscreen polygons. Read **Minimap.GetCuboidMS** for more information. -### Example +Example: ```pascal tpa := Minimap.GetDots(ERSMinimapDot.Player); //find all player dots and returns their coodinates. Debug(Minimap.GetCuboidArrayMS(tpa, [2, 3, 5], [2, 2])); //This will draw a polygon that is 2 by 3 tiles and height 5 in the mainscreen where each NPC is. diff --git a/osr/walker/objects/walkerobjects.simba b/osr/walker/objects/walkerobjects.simba index 8f4e83fb..a24bf6b6 100644 --- a/osr/walker/objects/walkerobjects.simba +++ b/osr/walker/objects/walkerobjects.simba @@ -226,7 +226,7 @@ So you need to set `TRSWalkerObject.Filter.Skip := False` and then call `TRSWalk Normal usage in the following example. -### Example +Example: ```pascal //Example with walker: var @@ -720,7 +720,7 @@ function TRSObject.Find(): Boolean; overload; TRSObject methods used to find a TRSObject. If found returns true, if not returns false. -### Example +Example: ```pascal WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there. Debug(atpa); @@ -775,7 +775,7 @@ function TRSObject.Find(): Boolean; overload; TRSObject methods used to find a TRSObject. If found returns true, if not returns false. -### Example +Example: ```pascal WriteLn RSObjects.GEBank.Find(atpa); //Be in ge and with a walker setup there. Debug(atpa); @@ -809,7 +809,7 @@ procedure TRSObject.Draw(out bitmap: TMufasaBitmap); Internal method used to draw found TRSObjects in a TMufasaBitmap. -### Example +Example: ```pascal Bitmap.FromClient() RSObjects.GEBank.Draw(Bitmap); //Be in ge and with a walker setup there. @@ -846,7 +846,7 @@ procedure TRSObject.SaveDebug(); Saves a debug image of the TRSObject to Simba\Screenshots\RSObjects -### Example +Example: ```pascal RSObjects.GEBank.SaveDebug(); //Be in ge and with a walker setup there. ``` @@ -1069,7 +1069,7 @@ function TRSObject.Hover(attempts: Int32 = 2; trackTarget: Boolean = TRACK_TARGE Method used to hover a TRSObject target if it's found on the mainscreen. It can update the target position while the mouse moves with **trackTarget**. -### Example +Example: ```pascal RSW.WebWalk(WaspWeb.LOCATION_VARROCK); RSObjects.GEBank.Hover(); //Be in GE with a walker setup there. @@ -1099,7 +1099,7 @@ function TRSObject.WalkHover(attempts: Int32 = 2; trackTarget: Boolean = TRACK_T Method used to walk and hover a TRSObject target if it's found on the mainscreen after walking. It can update the target position while the mouse moves with **trackTarget**. -### Example +Example: ```pascal //Be in varrock with a varrock map loaded. RSW.WebWalk(WaspWeb.LOCATION_VARROCK); @@ -1140,7 +1140,7 @@ function TRSObject.Click(leftClick: Boolean = True; attempts: Int32 = 2): Boolea Method used to click a TRSObject target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.Click(); @@ -1160,7 +1160,7 @@ function TRSObject.SelectOption(action: TStringArray; attempts: Int32 = 2): Bool Method used to select an option on a TRSObject target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in ge with a ge map loaded. WriteLn RSObjects.GEBank.SelectOption(['Collect']); @@ -1184,7 +1184,7 @@ function TRSObject.WalkClick(leftClick: Boolean = True; attempts: Int32 = 2): Bo Method used to walk and click a TRSObject target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in ge with a ge map loaded, preferably far away so it has to walk. WriteLn RSObjects.GEBank.WalkClick(); @@ -1203,7 +1203,7 @@ function TRSObject.WalkSelectOption(action: TStringArray; attempts: Int32 = 2): Method used to walk and select an option on a TRSObject target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in ge with a ge map loaded, preferably far away so it has to walk. WriteLn RSObjects.GEBank.WalkSelectOption(['Collect']); @@ -1542,7 +1542,7 @@ function TRSMMDot.Find(): Boolean; overload; TRSMMDot methods used to find a TRSMMDot. If found returns true, if not returns false. -### Example +Example: ```pascal WriteLn RSNPCs.LumbridgeCook.Find(atpa); //Be in lumbridge castle and with a walker setup there. Debug(atpa); @@ -1613,7 +1613,7 @@ procedure TRSMMDot.Draw(out bitmap: TMufasaBitmap); Internal method used to draw found TRSMMDot in a TMufasaBitmap. -### Example +Example: ```pascal Bitmap.FromClient() RSNPCs.LumbridgeCook.Draw(Bitmap); //Be in Lumbridge castle and with a walker setup there. @@ -1680,7 +1680,7 @@ procedure TRSMMDot.SaveDebug(); Saves a debug image of the TRSMMDot to Simba\Screenshots\RSMMDots -### Example +Example: ```pascal RSNPCs.LumbridgeCook.SaveDebug(); //Be in Lumbridge castle and with a walker setup there. ``` @@ -1886,7 +1886,7 @@ Method used to hover a TRSMMDot target if it's found on the mainscreen. It can update the target position as the mouse moves with **trackTarget**. For NPCs that move, this is highly recommended. -### Example +Example: ```pascal //Be in Lumbridge castle RSW.WebWalk(WaspWeb.LOCATION_LUMBRIDGE); @@ -1921,7 +1921,7 @@ Method used to walk and hover a TRSMMDot target if it's found on the mainscreen It can update the target position as the mouse moves with **trackTarget**. For NPCs that move, this is highly recommended. -### Example +Example: ```pascal //Be in Lumbridge castle RSW.WebWalk(WaspWeb.LOCATION_LUMBRIDGE); @@ -1966,7 +1966,7 @@ function TRSMMDot.Click(leftClick: Boolean = True; attempts: Int32 = 2): Boolean Method used to click a TRSMMDot target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in Lumbridge castle with a walker map of it loaded. WriteLn RSNPCs.LumbridgeCook.Click(); @@ -1985,7 +1985,7 @@ function TRSMMDot.SelectOption(action: TStringArray; attempts: Int32 = 2): Boole Method used to select an option on a TRSMMDot target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in Lumbridge castle with a walker map of it loaded. WriteLn RSNPCs.LumbridgeCook.SelectOption(['Examine']); @@ -2009,7 +2009,7 @@ function TRSMMDot.WalkClick(leftClick: Boolean = True; attempts: Int32 = 2): Boo Method used to walk and click a TRSMMDot target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in Lumbridge castle with a walker map of it loaded. WriteLn RSNPCs.LumbridgeCook.WalkClick(); @@ -2028,7 +2028,7 @@ function TRSMMDot.WalkSelectOption(action: TStringArray; attempts: Int32 = 2): B Method used to walk and select an option on a TRSMMDot target if it's found on the mainscreen. -### Example +Example: ```pascal //Be in Lumbridge castle with a walker map of it loaded. WriteLn RSNPCs.LumbridgeCook.WalkSelectOption(['Examine']); @@ -2268,7 +2268,7 @@ procedure Debug(mmdot: TRSMMDot); overload; Methods used to debug TRSObjects and TRSMMDots. -### Example +Example: ```pascal //Run in ge with a walker map setup there. Debug(RSObjects.GEBank); diff --git a/osr/walker/walker.simba b/osr/walker/walker.simba index c292674b..2255f7f1 100644 --- a/osr/walker/walker.simba +++ b/osr/walker/walker.simba @@ -55,7 +55,7 @@ function TRSHeightMap.GetColor(p: TPoint): Int64; Returns the color of the heightmap at the specified point. -### Example +Example: ```pascal WriteLn TRSHeightMap.GetColor([100, 100]); ``` @@ -82,7 +82,7 @@ procedure TRSHeightMap.DebugPosition(p: TPoint); Debug a point in the loaded heightmap. -### Example +Example: ```pascal TRSHeightMap.DebugPosition(RSW.GetMyPos()); ``` @@ -384,7 +384,7 @@ procedure TRSWalker.SetupNamedRegion(region: TRSBankRegion = []); overload; Use this if you want to setup a walker with whatever the user has setup in WLSettings.BankLocation. You can optionally pass in your own **region** but it's really meant to use the default. -### Example +Example: ```pascal WLSettings.BankLocation := EWLBankLocation.CASTLE_WARS_BANK; Walker.SetupNamedRegion(); @@ -413,7 +413,7 @@ Returns the height of the player at the specified coordinate with the help of TR If p is [], which is the default then we will use our current position. global decides wether the coordinate is converted to global coordinates or internal walker coordinates (read about walker regions for more info). -### Example +Example: ```pascal WriteLn rsw.GetHeight(); ``` @@ -447,7 +447,7 @@ procedure TRSWalker.DebugHeightTiles(angle: Double = -1); Displays a debug image of the tiles visible on the mainscreen with their height adjusted according to the TRSHeightMap. This is very useful if you need to adjust TRSHeightMap.MaxHeight. -### Example +Example: ```pascal rsw.DebugHeightTiles(); ``` @@ -505,7 +505,7 @@ function TRSWalker.GetMyPos(out height: Double): TPoint; overload; Overload that also returns the player height. -### Example +Example: ```pascal WriteLn RSW.GetMyPos(height); WriteLn height; @@ -560,7 +560,7 @@ function TRSWalker.GetHeightDiff(p, q: TPoint): Double; overload; Returns the height difference between 2 points. If only one point is passed, the player position is used as one of them. -### Example +Example: ```pascal WriteLn RSW.GetMyPos(RSW.GetMyPos(), [100, 100]); ``` @@ -900,7 +900,7 @@ This is perfect to to get an accurate bounding polygon of objects and NPCs which The example below will show you how it could be used to retrieve an accurate player bounding polygon: -### Example +Example: ```pascal Debug(RSW.GetCuboidMS([100, 100], [1, 1, 4], Offset)); //This will draw a polygon around the coordinate [100, 100]. ``` @@ -1031,7 +1031,7 @@ Gives you an array of mainscreen polygons. Read **Minimap.GetCuboidMS** for more This are TRSWalker methods so they will exist both on TRSWalker and TRSWalker. -### Example +Example: ```pascal TPA := Minimap.GetDots(ERSMinimapDot.Player); //find all player dots and returns their coodinates. Debug(Minimap.GetCuboidArrayMS(TPA, [2, 3, 5], [2, 2])); //This will draw a polygon that is 2 by 3 tiles and height 5 in the mainscreen where each NPC is. @@ -1116,7 +1116,7 @@ To make a polygon or a polygon array easily you can use Simba/Includes/WaspLib/t This are TRSWalker methods so they will exist both on TRSWalker and TRSWalker. -### Example +Example: ```pascal Debug(RSW.GetMMPoly(TPA).Connect()); //This will draw your TPA on the minimap. ``` diff --git a/tools/codetester.simba b/tools/codetester.simba index e0ae7d4d..0fb0e02e 100644 --- a/tools/codetester.simba +++ b/tools/codetester.simba @@ -1,6 +1,5 @@ (* -Tool CodeTester -=============== +# Tool CodeTester Simple tool to benchmark code speed. Add your method or methods to the Benchmark() method or Compare method() and diff --git a/tools/getobject.simba b/tools/getobject.simba index d071c8b1..1e2b3870 100644 --- a/tools/getobject.simba +++ b/tools/getobject.simba @@ -1,6 +1,5 @@ (* -Tool GetObject -============== +# Tool GetObject Tool to gather tile coordinates. Simply hover the tile you want the coordinate of and click with the mouse middle button. You can record several tiles at once into an array by click several tiles in diff --git a/tools/getpos.simba b/tools/getpos.simba index 45ed0663..de9ef787 100644 --- a/tools/getpos.simba +++ b/tools/getpos.simba @@ -1,6 +1,5 @@ (* -Tool GetPos -=========== +# Tool GetPos Simple tool to get the player coordinate. *) diff --git a/tools/map_maker.simba b/tools/map_maker.simba index 2e4725b1..6802f70f 100644 --- a/tools/map_maker.simba +++ b/tools/map_maker.simba @@ -1,6 +1,5 @@ (* -MapMaker -======== +# Tool Map Maker Simple tool to make TBoxes for SRL's RSWalkerRegions or WaspLib's RSRegions. *) diff --git a/tools/monster_maker.simba b/tools/monster_maker.simba index cf15df43..a6f3da57 100644 --- a/tools/monster_maker.simba +++ b/tools/monster_maker.simba @@ -1,7 +1,6 @@ (* -PolygonMaker -======== -Simple tool to make polygons for TRSWalker. +# Tool Monster Maker +Simple tool to help make RSMonsters. *) {$DEFINE SRL_DISABLE_REMOTEINPUT} diff --git a/tools/polygon_maker.simba b/tools/polygon_maker.simba index f29804e7..e3324839 100644 --- a/tools/polygon_maker.simba +++ b/tools/polygon_maker.simba @@ -1,6 +1,5 @@ (* -PolygonMaker -======== +# Tool Polygon Maker Simple tool to make polygons for TRSWalker. *) diff --git a/tools/webber.simba b/tools/webber.simba index 3ba1987a..4268230e 100644 --- a/tools/webber.simba +++ b/tools/webber.simba @@ -1,6 +1,5 @@ (* -Tool Webber -=========== +# Tool Webber SRL webber with WaspLib maps. Run it to launch the tool. This is the tool used to maked TRSWalker WebGraphs. diff --git a/utils/api.simba b/utils/api.simba index 249ba0b9..d591cefb 100644 --- a/utils/api.simba +++ b/utils/api.simba @@ -224,7 +224,7 @@ function APIClient.GetUUID(): String; static; Returns your UUID -### Example +Example: ```pascal WriteLn APIClient.GetUUID(); ``` @@ -341,7 +341,7 @@ This serves no purpose other than giving you a glimpse of what is stored in wasp Try the example below, notice how everytime you run it you will have slightly different results. That's the magic of "salting" passwords. You can read more about it on the wikipedia https://en.wikipedia.org/wiki/Salt_(cryptography). -### Example +Example: ```pascal WriteLn APIClient.HashPassword('helloworld'); WriteLn APIClient.HashPassword(StatsPayload.Password); @@ -366,7 +366,7 @@ function APIClient.CheckPassword(uuid: String; password: String): Boolean; stati Simply returns true/false if the **password** you submit matches what is stored in waspscripts stats database for the specified **uuid**. -### Example +Example: ```pascal WriteLn APIClient.CheckPassword('0.999999999999999', 'helloworld'); WriteLn APIClient.CheckPassword(APIClient.Generateuuid(), APIClient.GeneratePassword()); @@ -398,7 +398,7 @@ That's what this method is for. This will probably be complicated for regular users but an easier way can be figured out in the future. -### Example +Example: ```pascal const PASSWORD: String = 'old_password'; @@ -440,7 +440,7 @@ function APIClient.CheckStats(uuid: string): String; static; Returns the stats of the specified **uuid**. -### Example +Example: ```pascal WriteLn APIClient.CheckStats('0.999999999999999'); WriteLn APIClient.CheckStats(APIClient.Generateuuid()); @@ -463,7 +463,7 @@ function APIClient.SubmitStats(uuid: String): Boolean; static; Method to submit stats to wasp-stats with the help of **StatsPayload**. -### Example +Example: ```pascal StatsPayload.Setup('SCRIPT_ID_HERE', APIClient.GeneratePassword()); StatsPayload.Update(100, 100, 5000); @@ -515,7 +515,7 @@ APIClient.GetScript(script_id: String; verbose: Boolean = False): String; static Retrieves info of the script with the specified **script_id** from https://api.waspscripts.com -### Example +Example: ```pascal APIClient.GetScript('cf0a01e4-8d20-41c2-a78e-3d83081b388d'); ``` @@ -544,7 +544,7 @@ function APIClient.GetScriptRevision(script_id: String; verbose: Boolean = False Retrieves the latest revision number of the script with the specified **script_id** from https://api.waspscripts.com -### Example +Example: ```pascal WriteLn APIClient.GetScriptRevision('cf0a01e4-8d20-41c2-a78e-3d83081b388d'); ``` @@ -572,7 +572,7 @@ function APIClient.GetVersion(pkg: String; verbose: Boolean = False): String; st Retrieves the latest version of the package specified from https://api.waspscripts.com. -### Example +Example: ```pascal WriteLn APIClient.GetVersion('srl-t'); WriteLn APIClient.GetVersion('wasplib'); diff --git a/utils/biometrics.simba b/utils/biometrics.simba index 6deb2824..c18b47c9 100644 --- a/utils/biometrics.simba +++ b/utils/biometrics.simba @@ -15,7 +15,7 @@ function GenerateUUIDV4(): String; Generate a UUID. -### Example +Example: ```pascal WriteLn GenerateUUIDV4(); ``` @@ -156,7 +156,7 @@ function TAntiban.GetBehavior(behavior: EBioBehavior): Int32; Get the value that corresponds to the specified **behavior**. -### Example +Example: ```pascal WriteLn Antiban.GetBehavior(FKEY_CHANCE); ``` @@ -174,7 +174,7 @@ function TAntiban.GetChance(behavior: EBioBehavior): Double; Get a probability from the current biohash that is represented by **behavior**. -### Example +Example: ```pascal WriteLn Antiban.GetChance(FKEY_CHANCE); ``` @@ -196,7 +196,7 @@ There are times you will not want to use BioHash itself because it's value is st Values returned by this range between 0 and 2. So if you are multiplying something by this, your result will be between 0 and 200%. -### Example +Example: ```pascal Wait(Round(3000 * Antiban.GetMultiplier()))); ``` @@ -229,7 +229,7 @@ function TAntiban.GetUniqueNumber(input, min: Double): Double; overload; depreca These generate a unique number based on your **input** and you BioHash. The overloaded methods allow you to use some extra parameters for this to cap the results at a **min** and **max** value. -### Example +Example: ```pascal FoodAmount := Antiban.GetUniqueInt(7, 3, 15); ``` @@ -321,7 +321,7 @@ It will run Antiban.GetUniqueNumber for how many **Iterations** you specify and Useful to know more or less what result to expect from your input. -### Example +Example: ```pascal WriteLn Antiban.GetUniqueAverage(7, 3, 15, 500); ``` @@ -397,7 +397,7 @@ function TAntiban.BioDice(chance: Double): Boolean; overload; Throws a **SRL.Dice** heavily skewed in certain directions depending on your BioHash and the parameters passed in. -### Example +Example: ```pascal UseBankEarly := Antiban.BioDice(); WriteLn UseBankEarly; @@ -440,7 +440,7 @@ procedure TAntiban.SetSleepHour(); Sets WLSettings.Sleep.Hour based on the current BioHash. WLSettings.Sleep.HourOverride will override this. -### Example +Example: ```pascal Antiban.SetSleepHour(); WriteLn WLSettings.Sleep.Hour; @@ -473,7 +473,7 @@ procedure TAntiban.SetSleepLength(); Sets WLSettings.Sleep.Length based on the current BioHash. WLSettings.Sleep.LengthOverride will override this. -### Example +Example: ```pascal Antiban.SetSleepLength(); WriteLn WLSettings.Sleep.Length; @@ -501,7 +501,7 @@ Wait() but skewed with BioHash. This is a simple function. It just multiplies **time**/**min**/**max** by BioHash and calls Wait() with them. Might need further improvement in the future. -### Example +Example: ```pascal Inventory.Open() BioWait(4000); @@ -527,7 +527,7 @@ procedure TAntiban.BioWait(min, max: UInt32; weight: EWaitDir = wdMean); overloa Wait() but skewed with BioHash. -### Example +Example: ```pascal Inventory.Open() Antiban.Wait(4000); @@ -552,7 +552,7 @@ procedure TAntiban.Click(button: Int32; min: Int32 = 1, max: Int32 = 3); Mouse.Click() with a BioHashed probability of spam clicking between 0. -### Example +Example: ```pascal Inventory.HoverSlot(5); Antiban.Click(MOUSE_LEFT); diff --git a/utils/cacheparser.simba b/utils/cacheparser.simba index 0133a404..2c2ce467 100644 --- a/utils/cacheparser.simba +++ b/utils/cacheparser.simba @@ -20,16 +20,15 @@ For more information check this file: https://github.com/open-osrs/runelite/blob {$ENDIF} (* -## RSCacheParser +## type RSCacheParser ```pascal type RSCacheParser = record(TSRLBaseRecord) class var -Disabled: Boolean; -Directory: String; -Preferences: String; -Preferences2: String; + Disabled: Boolean; + Directory: String; + Preferences: String; + Preferences2: String; end; ``` - Type responsible for handling osrs cache parsing. *) type RSCacheParser = record(TSRLBaseRecord) class var @@ -153,7 +152,7 @@ function RSCacheParser.GetHexString(prefNumber: Int32 = 1): String; static; Print the cache files as a hex string. -### Example +Example: ```pascal WriteLn RSCacheParser.GetHexString(1); ``` @@ -192,7 +191,7 @@ procedure RSCacheParser.Print(prefNumber: Int32 = 0); static; Print the cache files as strings. This is only useful for debugging purposes. -### Example +Example: ```pascal RSCacheParser.Print(); ``` @@ -219,7 +218,7 @@ function RSCacheParser.GetOptionsAmount(): Int32; static; Returns the number of options saved in the cache. This is not very useful, AFAIK there's only 2 possible values for this: 0 and 10. 0 is only if you haven't accepted the EULA in the client. -### Example +Example: ```pascal WriteLn RSCacheParser.GetOptionsAmount(); ``` @@ -240,7 +239,7 @@ function RSCacheParser.RoofsHidden(): Boolean; static; Checks if the roofs are hidden. -### Example +Example: ```pascal WriteLn RSCacheParser.RoofsHidden(); ``` @@ -260,7 +259,7 @@ function RSCacheParser.TitleMusicDisabled(): Boolean; static; Checks if the music is enabled in the login screen. -### Example +Example: ```pascal WriteLn RSCacheParser.TitleMusicDisabled(); ``` @@ -280,7 +279,7 @@ function RSCacheParser.WindowMode(): Int32; static; Returns 1 for fixed mode and 2 for resizable mode. Resizable modern and resizable classic make no difference here. -### Example +Example: ```pascal WriteLn RSCacheParser.WindowMode(); ``` @@ -301,7 +300,7 @@ function RSCacheParser.GetAuthenticatorAmount(): Int32; static; Returns the number of authenticators saved for the next 30 days. If this is more than 0, you will have 8 bytes for each of the saved authenticators. This is important to know so we know where the saved username starts if we have saved authenticators. -### Example +Example: ```pascal WriteLn RSCacheParser.GetAuthenticatorAmount(); ``` @@ -321,7 +320,7 @@ function RSCacheParser.GetAuthenticators(): TStringArray; static; Returns each authenticator saved in a TStringArray. Each string is 8 bytes like mentioned in RSCacheParser.GetAuthenticatorAmount() documentation. -### Example +Example: ```pascal WriteLn RSCacheParser.GetAuthenticators(); ``` @@ -370,7 +369,7 @@ function RSCacheParser.GetUsername(): String; static; Returns the saved username in the osrs cache. This is the username you clicked to save on the client when logging in. -### Example +Example: ```pascal WriteLn RSCacheParser.GetUsername(); ``` @@ -415,7 +414,7 @@ function RSCacheParser.HideUsername(): Boolean; static; Returns true or false if we have the username hidden. -### Example +Example: ```pascal WriteLn RSCacheParser.HideUsername(); ``` @@ -433,7 +432,7 @@ function RSCacheParser.Brightness(): Int32; static; Returns the brightness value converted to a 0-100 value. -### Example +Example: ```pascal WriteLn RSCacheParser.Brightness(); ``` @@ -455,7 +454,7 @@ function RSCacheParser.MusicVolume(): Int32; static; Returns the music volume value converted to a 0-100 value. -### Example +Example: ```pascal WriteLn RSCacheParser.MusicVolume(); ``` @@ -477,7 +476,7 @@ function RSCacheParser.SoundEffectsVolume(): Int32; static; Returns the sound effects volume value converted to a 0-100 value. -### Example +Example: ```pascal WriteLn RSCacheParser.SoundEffectsVolume(); ``` @@ -499,7 +498,7 @@ function RSCacheParser.AreaSoundVolume(): Int32; static; Returns the area sound volume value converted to a 0-100 value. -### Example +Example: ```pascal WriteLn RSCacheParser.AreaSoundVolume(); ``` @@ -521,7 +520,7 @@ function RSCacheParser.Field1247(): Int32; static; I have absolutely no idea what this is. It's supposedly something, but AFAIK it's always 0. -### Example +Example: ```pascal WriteLn RSCacheParser.Field1247(); ``` @@ -544,7 +543,7 @@ function RSCacheParser.DisplayFPS(): Boolean; static; Returns true/false if we have Display FPS enabled. Display FPS can be enabled by typing ::displayfps in game. -### Example +Example: ```pascal WriteLn RSCacheParser.DisplayFPS(); ``` @@ -566,7 +565,7 @@ function RSCacheParser.Field1238(): Int32; static; I have absolutely no idea what this is. It's supposedly something, but AFAIK it's always 0. -### Example +Example: ```pascal WriteLn RSCacheParser.Field1238(); ``` diff --git a/utils/color.simba b/utils/color.simba index a999ddb0..ee97901e 100644 --- a/utils/color.simba +++ b/utils/color.simba @@ -15,7 +15,7 @@ Type that holds a large amount of color wrappers so you don't have to memorize t Some colors are duplicated. They are kept for easy name access. -### Example +Example: ```pascal WriteLn SRLColors.BLACK; WriteLn SRLColors.ORANGE; @@ -133,7 +133,7 @@ Converts an RGB color to BGR. credits go to slacky. ``` -### Example +Example: ```pascal WriteLn RGB2BGR($00FFAA); ``` diff --git a/utils/data/data.simba b/utils/data/data.simba index e8931f02..c4ed1939 100644 --- a/utils/data/data.simba +++ b/utils/data/data.simba @@ -30,20 +30,20 @@ Can be changed to use a different items data json as long as it has follows OSRS (* ## type ItemData ```pascal -type ItemData = record(TSRLBaseRecord) class var -ItemNames: TStringList; -PriceData: TJSONObject; -OSRSBoxData: TJSONObject; -ReloadTimer: TCountDown; -PriceIsSetup: Boolean; -OSRSBoxIsSetup: Boolean; -PricesDisconnected: Boolean; -OSRSBoxDisconnected: Boolean; -class const -DATA_PATH: String = WL_DATAPATH + 'cache' + DIRECTORYSEPARATOR + 'items' + DIRECTORYSEPARATOR + ITEM_DATA_VERSION + DIRECTORYSEPARATOR; -end; +type + ItemData = record(TSRLBaseRecord) class var + ItemNames: TStringList; + PriceData: TJSONObject; + OSRSBoxData: TJSONObject; + ReloadTimer: TCountDown; + PriceIsSetup: Boolean; + OSRSBoxIsSetup: Boolean; + PricesDisconnected: Boolean; + OSRSBoxDisconnected: Boolean; + class const + DATA_PATH: String = WL_DATAPATH + 'cache' + DIRECTORYSEPARATOR + 'items' + DIRECTORYSEPARATOR + ITEM_DATA_VERSION + DIRECTORYSEPARATOR; + end; ``` - Static ItemData type, responsible to handle anything that is related to item data. *) type ItemData = record(TSRLBaseRecord) class var @@ -268,7 +268,7 @@ function ItemData.GetPriceInt(Item: TRSItem; Key: String): Int32; Wrapper method used to fetch ints from ItemData.GetPrice(). To use this you should be familar with the structure of the JSONObject ItemData.GetPrice() returns. -### Example +Example: ```pascal WriteLn ItemData.GetPriceInt('Abyssal whip', 'low'); // will print the low price of abyssal whip. WriteLn ItemData.GetPriceInt('Abyssal whip', 'high'); // will print the high price of abyssal whip. @@ -291,7 +291,7 @@ function ItemData.GetAverage(Item: TRSItem): Int32; Method used to get the average price of **Item**. -### Example +Example: ```pascal WriteLn ItemData.GetAverage('Abyssal whip'); ``` @@ -329,7 +329,7 @@ function ItemData.GetOSRSBoxInt(Item: TRSItem; Key: String): Int32; Wrapper method used to get the integer values of the OSRSBox item json. To use it, knowledge about the file structure is required. -### Example +Example: ```pascal WriteLn ItemData.GetOSRSBoxInt('Abyssal whip', 'highalch'); //will print high alch value for the abyssal whip. ``` @@ -365,7 +365,7 @@ function ItemData.GetOSRSBoxBoolean(Item: TRSItem; Key: String): Boolean; Wrapper method used to get the boolean values of the OSRSBox item json. To use it, knowledge about the file structure is required. -### Example +Example: ```pascal WriteLn ItemData.GetOSRSBoxBoolean('Abyssal whip', 'tradeable_on_ge'); ``` @@ -394,7 +394,7 @@ function ItemData.GetHighAlch(Item: TRSItem): Int32; Method used to get the the high alchemy value of an item. -### Example +Example: ```pascal WriteLn ItemData.GetHighAlch('Magic longbow'); ``` @@ -419,7 +419,7 @@ Method used to get the the high alchemy profit of an item. HighAlchProfit = HighAlchValue - ItemAveragePrice - NatureRuneAveragePrice ``` -### Example +Example: ```pascal WriteLn ItemData.GetHighAlchProfit('Magic longbow'); ``` @@ -438,14 +438,13 @@ end; ```pascal function ItemData.GetLowAlchProfit(Item: TRSItem): Int32; ``` - Method used to get the the low alchemy profit of an item. ```{note} LowAlchProfit = LowAlchValue - ItemAveragePrice - NatureRuneAveragePrice ``` -### Example +Example: ```pascal WriteLn ItemData.GetLowAlchProfit('Magic longbow'); ``` @@ -462,25 +461,25 @@ end; type (* ## type ERSAttackType - +```pascal +ERSAttackType = (MELEE_ATTACK_TYPE, RANGED_ATTACK_TYPE, MAGIC_ATTACK_TYPE, TYPELESS_ATTACK_TYPE); +``` Enum of Attack types in game. Can be used to know what to pray for example. *) - ERSAttackType = ( - MELEE_ATTACK_TYPE, RANGED_ATTACK_TYPE, MAGIC_ATTACK_TYPE, TYPELESS_ATTACK_TYPE - ); + ERSAttackType = (MELEE_ATTACK_TYPE, RANGED_ATTACK_TYPE, MAGIC_ATTACK_TYPE, TYPELESS_ATTACK_TYPE); (* ## type TRSMonsterDrop ```pascal type -TRSMonsterDrop = record -Item: String; -ID: String; -Stackable: Boolean; -Noted: Boolean; -Quantity: Int32; -end; -TRSMonsterDropArray = array of TRSMonsterDrop; + TRSMonsterDrop = record + Item: String; + ID: String; + Stackable: Boolean; + Noted: Boolean; + Quantity: Int32; + end; + TRSMonsterDropArray = array of TRSMonsterDrop; ``` Helper record to handle monster drops. Has several variable that hold information about monster @@ -558,7 +557,7 @@ end; MONSTERS_ZIP: String = {$macro CURRENT_DIRECTORY} + '/monsters.zip'; DATA_PATH: String = WL_DATAPATH + 'cache' + DIRECTORYSEPARATOR + 'monsters' + DIRECTORYSEPARATOR + MONSTER_DATA_VERSION + DIRECTORYSEPARATOR; end; - +``` Static MonsterData type, responsible to handle anything that is related to monsters data. *) type MonsterData = record(TSRLBaseRecord) class var @@ -576,7 +575,6 @@ Static MonsterData type, responsible to handle anything that is related to monst ```pascal procedure MonsterData.Setup(); ``` - Internal method to setup the MonsterData record. *) procedure MonsterData.Setup(); static; @@ -597,8 +595,6 @@ begin MonsterData.IsSetup := True; end; - - function MonsterData.GetIDs(monster: String): TStringArray; static; type TStringList = TStringList; @@ -661,14 +657,13 @@ end; ```pascal function MonsterData.GetInt(Monster, Key: String): Int32; ``` - Wrapper method to get integer data from from monsters.json. ```{note} Using this requires you to know the structure of the monster.json file. ``` -### Example +Example: ```pascal WriteLn MonsterData.GetInt('Cow', 'hitpoints'); //This will print 8. ``` @@ -686,14 +681,13 @@ end; ```pascal function MonsterData.GetString(Monster, Key: String): String; ``` - Wrapper method to get string data from monsters.json. ```{note} Using this requires you to know the structure of the monster.json file. ``` -### Example +Example: ```pascal WriteLn MonsterData.GetString('Cow', 'drops'); ``` @@ -711,10 +705,9 @@ end; ```pascal function MonsterData.IsAgressive(Monster): String; ``` - Method to get information on wether a monster is aggressive or not. -### Example +Example: ```pascal WriteLn MonsterData.IsAgressive('Cow'); //Will print False. ``` @@ -732,7 +725,6 @@ end; ```pascal function MonsterData.GetJSONArray(Monster, Key: String): TJSONArray; ``` - Internal method to get a TJSONArray value from monsters.json. *) function MonsterData.GetJSONArray(monster, Key: String): TJSONArray; static; @@ -748,7 +740,6 @@ end; ```pascal function MonsterData.GetJSONObject(Monster, Key: String): TJSONObject; ``` - Internal method to get a TJSONObject value from monsters.json. *) function MonsterData.GetJSONObject(monster, Key: String): TJSONObject; static; @@ -764,7 +755,6 @@ end; ```pascal function MonsterData.GetAttackTypes(Monster: String): array of ERSAttackType; ``` - Method used to get an array of ERSAttackType used by the specified monster. *) function MonsterData.GetAttackTypes(monster: String): array of ERSAttackType; static; @@ -788,7 +778,6 @@ end; ```pascal function MonsterData.GetDrop(DropJSON: TJSONObject): TRSMonsterDrop; ``` - Method to convert a monster json object to a TRSMonsterDrop. *) function MonsterData.GetDrop(dropJSON: TJSONObject): TRSMonsterDrop; static; @@ -813,10 +802,9 @@ end; ```pascal function MonsterData.GetDrops(Monster: String): TRSMonsterDropArray; ``` - Method to return all monster drops as an array of TRSMonsterDrop. -### Example +Example: ```pascal WriteLn MonsterData.GetDrops('Abyssal demon'); //prints all monster drops. ``` @@ -850,10 +838,10 @@ end; ## type TWeaponData ```pascal type -TWeaponData = record -Data: TJSONObject; -IsSetup: Boolean; -end; + TWeaponData = record + Data: TJSONObject; + IsSetup: Boolean; + end; ``` Type responsible of handling anything that is related to weapons data. @@ -890,14 +878,13 @@ end; ```pascal function TWeaponData.GetInt(weapon, key: String): Int32; ``` - Method to fetch integer data from weapons.json. ```{note} Using this requires knowledge of the structure of weapons.json ``` -### Example +Example: ```pascal WriteLn TWeaponData.GetInt('Abyssal whip', 'special_attack'); //This will print 50. ``` @@ -913,10 +900,9 @@ end; ```pascal function TWeaponData.GetAttackType(weapon: String): ERSAttackType; ``` - Returns the ERSAttackType of the weapon specified. -### Example +Example: ```pascal WriteLn TWeaponData.GetAttackType('Abyssal whip'); //This will print MELEE_ATTACK_TYPE. ``` @@ -936,10 +922,9 @@ end; ```pascal function TWeaponData.IsTwoHanded(weapon: String): Boolean; ``` - Returns wether the weapon is two-handed or not. -### Example +Example: ```pascal WriteLn TWeaponData.IsTwoHanded('Abyssal whip'); //This will print false. ``` @@ -955,7 +940,6 @@ end; ```pascal function TWeaponData.GetRequirementsJSON(weapon: String): TJSONObject; ``` - Returns a TJSONObject of the level requirements for the weapon. *) function TWeaponData.GetRequirementsJSON(weapon: String): TJSONObject; @@ -978,7 +962,6 @@ type ```pascal procedure TRSObjectData.Setup(); ``` - Internal method to setup the TRSObjectData record. *) procedure TRSObjectData.Setup(); @@ -998,7 +981,6 @@ end; ```pascal function TRSObjectData.GetJSONObject(Monster, Key: String): TJSONObject; ``` - Internal method to get a TJSONObject value from monsters.json. *) function TRSObjectData.GetObject(RSObject: String): TJSONObject; diff --git a/utils/forms/scriptform.simba b/utils/forms/scriptform.simba index 77957b6a..afbbf14e 100644 --- a/utils/forms/scriptform.simba +++ b/utils/forms/scriptform.simba @@ -71,7 +71,7 @@ Internal method used to rewrite the credentials.simba file. This will use whatever is stored at the moment in **Login.Players** array and replace Simba/credentials.simba with it written in the appropiate format. -### Example +Example: ```pascal begin Login.AddPlayer('USERNAME1', 'PASSWORD1', 'PIN1', []); //[] is an array of world numbers. @@ -163,7 +163,7 @@ Your tab will also be added to **TScriptForm.Tabs** as the last element of the a This example as a very simple setup of a TScriptForm with one tab: -### Example +Example: ```pascal procedure TMyScriptForm.Run(); override; var @@ -264,7 +264,7 @@ function TScriptForm.GetTab(caption: String; ignoreCase: Boolean = False): TTabS Returns a tab based on index or caption. -### Example +Example: ```pascal MyForm.AddTab('Hello wolrd'); tab := MyForm.GetTab('Hello world'); @@ -343,7 +343,7 @@ All of this are quite complex but have all their own methods self contained and Very basic example of a full TScriptForm setup: -### Example +Example: ```pascal {$I SRL-T/osr.simba} {$I WaspLib/osr.simba} @@ -2024,7 +2024,7 @@ Overriding this will require you to use **inherited** on your override. Overriding this is also my recommended way of setting up your script variables like the following example: -### Example +Example: ```pascal procedure TScriptForm.StartScript(sender: TObject); override; begin @@ -2105,7 +2105,7 @@ procedure TScriptForm.Show(); Shows your TScriptForm after it has been setup. To run this you have to use **Sync()** -### Example +Example: ```pascal Sync(@MyForm.Show); ``` diff --git a/utils/geometry/tpointarray.simba b/utils/geometry/tpointarray.simba index ee9e3ae9..ea201628 100644 --- a/utils/geometry/tpointarray.simba +++ b/utils/geometry/tpointarray.simba @@ -45,7 +45,7 @@ function TPointArray.ToString(): String; Prints the TPointArray in a way that can be copy pasted into and used by Simba. -### Example +Example: ```pascal tpa := [[1,1], [2,2], [3,3]]; WriteLn tpa.ToString(); @@ -105,7 +105,7 @@ function T2DPointArray.Connect(): T2DPointArray; Connects each TPointArray in a T2DPointArray. Useful for debugging visually. -### Example +Example: ```pascal Debug(atpa.Connect()); ``` diff --git a/utils/input/mousezoom.simba b/utils/input/mousezoom.simba index b3f94d01..b20cce91 100644 --- a/utils/input/mousezoom.simba +++ b/utils/input/mousezoom.simba @@ -33,7 +33,7 @@ function TRSMouseZoom.GetNext(value: Int32; amount: Int32 = 1; down: Boolean = T Returns the next zoom level given your current one (value) and the direction you will be spinning the mouse wheel. You can optionally specify the number of scrolls you plan on doing via **amount**. -### Example +Example: ```pascal WriteLn('Current zoom value: ', value); WriteLn('Next value on scroll up: ', RSMouseZoom.GetNext(value, False)); @@ -74,7 +74,7 @@ function TRSMouseZoom.Level2Slider(value: Int32 = -1): Int32; As the name implies, this method is used to convert RSMouseZoom.ZoomLevel to MM2MS zoom slider levels (0..768 to 0..100). -### Example +Example: ```pascal WriteLn RSMouseZoom.Level2Slider(384); //should print 50. ``` @@ -120,7 +120,7 @@ To understand why first you need to understand a few concepts: Having understood that, you can now understand why it is not 100% accurate. If each slider level has 8 rsmousezoom levels in it, it's impossible to make it 100% accurate. -### Example +Example: ```pascal WriteLn RSMouseZoom.Slider2Level(50); //should print 384. ``` @@ -159,7 +159,7 @@ Performs a mouse scroll in the direction specified and updates RSMouseZoom.ZoomL The scroll direction can be specified either with a boolean or with a positive/negative amount of scrolls, scroll up being positive. You can also otpionally tell it to move the mouse to the mainscreen before scrolling. -### Example +Example: ```pascal RSMouseZoom.Scroll(5, True); ``` @@ -209,7 +209,7 @@ procedure TRSMouseZoom.MaxZoom(down: Boolean = True); Maxes the zoom limit in the direction you specified. -### Example +Example: ```pascal RSMouseZoom.MaxZoom(True); //will zoom out to the limit. ``` @@ -234,7 +234,7 @@ procedure TRSMouseZoom.MaxZoomBlind(down: Boolean = True); Maxes the zoom limit without knowing the current zoom level. This can be used to figure out the current zoom level if we don't know it yes. -### Example +Example: ```pascal RSMouseZoom.MaxZoomBlind(True); //will zoom out to the limit. ``` @@ -264,7 +264,7 @@ This method is pre-declared to be used by other methods that require it but it's Anyway, this simply returns RSMouseZoom.ZoomLevel if it is already set, if it's not set, it will attempt to set it up. -### Example +Example: ```pascal WriteLn RSMouseZoom.GetZoomLevel(); ``` @@ -306,7 +306,7 @@ Set the specified zoom level. This assumes slider levels (so 0..100 range). This will often miss the target by a couple of zoom levels due to how zooming with the mouse wheel works. Assuming we end up within 4 zoom levels of the target level, it's assumed successful. -### Example +Example: ```pascal RSMouseZoom.SetZoomLevel(75); //will attempt to zoom in/out until you are within 4 levels of 75. ``` @@ -357,7 +357,7 @@ should always be in sync. Be warned that you should never use this on an account you care! It can definitly get you banned! ``` -### Example +Example: ```pascal RSMouseZoom.RunStressTest(39999); //will perform 40000 zoom in/outs randomly. ``` @@ -442,7 +442,7 @@ procedure TRSMouseZoom.DrawGraph(); Draw a simple graph of the RSMouseZoom data. -### Example +Example: ```pascal RSMouseZoom.DrawGraph(); ``` diff --git a/utils/items/consumables.simba b/utils/items/consumables.simba index f3db92c8..73e5c855 100644 --- a/utils/items/consumables.simba +++ b/utils/items/consumables.simba @@ -80,7 +80,7 @@ CONSUMABLE_ARRAYS: array [ERSConsumable] of TRSItemArray = [FOOD_ARRAY, PRAYER_A Global array of all consumables. One can access a consumable array type easiely like so: -### Example +Example: ```pascal WriteLn CONSUMABLE_ARRAYS[ERSConsumable.ENERGY]; ``` diff --git a/utils/items/items.simba b/utils/items/items.simba index 48c654f7..ecbd00f3 100644 --- a/utils/items/items.simba +++ b/utils/items/items.simba @@ -83,7 +83,7 @@ function TRSItem.GetPortion(): Int32; Get the portion number of one specific Item. -### Example +Example: ```pascal Item := 'Saradomin brew(4)'; @@ -110,7 +110,7 @@ function TRSItem.GetArray(): TRSItemArray; Used to retrieve an item array of our multi dose/portion item. -### Example +Example: ```pascal var Item: TRSItem; @@ -154,7 +154,7 @@ function TRSItem.GetSingle(Lo: Boolean = True): TRSItem; Used to retrieve the lowest or highest dose of our multi dose/portion item. -### Example +Example: ```pascal var Item: TRSItem; diff --git a/utils/math.simba b/utils/math.simba index 0373e72d..56802357 100644 --- a/utils/math.simba +++ b/utils/math.simba @@ -16,7 +16,7 @@ function Double.GetDigit(n: Int32): Int32; Get the digit at the **n** place of the Double. -### Example +Example: ```pascal var BioHash := 0.0123456789; @@ -39,7 +39,7 @@ function NumberPerHour(n: Double): Int32; overload; Calculate how many **n** per hour. You can optionally specify the amount of **time** to use in the calculation. -### Example +Example: ```pascal WriteLn NumberPerHour(10000, 2 * ONE_HOUR); //will print 5000. ``` diff --git a/utils/recorder/recorder.simba b/utils/recorder/recorder.simba index a197cf24..81da1790 100644 --- a/utils/recorder/recorder.simba +++ b/utils/recorder/recorder.simba @@ -23,6 +23,7 @@ type Recorder = record(TSRLBaseRecord) class var PID: Integer; Debugging: Boolean; end; +``` *) type TRecorder = record