Log in

View Full Version : Pathfinding script



HunterekPL
08-25-2015, 09:51 PM
Greetings,

I wonder if there's a way to add a script which starts when player cannot find path to another waypoint.
I'm playing on otserver and there are pets there which sometimes clock paths, I was thinking about using !pet when player does cannot find the path and !pet 5 seconds laters so the pet disappears for a slight moment and then reappears.


Thanks in advance,
Hunterek

Ben
08-25-2015, 10:02 PM
edit: deleted this solution as it doesn't work, see my second post for a solution that I think works

Ben
08-25-2015, 10:10 PM
You have to manually start the script.

saidPet = false
Module("anti-stuck", function (mod)
if Walker.IsStuck() and not saidPet then
Self.Say("!pet")
saidPet = true
elseif saidPet then
Self.Say("!pet")
saidPet = false
end
mod:Delay(5000)
end)

HunterekPL
08-25-2015, 11:00 PM
Thanks a lot!