Skip to content

Commit

Permalink
docs: several fixes to things that were causing parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Feb 6, 2024
1 parent 45f3c30 commit 33ea792
Show file tree
Hide file tree
Showing 42 changed files with 316 additions and 348 deletions.
16 changes: 8 additions & 8 deletions optional/handlers/consumablehandler.simba
Original file line number Diff line number Diff line change
Expand Up @@ -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');
```
Expand Down Expand Up @@ -345,7 +345,7 @@ function TRSInventory.Consume(consumableType: ERSConsumable): Boolean; overload;

Methods used to consume consumables.

### Example
Example:
```pascal
Inventory.Consume(ERSConsumable.FOOD);
```
Expand Down Expand Up @@ -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);
```
Expand All @@ -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);
```
Expand All @@ -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.
```
Expand Down Expand Up @@ -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);
Expand All @@ -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);
```
Expand Down Expand Up @@ -683,7 +683,7 @@ function TRSBank.WithdrawConsumable(consumableType: ERSConsumable): Boolean;

Method used to withdraw a consumable type.

### Example
Example:
```pascal
FoodHandler.MinInvPoints := 100;

Expand Down
18 changes: 9 additions & 9 deletions optional/handlers/rsfishinghandler.simba
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function TRSFishingHandler.GetMMShoreLine(): TPointArray;

Get the shore lines on the minimap.

### Example
Example:
```pascal
ShowOnClient(TRSFishingHandler.GetMMShoreLine());
```
Expand Down Expand Up @@ -215,7 +215,7 @@ function TRSFishingHandler.GetMSShoreLine(): TPointArray;

Get the shore lines on the mainscreen.

### Example
Example:
```pascal
ShowOnClient(TRSFishingHandler.GetMSShoreLine());
```
Expand Down Expand Up @@ -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);
```
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -457,7 +457,7 @@ function TRSFishingHandler.SpotMoved(): Boolean; overload;

Check if TRSFishingHandler.CurrentSpot moved.

### Example
Example:
```pascal
WriteLn TRSFishingHandler.SpotMoved();
```
Expand Down Expand Up @@ -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();
```
Expand Down Expand Up @@ -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();
```
Expand All @@ -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();
```
Expand Down
7 changes: 4 additions & 3 deletions optional/interfaces/mainscreen/anvil.simba
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(*
# Anvil
Anvil interface.
*)

{$DEFINE WL_ANVIL_INCLUDED}
Expand Down Expand Up @@ -28,7 +29,7 @@ function TRSAnvil.GetSlots: TBoxArray;

Returns the all available anvil slots.

### Example
Example:
```pascal
Debug(Anvil.GetSlots());
```
Expand Down Expand Up @@ -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();
```
Expand Down Expand Up @@ -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;
```
Expand Down
14 changes: 7 additions & 7 deletions optional/interfaces/mainscreen/craftscreen.simba
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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');
Expand All @@ -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');
Expand All @@ -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);
```
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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...');
Expand Down
12 changes: 8 additions & 4 deletions optional/interfaces/mainscreen/driftnet.simba
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
(*
# DriftNet
DriftNet interface by Reldnahc.
*)
{$DEFINE RELD_DRIFTNET_INCLUDED}
{$IFNDEF WL_OSR}
{$I WaspLib/osr.simba}
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Loading

0 comments on commit 33ea792

Please sign in to comment.