Looting macro

TimeStamp

New member
Joined
Feb 28, 2008
Messages
78
Reaction score
0
Points
0
I want to make a simple looting macro. No warping required. I've already got the movement figured out.

It will just loot every item, passing it thru the /autodestruct filters.
It would go thru the mobs in a small area (the ones just killed by my other toon).


What's got me stumped is

(1)moving the cursor thru the loot box, item after item
and (2) responding to the dialog box when it asks "___ is a no drop item. Do you want to loot it."

How does MQ interact with dialog boxes?

-----------------------

or maybe there's already a simple loot macro (I couldn't find one that works for me)... point me in the right direction, maybe?

TIA
 
Ok, as for running through the item slots, I usually use a /for loop to go from 1 to ${Corpse.Items}.

Each corpse slot is just /itemnotify loot#, starting at 1 and going to 32.

As far as the notification window, you could either find what window it is, find the right button, and /notify it, or do "/lootnodrop never", which turns off the confirmation box. Either way works.
 
Try this

I didnt write this, but have used it forever with just a few mods.

Code:
| Just be close enough to the corpse for /loot to activate and this will work.
|
| In the loot.ini file use:  -1 to keep all of that item
|                            0 to destroy all of that item 
|                            any other number to keep just that many. (i.e. 5 would keep 5 of the item.)
|
| New loot items are added to the ini file automatically. 
|
| Loot sorted by zone.
|
|_______________________________________________________________________________________

sub LootMob 
    /varset MacroStatus LootMob
    /declare LootTimer timer local 0
    /declare LootSlot int local
    /declare MyMoney int local
    /varset MyMoney ${Me.Cash}
    /varset LootSlot 1
    :WaitForCorpse 
        /loot
        /if (${SpawnCount[Corpse range 50 65 radius 30]}==0) /return
        /if (!${Target.ID}) /return
        /delay 3s ${Corpse.Open}
        /if (!${Corpse.Open}) /goto :WaitForCorpse
        /delay 2s ${Corpse.Items}
        | /goto :doneloot
    
    :lootloop 
        /if (!${Corpse.Items}) /goto :doneloot
        /nomodkey /shift /itemnotify loot${LootSlot} leftmouseup
        /varset LootTimer 5s
        
        /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
	        
        /delay 6s ${Cursor.ID} || ${LootTimer}==0

        /doevents LoreItemFound

	/if (!${Cursor.ID} && ${LoreItemFlag}) { 
            /squelch /alert add 2 id ${Target.ID}
            /varcalc LootSlot ${LootSlot} + 1
	    /varset LoreItemFlag 0
            /goto :lootloop 
        } 

	/if (${Cursor.ID}) { 
            /call LootItemSort
            /autoinv 
            /delay 2 
            /varcalc LootSlot ${LootSlot} + 1
            /goto :lootloop 
        } 
    :doneloot
    | /delay 1s
    /notify LootWnd DoneButton leftmouseup 
    /delay 1s
    /autoinv
/return 

sub LootItemSort 
    /delay 5 
    /declare DoubleCheck local 
    /varset DoubleCheck "${Cursor.Name}" 
    /if (!${Ini[PallyLootList.ini,${Zone.Name},${Cursor.Name}].Length}) { 
        /ini "PallyLootList.ini" "${Zone.Name}" "${Cursor.Name}" "-1" 
    } else { 
        /if (${Ini[PallyLootList.ini,${Zone.Name},${Cursor.Name}]}) { 
            /if (${FindItemCount["=${Cursor.Name}"]}>=${Ini[PallyLootList.ini,${Zone.Name},${Cursor.Name}]}) {
                /if (${Ini[PallyLootList.ini,${Zone.Name},${Cursor.Name}]}!=-1) {
                    /goto :Destroy 
                }
            }
        } else { 
            :Destroy 
            /if (${Cursor.Name.Equal[${DoubleCheck}]}) { 
                /destroy 
                /return 
            } 
        } 
    } 
    :LootIt 
    /autoinventory 
    /delay 5 
    /if (${Cursor.ID}) /goto :LootIt 
/return