I'll post a slightly less rubbish version in the VIP area. Now is a good time to donate for VIP access!
Code: Select all
| Simple out of group Heal/nuke PL MAC by vsab
| Code lifted from the various Autobots, Blitter's pl mac, AFCleric and probably a ton of other more sophisticated macs.
| Version 1.0 28/11/12
| This mac does two things; firstly monitors a player, healing if necessary
| And it nukes the hell out of any mob <50% HP within range
| This assumes your nuke spell is in gem 1, your patch/quick heal in gem 2, your BIG heal in gem3 and a heal over time in gem 4
| Change line 30 to the tname of the toon you wish to monitor.
| The VIP section has a more sophisticated version:-
| -- all configuration driven by an ini file customisable per character
| -- checks for a minimum amount of mana before nuking (e.g. only over 50% mana)
| -- monitors and heals more than one PC (merc support too!)
| -- interrupts longer heal spell casting if target HP's are below a threshhold, and heals with a quick heal instead
| -- heal over time timer set only when it was cast successfully
| -- casts a MoK spell on each mob
#turbo 40
Sub Main
/declare HotSpellDuration string outer 21s
/declare HotSpellTimer1 timer outer
/declare MobID[150] int outer
/declare j int outer
/declare myMob int outer
/declare MinimumHealth int outer 50
/declare NumMobs int outer 1
/declare MobAdded int outer 0
/declare MobRadius int outer 50
/declare PcId1 int outer 0
/echo PL mac starting up. Setting PC ID's
/varset PcId1 ${Spawn[pc "Insert_Your_Toon_Here"].ID}
:loop
/delay 1s
/call CheckHealth
/if (${NearestSpawn[1,NPC zradius 20].Distance}>${MobRadius}) /goto :loop
/for myMob 1 to ${SpawnCount[NPC radius ${MobRadius} zradius 20]}
/target id ${NearestSpawn[${myMob},NPC zradius 20 radius ${MobRadius}].ID}
/delay 1s ${Target.ID}==${NearestSpawn[${myMob},NPC zradius 20 radius ${MobRadius}].ID}
/if (${Target.PctHPs}<${MinimumHealth} ) {
/cast 1
}
}
/call CheckHealth
/next myMob
/doevents
/goto :loop
/return
Sub CheckHealth
/target targetable id ${PcId1}
/delay 1s ${Target.ID}==${PcId1}
/call HealTarget
/return
Sub HealTarget
/if (${Target.PctHPs} > 95) /return
/if (${Target.PctHPs} <40) {
/echo Casting patch heal on ${Target.ID}
/cast 2
/return
}
/if (${Target.PctHPs} < 70) {
/echo Casting big heal on ${Target.ID}
/cast 3
/return
}
/if (${Target.PctHPs} <95) {
/if (${Target.ID}==${PcId1} && !${HotSpellTimer1} ) {
/echo Casting HoT on ${PcId1}
/cast 4
/varset HotSpellTimer1 21s
}
/return
}
/return

