As the macro is now, it makes the cleric use MoR pants, MoB spell, and CH. But that's of course something that could be easily altered. TIA.
Code: Select all
| PL.mac by ms1089
| Usage: /mac PL <name of PL'ee> <percentage of heal>
| Example: /mac PL Bob 50
#include spellcast.inc
#event dead "#*#have been slain#*#"
#event resist "#*#Your target resisted#*#"
#event marked "#*#gleams with bright red runes#*#"
#event marked "#*#bound by the mark of the blameless#*#"
sub main
/echo Heal&MoR PL Macro
/declare plee string outer ${Param0}
/declare healhps int outer ${Param1}
/declare mobid int outer
/declare idaq int outer
/declare mor int outer
/declare markspell string outer Ultor's Greaves of Faith
/declare markspell2 string outer Mark of the Blameless
/declare healspell string outer Complete Healing
/if (!${Defined[Param0]}) {
/echo You didn't name your PL'ee
/echo Usage: /mac PL <name of PL'ee> <percentage of heal>
/echo Ex: /mac PL Bob 50
/endmac
}
/if (!${Defined[Param1]}) {
/echo You didn't define when to heal
/echo Usage: /mac PL <name of PL'ee> <percentage of heal>
/echo Ex: /mac PL Bob 50
/endmac
}
/keypress Esc
:mainloop
/call assist
/call mark
/call mark2
/call heal
/call checkifdead
/doevents
/goto :mainloop
sub assist
:assist
/if (${mor}==0 && ${idaq}==0) {
/assist ${plee}
/delay 1s
/if (${Target.Type.Equal[NPC]}) {
/varset mobid ${Target.ID}
/varset mor 0
/varset idaq 1
/echo Target aquired.
/goto :assist
}
}
/doevents
/return
sub mark
:mark
/if (${mor}==0 && ${idaq}==1) {
/target ID ${mobid}
/if (${Target.ID} && ${Target.PctHPs}<98 && ${Target.Distance}<80) {
/target ID ${mobid}
/echo Casting MoR
/call cast "${markspell}" item
/doevents
/goto :mark
}
}
/doevents
/return
sub mark2
:mark2
/if (${mor}==1 && ${idaq}==1) {
/target ID ${mobid}
/if (${Target.ID} && ${Target.PctHPs}<98 && ${Target.Distance}<80) {
/target ID ${mobid}
/echo Casting MoB
/call cast "${markspell2}"
/doevents
/goto :mark2
}
}
/doevents
/return
sub heal
:heal
/if (${mor}==2 && ${idaq}==1) {
/target ${plee}
/if (${Target.ID} && ${Target.PctHPs}<${healhps} && ${Target.Distance}<80) {
/target ${plee}
/echo Casting HEAL
/call cast "${healspell}"
/goto :heal
}
}
/doevents
/return
sub checkifdead
/if (${mor}>0 && ${idaq}>0) {
/if (!${Spawn[${mobid}].Type.Equal[NPC]}) {
/echo Mob defeated. Waiting for next.
/varset idaq 0
/varset mor 0
}
}
/return
sub event_dead
/echo You have been owned. GL finding a rezz. Ending Macro.
/endmac
sub event_resist
/echo ${Target.CleanName} RESISTED
/return
sub event_marked
/echo ${Target.CleanName} was MARKED
/varset mor ${Math.Calc[${mor}+1]}
/return

