j0achim
New Member
- Joined
- Jan 15, 2010
- Messages
- 532
- Reaction score
- 15
Hi!
Working on a project, where I'm basically logging everything, but i just cant find any elegant way to determine what mob i have looted what from.
(there is an older similar thread like this on the forum, however i came no longer with what was noted in it here and i was unable to resurrect it as it was archived)
Anyhow this is how i want it to look:
OnMobKilled events works flawless.. So atm i store last confirmed kill Guid then when LUA event "CHAT_MSG_LOOT" fires this Guid (LastKillGuid) is stored with the loot. Making it in fights where you have killed more then 1 npc in fight unreliable, as it could be 10 mobs being looted and log would think it was all dropped from last kill.
Working on a project, where I'm basically logging everything, but i just cant find any elegant way to determine what mob i have looted what from.
(there is an older similar thread like this on the forum, however i came no longer with what was noted in it here and i was unable to resurrect it as it was archived)
Anyhow this is how i want it to look:
Code:
Styx.BotEvents.Player.OnMobLooted += OnLoot;
//Nor does this work:
Styx.BotEvents.Player.OnMobLooted += new Styx.BotEvents.Player.MobLootedDelegate(OnLoot);
private void OnLoot(Styx.BotEvents.Player.MobLootedEventArgs args)
{
Logging.Write(Color.ForestGreen, "[Testing]: Looted mob ");
Logging.Write(Color.ForestGreen, "[Testing]: Looted mob " + args.LootedMob.Name + " (" + args.LootedMob.Guid + ")");
}
OnMobKilled events works flawless.. So atm i store last confirmed kill Guid then when LUA event "CHAT_MSG_LOOT" fires this Guid (LastKillGuid) is stored with the loot. Making it in fights where you have killed more then 1 npc in fight unreliable, as it could be 10 mobs being looted and log would think it was all dropped from last kill.
Last edited: