Thread: GetItemInfo()
View Single Post
06-21-08, 10:27 AM   #6
Mejloc
A Murloc Raider
Join Date: Mar 2008
Posts: 8
pattern = string.gsub(string.gsub(value, "(%%s)", "(.+)"), "(%%d)", "(.+)");
local start, fin, arg1, arg2, arg3 = string.find(msg, pattern)

where value is i.e. LOOT_ITEM_SELF and msg is your loot event string.

Depending which loot event type you got, arg? is different and contains the owner, item and amount. In case of LOOT_ITEM_SELF arg1 contains the itemlink, rest is nil.

now you extract the needed info from the link.

this is how i realized a simple item tracker.
  Reply With Quote