canniv4-Caster Bot macro, updated 1-6-06
Posted: Mon Jul 04, 2005 2:09 pm
This macro will autoheal, time buffs, canni, take commands from another toon if a master is specified, repeat everything your master says if needed(nice at the PoD's and Magus's), practice spells, plus many other useful things. It should work for any caster type, not just shamans. I tried to document it well in cannidoc.txt. This macro is a lot like genbot, i tried to keep all the commands the same(i.e. a master can tell you buff somebuff on soanaso, and sit, etc...) so that other macros that work with genbot will hopefully work with this one too. I can add just about anything needed, so post requests. This macro can buff the whole group rather than just a single person. try these commands:
/echo buff celerity on group except myself someothertoon this command will buff the whole group except you and someothertoon with celerity.
/echo watch group except myself this command will watch the whole group and heal them as needed. your shaman will automatically heal itself always.
KNOWN BUGS: When mounted certain spell[].duration's do not return correctly. Spell[Celerity].Duration, for instance, returns 160 while not mounted, 100 while mounted even though the actual duration does not change. Ferine Avatar is another such spell. It's not a bug in the macro.
UPDATED: docommandv5.inc to docommandv5_1.inc . Fixed sit
7/10/05 caster5.inc to caster5_1.inc fixed a problem with watch in 7/10/05 caster5_1.inc, /echo watch group will work properly now
7/10/05 fixed multiple problems with bufbott. Now /echo buff blah on group will work when a player is not in the zone rather than looping.
7/11/05 added skills.inc to practice spells
7/11/05 removed most double-spacing
7/11/05 added SitAfterCast
7/11/05 fixed problems with retargeting.
9/29/05 caster5_1.inc to caster5_4.inc. Fixed sit loop.
9/29/05 fixed timbuff problem, and made timebuff work for pets.
9/29/05 skills.inc to skills1_1.inc.
10/11/05 caster5_5.inc added SnareOnAssist
10/11/05 docommand5_2.inc, SnareOnAssist added.
10/11/05 CrappySpell.inc added if you dont have spell_routines.inc
10/14/05 caster5_5.inc Fixed a problem in sub watch.
10/14/05 CrappySpell.inc Fixed a problem with fd failing.
10/27/05 canniv4_2.mac/caster5_7.inc added reslow on resist and report slow resist to group.
12/8/05 canniv4_3.mac/caster5_8.mac added CanniStartPct. This is the pct mana your shaman will start to cast canni. Default is 100%.
12/8/05 caster5_8.inc updated ReslowOnResist and ReportSlowResistToGroup to work properly.
1/6/06 caster5_9.inc updated buff check, and fixed an issue with Sub Canni.
1/6/06 Updated buff check in Sorbuff.inc
1/6/06 canniv4_4.mac
anyway, here's the code, read cannidoc.txt for all the commands etc..
canniv4_4.mac
expv3.inc
docommandv5_2.inc
saybotv2.inc
sorbuffv3.inc
skills1_1.inc
/echo buff celerity on group except myself someothertoon this command will buff the whole group except you and someothertoon with celerity.
/echo watch group except myself this command will watch the whole group and heal them as needed. your shaman will automatically heal itself always.
KNOWN BUGS: When mounted certain spell[].duration's do not return correctly. Spell[Celerity].Duration, for instance, returns 160 while not mounted, 100 while mounted even though the actual duration does not change. Ferine Avatar is another such spell. It's not a bug in the macro.
UPDATED: docommandv5.inc to docommandv5_1.inc . Fixed sit
7/10/05 caster5.inc to caster5_1.inc fixed a problem with watch in 7/10/05 caster5_1.inc, /echo watch group will work properly now
7/10/05 fixed multiple problems with bufbott. Now /echo buff blah on group will work when a player is not in the zone rather than looping.
7/11/05 added skills.inc to practice spells
7/11/05 removed most double-spacing
7/11/05 added SitAfterCast
7/11/05 fixed problems with retargeting.
9/29/05 caster5_1.inc to caster5_4.inc. Fixed sit loop.
9/29/05 fixed timbuff problem, and made timebuff work for pets.
9/29/05 skills.inc to skills1_1.inc.
10/11/05 caster5_5.inc added SnareOnAssist
10/11/05 docommand5_2.inc, SnareOnAssist added.
10/11/05 CrappySpell.inc added if you dont have spell_routines.inc
10/14/05 caster5_5.inc Fixed a problem in sub watch.
10/14/05 CrappySpell.inc Fixed a problem with fd failing.
10/27/05 canniv4_2.mac/caster5_7.inc added reslow on resist and report slow resist to group.
12/8/05 canniv4_3.mac/caster5_8.mac added CanniStartPct. This is the pct mana your shaman will start to cast canni. Default is 100%.
12/8/05 caster5_8.inc updated ReslowOnResist and ReportSlowResistToGroup to work properly.
1/6/06 caster5_9.inc updated buff check, and fixed an issue with Sub Canni.
1/6/06 Updated buff check in Sorbuff.inc
1/6/06 canniv4_4.mac
anyway, here's the code, read cannidoc.txt for all the commands etc..
canniv4_4.mac
Code: Select all
#turbo
#include CrappySpell.inc
#include expv3.inc
#include docommandv5_2.inc
#include caster5_9.inc
#include saybotv2.inc
#include sorbuffv3.inc
#include skills1_1.inc
Sub Main
|This next line must be first, it get's our master if one is specified at runtime (/macro canniv3 SoAndSo)
/if (!${Defined[MyMaster]}) /declare MyMaster string outer ${MacroQuest.LastCommand.Arg[3]}
/if (!${Defined[GetMaster]}) /declare GetMaster int outer 0
|Put your healspell here
/if (!${Defined[HealSpell]}) /declare HealSpell string outer Quiescence
|Set what pct yourbot should start casting HealSpell if watching someone.
/if (!${Defined[HealSpellPct]}) /declare HealSpellPct int outer 85
|Put your fast heal spell here
/if (!${Defined[FastHealSpell]}) /declare FastHealSpell string outer Tnarg`s Mending
|Put your canni spell here
/if (!${Defined[CanniSpell]}) /declare CanniSpell string outer Cannibalize IV
|What PctMana to start canni.
/if (!${Defined[CanniStartPct]}) /declare CanniStartPct int outer 100
|Put your lich spell here. Careful with this, because when practicing spells it will cast your lich spell while above 70% hp, so if that will kill you set your lich spell to a lower level one, or disable it in skills.inc, under Sub SkillHeal
/if (!${Defined[MyLichSpell]}) /declare MyLichSpell string outer Call of Bones
|Set what pct yourbot should start casting FastHealSpell if watching someone.
/if (!${Defined[FastHealSpellPct]}) /declare FastHealSpellPct int outer 70
|Put your slow spell here
/if (!${Defined[SlowSpell]}) /declare SlowSpell string outer Turgur's Insects
|Automatically slow on assist? on or off
/if (!${Defined[SlowOnAssist]}) /declare SlowOnAssist string outer on
|Report resisted slows to group? on or off
/if (!${Defined[ReportSlowResistToGroup]}) /declare ReportSlowResistToGroup string outer off
|Reslow when slows are resisted? on or off
/if (!${Defined[ReslowOnResist]}) /declare ReslowOnResist string outer off
|Put your snare spell here
/if (!${Defined[SnareSpell]}) /declare SnareSpell string outer Ensnare
|Automatically snare on assist? on or off
/if (!${Defined[SnareOnAssist]}) /declare SnareOnAssist string outer off
|Automatically send pet on assist? on or off
/if (!${Defined[PetAttackOnAssist]}) /declare PetAttackOnAssist string outer on
|Automatically refresh your own buffs? on or off
/if (!${Defined[AutoRefreshBuffs]}) /declare AutoRefreshBuffs string outer off
|Sit after cast? on or off
/if (!${Defined[SitAfterCast]}) /declare SitAfterCast string outer off
|||||||||||||||||||||||||||END DEFINED|||||||||||||||||||||||||||||||||||||||||||||||||
|First check who my master is
/if (${GetMaster}==0) /call GetMaster
:MainLoop
/doevents
/if (${Defined[personnumber]} && ${personnumber}>0) /call watch
/call canni
/if (${Defined[BuffToCast1]}) /call CheckTimedBuffBot
/if (${AutoRefreshBuffs.Equal[on]}) /call botbuff
/call CheckBotHPs
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||Things you want to do each loop go here|||||||||||||||||||||||||||||||||
||||||||||||||||||Add events at the top of this macro, and any other Subs at the bottom|||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/goto :MainLoop
/return
Sub GetMaster
/varset GetMaster 1
/if (${MyMaster.NotEqual[NULL]}) {
/echo My master is ${MyMaster}
} else {
/echo I have no master!
}
/return
expv3.inc
Code: Select all
#turbo
#event popupexp "[MQ2] exp"
#event expgained "You gain #*#"
Sub exp
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||ADD A /doevents popupexp AND A|||||||||
|||||||||||||||/doevents expgained TO YOUR MACRO,|||||
|||||||||||||||AND /echo exp TO SEE EXP OUTPUT||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||DEFINES||||||||||||||||||||||||||||||||
|Set this to yes to time OoW instance, otherwise set to no
/if (!${Defined[oowinstance]}) /declare oowinstance string local no
/if (!${Defined[numberkilledvar]}) /declare numberkilledvar int global 0
/if (!${Defined[oldexpvar]}) /declare oldexpvar float global ${Me.PctExp}
/if (!${Defined[expvar]}) /declare expvar float global 0
/if (!${Defined[expperkillvar]}) /declare expperkillvar float global
/if (!${Defined[exppermin]}) /declare exppermin float global
/if (!${Defined[expperhour]}) /declare expperhour float global
/if (!${Defined[oldaaexpvar]}) /declare oldaaexpvar float global ${Me.PctAAExp}
/if (!${Defined[aaexpvar]}) /declare aaexpvar float global 0
/if (!${Defined[aaexpperkillvar]}) /declare aaexpperkillvar float global
/if (!${Defined[aaexppermin]}) /declare aaexppermin float global
/if (!${Defined[aaexpperhour]}) /declare aaexpperhour float global
/if (!${Defined[exptimevar]}) /declare exptimevar timer global 1000000000
/if (!${Defined[zonetimevar]}) /declare zonetimevar timer global 214200
/if (!${Defined[zonehourvar]}) /declare zonehourvar float global 0
|||||||ANNOUNCE EXP|||||||||||||||||||||||||||
/if (${numberkilledvar}!=0) {
|Calc exp
/if (${Me.PctExp}<${oldexpvar}) /varcalc expvar ${Me.PctExp}+100-${oldexpvar}+${expvar}
/if (${Me.PctExp}>${oldexpvar}) /varcalc expvar ${Me.PctExp}-${oldexpvar}+${expvar}
/if (${Me.PctAAExp}<${oldaaexpvar}) /varcalc aaexpvar ${Me.PctAAExp}+100-${oldaaexpvar}+${aaexpvar}
/if (${Me.PctAAExp}>${oldaaexpvar}) /varcalc aaexpvar ${Me.PctAAExp}-${oldaaexpvar}+${aaexpvar}
|Calc exp/kill
/varcalc expperkillvar ${expvar}/${numberkilledvar}
/varcalc aaexpperkillvar ${aaexpvar}/${numberkilledvar}
|Calc exp/minute and exp/hour
/varcalc exppermin 1000000000-${exptimevar}
/varcalc expperhour 1000000000-${exptimevar}
/varcalc exppermin ${exppermin}/600
/varcalc expperhour ${expperhour}/36000
/if (${exppermin}>=.01) /varcalc exppermin ${expvar}/${exppermin}
/if (${expperhour}>=.01) /varcalc expperhour ${expvar}/${expperhour}
/varcalc aaexppermin 1000000000-${exptimevar}
/varcalc aaexpperhour 1000000000-${exptimevar}
/varcalc aaexppermin ${aaexppermin}/600
/varcalc aaexpperhour ${aaexpperhour}/36000
/if (${aaexppermin}>=.01) /varcalc aaexppermin ${aaexpvar}/${aaexppermin}
/if (${aaexpperhour}>=.01) /varcalc aaexpperhour ${aaexpvar}/${aaexpperhour}
|Calc zonetime
/varcalc zonehourvar ${zonetimevar}/36000
|Echo
/echo ${numberkilledvar} kills.
/if (${expvar}!=0) /echo ${expvar}% exp, ${expperkillvar}% exp per kill, ${exppermin}% exp per minute, ${expperhour}% exp per hour.
/if (${aaexpvar}!=0) /echo ${aaexpvar}% AAexp, ${aaexpperkillvar}% AAexp per kill, ${aaexppermin}% AAexp per minute, ${aaexpperhour}% AAexp per hour.
/if (${oowinstance.Equal[yes]}) /echo ${zonehourvar} hours left.
}
||||Reset variables
/varset oldexpvar ${Me.PctExp}
/varset oldaaexpvar ${Me.PctAAExp}
/return
Sub slain
/if (!${Defined[numberkilledvar]}) /declare numberkilledvar int global 0
/varcalc numberkilledvar ${numberkilledvar}+1
/return
Sub Event_popupexp
/if (${numberkilledvar}!=0) {
/echo ${numberkilledvar} kills.
/if (${expvar}!=0) /echo ${expvar}% exp, ${expperkillvar}% exp per kill, ${exppermin}% exp per minute, ${expperhour}% exp per hour.
/if (${aaexpvar}!=0) /echo ${aaexpvar}% AAexp, ${aaexpperkillvar}% AAexp per kill, ${aaexppermin}% AAexp per minute, ${aaexpperhour}% AAexp per hour.
/if (${oowinstance.Equal[yes]}) /echo ${zonehourvar} hours left.
} else {
/echo No exp yet!
}
/return
Sub Event_expgained
/call slain
/call exp
/return
docommandv5_2.inc
Code: Select all
#turbo
#event command12 "#1# tells you, 'do #2#'"
#event followme "#1# tells the group, 'follow #2#'"
#event followme "#1# tells you, 'follow #2#'"
#event stop "#1# tells the group, 'stop'"
#event stop "#1# tells you, 'stop'"
#event sit "#1# tells the group, 'sit'"
#event sit "#1# tells you, 'sit'"
#event stand "#1# tells the group, 'stand'"
#event stand "#1# tells you, 'stand'"
#event assist "#1# tells the group, 'assist'"
#event assist "#1# tells you, 'assist'"
Sub Event_command12(command12Text,MasterName,command)
/if (${MasterName.Equal[${MyMaster}]}) ${command}
/return
Sub Event_followme(Text,MasterName,FollowName)
/if (${MasterName.Equal[${MyMaster}]}) {
/if (!${FollowName.Length} || ${FollowName.Equal[me]} || ${FollowName.Equal[${MyMaster}]}) {
/tar pc ${MyMaster}
/if (!${Me.Mount.ID}) {
/squelch /stick 15
} else {
/fol
}
} else {
/tar pc ${FollowName}
/if (!${Me.Mount.ID}) {
/squelch /stick 15
} else {
/fol
}
}
/t ${MyMaster} I'm now following ${Target.Name}
}
/return
Sub Event_stop(text,MasterName)
/if (${MasterName.Equal[${MyMaster}]}) {
/keypress right hold
/delay 25
/keypress left
/face
/squelch /stick off
/t ${MyMaster} Stopping.
}
/return
Sub Event_sit(text,MasterName)
/if (${MasterName.Equal[${MyMaster}]}) {
/squelch /stick off
/if (${Me.State.Equal[STAND]}) /sit
}
/return
Sub Event_stand(text,MasterName)
/if (${MasterName.Equal[${MyMaster}]}) {
/squelch /stick off
/if (${Me.State.Equal[SIT]}) /stand
}
/return
Sub Event_assist(text,MasterName)
/if (${MasterName.Equal[${MyMaster}]}) {
/squelch /tar clear
/assist ${MyMaster}
/delay 2s
}
/if (${Defined[PetAttackOnAssist]} && ${PetAttackOnAssist.Equal[on]} && ${Me.Pet.ID}) {
/pet attack
/delay 2s
}
/if (${Defined[SlowOnAssist]} && ${SlowOnAssist.Equal[on]}) {
/call Cast "${SlowSpell}" gem3
/delay 2s
}
/if (${Defined[SnareOnAssist]} && ${SnareOnAssist.Equal[on]}) {
/call Cast "${SnareSpell}" gem3
/delay 2s
}
/return
saybotv2.inc
Code: Select all
#turbo
#event saycommand "#1# says, '#2#'"
#event saybot "#1# tells you, 'saybot #2#'"
#event saybot "#1# saybot #2#"
Sub Event_saycommand(saycommandText,MasterName,command)
/if (${MasterName.NotEqual[${MyMaster}]}) /return
/if (${saybot}==0) /return
/say ${command}
/return
}
/return
Sub Event_saybot(text,MasterName,OnOrOff)
/if (!${Defined[saybot]}) /declare saybot int outer 0
/if (${MasterName.NotEqual[${MyMaster}]} && ${MasterName.NotEqual[[[[MQ2]]]]}) /return
/if (${OnOrOff.NotEqual[off]} && ${OnOrOff.NotEqual[on]}) {
/echo Usage: saybot on|off
/return
}
/if (${OnOrOff.Equal[on]}) {
/varset saybot 1
/echo Toggling saybot: on.
}
/if (${OnOrOff.Equal[off]}) {
/varset saybot 0
/echo Toggling saybot: off.
}
/return
sorbuffv3.inc
Code: Select all
#turbo
Sub botbuff
||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||THIS INCLUED WILL KEEP TRACK OF YOUR||||
||||||||||||||BUFFS AND ASK YOUR GENBOTS TO RENEW|||||
||||||||||||||THEM WHEN NEEDED. KEEPS TRACK OF UP||||
||||||||||||||TO TWELVE BUFFS. EACH BUFF ALLOWS 30|||
||||||||||||||SECONDS FOR THE GENBOT TO CAST. ADD A||
||||||||||||||/call botbuff TO YOUR MACRO WHEN SAFE.||
||||||||||||||YOU MUST INCLUDE spell_routines.inc|||||
||||||||||||||OR spellcast.inc IN YOU MACRO.||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||CHANGE THESE VARIABLES TO YOUR BUFFS||||
||||||CHANGE THE REST TO none|||||||||||||||||
/if (!${Defined[buff1]}) /declare buff1 string outer Focus of the Seventh
/if (!${Defined[buff2]}) /declare buff2 string outer Blessing of Replenishment
/if (!${Defined[buff3]}) /declare buff3 string outer Ancestral Guard
/if (!${Defined[buff4]}) /declare buff4 string outer Endurance of the Boar
/if (!${Defined[buff5]}) /declare buff5 string outer none
/if (!${Defined[buff6]}) /declare buff6 string outer none
/if (!${Defined[buff7]}) /declare buff7 string outer none
/if (!${Defined[buff8]}) /declare buff8 string outer none
/if (!${Defined[buff9]}) /declare buff9 string outer none
/if (!${Defined[buff10]}) /declare buff10 string outer none
/if (!${Defined[buff11]}) /declare buff11 string outer none
/if (!${Defined[buff12]}) /declare buff12 string outer none
/if (!${Defined[buff13]}) /declare buff13 string outer none
/if (!${Defined[buff14]}) /declare buff14 string outer none
/if (!${Defined[buff15]}) /declare buff15 string outer none
||||||CHANGE caster# TO THE CASTER OF buff#|||
||||||CAN BE YOUR OWN NAME IF NEEDED||||||||||
/if (!${Defined[caster1]}) /declare caster1 string outer
/if (!${Defined[caster2]}) /declare caster2 string outer
/if (!${Defined[caster3]}) /declare caster3 string outer
/if (!${Defined[caster4]}) /declare caster4 string outer
/if (!${Defined[caster5]}) /declare caster5 string outer
/if (!${Defined[caster6]}) /declare caster6 string outer
/if (!${Defined[caster7]}) /declare caster7 string outer
/if (!${Defined[caster8]}) /declare caster8 string outer
/if (!${Defined[caster9]}) /declare caster9 string outer
/if (!${Defined[caster10]}) /declare caster10 string outer
/if (!${Defined[caster11]}) /declare caster11 string outer
/if (!${Defined[caster12]}) /declare caster12 string outer
/if (!${Defined[caster13]}) /declare caster13 string outer
/if (!${Defined[caster14]}) /declare caster14 string outer
/if (!${Defined[caster15]}) /declare caster15 string outer
/if (!${Defined[waitbuff]}) /declare waitbuff timer local
/if (!${Defined[totalbuffs]}) /declare totalbuffs int local 15
/if (!${Defined[currentbuff]}) /declare currentbuff int local 1
/if (!${Defined[tmpbuff]}) /declare tmpbuff int local 1
||||||||||||||||||||||||||||||||||END DEFINES|||||||||||||||||||||||||||||
/for currentbuff 1 to ${totalbuffs}
/if (${NearestSpawn[1, pc ${caster${currentbuff}}].Distance}<${Math.Calc[${Spell[${buff${currentbuff}}].Range}-5]}) {
/if (${buff${currentbuff}.NotEqual[none]} && ${NearestSpawn[1, pc ${caster${currentbuff}}].ID}) {
/varset tmpbuff 1
/for tmpbuff 1 to 20
/if (!${Me.Buff[${tmpbuff}].Name.Equal[${buff${currentbuff}}]}) /next tmpbuff
/if (${tmpbuff}==21) {
/if (${NearestSpawn[1, pc ${caster${currentbuff}}].Name.NotEqual[${Me.Name}]}) {
/t ${caster${currentbuff}} buff ${buff${currentbuff}}
/varset waitbuff 300
:Loop1
/varset tmpbuff 1
/for tmpbuff 1 to 20
/if (${NearestSpawn[1, pc ${caster${currentbuff}}].Distance}>${Math.Calc[${Spell[${buff${currentbuff}}].Range}-5]} || ${waitbuff}==0) /return
/if (!${Me.Buff[${tmpbuff}].Name.Equal[${buff${currentbuff}}]}) /next tmpbuff
/if (${tmpbuff}==21) /goto :Loop1
}
/if (${NearestSpawn[1, pc ${caster${currentbuff}}].Name.Equal[${Me.Name}]}) {
/tar myself
/delay 1s
/call Cast "${buff${currentbuff}}" gem4
/delay 1s
}
}
}
}
/next currentbuff
/varset currentbuff 1
/return
skills1_1.inc
Code: Select all
#turbo
#event PracSkill "[MQ2] practice #1#"
#event StopPrac "[MQ2] stop practicing"
Sub Event_PracSkill(text,spellname)
/if (!${Spell[${spellname}].ID}) {
/echo Invalid spell!
/return
}
/echo Practicing: ${spellname}.
:PracSpell
/doevents
|this checks if you need to cast lich
/if (${Me.Class.ID}==11) {
/if (!${Defined[CheckAllBuffs]}) /declare CheckAllBuffs int local 0
/if (!${Defined[NoLich]}) /declare NoLich int local 0
/for CheckAllBuffs 1 to 15
/if (${Me.Buff[${CheckAllBuffs}].Name.Equal[${MyLichSpell}]}) {
/varset CheckAllBuffs 15
/varset NoLich 1
}
/next CheckAllBuffs
/if (${NoLich}==0) {
/if (!${Me.Moving} && ${Me.PctHPs}>80) /call Cast "${MyLichSpell}" gem5
}
/varset CheckAllBuffs 0
/varset NoLich 0
}
|check if i need to canni, or heal, and autoinv if something is in my hand
/if (${Me.PctMana}<50 && ${Me.Class.ID}==10) /call canni
/if (${Me.PctMana}<50 && ${Me.Class.ID}!=10) /call SkillHeal
/if (${Cursor.ID}) /autoinv
|otherwise target myself and start practicing the spell
/tar myself
/if (${Me.Gem[1].Name.NotEqual[${spellname}]} || !${Me.Gem[1].ID}) {
/memspell 1 "${spellname}"
/delay 6s
}
/if (!${Me.Moving} && ${Me.SpellReady[${spellname}]}) /call Cast "${spellname}" gem1
/if (${SitAfterCast.Equal[on]} && ${Me.State.Equal[STAND]}) /sit
/goto :PracSpell
/return
Sub SkillHeal
:Heal
|this checks if you need to cast lich
/if (${Me.Class.ID}==11) {
/if (!${Defined[CheckAllBuffs]}) /declare CheckAllBuffs int local 0
/if (!${Defined[NoLich]}) /declare NoLich int local 0
/for CheckAllBuffs 1 to 15
/if (${Me.Buff[${CheckAllBuffs}].Name.Equal[${MyLichSpell}]}) {
/varset CheckAllBuffs 15
/varset NoLich 1
}
/next CheckAllBuffs
/if (${NoLich}==0) {
/if (!${Me.Moving} && ${Me.PctHPs}>80) /call Cast "${MyLichSpell}" gem5
}
/varset CheckAllBuffs 0
/varset NoLich 0
}
|doevents, sit and return when mana's back up
/doevents
/if (${Me.State.Equal[STAND]}) /sit
/if (${Me.PctMana}>95) /return
/goto :Heal
/return
Sub Event_StopPrac
/echo Done practicing.
/call Main
/return