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

UseSkillAndWait with ID?

Status
Not open for further replies.

stevenr

Member
Joined
Jan 15, 2010
Messages
871
Reaction score
0
Hi,

I will use the UseSkillAndWait with the german translation, is it possible?

UseSkillAndWait("Sturmangriff"); will not work

UseSkillAndWait("Charge"); will also not work
 
There is no native function UseSkillAndWait(). Function is UseSkill(str, bool, bool).

from api.
Code:
public bool UseSkill(
	string name,
	bool autoCome,
	bool selfTarget
)
 
Thx, I copy it from Fight4You.

UseSkill("Charge"); works
 
Code:
    public void UseSkillAndWait(string skillName, bool selfTarget = false)
    {
        //wait cooldowns first, before we try to cast skill
        while (me.isCasting || me.isGlobalCooldown)
            Thread.Sleep(50);
        if (!UseSkill(skillName, true, selfTarget))
        {
            if (me.target != null && GetLastError() == LastError.NoLineOfSight)
            {
                //No line of sight, try come to target.
                if (dist(me.target) <= 5)
                    ComeTo(me.target, 2);
                else if (dist(me.target) <= 10)
                    ComeTo(me.target, 3);
                else if (dist(me.target) < 20)
                    ComeTo(me.target, 8);
                else
                    ComeTo(me.target, 8);
            }
        }
}

Copypasta from Fight4You, most important thing is this handles global cd as well so your cpu doesn't choke.
 
Status
Not open for further replies.
Back
Top