SRL Archive - OSR Help

WalkToTile


Ethoroxyole

2011-02-15 13:15:09

I can't seem to get this to walk to where i want it to go, I'm trying to walk from the bank to the mine but I'm not sure if I need to create a full path to walk there or not.

It compiles so I know that is not a problem but meh :(
Procedure Walk2;
begin
if (not(LoggedIn)) then Exit;
WalkToTile(Point (3082,3400), 1, 1);
writeln('Walked');
end;

**BANNED The Man

2011-02-15 13:17:03

That will walk to that tile if it is on the minimap.
If you are say 60 tiles away then you are going to need to make a path of tile then use WalkPath(Tiles);

-Boom

Gu3st...

2011-02-15 13:19:23

You have to make the complete path, or use an function that does this for you. WalkToTile() walks to the tile only if the tile is viewable on the minimap

mormonman

2011-02-15 13:19:47

Function r_WebWalk(T: TTile): Boolean;

WILL NOT CIRCUMVENT OBSTACLES!!!!!!!!!!!!!!!!!!!

Ethoroxyole

2011-02-15 13:28:18

Thanks for the replies, I was using WalkPath but I didn't like how it waited for the flag to disappear before moving on to the next point again, but guess it will have to make do for now.

kitchenrange

2011-02-15 13:59:16

Set the points that you would for WalkPath and then use

R_WebWalk(Tile) using those tiles.

**BANNED The Man

2011-02-15 14:01:07

From: kitchenrange
Set the points that you would for WalkPath and then use

R_WebWalk(Tile) using those tiles.


wat.
Why make a Path then use R_WebWalk?
WebWalk walks to the tile wherever it is but as mormon said, it doesn't count for obstacles.

mormonman

2011-02-15 14:06:13

From: Dynamite
wat.
Why make a Path then use R_WebWalk?
WebWalk walks to the tile wherever it is but as mormon said, it doesn't count for obstacles.


You can dodge obstacles with your path.

for i := 0 to high(path) do
r_WebWalk(path[i]);

Something like that.

**BANNED The Man

2011-02-15 14:06:46

But then why not just use WalkPath?

-Boom

mormonman

2011-02-15 14:07:53

From: Dynamite
But then why not just use WalkPath?

-Boom


Less tiles.

**BANNED The Man

2011-02-15 14:19:28

From: mormonman
Less tiles.


Ah, fair enough.

-Boom