Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
|** 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 **|
| --------------
| -- 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}) /notify ConfirmationDialogBox Yes_Button leftmouseup
| ----------------------------------------------
| -- 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]}) {
/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.
/return