Barok
Member
- Joined
- Sep 11, 2014
- Messages
- 231
- Reaction score
- 0
Don't work UseSkill(String) in cycle.
Example:
Log:
Skills only once at the first start of the script, then neither the first nor the second skill is no longer working. Why?
Example:
Code:
mountSkill1 = view.cbMountSkill1.SelectedItem.ToString();
mountSkill2 = view.cbMountSkill2.SelectedItem.ToString();
Log(mountSkill1);
Log(mountSkill2);
while (true)
{
try
{
mount = getMount();
if (mount != null && me.sitOnMount && isAlive() && getSkill(mountSkill1) != null && skillCooldown(mountSkill1) == 0)
{
Log("Skill1 OK");
if (!UseSkill(mountSkill1))
Log(GetLastError().ToString());
}
Thread.Sleep(148);
if (mount != null && me.sitOnMount && isAlive() && getSkill(mountSkill2) != null && skillCooldown(mountSkill2) == 0 )
{
Log("Skill2 OK");
if(!UseSkill(mountSkill2))
Log(GetLastError().ToString());
}
}
catch (Exception e)
{
Log(DateTime.Now.ToString("T") + " Error in mountBuff: " + e.Message, "LogErrorSmartTrader");
}
Thread.Sleep(367);
}
}
Log:
Code:
Погоня
Неудержимый рывок
Skill1 OK //First UseSkill() norm
Skill2 OK //Fail skill2
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill1 OK //Fail skill2
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill1 OK //Fail skill1
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill1 OK //Fail skill1
ActionNotAllowed
Skill2 OK //Fail skill2
ActionNotAllowed
Skill1 OK //Fail skill1
ActionNotAllowed
...






