Pretty sure it've already been suggested at some point, however:
Walker.isStuck()
When the state of "Can't find the next waypoint".
Perhaps should return boolean or even time being stuck.
/Stusse
Printable View
Pretty sure it've already been suggested at some point, however:
Walker.isStuck()
When the state of "Can't find the next waypoint".
Perhaps should return boolean or even time being stuck.
/Stusse
heck yea
Something like this is very needed.... XenoBot is the most stuckable bot, it is always getting stuck at some point!
I'm make scripts for a couple of years now... started on ElfBot... went over NeoBot and iBot and now XenoBot.
I have to say that XenoBot was the bot wich made me the most problems in making scripts... still it's a pretty nice bot!
Look at a problem here.... my script is working fully afk except sometimes he get's "stuck" in the middle of a little hunt place....
http://screenshu.com/static/uploads/.../pr/hv3n4r.jpg
What's the problem here? It's nearly impossible for me to fix it... tryed alot of different wpt's!
If XenoBot would just skip waypoints till it finds the right one again.... like every other bot does!
Hope you can help me with that. ;)
EDIT:
Here another one. ;)
However you need to wait till someone is luring ghastly or something so character moves some sqm and your char continue hunting. Or just walk manual some sqm and your char continues walking.
http://screenshu.com/static/uploads/.../ge/v6zzl6.jpg
It's impossible for me to fix it... tryed alot of different ways to make waypoints and I always get stuck.
Skipping waypoints (when stuck) would be bad unless it'll skip only if you are too far away from the next one - that would be best I guess.
IsStuck as been added and will be in next release.
@Boomtune
The issue you are seeing happens when someone is blocking on the minimap on one of those dark-red tiles, and you are off screen. Try to mapclick, you get the same exact issue. Due to how Tibia works, paths remain blocked by creatures when you leave the screen. XenoBot mitigates this (and is the only bot that does) by ignoring blocking tiles IF the minimap color is one that's always walkable. Those dark-redish-brown tiles, however, are not always walkable, and assuming they are walkable would cause major bugs elsewhere.
The reason other bots don't get stuck here is because they will skip waypoints that they can't reach. This is why you commonly end up with someone in the middle of a spawn trying to buy potions as a gastly facerolls them, or spamming exani hur up on a water border.
The XenoBot solution for this is to isolate your character in screen-size chunks using special areas, making it impossible to go off-screen of a waypoint before you see it (this also assumes you have waypoints evenly spread at 6-10 sqm intervals).
So, yes, XenoBot does get stuck more in these scenarios. But would you rather be stuck, or banned?