Skip to content

Commit

Permalink
Add: minimap.clickCompass() face south functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTS committed Mar 12, 2015
1 parent 21b1218 commit eb022dd
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions lib/interfaces/minimap.simba
Expand Up @@ -591,36 +591,33 @@ to low, and the minimap compass angle set to north.
.. note::

- by Olly
- Last Modified: 10th October 2014 by Justin
- Last Modified: 12th March 2015 by The Mayor

Example:

.. code-block:: pascal

minimap.clickCompass();
*)
procedure TRSMinimap.clickCompass();
procedure TRSMinimap.clickCompass(faceSouth: boolean = false);
begin
mouseCircle(self.button[MM_BUTTON_COMPASS].center.x, self.button[MM_BUTTON_COMPASS].center.y,
self.button[MM_BUTTON_COMPASS].radius, MOUSE_MOVE);

if (random(4) = 2) then
if faceSouth or (random(4) = 2) then
begin
fastClick(MOUSE_RIGHT);
if (not chooseOption.select(['Face North', 'ace N', 'Face NoMh', 'orth'], 500)) then
begin
chooseOption.close(); //Move the mouse away to close the chooseOption dropdown
mouseCircle(self.button[MM_BUTTON_COMPASS].center.x, self.button[MM_BUTTON_COMPASS].center.y,
self.button[MM_BUTTON_COMPASS].radius, MOUSE_MOVE); //Move the mouse back to the compass
fastClick(MOUSE_LEFT); // failsafe
end;
wait(random(100, 200));

case faceSouth of
true: chooseOption.select(['Face So']);
false: chooseOption.select(['Face No']);
end;
end else
fastClick(MOUSE_LEFT);

self.mouseOffCompass();

wait(150 + random(300));

print('TRSMinimap.clickCompass(): Clicked compass', TDebug.SUB);
end;

Expand Down

0 comments on commit eb022dd

Please sign in to comment.