Loot Any Corpse
This macro is UNTESTED, but should work fine. If it doesn't - hit edit and fix it.
Converted from Wait4Rez.mac to loot.mac here---> Editing Existing Macros
1
|** Loot.mac by TheNewGuy
2
20 July 2005
3
4
Make a hotkey:
5
/mac loot.mac
6
7
When something dies, push that hotkey as you are standing over the
8
corpse. This should loot everything.
9
10
This code based upon Wat4rez.mac by FaNTuM. Changed from Wait4rez.mac to
11
loot.mac at the following URL:
12
13
http://www.macroquest2.com/wiki/index.php/Editing_Existing_Macros
14
15
**|
16
17
| --------------
18
| -- Main Sub --
19
| --------------
20
Sub Main
21
/declare t int outer 0
22
/declare loottotal int outer
23
/declare lootslot int outer
24
/declare lootleft int outer 0
25
/if (!${Defined[Param0]}) {
26
} else {
27
/varset lootleft ${Param0}
28
}
29
/tar corpse
30
/loot
31
| -----------------
32
| -- Count items --
33
| -----------------
34
/delay 3s
35
:LootLag
36
/if (${loottotal}!=${Corpse.Items}) {
37
/varset loottotal ${Corpse.Items}
38
/delay 2s
39
/goto :LootLag
40
}
41
/if (${loottotal}<=${lootleft}) {
42
/notify LootWnd DoneButton leftmouseup
43
/return
44
}
45
/varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]}
46
| ---------------------
47
| -- Loot the corpse --
48
| ---------------------
49
/for lootslot 1 to ${loottotal}
50
:LootItem
51
/itemnotify loot${lootslot} rightmouseup
52
/delay 5 !${Corpse.Item[${lootslot}].ID}
53
/if (!${Corpse.Item[${lootslot}].ID}) {
54
/next lootslot
55
} else {
56
/goto :LootItem
57
}
58
| -----------------
59
| -- Doublecheck --
60
| -----------------
61
/if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag
62
/notify LootWnd DoneButton leftmouseup
63
/return
Copied!
Last modified 6mo ago
Copy link