Esempio n. 1
0
def SemiNDSi(siSkill, dummySkill, delay, on, attackSpeed):
    Terminal.SetCheckBox("Auto Attack", False)
    Terminal.SetRadioButton("SIRadioMelee", True)
    Terminal.SetCheckBox("MonkeySpiritsNDcheck", False)
    count = 0
    if siSkill != 32120055:
        delay = 30 * math.ceil(delay * 1000 * (10 + attackSpeed) / 480) / 1000
    print("The delay for skill {} is {}, starting si".format(siSkill, delay))
    if siSkill not in [25101000, 25121000]:
        sleepTime = 0.231
    else:
        sleepTime = 0.101
    while Field.GetCharacterCount() <= 1 and Field.GetEliteState(
    ) != 2 and len(Field.GetMobs()) > 0 and not Terminal.IsRushing(
    ) and GameState.IsInGame(
    ) and not Terminal.GetRadioButton("SIRadioDragon") and on:
        Terminal.SetCheckBox("Skill Injection", True)
        Terminal.SetLineEdit("SISkillID", str(siSkill))
        Terminal.SetCheckBox("Melee No Delay", True)
        Terminal.SetSpinBox("SkillInjection", 17)
        time.sleep(sleepTime)
        #Terminal.SetCheckBox("Melee No Delay",False)
        Terminal.SetLineEdit("SISkillID", str(dummySkill))
        time.sleep(0.043)
        Terminal.SetCheckBox("Skill Injection", False)
        time.sleep(delay + 0.05)
        #if Terminal.IsRushing():
        #    break
        if count >= 30:
            break
        if siSkill == 27111303 and not (Character.HasBuff(2, 20040220)
                                        or Character.HasBuff(2, 20040219)):
            break
        count += 1
    print("Si ended due to break options")