Esempio n. 1
0
def checkAgain(portalToCheck):
    portal = Field.FindReactor(mineID)
    print("Old Portal Co-ordinates: " + str(portalToCheck.x) + "," +
          str(portalToCheck.y))
    print("New Portal Co-ordinates: " + str(portal.x) + "," + str(portal.y))
    if portal.valid:
        if (cmpT((portal.x, portal.y), (portalToCheck.x, portalToCheck.y))):
            print("Logging out.")
            Terminal.Logout()
        else:
            print("x/y not the same; continuing...")
Esempio n. 2
0
 def __LogGM(self):
     GMLogs = self.__ReadGMLogs()
     world = Terminal.GetComboBox('LoginWorld')
     worldStatus = ast.literal_eval(GMLogs)['worlds'][self.__GetWorld(
         world)]['status']
     worldsToCheck = self.__ReadWorldsToLogOut()[self.__GetWorld(world)]
     if worldStatus == 'online' and bool(worldsToCheck):
         Terminal.SetCheckBox('Auto Login', False)
         if GameState.IsInGame():
             Terminal.Logout()
     if worldStatus == 'offline' and bool(worldsToCheck):
         Terminal.SetCheckBox("Auto Login", True)
Esempio n. 3
0
 def __LogGM(self):
     try:
         worldStatus = ast.literal_eval(
             self.__ReadGMLogs())[self.__GetWorld(
                 Terminal.GetComboBox('LoginWorld'))]
         worldsToCheck = ast.literal_eval(
             self.__ReadWorldsToLogOut())[self.__GetWorld(
                 Terminal.GetComboBox('LoginWorld'))]
         if worldStatus == 'online' and bool(worldsToCheck):
             Terminal.SetCheckBox('Auto Login', False)
             Terminal.Logout()
         if worldStatus == 'offline' and bool(worldsToCheck):
             Terminal.SetCheckBox("Auto Login", True)
     except:
         pass
Esempio n. 4
0
                 Quest.StartQuest(16742, 9010010)
     else:
         Result = Packet.WaitForRecv(0x05F0, 60000)
         if Result.GetRemaining() > 0:
             BytesWanted = []
             ParsePacket(Result)
             Result = Packet.WaitForRecv(0x04C6, 10000)
             if Result.GetRemaining() > 0:
                 Exploit(BytesWanted)
         Terminal.SetProperty("count",
                              Terminal.GetProperty("count", -1) + 1)
         #count += 1
         print("Count = ", Terminal.GetProperty("count", -1))
         if Terminal.GetProperty("count", -1) >= 6:
             time.sleep(1)
             LeaveDance()
             time.sleep(0.8)
             Terminal.SetProperty("danceDone", True)
 else:
     if Field.GetID() == 993050000:
         # if Character.GetPos().x != 2464:
         #     Character.Teleport(2464,35)
         # else:
         #     Character.EnterPortal()
         #     time.sleep(0.3)
         print("Need to leave map")
     else:
         time.sleep(1)
         Terminal.Logout()
         Terminal.SetLineEdit(
             "LoginChar", str(int(Terminal.GetLineEdit("LoginChar")) + 1))
Esempio n. 5
0
    def StoreMeso(self):
        storage_map_id = 550000000
        storage_npc_id = 9270054
        ###########store mesos
        def store_mesos():
            while True:
                if Field.GetID() == storage_map_id:
                    print("Current Mesos before store = {}".format(Character.GetMeso()))
                    Packet.BlockRecvHeader(PACKET_HEADERS.block_header)
                    Character.Teleport(2268,17)
                    time.sleep(1)
                    Character.TalkToNpc(storage_npc_id)
                    time.sleep(1)
                    oPacket = Packet.COutPacket(PACKET_HEADERS.store_header)
                    oPacket.EncodeBuffer("07 FFFFFFF903DC5401")
                    Packet.SendPacket(oPacket)
                    oPacket1 = Packet.COutPacket(PACKET_HEADERS.store_header)
                    oPacket1.Encode2(8)
                    Packet.SendPacket(oPacket1)
                    print("Completed meso storing")
                    time.sleep(1)
                    print("Current Mesos after store = {}".format(Character.GetMeso()))
                    Packet.UnBlockRecvHeader(PACKET_HEADERS.block_header)
                    break
                else:
                    Terminal.Rush(storage_map_id)
                    print("Still rushing to storage")
                    time.sleep(2)

        def withdraw_mesos():
            if Field.GetID() ==101000000: #wait till character gets to ellinia
                #1032006
                time.sleep(2)
                Packet.BlockRecvHeader(PACKET_HEADERS.block_header)
                print("Current Mesos before withdraw = {}".format(Character.GetMeso()))
                Character.TalkToNpc(1032006)
                time.sleep(3)
                oPacket = Packet.COutPacket(PACKET_HEADERS.store_header)
                oPacket.EncodeBuffer("07 00000006FC23ABFF")
                Packet.SendPacket(oPacket)
                oPacket1 = Packet.COutPacket(PACKET_HEADERS.store_header)
                oPacket1.Encode2(8)
                #oPacket2.EncodeBuffer("08")
                Packet.SendPacket(oPacket1)
                time.sleep(1)
                print("Current Mesos after withdraw = {}".format(Character.GetMeso()))
                time.sleep(1)
                Packet.UnBlockRecvHeader(PACKET_HEADERS.block_header)

            else:
                Terminal.Rush(101000000)
                time.sleep(3)

        if Character.GetMeso() == 29999999999 and Character.GetJob() == 4212:
            #if mesos =29999999999, which is max, store them in the storage
            HELPER.ToggleRushByLevel(False)
            #Terminal.LoadProfile(r"C:\Users\Jacopo\Desktop\TerminalManager\terminalProfiles\StoreMesos.xml")
            if self.accountData['storing_meso'] == False:
                store_mesos()
            #Next step is to change the AutoChar Number and then logon into the new created luminous and release control
            #Read AutoChar Number, +1 write to file.
            time.sleep(3)
            if Character.GetMeso() == 0:
                self.accountData['storing_meso'] = True
                self.writeJson()
                print("logging out")
                if GameState.IsInGame():
                    Terminal.Logout()
                time.sleep(3)
        #print(GameState.GetLoginStep())
        if self.accountData['storing_meso'] and GameState.GetLoginStep() == 2:
            autochar_kanna = 19
            autochar_lumi = 11
            Terminal.SetCheckBox("Auto Login",False)
            Terminal.SetLineEdit("LoginChar", str(accountData['storage_number'] + 1))
            Terminal.SetComboBox("settings/autochar_job",autochar_lumi)
            Terminal.SetCheckBox("Auto Login",True)
            Terminal.SetCheckBox("settings/autochar",True)
        

        if self.accountData['storing_meso'] and Character.GetJob() == 2700 and Character.GetMeso() == 0:
            print("withdrawing mesos")
            HELPER.ToggleRushByLevel(False)
            withdraw_mesos()
            time.sleep(2)
            SCLib.UpdateVar("withdraw_flag",True)
        elif self.accountData['storing_meso'] and Character.GetJob() == 2700 and Character.GetMeso() == 29999999999 and SCLib.GetVar("withdraw_flag"):
            #safe to say that storage is empty and can switch back to kanna
            self.accountData['storage_number'] = self.accountData['storage_number'] + 1
            self.accountData['storing_meso'] = False
            self.writeJson()
            if GameState.IsInGame():
                Terminal.Logout()
            Terminal.SetLineEdit("LoginChar", self.accountData['kanna_pos'])
            SCLib.UpdateVar("withdraw_flag",False)
            print("Logging out and changing to Kanna farmer")
            time.sleep(2)
        elif self.accountData['storing_meso'] and Character.GetJob() == 2700 and Character.GetMeso() != 0 and not SCLib.GetVar("withdraw_flag"):
            #need to update bank number but did not withdraw mesos
            self.accountData['storage_number'] = self.accountData['storage_number'] + 1
            self.writeJson()
            if GameState.IsInGame():
                Terminal.Logout()
            print("Logging out and changing to next bank")
            time.sleep(2)

        def ChooseLightPath():
            choosePacket = Packet.COutPacket(PACKET_HEADERS.dialogue_header)
            choosePacket.EncodeBuffer("1A 01 00000000")
            Packet.SendPacket(choosePacket)

        if Field.GetID() == 927020000:
            ChooseLightPath()
            time.sleep(1)