Ejemplo n.º 1
0
 def __init__(self, ip, port=6000):
     SWSHBot.__init__(self, ip, port)
     from structure import EncounterNest8Archive, NestHoleDistributionEncounter8Archive
     buf = bytearray(open('../resources/bytes/local_raid', 'rb').read())
     Den.LOCALTABLE = EncounterNest8Archive.GetRootAsEncounterNest8Archive(
         buf, 0)
     buf = self.readEventBlock_RaidEncounter('Event/Current/')
     Den.EVENTTABLE = NestHoleDistributionEncounter8Archive.GetRootAsNestHoleDistributionEncounter8Archive(
         buf, 0x20)
     self.resets = 0
Ejemplo n.º 2
0
np = import_numpy()

ReadFromConsole = False
DumpPath = 'Event/Current/'
LocalPath = 'Event/PersonalDump/'
config = json.load(open("../config.json"))
Island = 0

pmtext = PKMString()
buf = bytearray(open('../resources/bytes/local_drop', 'rb').read())
drop = NestHoleReward8Archive.GetRootAsNestHoleReward8Archive(buf, 0)
buf = bytearray(open('../resources/bytes/local_bonus', 'rb').read())
bonus = NestHoleReward8Archive.GetRootAsNestHoleReward8Archive(buf, 0)

if ReadFromConsole:
    b = SWSHBot(config["IP"])
    if Island == 0:
        buf = b.readEventBlock_RaidEncounter(DumpPath)
    elif Island == 1:
        buf = b.readEventBlock_RaidEncounter_IoA(DumpPath)
    else:
        buf = b.readEventBlock_RaidEncounter_CT(DumpPath)
else:
    buf = bytearray(open(
        LocalPath +
        'normal_encount', 'rb').read()) if Island == 0 else bytearray(
            open(LocalPath + f'normal_encount_rigel{Island}', 'rb').read())
eventencounter = NestHoleDistributionEncounter8Archive.GetRootAsNestHoleDistributionEncounter8Archive(
    buf, 0x20)

if ReadFromConsole:
Ejemplo n.º 3
0
# Go to root of PyNXBot
import sys
sys.path.append('../')

from structure import PK8
from nxbot import SWSHBot

b = SWSHBot('192.168.1.6')
for ii in range(1, 7):
    pk8 = PK8(b.readParty(ii))
    print(pk8.toString())
Ejemplo n.º 4
0
# Go to root of PyNXBot
import sys
import json
sys.path.append('../')

from nxbot import SWSHBot

config = json.load(open("../config.json"))
b = SWSHBot(config["IP"])

print(f"TID: {b.TrainerSave.TID()}")
print(f"SID: {b.TrainerSave.SID()}")
print(f"TSV: {b.TrainerSave.TSV()}")
print(f"Language: {b.TrainerSave.getLangName()}")
print(f"Money: {b.TrainerSave.Money()}$")
print(f"Watts: {b.TrainerSave.Watts()}\n")

b.close()
Ejemplo n.º 5
0
# Go to root of PyNXBot
import sys
import json
sys.path.append('../')

from structure import PK8
from nxbot import SWSHBot

config = json.load(open("../config.json"))
b = SWSHBot(config["IP"])

while True:
    pk8 = PK8(b.readWild())
    if pk8.isValid() and pk8.ec() != 0:
        print(pk8.toString())
    else:
        print("No battle started\n")
    stop = input("Check again? (y/n): ")
    print()
    if stop == 'n' or stop == 'N':
        b.close()
Ejemplo n.º 6
0
# Go to root of PyNXBot
import sys
import json
sys.path.append('../')

from structure import PK8
from nxbot import SWSHBot

config = json.load(open("../config.json"))
b = SWSHBot(config["IP"])

for ii in range(1, 7):
    print(f"Slot: {ii}")
    pk8 = PK8(b.readParty(ii))
    if pk8.isValid() and pk8.ec() != 0:
        print(pk8.toString())
    else:
        print('Empty')

print()
b.close()
Ejemplo n.º 7
0
 def __init__(self,ip,port = 6000):
     SWSHBot.__init__(self,ip,port)
Ejemplo n.º 8
0
 def __init__(self, ip, port=6000):
     SWSHBot.__init__(self, ip, port)
     self.resets = 0
Ejemplo n.º 9
0
import signal
import sys
import json
sys.path.append('../')

from structure import PK8
from nxbot import SWSHBot
from lookups import Util

def signal_handler(signal, frame): #CTRL+C handler
    print()
    print("Stop request")
    b.close()

config = json.load(open("../config.json"))
b = SWSHBot(config["IP"])

signal.signal(signal.SIGINT, signal_handler)

V6 = [31,31,31,31,31,31] #add here the spreads you need
A0 = [31,0,31,31,31,31]
S0 = [31,31,31,31,31,0]
TRA0 = [31,0,31,31,31,0]

print("Modes:\n1) Ethernatus\n2)Registeel/Regirock/Regice/Regidrago/Regieleki\n")

mode = int(input("Input the desired mode: (1/2) "))

while True:
    found = False
    if mode == 1:
Ejemplo n.º 10
0
# Go to root of PyNXBot
import sys
import json

sys.path.append('../')

from structure import PK8
from nxbot import SWSHBot

config = json.load(open("../config.json"))
b = SWSHBot(config["IP"])

while True:
    empty = True
    box = int(input('Which box would you like to check? '))
    print()
    for ii in range(1, 31):
        pk8 = PK8(b.readBox(box, ii))
        if pk8.isValid() and pk8.ec() != 0:
            print(f"Box: {box} Slot: {ii}")
            print(pk8.toString())
            empty = False
    if empty:
        print('Box is empty\n')
    stop = input('Continue? (y/n) ')
    if stop != 'y' and stop != 'Y':
        break

b.close()