#turbo 40
Sub Main
/declare CurZone int outer ${Zone.ID}
/declare angle float outer 0
/declare NextX float outer 0
/declare NextY float outer 0
/declare i int outer 1
/declare Dist int outer 10
:Loop
/call CHECKAURA
/call HEAL
/call SAFETY
/call TARGET
/for i 1 to 2
/varcalc angle ${Target.Heading.Degrees}
/if (${i}==1) {
/varcalc NextY ${Target.Y}+${Math.Calc[${Dist}*${Math.Sin[${angle}]}]}
/varcalc NextX ${Target.X}+${Math.Calc[${Dist}*${Math.Cos[${angle}]}]}
} else {
/varcalc NextY (${Target.Y}-${Math.Calc[${Dist}*${Math.Sin[${angle}]}]})
/varcalc NextX (${Target.X}-${Math.Calc[${Dist}*${Math.Cos[${angle}]}]})
}
/squelch /warp loc ${NextY} ${NextX} ${Target.Z}
/squelch /face fast nolook
/nodelay
/next i
/goto :Loop
SUB CHECKAURA
/if (!${Me.Song[Master's Aura Effect].ID}) {
/squelch /superghost return
/doability "Master's Aura"
/delay 4s
/squelch /superghost on
}
/return
SUB HEAL
/if (${Me.PctHPs}<65) {
/doability mend
}
/if (${Me.PctHPs}<50) {
/cast item "Distillate of Celestial Healing X"
}
/if (${Me.PctHPs}<40) {
/squelch /superghost return
/doability "Feign Death"
/echo You Almost Died! Ending.
/end
}
/return
SUB SAFETY
/if (${SpawnCount[PC]}>1) {
/echo A PC or GM in Zone! Gating!
/gate
/call SUB SHUTDOWN
}
/if (${Zone.ID}!=${CurZone}) {
/echo You have zoned. Shutting down.
/call SUB SHUTDOWN
}
/return
SUB SHUTDOWN
/echo Turning Superghost off and ending the macro.
/superghost off
:ShutdownLoop
/end
/goto :ShutdownLoop
/return
SUB TARGET
/if (!${Target.ID}) {
/squelch /superghost return
/echo Getting a new target.
/target ${NearestSpawn[${Math.Calc[${SpawnCount[npc radius 3000]}+5]}, npc]}
/delay 5
/squelch /superghost on
}
/return