looking for any suggestions for a better dropagro sub then what I have created.
faster/more reliable is my goal
Following is all the immediatley relevant code
Code: Select all
#event Standing "has fallen to the ground."
#event FDFAIL "You are no longer feigning death"
standing is called by my cast sub
fdfail is called by my dropagro sub
Code: Select all
Sub DropAgro
/if $target()==FALSE /return
/attack off
/declare MobDistance local
:DropAgro1
/echo DropAgro1
/call gotoloc @Safe_L1
/call cast "Death Peace"
/goto :checkDropAgro1
:DropAgro2
/echo DropAgro2
/call gotoloc @Safe_L2
/call cast "Death Peace"
/goto :checkDropAgro2
:checkDropAgro1
/varset MobDistance $target(distance)
/delay 1s
/doevents FDFAIL
/if $return==FAILED /goto :DropAgro2
/if n $target(distance)==@MobDistance /goto :checkDropAgro1
/goto :mobresetDropAgro
:checkDropAgro2
/varset MobDistance $target(distance)
/delay 1s
/doevents FDFAIL
/if $return==FAILED /goto :DropAgro1
/if n $target(distance)==@MobDistance /goto :checkDropAgro2
/goto :mobresetDropAgro
:mobresetDropAgro
/echo mobresetDropAgro
/varset MobDistance $target(distance)
/doevents FDFAIL
/if $return==FAILED /goto :DropAgro1
/delay 5s
/doevents FDFAIL
/if $return==FAILED /goto :DropAgro1
/if n $target(distance)==@MobDistance /goto :doneDropAgro
/goto :mobresetDropAgro
:doneDropAgro
/press ESC
/echo doneDropAgro
/if $char(state)!=STAND /stand
/return
Code: Select all
Sub Event_Standing
/stand
/return CAST_RESTART
Sub Event_FDFAIL
/stand
/return FAILED
