SRL Archive - Non-RuneScape Scripts

[RSCEmulation] WalkToPoint


Toby1

2012-07-07 05:07:00

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:

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 :)

Abu

2012-07-07 14:53:51

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

So rather then doing something like:
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:
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:

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…

Sin

2012-07-07 14:57:08

It's for a private server i believe.

Abu

2012-07-07 15:08:10

From: Shay
It's for a private server i believe.


Oh.

Well that sucks.