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

Function for checking for buffs

Status
Not open for further replies.

remark

New Member
Joined
Nov 13, 2014
Messages
58
Reaction score
0
Made this little function to check if a buff is on you

it seems to work, but someone smarter than me could probably figure out something more fancy.


Code:
//Function that checks if a buff is on you, just need the first part of the buff name, should suffice
private bool Buff(string skillname)
    {
         bool result;
         return result = me.getBuffs().Exists(b => b.name.StartsWith(skillname));
     }

here is how you would call it, to see if you are missing a buff, in this case Double Recurve and then cast it.

Code:
    if(!Buff("Double")  && skillCooldown("Double Recurve") == 0)
        UseSkillAndWait("Double Recurve", true);

havent done any rough testing of it, but for my little autoattack script and self buff it works.
 
Status
Not open for further replies.
Back
Top