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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/ Share on other sites More sharing options...
Matenia 628 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25605 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25608 Share on other sites More sharing options...
Matenia 628 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25611 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25612 Share on other sites More sharing options...
Matenia 628 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25615 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 https://wrobot.eu/forums/topic/5613-fightclass-cleanse/#findComment-25617 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