Page 4 of 5

Posted: Mon Dec 13, 2004 10:49 am
by A_Druid_00
Just used my .inc version yesterday with the new zip, no problems. The only difference between this one and my inc is the sub names, so I can't see it behaving differently.

Posted: Sun Apr 17, 2005 1:27 pm
by fantum409
Something in EQ or MQ changed a while back and now it need some delay to wait for all of the items to show up before looting. If you were getting "error in number of items to loot" and the macro ended before looting appropriately, you need this update.

=)

Posted: Fri May 06, 2005 2:40 am
by jaq
Great Macro fantum409, I really enjoy using it. I wanted to point out a very minor bug I found in the code while I was in the process of moding the macro to one that will just loot my corpse for me (basicly striped out the wait for rez part)

The condition in the /if statement below will always return NULL if the player does not have a target. Its not a huge issue as the macro catches it down further and echos the "where did my corpse go.. " message. But the message "No corpse in this zone" is never seen.

Code: Select all

| -----------------------
| -- Pull corpse close --
| -----------------------
Sub Loot
   :corpsepull
   /target mycorpse
   /delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
   [color=red]/if (${Target.CleanName.NotEqual[${Me}'s corpse]})[/color] {

      /echo No corpse in this zone
      /return
I fixed this just by adding a || check to see if the player has a target. If they don't then it assumes they don't have a corpse in zone.

Code: Select all

| -----------------------
| -- Pull corpse close --
| -----------------------
Sub Loot
   :corpsepull
   /target mycorpse
   /delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
  [color=lime] /if (${Target.CleanName.NotEqual[${Me}'s corpse]} || !${Target.ID}) [/color]{
      /echo No corpse in this zone
      /return
I know this is really minor, but thought I would point it out. I doubt anyone would ever see the bug unless they did what I did and used the loot code without the rez accept code.

--jaq

Re: Wait4rez.mac: consent, accept rez then loot (Update 4/17

Posted: Sat May 07, 2005 3:11 pm
by Fixxer
fantum409 wrote:Warning: TL boxes look just like rez boxes so it will accept any kind of rezz or TL. Need to find a way to make it read the text...
So what you are saying is that some sick necro could wait in the guild lobby and cast Sacrifice on you, and this would automatically accept it? Has there been any progress on figuring out how to prevent this (other than waiting in your guild hall instead of the guild lobby for the rez)?

Thanks.

Re: Wait4rez.mac: consent, accept rez then loot (Update 4/17

Posted: Sun May 08, 2005 12:31 pm
by Clueless_Coder
Fixxer wrote:So what you are saying is that some sick necro could wait in the guild lobby and cast Sacrifice on you, and this would automatically accept it? Has there been any progress on figuring out how to prevent this (other than waiting in your guild hall instead of the guild lobby for the rez)?

Thanks.
I'm not a coder by any means, nor do I have a handle on all that can be put into a macro, but was just wondering if building a slight pause into the routine that accepts the rez might help? Give you time to read the confirm box before it accecpts it that way? So if it were a TL or Sac confirmation you can decline it?

Re: Wait4rez.mac: consent, accept rez then loot (Update 4/17

Posted: Fri May 13, 2005 3:59 pm
by DumbStruck
Clueless_Coder wrote:
Fixxer wrote:So what you are saying is that some sick necro could wait in the guild lobby and cast Sacrifice on you, and this would automatically accept it? Has there been any progress on figuring out how to prevent this (other than waiting in your guild hall instead of the guild lobby for the rez)?

Thanks.
I'm not a coder by any means, nor do I have a handle on all that can be put into a macro, but was just wondering if building a slight pause into the routine that accepts the rez might help? Give you time to read the confirm box before it accecpts it that way? So if it were a TL or Sac confirmation you can decline it?
In order to sacrifice some one u must be in same group ..

Posted: Mon May 16, 2005 8:50 am
by A_Druid_00
This mac is only set up to run once and end once the corpse is looted. So technically some evil necro could sac you, but he could only sac you once unless you're a dumbass and decided to restart the macro and let him do it again.

Posted: Mon May 16, 2005 11:04 am
by dedpoet
If you're worried about it, find this line in there:

Code: Select all

/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
And change it to something like:

Code: Select all

/if (${Window[ConfirmationDialogBox].Open}) {
   /delay 5s
   /notify ConfirmationDialogBox Yes_Button leftmouseup
}
That would leave the box up for 5 seconds. If this is a big problem fo you though, you may want to consider just accepting the rez manually and then once you're zoned, use lootmycorpse to do the looting.

Posted: Sat Jul 02, 2005 1:36 pm
by Terramantian
People in the help forum are too busy complaining about the pointless string change, so i'll ask here. Is this working for anyone since the patch? The ConfirmationDialogBox window seems to have disappeared, at least for me.

Posted: Wed Jul 13, 2005 12:45 am
by Warauinu
Getting the error message

Code: Select all

Bad {} blocking
and it references these sections

Code: Select all

} else /goto :LootItem

Code: Select all

/call Loot

Posted: Wed Jul 13, 2005 7:09 am
by A_Druid_00
/shrug, my wait4rez.inc still works. If anyone wants to take a look at it and find out what's so different between the two, feel free. Or you can even just make a macro that has

Code: Select all

#include Wait4Rez.inc
Sub Main
/call Wait4Rez
/return
and start it up.

Posted: Wed Jul 13, 2005 10:39 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 10:54 am
by A_Druid_00
Apparently it's a good thing I haven't updated my zip since like the 7th!

Posted: Thu Jul 14, 2005 10:38 pm
by Warauinu
Thanks Fearless

Posted: Tue Mar 14, 2006 9:17 am
by Harden
I havent had the chance to Die and test this yet, so someone please post if it's not working. Just did a coupld minor updates to it.

Code: Select all

|** Wait4rez.mac by FaNTuM, 
This will automatically accept rez, then loot your corpse for you, leaving 
   the specified number of items on it. Usage: </mac wait4rez 0> where 0 
   is the number of items to leave on corpse, 0 loots all items. 03/30/2005 
03/14/2006 Updated by Harden
	-Added a status /echo, when rez box is recieved.
	-Added Automatic Mod Rod Clicking after looting corpse.(Thanks Gimp) Excludes: BER, BRD, MNK, ROG, WAR**| 

#include spell_routines.inc

| -------------- 
| -- Main Sub -- 
| -------------- 
Sub Main 
   /declare t int outer 0 
   /declare loottotal int outer 
   /declare lootslot int outer 
   /declare lootleft int outer 1 

   /if (!${Defined[Param0]}) { 
      /echo Defaulting to leaving ${lootleft} item/s on corpse 
   } else { 
      /varset lootleft ${Param0} 
   } 
   /echo Wait4rez.mac activated. Now consenting guild, raid, and group. 
| -------------- 
| -- Consents -- 
| -------------- 
   /consent guild 
   /delay 30 
   /consent raid 
   /delay 30 
   /consent group 
   /echo Awaiting rez: will auto-accept, then loot leaving ${lootleft} item/s on corpse 
| --------------------- 
| -- Auto-accept Rez -- 
| --------------------- 
   :waitforrez 
   /if (!${Window[ConfirmationDialogBox].Open}) { 
      /delay 1s ${Window[ConfirmationDialogBox].Open} 
      /goto :waitforrez 
   } 
   /if (${Window[ConfirmationDialogBox].Open}) {
		/echo Auto accepting rez in 5 sec
		/echo Rez window text: ${Window[ConfirmationDialogBox].Child[CD_TextOutput].Text}
		/delay 5s
		/notify ConfirmationDialogBox Yes_Button leftmouseup
		/delay 5s
	} 
| ---------------------------------------------- 
| -- Wait until fully zoned in before looting -- 
| ---------------------------------------------- 
   :zonein 
   /delay 5 
   /target mycorpse 
   /delay 5 ${Target.CleanName.Equal[${Me}'s corpse]} 
   /if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein 
   /if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
      /delay 3s 
      /call Loot 
   } else {
    /goto :zonein
    } 
/end 

| ----------------------- 
| -- Pull corpse close -- 
| ----------------------- 
Sub Loot 
	:corpsepull 
	/target mycorpse 
	/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
	/if (${Target.CleanName.NotEqual[${Me}'s corpse]} || !${Target.ID}) {
		/echo No corpse in this zone 
	/return  
   } 
   /delay 3s 
   /corpse 
   /delay 1s ${Target.Distance}<20 
   /if (${Target.Distance}>20) { 
      /echo Corpse is too far away 
      /return 
   } 
| --------------------- 
| -- Open the corpse -- 
| --------------------- 
   /if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
      /loot 
   } else { 
      /echo where did my corpse go? 
      /return 
   } 
   /delay 5s ${Me.State.Equal[BIND]} 
   /if (${Me.State.NotEqual[BIND]}) /goto :corpsepull 
   /varset loottotal 0 
| ----------------- 
| -- Count items -- 
| ----------------- 
   /delay 3s 
   :LootLag 
   /if (${loottotal}!=${Corpse.Items}) { 
      /varset loottotal ${Corpse.Items} 
      /delay 2s 
      /goto :LootLag 
   } 
   /if (${loottotal}<=${lootleft}) { 
      /echo Looting aborted.  Error in number of items to be left on corpse. 
      /notify LootWnd DoneButton leftmouseup 
      /return 
   } 
   /varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]} 
| --------------------- 
| -- Loot the corpse -- 
| --------------------- 
   /echo Looting all but ${lootleft} item(s) 
   /for lootslot 1 to ${loottotal} 
   :LootItem 
   /itemnotify loot${lootslot} rightmouseup 
   /delay 5 !${Corpse.Item[${lootslot}].ID} 
   /if (!${Corpse.Item[${lootslot}].ID}) { 
      /next lootslot 
   } else {
   /goto :LootItem
   } 
| ----------------- 
| -- Doublecheck -- 
| ----------------- 
   /if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag 
   /notify LootWnd DoneButton leftmouseup 
   /echo Done looting.  ${lootleft} Item(s) left on your corpse.

| ------------------------------ 
| -- Uses mod rod if possible -- 
| ------------------------------ 
   /if (${Me.MaxMana} && ${Me.PctMana}<=10 && ${Me.CurrentHPs}>=1500 && !${Select[${Me.Class.ShortName},BRD,MNK,ROG,WAR,BER]} && ${FindItem[Rod of Mystical Transvergance].InvSlot} && !${FindItem[Rod of Mystical Transvergance].Timer}) { 
      /call Cast "Rod of Mystical Transvergance" item 
      /echo Clicking modrod 
   } 
   /if (${Me.Standing} && ${Me.MaxMana} && !${Me.Moving} && !${Me.Casting.ID}) /sit 
/return  
Edit- Forgot to mention spell_routines.inc is required for the ModRod code to work properly. Just Delete the following, if you don't want ModRod clicking:

Code: Select all

| ------------------------------ 
| -- Uses mod rod if possible -- 
| ------------------------------ 
   /if (${Me.MaxMana} && ${Me.PctMana}<=10 && ${Me.CurrentHPs}>=1500 && !${Select[${Me.Class.ShortName},BRD,MNK,ROG,WAR,BER]} && ${FindItem[Rod of Mystical Transvergance].InvSlot} && !${FindItem[Rod of Mystical Transvergance].Timer}) { 
      /call Cast "Rod of Mystical Transvergance" item 
      /echo Clicking modrod 
   } 
   /if (${Me.Standing} && ${Me.MaxMana} && !${Me.Moving} && !${Me.Casting.ID}) /sit 
/return