not sure if will work, please test and reply me:
PHP Code:
2200 {exori con} Creatures.OnScreen()>!x! Self.Attacking()==1 Self.Say(exori con)
1000 {leavehuntwhenghost} Self.Health() !leavehunt!==0 Creatures.ByName(Ghost)>=1 Killer.Stop() Tibia.SendKey(27) CaveBot.GoLabel(refil) leavehunt:=1 Self.Health()
0 {checkleavehuntondp} Self.Health() !leavehunt!==1 Cavebot.Stop()
i guess it will:
1 - cast exori con when more than x creatures on screen, set it on global variables
2 - when ghost on screen, will turn "leavehunt" variable to 1, and go to cavebot label "refil", that will lead to depot, on depot should make a macro waypoint with "checkleavehuntondp" to stop cavebot if there was a ghost on the hunt
IT MIGHT BE NESCESSARY TO RELOAD THE SCRIPT TO TURN "leavehunt" VARIABLE TO 0 AGAIN
not sure if works, please test and reply
also in cavebot you put a waypoint
SupliesWithdraw (32097 32240 7:7378 20)
to withdraw up to 20 royal spears from depot, and put on Reuser and Cures - left hand to reequip the royal spears