For the unducking, I think this should work with only a small change:
Code:
/if (!${duckOn}) {
/if (${Me.State.NotEqual[STAND]}) /stand
/doevents flush DuckOn
/return
}
....
Sub Event_DuckOff
/if (!${Defined[duckOn]}) {
/declare duckOn int outer 0
} else {
/varset duckOn 0
}
/doevents flush DuckOff
/return
Why not just go the simple route and do this:
Code:
#event DuckOn "#*#The ice encrusted Avatar of War shouts that #1# must bend the knee!#*#"
Sub Event_DuckOn(line, player)
/if (${player.Equal[${Me.Name}]}) {
/if (!${Me.Ducking}) /keypress duck
}
/doevents flush DuckOn
/return
#event DuckOff "#*#The Avatar of War nods, accepting the subservience of those that gave it.#*#"
Sub Event_DuckOff
/if (${Me.State.NotEqual[STAND]}) /stand
/doevents flush DuckOff
/return
Or do the macros/plugins discussed here have a check for invalid combat states and automatically unduck if it is detected, thus forcing a while loop to wait?