Stand Alone Looting Macro [7/20/04]

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

exslam
orc pawn
orc pawn
Posts: 14
Joined: Wed Jun 23, 2004 6:19 am

Stand Alone Looting Macro [7/20/04]

Post by exslam » Tue Jul 20, 2004 2:34 pm

Made this for my bard, while AE kiting..
got bored with having to loot each one ><
Saw a loot mac earlier this month, but decided to write/snippet one together.

Thanks to Robdawg for the loot code.

One problem i forsee, but havent tested, is that it will target PC corpses..
But, I dunno how to work around that yet..

Code: Select all

|------------
|
|  Taken Parts of Robdawg's Hunter.mac Loot code
|
|  Edited and designed to meet my needs 
|  ~Exslam
|
|
|------------

   /declare RV_LootSlot         int outer  0


Sub Main

   /squelch /target radius 500 corpse
   /if (!${Target.ID}) {
   /echo No Corpses in Range.
   /echo Ending Macro.
   /end
}

:MoveTo
   /if ((${Target.Distance})>10) {
   /face fast
   /keypress Forward Hold
   /delay 5
}
/if ((${Target.Distance})<5) {
/delay 2
/keypress back
/goto :loot
/delay 2
}
   /goto :MoveTo

:loot

   /declare LootSlot    int inner  0
   /declare LootCheck   int inner  0
   /declare LootTotal   int inner  0

   /lootn never
   /fastdrop on
   /delay 2s
   /loot
   /delay 2s

   /if (!${Corpse.Items}) {
      /echo No Loot, moving to next.
      /return
   }

   /varset LootTotal ${Corpse.Items}
   /for LootSlot 1 to ${LootTotal}
      /itemnotify loot${LootSlot} leftmouseup
      /delay 1s
         /echo Keeping a ${Cursor.Name}.
         /autoinventory
         /delay 1s
   /next LootSlot
   
   /notify LootWnd DoneButton leftmouseup
   /delay 1s
   /if ((${Me.FreeInventory})=0) {
   /echo No Free Inventory Slots, Ending Macro.
   /end
}
   /squelch /target corpse radius 500
   /if (${Target.ID}) {
   /goto :start
   } else {
   /echo No corpses in Range, Ending Macro!
}

/return
Exslam ~

3djoker
a hill giant
a hill giant
Posts: 167
Joined: Thu Jun 24, 2004 11:19 pm

Post by 3djoker » Tue Jul 20, 2004 10:32 pm

Code: Select all

/squelch /target corpse radius 500 
what is this line doing? specifically the /squelch?

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Tue Jul 20, 2004 11:05 pm

what is this line doing? specifically the /squelch?
It's so that if there are no corpses (or they're too far) it doesn't spam the chat window with "There are no spawns matching any....."
One problem i forsee, but havent tested, is that it will target PC corpses..
But, I dunno how to work around that yet..
/target radius 500 npc corpse

exslam
orc pawn
orc pawn
Posts: 14
Joined: Wed Jun 23, 2004 6:19 am

Post by exslam » Tue Jul 20, 2004 11:34 pm

what is this line doing? specifically the /squelch?
Correct /squelch hides the responce from the MQ2 window, it keeps less clutter out for me.
/target radius 500 npc corpse
Tried that, i may have used the wrong syntax, but it didnt work for me, it would still target the PCs corpse... was gonna test that out tonight near a graveyard, may still

Exslam ~

Pickled
a lesser mummy
a lesser mummy
Posts: 34
Joined: Tue Sep 16, 2003 11:29 am

Post by Pickled » Wed Jul 21, 2004 5:29 am

Can this cope with items that you loot that are Lore and you may already own?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Wed Jul 21, 2004 6:13 am

Doesn't look like there is a check built into it to check for lore dups, nor for that matter No Drops.

I think, from the looks of it that it is supposed to have some kind of loot list. Keep in mind, I'm still learning.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

exslam
orc pawn
orc pawn
Posts: 14
Joined: Wed Jun 23, 2004 6:19 am

Post by exslam » Wed Jul 21, 2004 4:06 pm

This code doesn't check if the Item is Lore or No Drop.
It did have a loot list originally, but I dont know enought to read INI,.

Like i said this was mainly for my bard while kiting. So i would just loott anything on the corpse.

Maybe when i learn more about it ill enhance itt, but for now ... =(


Exslam ~