Results 1 to 2 of 2

Thread: Click on Compass

  1. #1
    Join Date
    Jan 2015
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Click on Compass

    EDIT: Did some fine combing through the include and found minimap.clickCompass.
    I laugh at how simple the code is. I'll leave the original text for reference.



    ORIGINAL TEXT:

    Hello everyone,
    I'm working on my first script, as well, I have zero experience with coding/scripting, and it's essential that the bot clicks the compass otherwise the objects are not in view.
    I've tried:
    Simba Code:
    var
    myPoint: TPoint;
    begin
      minimap.findSymbol(myPoint, MM_BUTTON_MAP, minimap.getBounds());
      mouse(myPoint, MOUSE_LEFT);
    end;

    to no avail. Any assistance would be appreciated.
    Last edited by Alexxzander; 11-03-2015 at 05:21 PM.

  2. #2
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    minimap.clickCompass();


    from srl-6 include:

    Simba Code:
    (*
    clickCompass
    ------------

    .. code-block:: pascal

        procedure TRSMinimap.clickCompass(faceSouth: boolean = false);

    Clicks the Runescape compass to set the angle to north. If **faceSouth** is true,
    it will right click and make the compass south *(default = false)*

    .. note::

        - by Olly
        - Last Modified: 12 March 2015 by The Mayor

    Example:

    .. code-block:: pascal

        minimap.clickCompass();
        minimap.clickCompass(true); // To face south
    *)

    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 faceSouth or (random(4) = 2) then
      begin
        fastClick(MOUSE_RIGHT);
        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;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •