I use this in 2 ways in my AutoBot macro. One is via events, the other checks for the presence of a BP and Platinum on your character. Here's an example of both:
Code: Select all
/if (!${InvSlot[chest].Item.ID} && !${Me.Platinum}) /call Wait4RezCode: Select all
#Event Dead "#*#Returning to Bind Location#*#"
Sub Event_Dead
/call Wait4Rez
/doevents flush
/returnv2.1- Shortened it up to under 40 lines using my patented A_Druid_00 optimization technique. If anyone can make it smaller and still reliably loot a corpse regardless of lag, etc; feel free to post it.
v2.0- OK, I massively rewrote this using my acquired knowldge over the past year or so of working with MQ. It uses local variables to prevent conflict with other incs that might use the same names for variable (Hi advloot). It now only uses 1 subroutine, since the other 2 subroutines were only called once in the macro anyway. It also uses the /nomodkey option for loot window notification, so that if you accidentally hit the Alt key you don't get spammed with 5000 item inspection popup windows. It uses a lot less in the way of /goto :stuff loops, to speed up the whole process and spend less time parsing for :stuff. Oh, it always loots to the last item now, since your corpse no longer poofs if it hasn't been rezzed.
Code: Select all
|Wait4rez.inc v2.1
Sub Wait4Rez
/echo Awaiting rez: auto-accepting, and looting my corpse
/consent group
/delay 25
/consent raid
/delay 25
/consent guild
:rezmeffs
/delay 600m ${Window[ConfirmationDialogBox].Open}
/if (!${Window[ConfirmationDialogBox].Open}) /goto :rezmeffs
/nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
:zoneffs
/delay 5m ${Spawn[${Me}'s corpse].ID}
/if (${Spawn[${Me}'s corpse].ID}) /target mycorpse
/delay 5s ${Target.ID}==${Spawn[${Me}'s corpse].ID}
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zoneffs
:corpsepull
/if (${Target.Distance}>100 || !${Spawn[${Me}'s corpse].ID}) /return
/if (${Target.Distance}>20) /corpse
/delay 5s ${Target.Distance}<20
/loot
/delay 5s ${Me.State.Equal[BIND]}
/if (${Me.State.NotEqual[BIND]}) /goto :corpsepull
/declare loottotal int local
:LootLag
/varset loottotal ${Corpse.Items}
/delay 1s ${loottotal}!=${Corpse.Items}
/if (${loottotal}!=${Corpse.Items}) /goto :LootLag
/declare i int local
/for i 1 to ${loottotal}
:lootagain
/itemnotify loot${i} rightmouseup
/delay 10s !${Corpse.Item[${i}].ID}
/if (${Corpse.Item[${i}].ID}) /goto :lootagain
/next i
/nomodkey /notify LootWnd DoneButton leftmouseup
/return



