April 7, 20188 yr I want to add Remove Lesser Curse to mage FightClass by Fight Class Editor. Which “ conditions” i need to ues? It seems impossible to add all the curses by the conditions:Buff And Check if any buff/debuff by type seems not work in vanilla. LuaScript: anyCurse = false; for i=1,40 do local name, rank, icon, count, debuffAuraType = UnitAura("player", i); if name and debuffAuraType and debuffAuraType == "Curse" then anyCurse = true; return; end end Return Value Research: true Return Value Var: anyCurse
April 8, 20188 yr Hello, on Vanilla use http://vanilla-wow.wikia.com/wiki/API_UnitBuff or http://vanilla-wow.wikia.com/wiki/API_UnitDebuff (instead "UnitAura")
April 8, 20188 yr Author 2 hours ago, Droidz said: Hello, on Vanilla use http://vanilla-wow.wikia.com/wiki/API_UnitBuff or http://vanilla-wow.wikia.com/wiki/API_UnitDebuff (instead "UnitAura") Thanks for your help, I have replaced UnitAura with UnitDebuff,but still not work. Even if I try to replace debuffAuraType with debuffType, it is still not work. There is a debug message in the log: [D] 19:57:18 - [FightClass] Remove Lesser Curse - NeedToRun = false - condition debuffAuraType.xml debuffType.xml
April 8, 20188 yr https://forum.elysium-project.org/topic/34281-getting-debufftype-out-of-unitdebuff/?do=findComment&comment=315238 Not tested: anyCurse = false; for i = 1, 16 do local debuffTexture, debuffApplications, debuffDispelType = UnitDebuff("player", i); if debuffDispelType and debuffDispelType == "Curse" then anyCurse = true; return; end end
April 8, 20188 yr Author 12 minutes ago, Droidz said: https://forum.elysium-project.org/topic/34281-getting-debufftype-out-of-unitdebuff/?do=findComment&comment=315238 Not tested: anyCurse = false; for i = 1, 16 do local debuffTexture, debuffApplications, debuffDispelType = UnitDebuff("player", i); if debuffDispelType and debuffDispelType == "Curse" then anyCurse = true; return; end end Thanks,but......still not work. Same debug message in the log: [D] 20:37:37 - [FightClass] Remove Lesser Curse - NeedToRun = false - condition [D] 20:37:37 - [FightClass] Remove Lesser Curse - NeedToRun time to execute: 31 debuffApplications.xml
April 9, 20188 yr Author @Droidz Hello,Can i get more help? Use the following macro in the game can get a message ‘Curse’ ,Why in Wrobot conditions can not work? /run for i = 1, 16 do local debuffTexture, debuffApplications, debuffDispelType = UnitDebuff("player", i); if debuffDispelType then DEFAULT_CHAT_FRAME:AddMessage(debuffDispelType); end end And How to detect debuff Type also not work in vanilla.
September 6, 20187 yr Droidz solution works, you just need to add the condition properly. I use this: hasDebuff = false; for i=1,40 do local texture, count, debuffType = UnitDebuff("player", i); if debuffType == "Poison" then hasDebuff = true break; end end
September 24, 20187 yr On 9/6/2018 at 9:21 AM, Matenia said: Droidz solution works, you just need to add the condition properly. I use this: hasDebuff = false; for i=1,40 do local texture, count, debuffType = UnitDebuff("player", i); if debuffType == "Poison" then hasDebuff = true break; end end I'm a bit of a noob so please have patience. I'm using C# for my fightclass which is a modification of a free one. How would I go about accomplishing this same thing but in a C# fightclass? I want my pala FC to be able to use dispels for poisons/diseases. Does anyone have a similar snippet for C#?
September 24, 20187 yr You wrap that code I gave you in Lua.LuaDoString<bool>("codeHere", "hasDebuff") and if that evaluates to true - there you go
Create an account or sign in to comment