コード例 #1
0
def ToMid():
    sp = Field.FindPortal("sp").x
    down00 = Field.FindPortal("down00").x
    pos = Character.GetPos().x

    if not ((pos < sp + 5 and pos > sp - 5) or
            (pos < down00 + 5 and pos > down00 - 5)):
        ToPortal("down00", False)
コード例 #2
0
def ToPortal(portal, enter=True):
    map = Field.GetID()
    portal = Field.FindPortal(portal)
    if portal.valid:
        AAFlag = False
        kamiFlag = False
        if Terminal.GetCheckBox("Auto Attack"):
            AAFlag = True
            CheckBox("Auto Attack", False)
        if Terminal.GetCheckBox("Kami Vac"):
            kamiFlag = True
            CheckBox("Kami Vac", False)
            time.sleep(1)

        if not (Character.GetPos().x < portal.x + 5
                and Character.GetPos().x > portal.x - 5):
            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)

        if AAFlag:
            CheckBox("Auto Attack", True)
        if kamiFlag:
            CheckBox("Kami Vac", True)
コード例 #3
0
def takePortal(portalstr):
    portal = Field.FindPortal(portalstr)
    if portal.valid:
        Character.Teleport(portal.x, portal.y)
        time.sleep(1)
        Character.EnterPortal()
        time.sleep(1)
コード例 #4
0
def toPortal(portal):  # Credit to Rain for this function
    tPortal = Field.FindPortal(portal)
    if tPortal.valid:
        while tPortal.x != Character.GetPos().x:
            Character.Teleport(tPortal.x, tPortal.y)
            time.sleep(1)
            if tPortal.x == Character.GetPos().x:
                break
        Character.EnterPortal()
        time.sleep(2)
コード例 #5
0
def ToPortal(portal, enter=True):
    portal = Field.FindPortal(portal)
    if portal.valid:
        if not (Character.GetPos().x < portal.x+5 and Character.GetPos().x > portal.x-5):
            SunCat.Teleport(portal.x, portal.y-5)
            time.sleep(1)
            if enter:
                Character.EnterPortal()
                time.sleep(1)
        elif enter:
            time.sleep(1)
            Character.EnterPortal()
コード例 #6
0
    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)
コード例 #7
0
def EnterPortal(pos, enter=True):
    _map = Field.GetID()
    _portal = Field.FindPortal(pos)
    _char = Character.GetPos()

    if not (_portal.x - 10 < _char.x <
            _portal.x + 10) or not (_portal.y - 5 < _char.y < _portal.y + 5):
        Character.Teleport(_portal.x, _portal.y)
        time.sleep(teleportTime)

    if enter:
        Character.EnterPortal()

    time.sleep(teleportTime)
コード例 #8
0
def EnterPortal(name):
    time.sleep(0.5)
    portal = Field.FindPortal(name)
    pos = Character.GetPos()
    if pos.x != portal.x:
        print("Portal " + str(name) + " found, teleporting...")
        Character.Teleport(portal.x, portal.y - 20)
        time.sleep(0.5)
        print("Teleported to portal: " + str(name) + "...")
    print("Trying to enter portal...")
    while GameState.IsInGame() and Character.GetPos().x == portal.x:
        if Field.GetID() == 610050000:
            break
        Character.EnterPortal()
        time.sleep(0.5)
コード例 #9
0
def ToPortal(portal, enter=True, safe=False):
    map = Field.GetID()
    if safe:
        for char in Field.GetCharacters():
            if not Terminal.IsLocalUser(char.id):
                return False

    portal = Field.FindPortal(portal)
    if portal.valid:
        AAFlag = False
        kamiFlag = False
        if Terminal.GetCheckBox("Auto Attack"):
            AAFlag = True
            CheckBox("Auto Attack", False)
        if Terminal.GetCheckBox("Kami Vac"):
            kamiFlag = True
            CheckBox("Kami Vac", False)
            time.sleep(1)

        if not (Character.GetPos().x < portal.x+5 and Character.GetPos().x > portal.x-5) \
        or not (Character.GetPos().y < portal.y+10 and Character.GetPos().y > portal.y-10):
            Character.Teleport(portal.x, portal.y - 20)
            time.sleep(1)

        attempt = 0
        while enter and Field.GetID() == map and attempt < 3:
            if (Character.GetPos().x < portal.x + 5
                    and Character.GetPos().x > portal.x - 5):
                attempt += 1
                Character.EnterPortal()
                time.sleep(2)

        if AAFlag:
            CheckBox("Auto Attack", True)
        if kamiFlag:
            CheckBox("Kami Vac", True)
コード例 #10
0
def doMaze(targetMap):
   if Field.GetID() in mazeMaps:
      triedRoutes = []
      mapRoute = []
      returnRoute = []

      while Field.GetID() != targetMap:
         if Terminal.IsRushing():
            continue
         if GameState.IsInGame():
            fgm(True)
            checkMap = Field.GetID()
            charPos = Character.GetPos()
            foundNext = False

            routeChecked = False

            for portal in mazePortals:
               # Don't go the return route
               if len(returnRoute) > 0:
                  if portal == returnRoute[len(returnRoute) - 1]:
                     print("Skipping return portal:", portal)
                     continue

               nextPortal = Field.FindPortal(portal)
               if nextPortal.valid:
                  # Check routes
                  testRoute = mapRoute.copy()
                  testRoute.append(portal)

                  for route in triedRoutes:
                     if testRoute == route:
                        print("Skipping already tried portal:", portal)
                        routeChecked = True
                        break

                  if routeChecked:
                     continue

                  if (nextPortal.x >= (charPos.x - 20) and nextPortal.x <= charPos.x + 20) and (
                        nextPortal.y >= (charPos.y - 20) and nextPortal.y <= charPos.y + 20):
                     continue
                  print("Going to portal:", portal)
                  Character.Teleport(nextPortal.x, nextPortal.y - 10)
                  time.sleep(enterWait)
                  for i in range(5):
                     Character.EnterPortal()
                     time.sleep(0.05)
                  time.sleep(checkWait)
                  if Field.GetID() != checkMap:
                     mapRoute.append(portal)
                     print(mapRoute)
                     foundNext = True

                     newPos = Character.GetPos()
                     for portal2 in mazePortals:
                        returnPortal = Field.FindPortal(portal2)
                        if returnPortal.valid:
                           if (returnPortal.x >= (newPos.x - 20) and returnPortal.x <= newPos.x + 20) and (
                                 returnPortal.y >= (newPos.y - 20) and returnPortal.y <= newPos.y + 20):
                              returnRoute.append(portal2)
                              break

                     break
         elif Field.GetID() == 863000017:
            print("Disconnected from game! Exiting script...")
            break
         else:
            print("Disconnected from game! Exiting script...")
            break

         if not foundNext and Field.GetID() != targetMap:
            if len(returnRoute) > 0:
               if mapRoute not in triedRoutes:
                  triedRoutes.append(mapRoute)
                  print(triedRoutes)

               portal3 = returnRoute.pop()
               backPortal = Field.FindPortal(portal3)
               if backPortal.valid:
                  print("Going back to", portal3)
                  Character.Teleport(backPortal.x, backPortal.y - 10)
                  time.sleep(enterWait)
                  Character.EnterPortal()
                  time.sleep(checkWait)
                  mapRoute.pop()
            else:
               print("Already starting on a portal - pls don't do this")
               Character.EnterPortal()
               time.sleep(checkWait)
コード例 #11
0
							continue
							
						# if we are in the room, start the quest
						elif currentMap == 450000020:
							Quest.StartQuest(1464, 1540944)
							time.sleep(2)
							continue
							
					elif Quest.CheckCompleteDemand(1464, 1540944) != 0:
						# if its not done, we need to rush to top of dwt
						# look for the portal that has her in it
						
						# rush to upper left stem to check here first
						Terminal.Rush(105300300)
						time.sleep(30)
						portal = Field.FindPortal("pt_horizon")
						if portal.valid:
							Character.Teleport(portal.x, portal.y-20)
							time.sleep(2)
							Character.EnterPortal()
							time.sleep(3)
							Character.EnterPortal()
							time.sleep(3)
							
							currentMap  = Field.GetID()
							if currentMap != 105300300:
								continue
							
						# so the portal was invalid
						# go to stem crossroad
						Terminal.Rush(105300301)
コード例 #12
0
        else:
            print('Not in game!')
    
    Terminal.SetCheckBox("bot/si_no_wait", False)
    RestoreSetting()
    time.sleep(3)
    
if ChuChu_Daily and SCLib.GetVar("ChuchuDone"):
    print("Completed ChuChu daily")

##########################
##########################
# Dream Defender Daily
##########################
##########################
ptgo_up = Field.FindPortal('ptgo_up')
ptgo_down = Field.FindPortal('ptgo_down')
ptgo_left = Field.FindPortal('ptgo_left')
ptgo_right = Field.FindPortal('ptgo_right')
ptback_up = Field.FindPortal('ptback_up')
ptback_down = Field.FindPortal('ptback_down')
ptback_left = Field.FindPortal('ptback_left')
ptback_right = Field.FindPortal('ptback_right')

NIGHTMARE_BOX = [9833080, 9833081, 9833082, 9833083, 9833084]
DD_MAP = [921171000, 921171001, 921171002, 921171003, 921171004, 921171005]
DD_CLOCKMAP = 450003540
DD_ENTERMAP = 450004000
DD_EXITMAP = 921171100
SLEEP_TIME = 0.5
コード例 #13
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)
コード例 #14
0
   oPacket.Encode1(0x00)
   oPacket.Encode4(0x00000000)
   oPacket.Encode2(0x7B30)
   oPacket.Encode1(0x00)
   Packet.SendPacket(oPacket)
   time.sleep(6)
 elif field_id == 350140100:
   Character.TalkToNpc(1540899)
   Npc.ClearSelection()
   Npc.RegisterSelection("Fight together.")
   time.sleep(2)
   Character.TalkToNpc(1540896)
   Npc.ClearSelection()
   Npc.RegisterSelection("Fight together.")
   time.sleep(2)
   portal = Field.FindPortal("out_350140100")
   Character.Teleport(portal.x, portal.y-10)
   Character.EnterPortal()
   time.sleep(1)
   Character.EnterPortal()
   time.sleep(1)
 elif field_id == 350140152:
   continue
 elif field_id == 350140160:
   continue
 elif field_id == 350140200:
   continue
 elif field_id == 350140220:
   Packet.WaitForRecv(0x031E)
   oPacket = Packet.COutPacket(0x00D3) #Skip video
   oPacket.Encode4(int(time.monotonic()*1000))