Wow, what a fucking no lifer retard.
Ummm if the dwarf cave is underground, try this action, just add the cave extrance to your hunt loot so it can get back inside if you go outside...
if paround(7, true, "Waldek Man") >= 1 and posz > 7 then
This will work the same way, but if he ropes you our of the cave to the ground floor, it will enable cavebot, and if your script is written well, should go back inside.
Also, add a new monster to targeting for "All" and put only if trapped, that way if he pushes you to something and cavebot is on, it will assume you're trapped (if he does push you to far) and will atleast target any monster so you dont die.
closing tibia could be your final option