UPDATE: Modified the mob's name parsing. It no longer needs to parse, so I got rid of the /declare, /varcalc, and used ${Target.DisplayName} instead.
Code: Select all
|LootMob.inc
|
|Looting include that also keeps track of loot from mobs
|
||||||||||||||||||||
| LootMob
||||||||||||||||||||
Sub LootMob
{
/declare slot int local 1
/declare NumberItems int local 0
/echo Looting corpse
/target corpse
/loot
/delay 2s
/varset NumberItems ${Corpse.Items}
/if (${NumberItems}>0) {
/for slot 1 to ${NumberItems}
/nomodkey /itemnotify loot${slot} leftmouseup
/delay 1s
:LagFix
/call DoINI "${Target.DisplayName}"
/autoinventory
/delay 1s
/if (${Cursor.ID}) /goto :LagFix
/next slot
}
/nomodkey /notify LootWnd DoneButton leftmouseup
/delay 5
/if (${Target.ID}) /target clear
/delay 1s
/return
}
||||||||||||||||||||
| DoINI
||||||||||||||||||||
Sub DoINI(string MobName)
{
/declare ItemSetting int local
/declare NotFound int local -1
| Look up this item in (Zone).ini
/varset ItemSetting ${Ini["LootList/${Zone.ShortName}.ini",${MobName},${Cursor.Name},${NotFound}]}
/delay 5
| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "LootList/${Zone.ShortName}.ini" "${MobName}" "${Cursor.Name}" "1"
/varset ItemSetting 1
}
/return
}

