Better way to loot?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

User avatar
SimpleMynd_01
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu May 08, 2003 3:16 pm

Better way to loot?

Post by SimpleMynd_01 » Wed May 12, 2004 11:08 am

In all the hunter bots and such I always see code like:

Code: Select all

/loot 
/delay 2s
Well my problem is that I play on satellite and so latency can be any anywhere for .5 to 3 or 4 seconds. I figured I'd be able to use something like:

Code: Select all

/loot
:OpenCorpse
/delay 1
/if !${Corpse.Open} /goto :OpenCorpse
But when I tried it it didn't seem to work. (But in retrospect there's a chance that I had typoed $!{Corpse.Open} so it might just be me!) So while I'm here at work, is the above theory sound even with lots of lag/latency?

-SimpleMynd

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Wed May 12, 2004 11:23 am

depending on the rest of your script, that loop may put you in an infinte loop if the script tries to loot someone elses corpse.

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Missing ()

Post by Chill » Wed May 12, 2004 12:54 pm

You are missing () around the condition in your /if statement.

Assuming ${Corpse.Open} is a valid boolean expression, add those and your code should work:

Code: Select all

/loot 
:OpenCorpse 
/delay 1 
/if (!${Corpse.Open}) /goto :OpenCorpse

User avatar
SimpleMynd_01
a lesser mummy
a lesser mummy
Posts: 71
Joined: Thu May 08, 2003 3:16 pm

Post by SimpleMynd_01 » Wed May 12, 2004 1:02 pm

Hmm... was just typing from memory, but good reminder. I'll put it back into my macro tonight (and after MQ2 is up and running) so I can cut/paste what isn't working. The logic always semed sound to me, but didn't work when (I thought) I put it into practice. :)