hdnine 0 Report post Posted January 22, 2017 Been at it now soooooo long that it's driving me crazy. According to the API you should be able to retrieve the value of debuffType (which could be "Magic, Disease, Poison, Curse, or nothing for those with out a type") but i can't get it to work no matter what i do. >.< I am trying to write a script that checks what type of debuff i have on me. Any help would be much appreciated. 0 Share this post Link to post Share on other sites
Ike 20 Report post Posted January 22, 2017 First of all, don't use that wiki. The name is misleading as the site contains information from all kinds of patches (at least up to WotLK). Save yourself some trouble by using http://wow.gamepedia.com/ instead and just click "History" in the top right and go back to around August of 2006 on the sites you're interested in (I know that TBC released in December, but many sites were being updated before that). In contrast to the vanilla-wow wiki, this one was actually trying to be accurate. Regarding your problem: http://wow.gamepedia.com/index.php?title=API_UnitDebuff&oldid=204497 for i = 1, 16 do local debuffTexture, debuffApplications, debuffDispelType = UnitDebuff("player", i); if debuffDispelType then DEFAULT_CHAT_FRAME:AddMessage(debuffDispelType); end end This is how you'd use the function. 1 Share this post Link to post Share on other sites
hdnine 0 Report post Posted January 22, 2017 OMG you're my hero! Not much of a programmer but i do understand it to some extent. LUA felt a bit strange to me and i got super frustrated when all i got was "interface\icons\" and the spell name. Thanks! 0 Share this post Link to post Share on other sites
Rhena 30 Report post Posted January 22, 2017 It also is common use to not assign names to return values you are not going to use. It would look like this then: for i = 1, 16 do local _, _, debuffDispelType = UnitDebuff("player", i); if debuffDispelType then DEFAULT_CHAT_FRAME:AddMessage(debuffDispelType); end end 1 Share this post Link to post Share on other sites
Ike 20 Report post Posted January 22, 2017 True, but since I figured he was new to this I wanted to make this as straightforward as possible. If he decides to go the extra mile and learns Lua he will inevitably read these more eccentric details eventually. If he doesn't then there's no reason to confuse him with this stuff as it makes no difference to the outcome. 0 Share this post Link to post Share on other sites