I had a problem with the macro not closing loot window if there were no items on the corpse. Here is my modification that worked, before and after code shown.
Before:
Code: Select all
Sub LootMob
/declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
/delay 1s
/face fast
/keypress forward
/keypress back
/keypress forward
/delay 2s
/loot
/delay 2s
/doevents
/if (!${Corpse.Items}) {
/echo NO LOOT! Cheap Bastard!
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 1s
/if (${RV_LootAllItems}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 1s
} else {
/for LootCheck 1 to ${RV_LootArray.Size}
/if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 1s
}
/next LootCheck
}
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/delay 1s
}
/next LootSlot
/notify LootWnd DoneButton leftmouseup
/delay 2
/look
/return
After:
Code: Select all
Sub LootMob
/declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
/delay 1s
/face fast
/keypress forward
/keypress back
/keypress forward
/delay 2s
/loot
/delay 2s
/doevents
/if (!${Corpse.Items}) {
/echo NO LOOT! Cheap Bastard!
/notify LootWnd DoneButton leftmouseup
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 1s
/if (${RV_LootAllItems}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 1s
} else {
/for LootCheck 1 to ${RV_LootArray.Size}
/if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 1s
}
/next LootCheck
}
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/delay 1s
}
/next LootSlot
/notify LootWnd DoneButton leftmouseup
/delay 2
/look
/return
There are also a few problems i'm having with the macro that I haven't been able to fix yet .. maybe someone else knows more.
1) If a mob adds on me while i'm killing one, my pet finishes off the add and the macro never loots the add's corpse.
2) Getting the macro to delete items not specified in the loot section of the ini. I have /varset RV_LootAllItems 0 for the zone i'm farming in setup in the farming.inc but yet it loots every item on the corpse. The loot table on the mobs i'm farming is huge too so it would be a pain to specify all items i'm supposed to delete.
3) Pathing. I'm getting stuck on trees, rocks, and whatnot. I'm planning on just making the pathing code very detailed but was wondering if there was a better way. It seems like MQ could just attempt to target Mob1, Mob2, ..., MobN then /face and go kill it and repeat rather than pathing around but I don't have the coding knowlege to do that yet (I'm a newbe t o this stuff yet.)
Anyways, thanks for the awesome macro and any help you can give me. It does work very well for the most part.