Moderator: MacroQuest Developers
if you replace spellcast.inc with spell_routines.inc you could do this fairly easily. one of the problems with spellcast.inc is it basically doesn't let you do anything while it's casting a spell until the spell is done casting. in the 10 seconds CH takes, lots of things can happen. maybe you get an add and it starts eating the chanter and he needs a fast heal or maybe you're about to die and need to DA like you said.My cleric does die tho. wishh he would stop casting CH, if his health is going down and DA or heal himself :)
Code: Select all
/call Cast "${healspell}" Code: Select all
/call Cast "${healspell}" gem1 0 CheckHPCode: Select all
Sub CheckHP
/if ( ${Me.PctHPs}<29 ) /call Cast "${daspell}" gem8 3s
/returnCode: Select all
/if ((${Math.Calc[${majorhurt}+${minorhurt}]}==${Math.Calc[${Group}+1]})&&(${Me.AltAbilityReady[38]})) /call Cast "38" activateCode: Select all
/if ((${majorhurt}==0)&&(${minorhurt}==0)) {
/Target pc ${tankname}
/delay 6 ${Target.Name.Equal[${tankname}]}
/delay 1
/if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}>${healpct})&&(${Me.PctMana}<=98)) /call MedTime
/return
}
[color=red]/if ((${Math.Calc[${majorhurt}+${minorhurt}]}==${Math.Calc[${Group}+1]})&&(${Me.AltAbilityReady[38]})) /call Cast "38" activate[/color]
/target pc ${worsthurt}Code: Select all
/declare yaulpspell string outer Yaulp VI
/if (!${Target.ID}) {
Code: Select all
/declare yaulpspell string outer Yaulp VI
/varset tankname ${Target}
/if (!${Target.ID}) {
Code: Select all
/mqpauseCode: Select all
Sub Healgroup
:healgroup
/varset worsthurt NULL
/varset worsthp 100
/varset minorhurt 0
/varset majorhurt 0
/for gmember 0 to ${Group}
/if (${Group[${gmember}].PctHPs}<=${worsthp}) {
/varset worsthurt ${Group[${gmember}].Name}
/varset worsthp ${Group[${gmember}].PctHPs}
}
/if ((${Group[${gmember}].PctHPs}<=85)&&(${Group[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
/if ((${Group[${gmember}].PctHPs}<=60)&&(${Group[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
/next gmemberCode: Select all
/if (${autohealmode}==3) {
/if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) {
/Target pc ${tankname}
/delay 6 ${Target.Name.Equal[${tankname}]}
/delay 1
/if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}<=${healpct})) /return
}
[color=red] /if (${Me.PctHPs}<=85) /return [/color]
}Code: Select all
/if ((${majorhurt}==0)&&(${minorhurt}==0)) {
/Target pc ${tankname}
/delay 6 ${Target.Name.Equal[${tankname}]}
/delay 1
/if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}>${healpct})&&(${Me.PctMana}<=98)) /call MedTime
/return
}
/target pc ${worsthurt}
/delay 5 ${Target.Name.Equal[${worsthurt}]}
/if (!${Target.ID}) /goto :healgroup
/if (${Target.Name.Equal[${tankname}]}) /return
/if (${Target.Name.Equal[${Me}]}) {
/call Healself
/return
}Code: Select all
/if (${Target.Class.Name.Equal[Warrior]})||(${Target.Class.Name.Equal[Paladin]})||(${Target.Class.Name.Equal[Shadow Knight]})) {
/if ((${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})&&(${majorhurt}<=0)&&(${minorhurt}<=2)) {
/if (${announce}==1) /g Casting ${healspell} on %T
/call Cast "${healspell}"
/delay 15 ${Me.SpellReady[${healspell}]}
/return
}
/if ((${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
/if (${announce}==1) /g Casting ${patchheal} on %T
/call Cast "${patchheal}"
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}Code: Select all
} else /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Magician]})||(${Target.Class.Name.Equal[Wizard]})||(${Target.Class.Name.Equal[Enchanter]})||(${Target.Class.Name.Equal[Druid]})) {
[color=red] /if ((${Target.PctHPs}<=86)&&(${Target.PctHPs}>=60)) { [/color]
/if ((${Target.Name.Equal[${nohotforua}]})||(${Target.Name.Equal[${nohotforub}]})||(${Target.Name.Equal[${nohotforuc}]})||(${Target.Name.Equal[${nohotforud}]})) {
/echo No ${hotspell} for ${Target.Name} (Timer not up yet)
/return
}
/if (${String[${nohotforua}].Equal[NULL]}) {
/varset nohotforua ${Target.Name}
/if (${announce}==1) /g Casting ${hotspell} on %T
/call Cast "${hotspell}"
/timed 200 /varset nohotforua NULL
} else /if (${String[${nohotforub}].Equal[NULL]}) {
/varset nohotforub ${Target.Name}
/if (${announce}==1) /g Casting ${hotspell} on %T
/call Cast "${hotspell}"
/timed 200 /varset nohotforub NULL
} else /if (${String[${nohotforuc}].Equal[NULL]}) {
/varset nohotforuc ${Target.Name}
/if (${announce}==1) /g Casting ${hotspell} on %T
/call Cast "${hotspell}"
/timed 200 /varset nohotforuc NULL
} else /if (${String[${nohotforud}].Equal[NULL]}) {
/varset nohotforud ${Target.Name}
/if (${announce}==1) /g Casting ${hotspell} on %T
/call Cast "${hotspell}"
/timed 200 /varset nohotforud NULL
}
/return
}
[color=red] /if ((${Target.PctHPs}<=59)&&(${Target.PctHPs}>=1)) { [/color]
/if (${announce}==1) /g Casting ${patchheal} on %T
/call Cast "${patchheal}"
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}Code: Select all
[color=red] } else /if ((${Target.PctHPs}<=85)&&(${Target.PctHPs}>=1)) { [/color]
/if (${announce}==1) /g Casting ${patchheal} on %T
/call Cast "${patchheal}"
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}
/return