Jump to content

Add Remove Lesser Curse to FightClass


Recommended Posts

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

 

Remove Lesser Curse.jpg

Link to comment
Share on other sites

2 hours ago, Droidz said:

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

curse.jpg

debuffApplications.xml

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

  • 4 months later...

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

 

Link to comment
Share on other sites

  • 3 weeks later...
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#?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...