Code: Select all
#include spellcast.inc
#event QuiOn "You fall into a state of quiescence."
#event QuiOff "Your state of quiescence ends."
sub Main
/declare CanniSpell string outer "Cannibalize IV"
/declare CannAATimer timer outer
/declare CannTimer timer outer
/declare QuiState bool outer FALSE
:MainLoop
/doevents
/if (${Me.PctHPs}<=80 && !${QuiState}) {
/echo "casting Qui"
/call Cast "Quiescence"
}
/if (${Me.PctMana}>97) {
/echo "mana good, exiting"
/return
}
/call CheckCann
/goto :MainLoop
/echo "got thru!!!"
/return
Sub CheckCann
/if (!${Me.Moving}) {
/if (${Me.PctMana}<80 && ${Me.PctHPs}>=60 && ${Me.CurrentHPs}>2900 && ${CannAATimer}<=0) {
/echo "canny5"
/call Cast "47" activate
/varset CannAATimer 3m
/return
}
/if (${Me.PctMana}<97 && ${Me.PctHPs}>=40 && ${CannTimer}<=0) {
/echo "Casting ${CanniSpell}"
/call Cast ${CanniSpell}
/varset CannTimer 4s
}
}
/return
| ### EVENTS ### |
Sub Event_QuiOn
/varset QuiState TRUE
/end
Sub Event_QuiOff
/varset QuiState FALSE
/end
Any ideas?