View Full Version : IF Skulled Player onscreen THEN Stairhop
Y2Quake
06-23-2016, 02:02 PM
How would i implement this into my cavebot?
Issue is this is a fairly large spawn but there are lots of stairs pretty much near every part of it,
would i need PK labels near every stair? but then how do i make the bot go to the closest label? Anyone know what to do for this?
shadowart
06-23-2016, 02:25 PM
Storing a list of stair positions in a lua-table and then using Self.WalkTo(x,y,z) seems like less work. Alternatively you could start a module that waits until there's a stair on screen and then uses Self.WalkTo to stair-hop it.
However, Self.WalkTo has some issues. First of all, its a blocking function so your regular modules won't execute while you're walking. This can be dangerous if you're doing stuff like equipping SSA's against the pk. Second, I'm pretty sure that Self.WalkTo can't handle getting stuck. You will just stand still for a few seconds and then it will return false without attempting to kill any monsters blocking your way. Both of these problems can be worked around, but they may complicate the implementation somewhat. Or you can do it the one-label per stair way...
For picking the closest stair you'll have to store a lua table with all stair positions in your lua script and then iterate through it to find the closest one. Or you can add labels that tell your script which stair that is the closest one after you have reached that label.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.