Loot all but X items
Posted: Thu Apr 29, 2004 9:26 pm
Loot items after res or loot all but X items
Bob
Code: Select all
| Loot.mac
| By LordGiddion and AP50
| Edited by Bob_the_builder
| 5/2/04
| /mac loot <# items to leave on corpse>
|
Sub main
/declare LootTotal int
/declare LootSlot int
/declare LootLeft int
:CheckParam
/if (!${Defined[Param0]}) {
/varset LootLeft 1
/echo Using default LootLeft of ${LootLeft}
/echo Useage: /mac loot <# items to leave on corpse>
/echo Useage: /mac loot 0 <Loots all items>
} else {
/varset LootLeft ${Param0}
}
:CheckMyCorpse
/target mycorpse
/corpse
/loot
/delay 2s
:CheckIfCorpseNear
/if (!${Corpse.Items}) {
/popup NO CORPSE TO LOOT
/endmacro
}
:SetLootTotal
/varset LootTotal ${Math.Calc[${Corpse.Items}-${LootLeft}].Int}
/echo Total to Loot: ${LootTotal}
:MainLoop
/for LootSlot 1 to ${LootTotal}
|/echo loot slot: ${LootSlot}
/itemnotify loot${LootSlot} rightmouseup
/delay 1s
/next LootSlot
:DoneLooting
/delay 1s
/notify LootWnd DoneButton leftmouseup
/popup DONE LOOTING
/endmacro