Results 1 to 4 of 4

Thread: [RSCEmulation] WalkToPoint

  1. #1
    Join Date
    Nov 2011
    Posts
    68
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default [RSCEmulation] WalkToPoint

    This script walks to different tiles around you (which you choose) just get the middle of your tiles coordinates (where your feet are, does not need to be completely exact) and put them in absX, absY variables


    Example:
    Code:
    program WalkToPoint;
    const
      absX = 228;
      absY = 204;
    var
      X, Y: Integer;
      p, c: Integer;
    
    procedure Mouse;
    begin
        MoveMouse(c, p);
        GetMousePos(c, p);
        ClickMouse(c, p, mouse_left);
    end;
    
    procedure WalkBack;
    begin
        c := (absX);
        p := (absY - 37);
        Mouse;
    end;
    
    procedure WalkForward;
    begin
        c := (absX);
        p := (absY + 43);
        Mouse;
    end;
    
    procedure WalkRight;
    begin
        c := (absX + 37);
        p := (absY);
        Mouse;
    end;
    
    procedure WalkLeft;
    begin
        c := (absX - 37);
        p := (absY);
        Mouse;
    end;
    
    begin
        WalkRight;
        Wait(3000);
        WalkLeft;
        Wait(3000);
        WalkForward;
        Wait(5000);
    end.
    Choose where you wanna walk in mainloop as you can see

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Hmmm, it would be much more useful if you could combine the functions...

    So rather then doing something like:
    Simba Code:
    WalkLeft;
    FFlag(2); //Waits for player to be 2 pixels from Flag on MM
    WalkLeft;
    FFlag(2);
    WalkLeft;
    FFlag(2);
    WalkLeft;
    FFlag(2);
    WalkForward;

    You could do:
    Simba Code:
    WalkLeft(4, 2); // Walk left 4 times, continue when 2 pixels from flag on MM
    WalkForward(1, 0); // Walk Forwars once, continue when 0 pixels from flag


    And you could do this by altering the function like this:
    Simba Code:
    var
      i: Integer; // add to global variables

    procedure WalkForward(Amount, Flag: Integer);
    begin
        c := (absX);
        i := 43 * amount
        p := (absY + i);
        Mouse;
        FFlag(Flag);
    end;

    Not sure if the above compiles but it should do.


    Also, another little note, you should only click if the uptext is 'Walk Here', else you'd end up chopping trees...

  3. #3
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    It's for a private server i believe.

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Shay View Post
    It's for a private server i believe.
    Oh.

    Well that sucks.

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
  •