From f6239aa0080278f745661b120fc1cd433d301d7a Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 13 Nov 2016 17:11:19 +0100 Subject: [PATCH 1/3] Update backpack.simba --- lib/interfaces/gametabs/backpack.simba | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lib/interfaces/gametabs/backpack.simba b/lib/interfaces/gametabs/backpack.simba index 5d3f00d..55b5133 100644 --- a/lib/interfaces/gametabs/backpack.simba +++ b/lib/interfaces/gametabs/backpack.simba @@ -656,6 +656,47 @@ begin mouseBox(self.getSlotBox(slot), mouseAction); end; +(* +mouseSlot +--------- + +.. code-block:: pascal + + function TRSTabBackpack.mouseSlot(slot, waitTime, mouseAction: integer = MOUSE_MOVE; upText: TStringArray): boolean; overload; + +Overload function, additional parameters **waitTime** and **upText**. +Returns true if it finds the correct **upText** at the desired backpack **slot**. +The **upText** parameter is a TStringArray, and uses both the text in top left +corner or the mouseOver popup, while the **waitTime** parameter is used to wait +after the **mouseAction** + +.. note:: + + - by Thomas + - Last Updated: 13 November 2016 by Thomas + +Example: + +.. code-block:: pascal + + if tabBackpack.mouseSlot(1, randomRange(100, 200), MOUSE_LEFT, ['Dragon bones', 'Big bones']) then + writeln('We clicked the bones in Backpack slot 1'); + +*) + +function TRSTabBackpack.mouseSlot(slot, waitTime, mouseAction: integer = MOUSE_MOVE; upText: TStringArray): boolean; overload; +begin + if (not self.open()) or (not self.isSlotValid(slot)) then + exit(false); + + mouseBox(self.getSlotBox(slot), MOUSE_MOVE); + result := (isUpText(upText) or isMouseOverText(upText)); + + if result then + mouseBox(self.getSlotBox(slot), mouseAction); + wait(waitTime); +end; + (* isSlotActivated --------------- From 70a1286210019a9cc80dce4bbd0ee29ebc21893c Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 19 Nov 2016 15:33:00 +0100 Subject: [PATCH 2/3] Update backpack.simba --- lib/interfaces/gametabs/backpack.simba | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/interfaces/gametabs/backpack.simba b/lib/interfaces/gametabs/backpack.simba index 55b5133..e26f0bf 100644 --- a/lib/interfaces/gametabs/backpack.simba +++ b/lib/interfaces/gametabs/backpack.simba @@ -647,7 +647,7 @@ Example: writeln('We moved the mouse to Backpack slot 1'); *) -function TRSTabBackpack.mouseSlot(slot, mouseAction: integer = MOUSE_MOVE): boolean; +function TRSTabBackpack.mouseSlot(slot: integer; mouseAction: integer = MOUSE_MOVE): boolean; begin if (not self.open()) or (not self.isSlotValid(slot)) then exit(false); @@ -662,7 +662,7 @@ mouseSlot .. code-block:: pascal - function TRSTabBackpack.mouseSlot(slot, waitTime, mouseAction: integer = MOUSE_MOVE; upText: TStringArray): boolean; overload; + function TRSTabBackpack.mouseSlot(slot, waitTime: integer; mouseAction: integer = MOUSE_MOVE; uptext: TStringArray): boolean; overload; Overload function, additional parameters **waitTime** and **upText**. Returns true if it finds the correct **upText** at the desired backpack **slot**. From b38f46a1ea9d0de5de1d168caeb3f4093fed2946 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 18 Mar 2017 15:51:35 +0100 Subject: [PATCH 3/3] Update backpack.simba --- lib/interfaces/gametabs/backpack.simba | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/interfaces/gametabs/backpack.simba b/lib/interfaces/gametabs/backpack.simba index e26f0bf..be52768 100644 --- a/lib/interfaces/gametabs/backpack.simba +++ b/lib/interfaces/gametabs/backpack.simba @@ -684,7 +684,7 @@ Example: *) -function TRSTabBackpack.mouseSlot(slot, waitTime, mouseAction: integer = MOUSE_MOVE; upText: TStringArray): boolean; overload; +function TRSTabBackpack.mouseSlot(slot, waitTime: integer; mouseAction: integer = MOUSE_MOVE; upText: TStringArray): boolean; overload; begin if (not self.open()) or (not self.isSlotValid(slot)) then exit(false);