Results 1 to 5 of 5

Thread: Make the player rest

  1. #1
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Question Make the player rest

    How can I make the player rest?

    I can check if they are resting with this (API):

    Simba Code:
    function TRSMinimap.isResting(): boolean;

    Is there something like this code below?
    Simba Code:
    TRSMinimap.rest();

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    u have to create a variable of that type 1st:
    Simba Code:
    var
      minimap: TRSMinimap;
    begin
      minimap.rest();
    end;
    object-oriented programming

  3. #3
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    u have to create a variable of that type 1st:
    Simba Code:
    var
      minimap: TRSMinimap;
    begin
      minimap.rest();
    end;
    object-oriented programming

    I could be mistaken but rest is not in the API. I just got this compiler error:

    Code:
    Exception in Script: Unknown declaration "rest"

  4. #4
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by KLight View Post
    I could be mistaken but rest is not in the API. I just got this compiler error:

    Code:
    Exception in Script: Unknown declaration "rest"
    Because rest isn't currently a function in SRL6. There should actually be a TRSMinimap.rest but it was never written. You could just paste this into your script:

    Simba Code:
    procedure TRSMinimap.rest();
    var
      p: TPoint;
    begin
      p := self.button[MM_BUTTON_RUN].center;

      if (not self.isResting()) then
      begin
        mouseCircle(p.x, p.y, self.button[MM_BUTTON_RUN].radius, MOUSE_RIGHT);
        chooseOption.select(['Rest']);
        print('minimap.rest(): Enabled rest', TDebug.SUB);
      end;
    end;

    and then you can go:

    Simba Code:
    minimap.rest()

  5. #5
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

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
  •