Event_loot_received
Hello,
I'm trying to get a function to execute on event_loot_received but only if the item type is a recipe. Is that even possible? GetItemLinkItemType looks promising but I couldn't get it to work, most likely due to me not using it correctly. I tried using something like "function() if itemType == ITEMTYPE_RECIPE then ....." but I can't seem to get the itemType when I loot a recipe. Any help is appreciated. |
Here's a handler that should work:
Lua Code:
|
Quote:
|
Quote:
Thanks merlight. I made the mistake of putting "local itemtype = getitemlinkitemtype" outside of the function. Don't know what possessed me to do such a thing. I got the code to work within the eventmanager:registerforevent call. |
All times are GMT -6. The time now is 09:11 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI