Looting Script

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

Kingmen30264
decaying skeleton
decaying skeleton
Posts: 7
Joined: Fri Oct 13, 2006 11:26 am
Contact:

Looting Script

Post by Kingmen30264 » Tue Mar 29, 2011 4:22 am

Hi, I am new to trying to write a macro for MQ2 to run for me and I need a little help with sorting out the parts that I am missing.

What I am basically trying to do is write a macro that allows me to loot a corpse while avoiding the No Trade Items, but at the same time allows me to loot all of the "vendor trash".

Currently when running a hotkey I made (Line 1: /tar corpse | Line 2: /lootall ) /lootall will not loot any of the items that are not No Trade if there is more than one No Trade item on the corpse. For example, if the mob drops Slot 1: Diamond Slot 2: No Trade Necklace Slot 3: No Trade Augment, it will just skip all items on corpse and won't even recognize the Diamond in Slot 1 even though it is first.

Here is the code that I have come up with so far. Keep in mind I am just a newb, so it probably looks like a two-year wrote it :(

Code: Select all

| Loot.mac

Sub main
  
  :loop
  
  /delay 3
  /target corpse
  /stick 10
  /delay 2 
  /lootall
  /delay 2s
  /keypress forward hold
  /delay 1
  /keypress forward
 
/goto :loop
  
 
I would like to learn more about what each line of code does, so if you could please include why you used that line/command, it would better help me to understand each commands' function and keep me from asking newb questions (You don't have to, but it would be greatly appreciated).

Thank you,
Kingmen
Greatest Ambition Is To One Day Rule The World!!


Kingmen30264
decaying skeleton
decaying skeleton
Posts: 7
Joined: Fri Oct 13, 2006 11:26 am
Contact:

Re: Looting Script

Post by Kingmen30264 » Tue Mar 29, 2011 1:58 pm

Thank you dont_know_at_all for you help with this, it has helped me understand what I have done so far.

Is there anyway for me to tell it to loot all items on a corpse that is not No Trade while avoiding the No Trade item(s)?
For example, is there a way that I can create a line of the macro to read something like:

Code: Select all


/lootall ${items.not_no_trade}

Greatest Ambition Is To One Day Rule The World!!

Olain
a snow griffon
a snow griffon
Posts: 477
Joined: Sun May 15, 2005 12:45 am

Re: Looting Script

Post by Olain » Tue Mar 29, 2011 3:44 pm

Kingmen30264 wrote:Thank you dont_know_at_all for you help with this, it has helped me understand what I have done so far.

Is there anyway for me to tell it to loot all items on a corpse that is not No Trade while avoiding the No Trade item(s)?
For example, is there a way that I can create a line of the macro to read something like:

Code: Select all


/lootall ${items.not_no_trade}

You can setup your loot macro to do this as its been done in the VIP section. As far as how its done I have no idea. Donate and check out the loot macro / include in the VIP section on how they did it.

Kingmen30264
decaying skeleton
decaying skeleton
Posts: 7
Joined: Fri Oct 13, 2006 11:26 am
Contact:

Re: Looting Script

Post by Kingmen30264 » Tue Mar 29, 2011 4:53 pm

Yeah, okay thanks... I was thinking of doing a donation to the site to gain access to the VIP section, but for right now I don't have that kind of budget, but maybe next month =)

Thanks for all the responses....
Greatest Ambition Is To One Day Rule The World!!