Page 1 of 6

Wait4rez.inc v2.1

Posted: Mon Nov 22, 2004 8:25 pm
by A_Druid_00
Usage:
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 Wait4Rez

Code: Select all

#Event Dead             "#*#Returning to Bind Location#*#"

Sub Event_Dead
/call Wait4Rez
/doevents flush
/return
12/18
v2.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

Posted: Fri Jan 21, 2005 6:31 am
by fallon
There an easy way to kick this off after comming off a death to desktop or the like?

It works great, when it works. However it fails when you get clobbered in the middle of something in the main macro frequently & also obviosly fails when you crash while zoning from your death, then log back on.

A /wait4rez command to manually deliver a swift kick in the ass and get things going again might be nice... although I'm not sure if that's really possible from an include.

Posted: Fri Jan 21, 2005 8:28 am
by A_Druid_00
That's when I just load up vanilla wait4rez.mac.

Posted: Fri Jan 21, 2005 11:07 am
by Cr4zyb4rd
Just put /if (!${Me.Copper}) /call Wait4Rez somewhere in your main macro loop.

Posted: Fri Jan 21, 2005 11:44 am
by JGC84
i'd check to see if i was wearing a piece of armor on my arm ; thats not somthing very many people ever switch out for clicky effects and what not.

Posted: Fri Jan 21, 2005 11:58 am
by Cr4zyb4rd
i'd check to see if i was wearing a piece of armor on my arm ; thats not somthing very many people ever switch out for clicky effects and what not.
...

Posted: Fri Jan 21, 2005 12:10 pm
by aChallenged1
Cr4zyb4rd wrote:Just put /if (!${Me.Copper}) /call Wait4Rez somewhere in your main macro loop.
I destroy copper on a regular basis, so the arms or a ring might be more likely, at least for me. It really depends on the person. It is easy enough to modify that line for whatever way you want it.

Posted: Sun Jan 23, 2005 12:52 pm
by JGC84
1 JGC point for aC1 for understanding me w/o further explantion!

(JGC points have no value, and no one really wants them anyway, but you get one!)

Posted: Sun Jan 23, 2005 2:10 pm
by Arune
What about a zone name to kick this off? I don't use macros across zones very often, so if it picks up the zone name, then it calls the sub.

Posted: Sun Jan 23, 2005 6:50 pm
by Cr4zyb4rd
For understanding you? Gosh it was just so far over my head...

Posted: Mon Jan 24, 2005 8:46 am
by JGC84
your just jelous you dont have a JGC point cr4zy

Posted: Sun Jun 26, 2005 1:06 am
by Airvz
Arune wrote:What about a zone name to kick this off? I don't use macros across zones very often, so if it picks up the zone name, then it calls the sub.
Would be easy to do. For example if you were bound in PoK.

Code: Select all

#event PoK "You have entered the Plane of Knowledge."
#include wait4rez.inc
Sub Main
:loop
/doevents
/goto :loop
/return

Sub event_PoK
/call wait4rez
/return
Just an example but you get the point, and that would be easy to add to your mac.

Posted: Wed Jul 13, 2005 10:40 am
by fearless
Change

Code: Select all

} else /goto :zonein
to

Code: Select all

} else {
/goto :zonein
}
Change

Code: Select all

} else /goto :LootItem
to

Code: Select all

} else {
/goto :LootItem
}

Posted: Wed Jul 13, 2005 11:45 am
by Fixxer
With the Autoconsent feature, does this really need to have the consent lines in it anymore?

Posted: Wed Jul 13, 2005 11:49 am
by TheNewGuy
Yes

It surely doesn't hurt, and on my many toons on many computers I could forget to turn on autoconsent on a few of them on one computer or the other. I'd vote just leave it in, it doesn't hurt anything.