Code: Select all
|New AFK Cleric Macro
|afkcleric.mac
|Author: Digitalxero
|Usage: /macro afkcleric.mac <sit> <heal percent>
|Example: /macro afkcleric.mac 1 60
#event MeHit " hits YOU for "
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event Fizzle "Your spell fizzles!"
Sub Main
/declare Healpct int outer ${Param1}
/declare Fastheal string outer Supernal Light
/declare Groupnum int outer
/declare i int outer
/declare Sit int outer ${Param0}
/declare Delay int outer
/declare Casting string outer
:chkevent
/doevents
/varset Groupnum ${Group}
| *** AutoHeal ***
:Healcheck
/for i 1 to ${Group}
/if (${Group[${i}].PctHPs}<=${Healpct}) {
/if (${Group[${i}].PctHPs}<1) /goto :nextmember
/if (${Group[${i}].Class.Name.Equal["Warrior"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Paladin"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Shadow Knight"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Monk"]}) /goto :Tankheal
/doevents
/goto :CasterHeal
:Tankheal
/if (!${Buff[Divine Barrier].ID}) {
/target ${Group[${i}].Name}
/stand
/g CH on %t!
/varset Casting Complete Healing
/cast "Complete Healing"
/doevents
/varset Delay ${Math.Calc[${Spell[Complete Healing].MyCastTime}*10+10]}
/delay ${Delay}
/if (${Sit}==1) /sit
/goto :nextmember
}
:Casterheal
/if (!${Buff[Divine Barrier].ID}) {
/target ${Group[${i}].Name}
/stand
/g Fast Heal on %t!
/varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]}
/varset Casting ${Fastheal}
/cast "${Fastheal}"
/doevents
/delay ${Delay}
/if (${Sit}==1) /sit
}
:nextmember
}
/next i
/goto :chkevent
/return
Sub Event_MeHit
/if (${Me.PctHPs}<=60 AND ${Me.PctHPs}>40) {
/if (!${Buff[Divine Barrier].ID}) {
/if (!${Me.Buff[Supernal Elixir].ID}) {
/target myself
/stand
/g Elixir %t!
/varset Casting Supernal Elixir
/cast "Supernal Elixir"
/doevents
/varset Delay ${Math.Calc[${Spell[Supernal Elixir].MyCastTime}*10+5]}
/delay ${Delay}
}
}
} else /if (${Me.PctHPs}<=40 AND ${Me.PctHPs}>25) {
/if (!${Buff[Divine Barrier].ID}) {
/target myself
/stand
/g Fast Heal on %t!
/varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]}
/varset Casting ${Fastheal}
/cast "${Fastheal}"
/doevents
/delay ${Delay}
}
} else {
/stand
/if (!${Buff[Divine Barrier].ID}) {
/varset Casting Divine Barrier
/cast "Divine Barrier"
/doevents
/varset Delay ${Math.Calc[${Spell[Divine Barrier].MyCastTime}*10+5]}
/delay ${Delay}
/if (${Buff[Divine Barrier].ID}) /g DBed! NO HEALS for 18 Sec
}
}
/return
Sub Event_Fizzle
/goto :Healcheck
/return
Sub Event_OutOfMana
/g OOM, meding
/if (${Sit}==1) /sit
/delay 5s
/return
Sub Event_OutOfRange
/g %t your OOR!
/delay 1s
/return
Sub Event_Fizzle
/cast "${Casting}"
/return





