What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Need help with some buffdetection code (Paladin's "The Art of War")

Koglin

New Member
Joined
Jan 15, 2010
Messages
23
Reaction score
0
So basically what i need is i piece of code that detects Paladins buff "The Art of War".
If i use _me.Buffs.ContainsKey("The Art of War") it detects it as allways active/present.
If i use _me.ActiveBuffs.ContainsKey("The Art of War") or _me.PassiveBuffs.ContainsKey("The Art of War") it does not detects it at all..So if it is not an active or a passive buff then what kind is it ?
Please Help.
 
You need to use LUA code to do it.

Code:
public static bool IsBuffOnMeLUA(string buffName)
{
string luaCode = String.Format("buffName,_IfPet,_IfPet,stackCount,_IfPet,_IfPet,_IfPet,_IfPet,_IfPet=UnitBuff(\"player\",\"{0}\")", buffName);
Lua.DoString(luaCode);
returnLua.GetLocalizedText("buffName", Me.BaseAddress) == buffName;
}
 
After i use this code or this code..CC is not loading, i add references from ather CC's but it still not loading

public bool IsBuffOnMeLUA(string BuffName)
{
Lua.DoString("buffName,_,_,stackCount,_,_,_,_,_=UnitBuff(\"player\",\"" + BuffName + "\")");
string buffName = Lua.GetLocalizedText("buffName", Me.BaseAddress);


if (buffName == BuffName)
{
return true;
}

else
return false;
}
 
Last edited:
Back
Top