Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include spell_routines.inc
- Sub Main
- |CHANGE THESE!!!!
- /declare FastHeal string outer "fastheal1"
- /declare HoTHeal string outer "hot1"
- /declare MainHeal string outer "heal1"
- /declare Invuln string outer "invulnspellhere"
- /declare FastHealPct int outer 30
- /declare HotPct int outer 80
- /declare MainHealPct int outer 50
- /declare OhShitPct int outer 30
- /declare MedPct int outer 30
- /declare MedTil int outer 90
- |Don't worry about these
- /declare TankID int outer 0
- /declare TankHoT timer outer 0
- /declare HoTTimers[6] timer outer 0
- /echo Cleric Mac started, here we go!
- /if (!${Target.ID}) {
- /echo No target at the start of the mac, just healing the group
- } else {
- /varset TankID ${Target.ID}
- }
- :mainloop
- /if (${Me.PctHPs}==0 || ${Me.State.Equal[HOVER]}) /endmac
- /if (${TankID}!=0) /call TankCheck
- /call GroupCheck
- /call OhShitCheck
- /call MedCheck
- /if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID}) /sit
- /goto :mainloop
- /return
- Sub TankCheck
- |Sadly we do have to target the tank if he isn't in the group to check his HP
- /if (${Target.ID}!=${TankID}) /call Target ${TankID}
- /if (${Target.PctHPs}<=${FastHealPct}) /call Cast "${FastHeal}"
- /if (${Target.PctHPs}<=${HotPct} && !${TankHoT}) {
- /call Cast "${HotHeal}"
- /if (${Return.Equal[CAST_SUCCESS]}) /varset TankHoT ${Me.Book[${Me.Book[${HotHeal}]].Duration.TotalSeconds}s
- }
- /if (${Target.PctHPs}<=${MainHealPct}) /call Cast "${MainHeal}"
- /return
- Sub GroupCheck
- /declare i int local 0
- |For loops rock!
- /for i 0 to ${Group.Members}
- |If group member i is the tank, or they aren't in the zone or they are more than 200 units away, skip them
- |If you want to check the tank in between every other group member uncomment the line below this
- |/if (${TankID}!=0) /call TankCheck
- /if (${Group.Member[${i}].ID}==${TankID}|| !${Group.Member[${i}].ID} || ${Group.Member[${i}].Distance}>200) /next i
- /if (${Group.Member[${i}].PctHPs}<=${FastHealPct}) {
- /call Target ${Group.Member[${i}].ID}
- /call Cast "${FastHeal}"
- }
- /if (${Group.Member[${i}].PctHPs}<=${HotPct} && !${HoTTimers[${i}]}) {
- /call Target ${Group.Member[${i}].ID}
- /call Cast "${HotHeal}"
- |If the heal was successful set a timer so we don't spam the hot on them
- /if (${Return.Equal[CAST_SUCCESS]}) /varset HoTTimers[${i}+1] ${Me.Book[${Me.Book[${HotHeal}]].Duration.TotalSeconds}s
- }
- /if (${Group.Member[${i}].PctHPs}<=${MainHealPct}) {
- /call Target ${Group.Member[${i}].ID}
- /call Cast "${MainHeal}"
- }
- /next i
- /return
- Sub Target(int id)
- :GetTarget
- /target ID ${id}
- /delay 5 ${Target.ID} ==${id}
- /if ${Target.ID}!=${id} && ${Spawn[ID ${id}].ID} /goto :GetTarget
- /return
- Sub OhShitCheck
- /if (${Me.PctHPs}<=${OhShitPct})
- {
- /if (${Me.Casting.ID})
- {
- /call Interrupt
- /delay 1s !${Me.Casting.ID}
- }
- /group OH SHIT HELP ME!!!
- /cast ${Invuln}
- /beep
- |This really should be more complex than waiting 10 seconds before continuing but
- |I'm trying to keep it simple let me know if you want to know what you should do
- /delay 10s
- }
- /return
- Sub MedCheck
- /beep
- /gsay I need to med please...
- /echo MED DUMBASS
- |Usually here I would still check to see if any one needs heals
- |But since healing is all this script does...
- :MedLoop
- /if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID}) /sit
- /delay 1s ${Me.PctMana}>${MedTil}
- /if (${Me.PctMana}<${MedTil}) /goto :MedLoop
- /echo Done medding
- /gsay Ready to go!
- /return
Add Comment
Please, Sign In to add comment