def AutoQuestQ19():
    if HasQuest(q19):
        if InProgress(q19, 3003432):
            if Field.GetID() not in [940204430, 940204450, 940204470]:
                for map in [450006410, 450006420, 450006430]:
                    if Field.GetID() != map:
                        Rush(map)
                    if Field.GetID() == map:
                        ToPortal("dq00")
                        time.sleep(2)
                        ToPortal("dq01")
                        time.sleep(2)

                    if Field.GetID() == 940204430:
                        break
            elif len(Field.GetMobs()) == 0:
                ToPortal("pt00")
                ToPortal("pt01")

            return True
        else:
            returnmaps[q19] = town
            if Field.GetID() == town:
                ToMid()
                Quest.CompleteQuest(q19, 3003432)

            return False
示例#2
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 in [5311000,5301000]:
        sleepTime = 0.161
    elif siSkill not in [25101000,25121000]:
        sleepTime = 0.211
    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 (siSkill == 27111303 or siSkill == 27121303) and not(Character.HasBuff(2,20040220) or Character.HasBuff(2,20040219)):
            break
        count += 1
    print("Si ended due to break options")
def AutoQuestQ20():
    if HasQuest(q20):
        if InProgress(q20, 3003469):
            if Field.GetID() not in [940204490, 940204510, 940204530]:
                for map in [450006300, 450006310, 450006320]:
                    if Field.GetID() != map:
                        Rush(map)
                    if Field.GetID() == map:
                        ToPortal("dq00")
                        time.sleep(2)

                    if Field.GetID() == 940204490:
                        break
            elif len(Field.GetMobs()) == 0:
                ToPortal("pt00")

            return True
        else:
            returnmaps[q20] = research
            if Field.GetID() == research:
                Quest.CompleteQuest(q20, 3003469)

            return False
示例#4
0
def Main():
    if GameState.IsInGame():
        if not Quest.GetQuestState(33284) == 2:
            if Terminal.IsRushing():
                Terminal.StopRush()

            CoreEnterance = 350060000
            Core = 350060160

            Lotus1 = 350060220
            Lotus2 = 350060240
            Lotus3 = 350060260

            BHCorrider = 350062000
            BHCorrider1 = 350062110
            BHCorrider2 = 350062120
            BHCorrider3 = 350062130
            BHCorrider4 = 350062150

            Quater = 350062400
            Gelimer = 350062410
            Gelimer2 = 350062500
            Escape1 = 350063000
            Escape2 = 350063001
            Escape3 = 350063002
            Escape4 = 350063003
            Escape5 = 350063004
            currentMap = Field.GetID()

            if not 350060000 <= Field.GetID() <= 350063500:
                Terminal.Rush(350061000)
                time.sleep(5)

            if currentMap == CoreEnterance:
                SetAttack(False)
                ToPortal("bossIn00")

            if currentMap in range(Core, Core + 10):
                SetAttack(True)

            if MapRange(Lotus1) or MapRange(Lotus2) or MapRange(Lotus3):
                SetAttack()

            if currentMap == 350061000:
                ToPortal("pt_350061000")

            elif currentMap == BHCorrider:
                SetAttack(False)
                ToPortal("In00")

            elif currentMap in range(BHCorrider1, BHCorrider1 + 10):
                if len(Field.GetMobs()) > 0:
                    SetAttack(True)
                else:
                    SetAttack(False)
                    ToPortal("east00")

            elif currentMap in range(BHCorrider3, BHCorrider3 + 10):
                if len(Field.GetMobs()) > 0:
                    SetAttack(True)
                else:
                    SetAttack(False)
                    ToPortal("east00")

            elif currentMap in range(BHCorrider4, BHCorrider4 + 10):
                if len(Field.GetMobs()) > 0:
                    SetAttack(True)
                else:
                    SetAttack(False)
                    ToPortal("east00")

            if currentMap == Quater:
                SetAttack(False)
                ToPortal("pt00")

            elif currentMap == Gelimer:
                Npc.ClearSelection()
                Npc.RegisterSelection("Please")
                time.sleep(2)
                SpamSpace()

            elif currentMap == Gelimer2:
                Character.MoveX(Field.FindPortal("pt00").x, 8000)
                # ToPortal("pt00")
                SpamSpace()

            elif currentMap == 350062900:
                ToPortal("out00")

            elif currentMap == Escape1:
                Character.MoveX(0, 5000)

            elif currentMap == Escape2:
                ToPortal("wet00")

            elif currentMap == Escape3:
                ToPortal("west00")

            elif currentMap == Escape4:
                time.sleep(2)
                ToPortal("pt00")

            elif currentMap == Escape5:
                SetAttack(False, False)
                Character.MoveX(200, 15000)
                # ToPortal("pt00")
                SpamKey("alt")

            elif currentMap == 350063200:
                quests = {
                    33281: 1540744,
                    33282: 1540745,
                    33283: 1540746,
                    33284: 1540729
                }

                for qid, npc in quests.items():
                    if DoQuest(qid):
                        StartQuest(qid, npc)
                        time.sleep(5)
示例#5
0
def MobExists(count=0):
    if len(Field.GetMobs()) > count:
        return True
    else:
        return False
示例#6
0
def KannaRing(_map, hero):
    dcMap = 811000013
    momijigaoka = 807000000
    childMap = 811000014
    ayameMap = 811000008

    child = 9130107
    child2 = child + 1
    ayame = 9130103
    princess = 9130116
    gourdid = 2432732
    qAyame = 58916

    if hero == "kanna":
        q1 = 58941
        q2 = q1 + 1
        q3 = q2 + 1
        q4 = q3 + 1
        q5 = q4 + 1
        q6 = q5 + 1
        q7 = q6 + 1
        q8 = 58963
        q9 = q8 + 1
        q10 = 58965
        q11 = q10 + 1
        q12 = q11 + 1
        q13 = q12 + 1
    elif hero == "hayato":
        q1 = 58928
        q2 = q1 + 1
        q3 = q2 + 1
        q4 = q3 + 1
        q5 = q4 + 1
        q6 = q5 + 1
        q7 = q6 + 1
        q8 = q7 + 1
        q9 = q8 + 1
        q10 = 58937
        q11 = q10 + 1
        q12 = q11 + 1
        q13 = q12 + 1
    elif hero == "ayameHero":
        q1 = 58914
        q2 = 58915
        q3 = 58917
        q4 = 58918
        q5 = 58919
        q6 = 58920
        q7 = q6 + 1
        q8 = q7 + 1
        q9 = q8 + 1
        q10 = q9 + 1
        q11 = q10 + 1
        q12 = q11 + 1
        q13 = q12 + 1

    if _map == momijigaoka:
        TerminalATK(False, True)
        EnterPortal("west00")
    elif _map == dcMap:
        TerminalATK(False, True)
        EnterPortal("out00")
    elif _map == ayameMap:
        TerminalATK(False, True)
        gourd = Inventory.FindItemByID(gourdid)
        if not gourd.valid:
            MoveToNpc(ayame)
            Npc.ClearSelection()
            time.sleep(talkTime)
            #Character.TalkToNpc(ayame)
            time.sleep(talkTime)
            Npc.RegisterSelection('Talk to Ayame.')
            time.sleep(talkTime)
            Character.TalkToNpc(ayame)
            #Npc.RegisterSelection('Metamorph')
            Npc.RegisterSelection('Receive another Metamorph Potion')
            time.sleep(talkTime)
        else:
            Npc.ClearSelection()
            Inventory.UseItem(gourdid)
            if hero == "kanna":
                Npc.RegisterSelection('Kanna')
            if hero == "hayato":
                Npc.RegisterSelection('Hayato')
            if hero == "ayameHero":
                Npc.RegisterSelection('Ayame')
    elif _map == 811000099:
        #bug might be here
        bugQuest = 58913
        if QuestStage(bugQuest) < 0:
            print('hi')
            StartingQuest(bugQuest, ayame)
        else:
            TerminalATK(False, True)
            print("setting up skills")
            if useGM:
                Terminal.SetCheckBox(gmType, True)
            if not useAli and not useGM:
                Key.Set(potionKey, 2, potionID)
            time.sleep(teleportTime)
            if hero == "hayato":
                Key.Set(autoAttackKey, 1, hayatoID)
            if hero == "kanna":
                Key.Set(autoAttackKey, 1, kannaID)
            if hero == "ayameHero":
                Key.Set(autoAttackKey, 1, ayameID)
            time.sleep(teleportTime)
            EnterPortal("out00")
    else:
        if not QuestCompleted(q1):
            mapid = 811000098
            StartingQuest(q1, child)
            if QuestInProgress(q1, child):
                if Character.GetPos().x != 91:
                    Character.Teleport(91, 62)
                    time.sleep(teleportTime)
                else:
                    if sendPacket:
                        print("sending packet")
                        SendingPacket()

            else:
                CompletingQuest(q1, child, childMap)

        if not QuestCompleted(q2) and QuestCompleted(q1):
            if hero == "ayameHero" and QuestCompleted(q2):
                if debugMSG:
                    print('we should be fcking done hre')
            else:
                if not QuestCompleted(q2) and not QuestCompleted(qAyame):
                    StartingQuest(q2, child)
                if hero == "ayameHero" and not QuestCompleted(qAyame):
                    #StartingQuest(q2, child)
                    StartingQuest(qAyame, child)
                    if QuestInProgress(qAyame, child):
                        mapid = 811000098
                        if _map != mapid:
                            CheckInstanceMap(mapid, "up")
                        else:
                            TerminalATK(True, True)
                    else:
                        mapid = childMap
                        TerminalATK(False, True)
                        CheckInstanceMap(childMap, "up", False)
                        if _map == childMap:
                            CompletingQuest(qAyame, child, _map)
                else:
                    if QuestInProgress(q2, child) and hero != "ayameHero":
                        mapid = 811000098
                        if _map != mapid:
                            CheckInstanceMap(mapid, "up")
                        else:
                            TerminalATK(True, True)
                    else:
                        if hero != "ayameHero":
                            TerminalATK(False, True)
                            CheckInstanceMap(childMap, "up", False)
                            if _map == childMap:
                                CompletingQuest(q2, child, childMap)

        if hero == "ayameHero":
            q2 = qAyame
        if not QuestCompleted(q3) and QuestCompleted(q2):
            StartingQuest(q3, child)
            if QuestInProgress(q3, child):
                mapid = 811000098
                if _map != mapid:
                    CheckInstanceMap(mapid, "up")
                else:
                    TerminalATK(True, True)
            else:
                TerminalATK(False, True)
                CheckInstanceMap(childMap, "up", False)
                CompletingQuest(q3, child, childMap)

        if not QuestCompleted(q4) and QuestCompleted(q3):
            StartingQuest(q4, child)
            if QuestInProgress(q4, child):
                mapid = 811000015
                if _map != mapid:
                    CheckInstanceMap(mapid, "down")
                else:
                    TerminalATK(True, True)
            else:
                TerminalATK(False, True)
                CheckInstanceMap(childMap, "down", False)
                CompletingQuest(q4, child, childMap)

        if not QuestCompleted(q5) and QuestCompleted(q4) and QuestCompleted(
                q3):
            StartingQuest(q5, child)
            if QuestInProgress(q5, child):
                mapid = 811000016
                if _map != mapid:
                    CheckInstanceMap(mapid, "down")
                else:
                    TerminalATK(True, True)
            else:
                TerminalATK(False, True)
                CheckInstanceMap(childMap, "down", False)
                CompletingQuest(q5, child, childMap)

        if not QuestCompleted(q6) and QuestCompleted(q5):
            StartingQuest(q6, child)
            if QuestInProgress(q6, child):
                mapid = 811000017
                if _map != mapid:
                    CheckInstanceMap(mapid, "down")
                else:
                    TerminalATK(True, True)
            else:
                TerminalATK(False, True)
                CheckInstanceMap(childMap, "down", False)
                CompletingQuest(q6, child, childMap)

        if not QuestCompleted(q7) and QuestCompleted(q6):
            TerminalATK(False, True)
            StartingQuest(q7, child)
            if QuestInProgress(q7, child):
                mapid = 811000018
                CheckInstanceMap(mapid, "down")
                CompletingQuest(q7, child2, mapid)

        if not QuestCompleted(q8) and QuestCompleted(q7):
            StartingQuest(q8, child2)
            if QuestInProgress(q8, child2):
                mapid = 811000018
                CheckInstanceMap(mapid, "down")
                if _map == mapid:
                    if Character.GetPos().x != 87:
                        Character.Teleport(87, 62)
                    else:
                        if sendPacket:
                            print("sending packet")
                            SendingPacket()

        if not QuestCompleted(q9) and QuestCompleted(q8):
            if Party.IsInParty():
                Party.LeaveParty()
            mapid = 811000020
            StartingQuest(q9, 0)
            if QuestInProgress(q9, 0):
                CheckInstanceMap(mapid, "mid")
                if _map == mapid:
                    if len(Field.GetMobs()) > 0:
                        TerminalATK(True, True)
                    else:
                        TerminalATK(False, True)
            else:
                CompletingQuest(q9, 0, mapid)
                CheckInstanceMap(mapid - 1, "mid", False)

        if not QuestCompleted(q10) and QuestCompleted(q9):
            mapid = 811000021
            StartingQuest(q10, 0)
            StartingQuest(58950, 0)  # extra quest somehow
            if QuestInProgress(q10, 0):
                CheckInstanceMap(mapid, "right")

        if not QuestCompleted(q11) and QuestCompleted(q10):
            mapid = 811000025
            StartingQuest(q11, 0)
            if QuestInProgress(q11, 0):
                CheckInstanceMap(mapid, "right")
                if len(Field.GetMobs()) > 0:
                    TerminalATK(True, True)
                else:
                    TerminalATK(False, True)
            else:
                CompletingQuest(q11, 0, mapid)

        if not QuestCompleted(q12) and QuestCompleted(q11):
            mapid = 811000025
            boss1 = mapid + 1
            boss2 = boss1 + 1
            boss3 = boss2 + 2
            if _map == mapid:
                EnterPortal("in00")
            elif _map == boss1:
                if len(Field.GetMobs()) > 0:
                    TerminalATK(True, True)
                else:
                    TerminalATK(False, True)
                    EnterPortal("next00")
            elif _map == boss2:
                if len(Field.GetMobs()) > 0:
                    TerminalATK(True, True)
                else:
                    TerminalATK(False, False)
                    EnterPortal("next00")
            elif _map == boss3:
                StartingQuest(q12, princess)

        if not QuestCompleted(q13) and QuestCompleted(q12):
            mapid = 811000025
            lastTemp = 811000028
            lastDest = 811000033
            StartingQuest(q13, 0)
            if QuestInProgress(q13, 0):
                if _map != mapid and _map != lastTemp and _map != lastDest:
                    CheckInstanceMap(mapid, "mid2", False)
                if (_map == mapid or _map == lastTemp) and _map != lastDest:
                    CheckInstanceMap(lastDest, "right")
                if _map == lastDest:
                    if len(Field.GetMobs()) > 0:
                        TerminalATK(True, True)
                    else:
                        TerminalATK(False, True)
            else:
                TerminalATK(False, True)
                if _map == lastDest and Character.GetPos().x != -147:
                    Character.Teleport(-147, -195)
                    time.sleep(teleportTime)
                else:
                    if _map != lastDest:
                        CheckInstanceMap(lastDest, "right")
                    else:
                        if sendPacket:
                            print("sending packet")
                            SendingPacket()

                        CompletingQuest(q13, 0, lastDest)