Moderator: MacroQuest Developers
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
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
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)?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...

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?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.

In order to sacrifice some one u must be in same group ..Clueless_Coder wrote: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?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.
Code: Select all
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseupCode: Select all
/if (${Window[ConfirmationDialogBox].Open}) {
/delay 5s
/notify ConfirmationDialogBox Yes_Button leftmouseup
}
Code: Select all
Bad {} blockingCode: Select all
} else /goto :LootItemCode: Select all
/call LootCode: Select all
#include Wait4Rez.inc
Sub Main
/call Wait4Rez
/returnCode: Select all
} else /goto :zoneinCode: Select all
} else {
/goto :zonein
}Code: Select all
} else /goto :LootItemCode: Select all
} else {
/goto :LootItem
}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 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