|** Lewt.mac by Gnuoy
Make a hotkey:
/mac lewt.mac
clear the zone ... this targets, warps, and loots all the corpses in the zone.
Uses /warp t and /warp s
I use MQ2Cursor to handle autodestroying items.
Mostly TheNewGuy's code just made it loot for all corpses in zone.
This code based upon Wat4rez.mac by FaNTuM. Changed from Wait4rez.mac to
loot.mac at the following URL:
http://www.macroquest2.com/wiki/inde...xisting_Macros
**|
#Event Skip "You may not loot that item from this corpse."
| --------------
| -- Main Sub --
| --------------
Sub Main
/declare Alert int outer 1
/declare Skip bool outer FALSE
/declare t int outer 0
/declare loottotal int outer
/declare lootslot int outer
/declare CurrentZone int
/echo Looting all corpses ...
/varset CurrentZone ${Zone.ID}
:main
/if (${Zone.ID}!=${CurrentZone}) {
/echo You have zoned macro ended ...
/end
}
/tar corpse${If[${Alert}, noalert ${Alert},]}
/if (!${Target.ID}) {
/go to
/echo Done Looting ...
/delay 5
/if (${Alert}) /alert clear ${Alert}
/end
}
/go to
/delay 5
/loot
| -----------------
| -- Count items --
| -----------------
/delay 5
:LootLag
/if (${loottotal}!=${Corpse.Items}) {
/varset loottotal ${Corpse.Items}
/delay 1s
/goto :LootLag
}
/if (${loottotal}<=0) {
/notify LootWnd DoneButton leftmouseup
/delay 2
/goto :Main
}
| ---------------------
| -- Loot the corpse --
| ---------------------
/for lootslot 1 to ${loottotal}
:LootItem
/itemnotify loot${lootslot} leftmouseup
/doevents
/if (${Corpse.Item[${lootslot}].Lore}) {
/vgroup 7
/doevents
/gsay Lore Item < ${Corpse.Item[${lootslot}]} >
/if (${lootslot}==${loottotal}) /goto :loredone
/next lootslot
}
/squelch /notify QuantityWnd QTYW_Accept_Button LeftMouseUp
/delay 1
/autoinventory
/if (!${Corpse.Item[${lootslot}].ID}) {
/next lootslot
} else {
/goto :LootItem
}
:loredone
/notify LootWnd DoneButton leftmouseup
:end
/delay 15
/autoinventory
/goto :main
/return
|--------------------------------------------------------------------------------
|Skip this corpse, move on the to the next one.
|--------------------------------------------------------------------------------
Sub Event_Skip
/alert add 1 corpse id ${Target.ID}
/varset Skip TRUE
/return