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

Help with UseSkillAndWait()

Status
Not open for further replies.

remark

New Member
Joined
Nov 13, 2014
Messages
58
Reaction score
0
Where would i put a Log("Used :" +skillName);

in this to have it log when i used the skill, tried a few different things but cant get it right.


Code:
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            while (me.isCasting || me.isGlobalCooldown)
            {
                Thread.Sleep(50);
            }   
            
            if (!UseSkill(skillName, false, selfTarget))
            {
                while (me.isCasting || me.isGlobalCooldown)
                {
                    Thread.Sleep(50);
                }
            }
        }


Edit:

Think i figured it out, heh shows how not focusing on a thing for a bit will help in figuring it out, maybe.


added an else to the if thing since that is cast the skill but if i failed, so the else would be cast the skill but i succeeded. or something like that. but seems to work for now

Code:
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            while (me.isCasting || me.isGlobalCooldown)
            {
                Thread.Sleep(50);
            }   
            
            if (!UseSkill(skillName, false, selfTarget))
            {
                while (me.isCasting || me.isGlobalCooldown)
                {
                    Thread.Sleep(50);
                }
            }
else
                 Log(": Used ->" +skillName);

        }
 
Last edited:
Status
Not open for further replies.
Back
Top