superkillen 0 Posted April 9, 2017 Share Posted April 9, 2017 Hi! I've created a fightclass for my paladin while leveling, I want him to cleanse nasty debuffs... (the one I am trying to cleanse now is Toxic Saliva, spell ID 7125 he doesn't do nothing about it when I have Return value research: 1 Return value var: result but if I delete both those lines he just spams cleanse (it works but that's just cuz I've got it in the last spots in my priority list) my question is, what have I done wrong? :( prot pala TBC dubbel wisdom.xml Link to comment Share on other sites More sharing options...
Matenia 625 Posted April 9, 2017 Share Posted April 9, 2017 UnitBuff looks like this in TBC local name, rank, iconTexture, count, duration, timeLeft = UnitBuff(unit, buffIndex[, castable]); UnitDebuff looked like this: local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff(unitID, debuffIndex [, removable]); local buffNames = { ["Toxic Saliva"] = true, }; for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("player", i) if (buffNames[name]) then result=1 return; end end Link to comment Share on other sites More sharing options...
superkillen 0 Posted April 9, 2017 Author Share Posted April 9, 2017 2 hours ago, Schaka said: UnitBuff looks like this in TBC local name, rank, iconTexture, count, duration, timeLeft = UnitBuff(unit, buffIndex[, castable]); UnitDebuff looked like this: local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff(unitID, debuffIndex [, removable]); local buffNames = { ["Toxic Saliva"] = true, }; for i=1,40 do local name, rank, iconTexture, count, debuffType, duration, timeLeft = UnitDebuff("player", i) if (buffNames[name]) then result=1 return; end end you sir is a god among men. worked perfect, so if I want more debuffs cleansed, do I have to do a new cleanse for every debuff? or could I add so it cleanses all poison/disease/magic? Link to comment Share on other sites More sharing options...
Matenia 625 Posted April 9, 2017 Share Posted April 9, 2017 You just add the debuffname, like such: local buffNames = { ["Toxic Saliva"] = true, ["Shadow Word: Pain"] = true, }; Link to comment Share on other sites More sharing options...
superkillen 0 Posted April 9, 2017 Author Share Posted April 9, 2017 1 minute ago, Schaka said: You just add the debuffname, like such: local buffNames = { ["Toxic Saliva"] = true, ["Shadow Word: Pain"] = true, }; will be a long list... would it be able to do it with debuffType? Link to comment Share on other sites More sharing options...
Matenia 625 Posted April 9, 2017 Share Posted April 9, 2017 If you changed the code to not check for name but debuffType, sure. But your table has to contain the debuffTypes then. You can use the History function on WoWWiki to read the old TBC API. Link to comment Share on other sites More sharing options...
superkillen 0 Posted April 9, 2017 Author Share Posted April 9, 2017 yeah this is a little over the top for my knowledge, I will just add all the debuffs :) thanks for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now