----------------------------------------------------------------
OUTDATED,
new version found here:
http://macroquest2.com/phpBB2/viewtopic.php?t=3804
----------------------------------------------------------------
First macro I've managed to clean up enough to post :) ..
Intended for raiding clerics, goes through all corpses within a defined radius and clicks them. It cycles through corpses twice, the first time clicking corpses that are defined as high priority, people you want to get up first for example other clerics that can help you click. This behaviour is defined in Sub HasPriority.
Max range for the spell is actually 200ft but for safety you might want to use something shorter.
Haven't had a chance to test it on a real raid wipe but I've tested it around graveyards in various pop zones.
Suggestions and bug reports welcome.
Code: Select all
| Click.mac - Click all corpses around you - by blueninja
| Resurrects all corpses within a radius using the cleric epic
| Clicks high priority classes first as defined by Sub HasPriority
|
| You probably want to run this with '/filter macros enhanced' to avoid targeting spam
#turbo
#define clickradius 100
#event interrupt "Your spell is interrupted"
#event notequipped "You cannot use this item unless it is equipped."
#event notmemmed "You do not seem to have that spell memorized."
Sub Event_interrupt
/varset status 2
/return
Sub Event_notequipped
|Epic is in an inventory slot, need to put it in primary
/endmacro
/return
Sub Event_notmemmed
|Epic is bagged or banked
/endmacro
/return
Sub Main
/press esc
/declare status global
/declare oldtargetid local
|First loop through high priority classes..
:loopprio
/varset status 0
/varset oldtargetid $target(id)
/target corpse range 1 65 radius clickradius next
/doevents
|If we didn't get a new target move on to low priority
/if @oldtargetid==$target(id) /goto :clicktherest
|Check if this is a high priority corpse
/call HasPriority
/if $return!="true" /goto :loopprio
/call clickit
/goto :loopprio
:clicktherest
/press esc
|.. then everyone else
:restloop
/varset status 0
/varset oldtargetid $target(id)
/target corpse range 1 65 radius clickradius next
/doevents
| If we didn't get a new target quit
/if @oldtargetid==$target(id) /endmacro
|Check that this isn't a priority corpse
/call HasPriority
/if $return=="true" /goto :restloop
/call clickit
/goto :restloop
/return
Sub HasPriority
|Add conditions for corpses to click before everyone else here
|For example you might want to get clerics up first to help out with rezzing
|or bards for manaregen song.
/if "$target(class)"=="Cleric" /return "true"
/if "$target(class)"=="Bard" /return "true"
/return "false"
Sub clickit
/declare counter local
/declare giveup local
/declare castwait local
/if $target()=="FALSE" /return
|Counter to give up after 4 attempts at rezzing a corpse
|that fail either by interrupt or if we can't cast for 3 seconds
/varset giveup 0
:tryagain
/varadd giveup 1
|Too many tries, move on to next
/if n @giveup>4 /return
/varset status 0
/varset castwait 0
|Wait until we are not casting, if we wait too long, treat as an interrupt
:waitforcast
/if $char(casting)!="TRUE" /goto :castit
/delay 5
/varadd castwait 1
/if n @castwait>5 /goto :tryagain
/goto :waitforcast
:castit
/cast item "water sprinkler of nem ankh"
|Wait until not casting anymore
:castdelay
/delay 1s
/doevents
/if n @status==2 /goto :tryagain
/if n @status==1 /return
/if $char(casting)=="TRUE" /goto :castdelay
/return
EDIT: Removed the hp check, seems like it wasn't very reliable after all. So now it's back to clicking corpses.




