SRL Archive - OSR Help

Walking to a point if stuck - how to add this?


Saleen

2013-04-09 14:25:04

Hey, villavu!

When 'playing' the fight caves mini-game, occasionally the bot will get stuck behind one of the rocks, as the lvl 90's lure the character there and none of the monsters on the next wave will attack you. I was wondering how I would go about adding a procedure that checks if you have been out of combat for ~1 min and are behind the rocks on the mini-map then walks to the centre, but I'm not sure how to do this, and was hoping someone could help. :D


Thanks.

Vusn

2013-04-09 22:30:31

You could try something like this:

procedure GetUnstuckInCave
begin
if (not IsMoving) then
begin
MakeCompass('N');
radialWalkTolerance(7369593, 80, 100, 55, 1, 1, 23);
end;
end;


Change the radialwalk values to fit your needs, though. There are tons of tutorials here for that :D

Saleen

2013-04-10 11:59:39

Thank you, Vusn!

Vusn

2013-04-10 12:06:48

No problem :)