Post your completed (working) macros here. Only for macros using MQ2Data syntax!
Moderator: MacroQuest Developers
-
bob_the_builder
- a hill giant

- Posts: 275
- Joined: Tue Jul 22, 2003 1:22 pm
Post
by bob_the_builder » Thu Apr 29, 2004 9:26 pm
Loot items after res or loot all but X items
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
Bob
Last edited by
bob_the_builder on Wed May 05, 2004 9:04 am, edited 6 times in total.
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Thu Apr 29, 2004 9:42 pm
You missed a var:
Code: Select all
/itemnotify loot@LootSlot rightmouseup
-
nald
- orc pawn

- Posts: 15
- Joined: Sat Dec 20, 2003 9:30 am
Post
by nald » Sat May 01, 2004 6:38 am
This one not working for me? Off to look for the setting to remove the profainity :)
Macro - Loading macro: D:\games\MQ2-Latest\Release\Macros\loot.mac
Macro - Starting macro with '/call Main 0'
WriteChatColor([MQ2] Using default LootLeft of "1")
WriteChatColor([MQ2] Useage: /mac loot <# items to leave on corpse>)
WriteChatColor([MQ2] Useage: /mac loot 0 <Loots all items>)
Target - toonsname's corpse0 selected
CChatHook::Detour(Summoning toonsname corpse...)
CChatHook::Detour(You receive 109 platinum, 188 gold, 257 silver and 290 copper as your split.)
WriteChatColor(GKFJDGJKFDGJKDF you fucking broke it FUCKING DUMBASS)
WriteChatColor(Calculate encountered unparsable text '"1"')
WriteChatColor(loot.mac@36 (main): /varset LootTotal "${Math.Calc[${Corpse.Items}-${LootLeft}].Int}")
WriteChatColor(The current macro has ended.)
WriteChatColor(FUCKING CHRIST whatever you're smoking, pass it MOTHER FUCKING along FUCKING IDIOT)
WriteChatColor(/varset failed, variable 'LootTotal' not found)
-
theafkxper
- a hill giant

- Posts: 207
- Joined: Sun Sep 08, 2002 6:41 pm
Post
by theafkxper » Sun May 02, 2004 2:03 am
line 15:
Code: Select all
/varset LootLeft [color=red]"[/color]1[color=red]"[/color]
remove the quotes and should be alright
-
Space-Boy
- a hill giant

- Posts: 242
- Joined: Wed Dec 04, 2002 12:53 pm
-
Contact:
Post
by Space-Boy » Sun May 02, 2004 10:28 pm
Code: Select all
/for loops ust use an int variable
loot.mac@41 (main): /for LootSlot 1 to ${LootTotal}
The Current Macro has ended.
not to sound like a fucktard but please post working macros =P i was all hoping this would work, and i still have no clue how the hell to fix it lol
thats the spew i get
You have gotten better at Carpal Tunnel! (247)
-
dirx
- orc pawn

- Posts: 21
- Joined: Fri Dec 05, 2003 1:00 am
- Location: orlando
Post
by dirx » Sun May 02, 2004 11:21 pm
I got this to work by changing a few things here is my code.
Code: Select all
Sub main
/declare LootTotal
/declare LootSlot int
/declare LootLeft
[color=red] /varset LootLeft ${Param0}[/color]
:CheckParam
[color=red]/if (!${Defined[Param0]})[/color] {
/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 ${LootLeft}
}
:CheckMyCorpse
/target mycorpse
/corpse
/loot
/delay 2s
:CheckIfCorpseNear
/if (!${Corpse.Items}) {
/popup NO CORPSE TO LOOT
/endmacro
}
:SetLootTotal
[color=red]/varset LootTotal ${Math.Calc[${Corpse.Items}-${LootLeft}].Int}[/color]
/echo Total to Loot: ${LootTotal}
/popup LOOTING ALL BUT ${LootLeft} ITEMS
: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
The lines I changed are in red. I have been looking for this exact macro you guys rock.
Thanks,
Dirx