SRL Archive - Reflection Development

WalkToTileEx


Infantry001

2008-09-12 15:49:55

In theory, this could walk from Lumbridge to Draynor or Draynor to Falador in one line of code. Of course, Runescape doesn't work that way ;)

Still, this is a very useful function. It works by walking in a straight line to the Tile, even if it's off the minimap!

{*******************************************************************************
function WalkToTileEx(Tile : TPoint; RandX,RandY,flagdist : integer) : boolean;
By: Infantry001
Description: Walks to tile, even if it is off the minimap!
*******************************************************************************}
function WalkToTileEx(Tile : TPoint; RandX,RandY,flagdist : integer) : boolean;
var
i,temp : TPoint;
mark : integer;
begin
Marktime(Mark);
repeat
i := TileToMM(Tile); //Check for the original tile
result := rs_OnMinimap(i.X,i.Y); //If on minimap, then break
if result then break;
repeat
temp := GetMyPos; //Get tile I'm on
i := Midpoint(Tile,temp); //Find the midpoint
i := TileToMM(i); //If midpoint is on MM, break
if rs_OnMinimap(i.X,i.Y) then break;
until(TimeFromMark(mark) > 10000) //If not, repeat the procedure w/ previous midpoint
Mouse(i.X,i.Y,RandX,RandY,true); //Click the Midpoint - gets closer
FFlag(flagdist); //To original tile
until(TimeFromMark(mark) > 120000)
Mouse(i.X,i.Y,RandX,RandY,true); //Clicks the original tile
FFlag(flagdist);
end;

Soooo? What do you think?

Timer

2008-09-12 15:54:37

No, your rong… :p… Scar doesn't work that way, nor does runescape… But its very possible… ;)

ever see nexus? You can go from any where to any where with one line of code! theWorldMap.WalkTo.(3124, 3441)

Nice, although, this has been made… Long walk! ;)

Infantry001

2008-09-12 17:59:25

Aww… oh well. I tried =P

Timer

2008-09-12 18:16:02

<3

Method

2008-09-12 19:01:57

If you really want to walk anywhere, feel free to set up a working web of tiles that SCAR can use to walk around. :p

Nice job, though.