if emotionSeller == 0:
				Quest.StartQuest(3514, 2140002)
				time.sleep(10)
			
			elif Quest.CheckCompleteDemand(3514, 2140002) == 0:
				# if its completed, rush to room and hand in
				if currentMap  != 270020211:
					Terminal.Rush(270020211)
					time.sleep(1)
				Quest.CompleteQuest(3514, 2140002)
				
			else:
				# so the quest isn't completed yet, but it is accepted
				# we need to drink that potion. 
				# MAKE SURE AUTO REVIVE IS TOGGLED
				Inventory.UseItem(2022337)
				time.sleep(5)
			continue
		
		
		elif oblivion1 != 2:
			rushAndDo(270030100, 270030100, oblivion1, 3515, 2140000, 2140000)
			continue
			
		elif oblivion2 != 2:
			rushAndDo(270030200, 270030200, oblivion2, 3516, 2140000, 2140000)
			continue
			
		elif oblivion3 != 2:
			rushAndDo(270030300, 270030300, oblivion3, 3517, 2140000, 2140000)
			continue
Exemple #2
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)
Exemple #3
0
def Job1():

    def to_portal(pname, enter=True):
        map = Field.GetID()
        portal = Field.FindPortal(pname)
        if portal.valid:
            if not ((portal.x-10 < Character.GetPos().x < portal.x+10)\
                    and (portal.y-10 < Character.GetPos().y < portal.y+15)):
                Character.Teleport(portal.x, portal.y-20)
                time.sleep(1)

            attempt = 0
            while enter and Field.GetID() == map and attempt < 3:
                attempt += 1
                Character.EnterPortal()
                time.sleep(1)

    def startQuest(quest, npc):
        print("Starting quest {0} from npc {1}".format(quest, npc))
        Quest.StartQuest(quest, npc)
        time.sleep(1)

    def completeQuest(quest, npc):
        print("Completing quest {0} from npc {1}".format(quest, npc))
        Quest.StartQuest(quest, npc)
        time.sleep(1)

    def questDone(quest, npc):
        return Quest.CheckCompleteDemand(quest, npc) == 0

    def needQuest(id):  # quest hasn't been accepted
        return Quest.GetQuestState(id) == 0

    def hasQuest(id):  # quest is active
        return Quest.GetQuestState(id) == 1

    def doQuest(id):  # quest isn't complete/turned in
        return Quest.GetQuestState(id) != 2

    def doneQuest(id):  # quest isn't complete/turned in
        return Quest.GetQuestState(id) == 2

    map = Field.GetID()
    
    if Character.GetJob() != 301 and Character.GetLevel() <= 29:
        if map == 910090301:
            Terminal.SetCheckBox("RushByLevel", False)
            Terminal.SetCheckBox("Auto Pet", True)
            Inventory.UseItem(2434265)
            to_portal("east00")
        elif doQuest(35900):
            if needQuest(35900):
                time.sleep(1)
                startQuest(35900, 0)
                time.sleep(1)
            elif hasQuest(35900):
                time.sleep(1)
                completeQuest(35900, 1013305)
                time.sleep(1)
        elif doneQuest(35900) and doQuest(35901):
            if needQuest(35901):
                time.sleep(1)
                startQuest(35901, 1013305)
                time.sleep(1)
            elif hasQuest(35901):
                time.sleep(5)
                completeQuest(35901, 1013305)
                time.sleep(5)
        elif doneQuest(35901) and doQuest(35902):
            if needQuest(35902):
                time.sleep(1)
                startQuest(35902, 1013305)
                time.sleep(1)
            if hasQuest(35902):
                if not questDone(35902, 1013305):
                    if map == 910090302:
                        to_portal("east00")
                    if map == 910090303:
                        Terminal.SetCheckBox("Legit Vac", False)
                        Terminal.SetCheckBox("Mob Falldown", True)
                        Terminal.SetCheckBox("Auto Aggro", False)
                        Terminal.SetCheckBox("Melee No Delay", False)
                        Terminal.SetCheckBox("Skill Inection", False)
                        Terminal.SetCheckBox("General FMA", False)
                        Terminal.SetCheckBox("Auto Attack", True)
                        Terminal.SetPushButton("Item Filter", False)
                if questDone(35902, 1013305):
                    Terminal.SetCheckBox("Auto Aggro", False)
                    Terminal.SetCheckBox("Melee No Delay", False)
                    Terminal.SetCheckBox("Auto Attack", False)
                    if map == 910090303:
                        to_portal("west00")
                    if map == 910090302:
                        Npc.ClearSelection()
                        Npc.RegisterSelection("Fire")
                        completeQuest(35902, 1013305)
        elif doneQuest(35902) and not doneQuest(35903):
            if needQuest(35903):
                time.sleep(1)
                startQuest(35903, 9010000)
    else: 
        if map == 910090305 and Character.GetLevel() <= 15:
            Terminal.SetCheckBox("RushByLevel", True)
            to_portal("out00")
Lv60 = True
#############################################

if GameState.IsInGame():
    print("Running")
    if Lv20 and Quest.GetQuestState(61586) != 2 and Character.GetLevel() >= 20:
        Terminal.SetCheckBox("bot/puffram", False)
        Npc.ClearSelection()
        Npc.RegisterSelection("Cash Shop")
        Npc.RegisterSelection("Beauty Salon")
        Npc.RegisterSelection("Receive")
        Quest.StartQuest(61586, 9201253)
        time.sleep(10)
    elif OpenBox and Quest.GetQuestState(61586) == 2:
        if Inventory.FindItemByID(2430445).valid:
            Inventory.UseItem(2430445)

    if Lv30 and Quest.GetQuestState(61587) != 2 and Character.GetLevel() >= 30:
        Terminal.SetCheckBox("bot/puffram", True)
        time.sleep(10)
    elif OpenBox and Quest.GetQuestState(61587) == 2:
        if Inventory.FindItemByID(2430447).valid:
            Inventory.UseItem(2430447)

    if Lv40 and Quest.GetQuestState(61588) != 2 and Character.GetLevel() >= 40:
        Terminal.SetCheckBox("bot/puffram", False)
        Npc.ClearSelection()
        Npc.RegisterSelection("Safety Charm")
        Npc.RegisterSelection("Respawn Token")
        Npc.RegisterSelection("You get")
        Quest.StartQuest(61588, 9201253)