-
-
Save DRayX/d618ca7adc69065950a30425fae6eece to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
TILE_DATA = ( | |
(0x09,0x12),(0x0a,0x12),(0x0b,0x12),(0x0c,0x12),(0x0d,0x12),(0x0e,0x12),(0x0f,0x12),(0x10,0x12),(0x11,0x12),(0x12,0x12),(0x13,0x12),(0x14,0x12),(0x15,0x12),(0x16,0x12),(0x17,0x12),(0x18,0x12),(0x19,0x12),(0x1a,0x12), | |
(0x09,0x13),(0x0a,0x13),(0x0b,0x13),(0x0c,0x13),(0x0d,0x13),(0x0e,0x13),(0x0f,0x13),(0x10,0x13),(0x11,0x13),(0x12,0x13),(0x13,0x13),(0x14,0x13),(0x15,0x13),(0x16,0x13),(0x17,0x13),(0x18,0x13),(0x19,0x13),(0x1a,0x13), | |
(0x09,0x14),(0x0a,0x14),(0x0b,0x14),(0x0c,0x14),(0x0d,0x14),(0x0e,0x14),(0x0f,0x14),(0x10,0x14),(0x11,0x14),(0x12,0x14),(0x13,0x14),(0x14,0x14),(0x15,0x14),(0x16,0x14),(0x17,0x14), (0x19,0x14),(0x1a,0x14), | |
(0x09,0x15),(0x0a,0x15),(0x0b,0x15), (0x0d,0x15),(0x0e,0x15),(0x0f,0x15),(0x10,0x15),(0x11,0x15),(0x12,0x15),(0x13,0x15),(0x14,0x15),(0x15,0x15),(0x16,0x15),(0x17,0x15),(0x18,0x15),(0x19,0x15),(0x1a,0x15), | |
(0x09,0x16),(0x0a,0x16),(0x0b,0x16),(0x0c,0x16),(0x0d,0x16),(0x0e,0x16),(0x0f,0x16),(0x10,0x16),(0x11,0x16),(0x12,0x16),(0x13,0x16),(0x14,0x16),(0x15,0x16),(0x16,0x16),(0x17,0x16),(0x18,0x16),(0x19,0x16),(0x1a,0x16), | |
(0x09,0x17),(0x0a,0x17),(0x0b,0x17),(0x0c,0x17),(0x0d,0x17),(0x0e,0x17),(0x0f,0x17),(0x10,0x17),(0x11,0x17),(0x12,0x17),(0x13,0x17),(0x14,0x17),(0x15,0x17),(0x16,0x17),(0x17,0x17),(0x18,0x17),(0x19,0x17),(0x1a,0x17), | |
(0x09,0x18),(0x0a,0x18),(0x0b,0x18),(0x0c,0x18),(0x0d,0x18),(0x0e,0x18),(0x0f,0x18),(0x10,0x18),(0x11,0x18),(0x12,0x18),(0x13,0x18),(0x14,0x18),(0x15,0x18),(0x16,0x18),(0x17,0x18),(0x18,0x18),(0x19,0x18),(0x1a,0x18), | |
(0x09,0x19),(0x0a,0x19),(0x0b,0x19),(0x0c,0x19),(0x0d,0x19),(0x0e,0x19),(0x0f,0x19),(0x10,0x19),(0x11,0x19),(0x12,0x19),(0x13,0x19),(0x14,0x19),(0x15,0x19),(0x16,0x19),(0x17,0x19),(0x18,0x19),(0x19,0x19),(0x1a,0x19), | |
(0x09,0x1a),(0x0a,0x1a),(0x0b,0x1a),(0x0c,0x1a),(0x0d,0x1a),(0x0e,0x1a),(0x0f,0x1a),(0x10,0x1a),(0x11,0x1a),(0x12,0x1a),(0x13,0x1a),(0x14,0x1a),(0x15,0x1a),(0x16,0x1a),(0x17,0x1a),(0x18,0x1a),(0x19,0x1a),(0x1a,0x1a), | |
(0x09,0x1b),(0x0a,0x1b),(0x0b,0x1b),(0x0c,0x1b),(0x0d,0x1b),(0x0e,0x1b), (0x10,0x1b),(0x11,0x1b),(0x12,0x1b),(0x13,0x1b),(0x14,0x1b),(0x15,0x1b),(0x16,0x1b),(0x17,0x1b),(0x18,0x1b),(0x19,0x1b),(0x1a,0x1b), | |
(0x09,0x1c),(0x0a,0x1c),(0x0b,0x1c),(0x0c,0x1c),(0x0d,0x1c),(0x0e,0x1c),(0x0f,0x1c),(0x10,0x1c),(0x11,0x1c),(0x12,0x1c),(0x13,0x1c),(0x14,0x1c),(0x15,0x1c),(0x16,0x1c),(0x17,0x1c),(0x18,0x1c),(0x19,0x1c),(0x1a,0x1c), | |
(0x09,0x1d),(0x0a,0x1d),(0x0b,0x1d),(0x0c,0x1d),(0x0d,0x1d),(0x0e,0x1d),(0x0f,0x1d),(0x10,0x1d), (0x18,0x1d),(0x19,0x1d),(0x1a,0x1d), | |
(0x09,0x1e),(0x0a,0x1e),(0x0b,0x1e),(0x0c,0x1e),(0x0d,0x1e),(0x0e,0x1e),(0x0f,0x1e),(0x10,0x1e), (0x19,0x1e),(0x1a,0x1e), | |
(0x09,0x1f),(0x0a,0x1f),(0x0b,0x1f),(0x0c,0x1f),(0x0d,0x1f),(0x0e,0x1f),(0x0f,0x1f),(0x10,0x1f), (0x18,0x1f),(0x19,0x1f),(0x1a,0x1f), | |
(0x09,0x20),(0x0a,0x20), (0x0d,0x20),(0x0e,0x20),(0x0f,0x20),(0x10,0x20), (0x18,0x20),(0x19,0x20),(0x1a,0x20), | |
(0x09,0x21),(0x0a,0x21), (0x0d,0x21),(0x0e,0x21),(0x0f,0x21),(0x10,0x21), (0x18,0x21),(0x19,0x21),(0x1a,0x21), | |
(0x09,0x22),(0x0a,0x22),(0x0b,0x22),(0x0c,0x22),(0x0d,0x22),(0x0e,0x22),(0x0f,0x22),(0x10,0x22), (0x18,0x22),(0x19,0x22),(0x1a,0x22), | |
(0x09,0x23),(0x0a,0x23),(0x0b,0x23),(0x0c,0x23),(0x0d,0x23),(0x0e,0x23),(0x0f,0x23),(0x10,0x23), (0x18,0x23),(0x19,0x23),(0x1a,0x23), | |
(0x09,0x24),(0x0a,0x24),(0x0b,0x24),(0x0c,0x24),(0x0d,0x24),(0x0e,0x24),(0x0f,0x24),(0x10,0x24),(0x11,0x24),(0x12,0x24),(0x13,0x24),(0x14,0x24),(0x15,0x24),(0x16,0x24),(0x17,0x24),(0x18,0x24),(0x19,0x24),(0x1a,0x24), | |
(0x09,0x25),(0x0a,0x25),(0x0b,0x25),(0x0c,0x25),(0x0d,0x25),(0x0e,0x25),(0x0f,0x25),(0x10,0x25),(0x11,0x25),(0x12,0x25),(0x13,0x25),(0x14,0x25),(0x15,0x25),(0x16,0x25),(0x17,0x25),(0x18,0x25),(0x19,0x25),(0x1a,0x25), | |
(0x09,0x26),(0x0a,0x26),(0x0b,0x26),(0x0c,0x26),(0x0d,0x26),(0x0e,0x26),(0x0f,0x26),(0x10,0x26),(0x11,0x26),(0x12,0x26),(0x13,0x26),(0x14,0x26),(0x15,0x26),(0x16,0x26),(0x17,0x26),(0x18,0x26),(0x19,0x26),(0x1a,0x26), | |
(0x09,0x27),(0x0a,0x27),(0x0b,0x27),(0x0c,0x27),(0x0d,0x27),(0x0e,0x27),(0x0f,0x27),(0x10,0x27),(0x11,0x27),(0x12,0x27),(0x13,0x27),(0x14,0x27),(0x15,0x27),(0x16,0x27),(0x17,0x27),(0x18,0x27),(0x19,0x27),(0x1a,0x27), | |
(0x09,0x28),(0x0a,0x28),(0x0b,0x28),(0x0c,0x28),(0x0d,0x28),(0x0e,0x28),(0x0f,0x28),(0x10,0x28),(0x11,0x28),(0x12,0x28),(0x13,0x28),(0x14,0x28),(0x15,0x28), (0x19,0x28),(0x1a,0x28), | |
(0x09,0x29),(0x0a,0x29),(0x0b,0x29),(0x0c,0x29),(0x0d,0x29),(0x0e,0x29),(0x0f,0x29),(0x10,0x29),(0x11,0x29),(0x12,0x29),(0x13,0x29),(0x14,0x29),(0x15,0x29), (0x19,0x29),(0x1a,0x29), | |
(0x09,0x2a),(0x0a,0x2a),(0x0b,0x2a),(0x0c,0x2a),(0x0d,0x2a),(0x0e,0x2a),(0x0f,0x2a),(0x10,0x2a),(0x11,0x2a),(0x12,0x2a),(0x13,0x2a),(0x14,0x2a),(0x15,0x2a), (0x19,0x2a),(0x1a,0x2a), | |
(0x09,0x2b),(0x0a,0x2b),(0x0b,0x2b),(0x0c,0x2b),(0x0d,0x2b),(0x0e,0x2b),(0x0f,0x2b),(0x10,0x2b),(0x11,0x2b),(0x12,0x2b),(0x13,0x2b),(0x14,0x2b),(0x15,0x2b),(0x16,0x2b),(0x17,0x2b),(0x18,0x2b),(0x19,0x2b),(0x1a,0x2b), | |
(0x09,0x2c),(0x0a,0x2c),(0x0b,0x2c),(0x0c,0x2c),(0x0d,0x2c),(0x0e,0x2c),(0x0f,0x2c),(0x10,0x2c),(0x11,0x2c),(0x12,0x2c), (0x14,0x2c),(0x15,0x2c),(0x16,0x2c),(0x17,0x2c),(0x18,0x2c),(0x19,0x2c),(0x1a,0x2c), | |
(0x09,0x2d),(0x0a,0x2d),(0x0b,0x2d), (0x0f,0x2d),(0x10,0x2d),(0x11,0x2d),(0x12,0x2d),(0x13,0x2d),(0x14,0x2d),(0x15,0x2d),(0x16,0x2d),(0x17,0x2d),(0x18,0x2d),(0x19,0x2d),(0x1a,0x2d), | |
(0x09,0x2e),(0x0a,0x2e),(0x0b,0x2e), (0x0f,0x2e),(0x10,0x2e),(0x11,0x2e),(0x12,0x2e),(0x13,0x2e),(0x14,0x2e),(0x15,0x2e),(0x16,0x2e),(0x17,0x2e),(0x18,0x2e),(0x19,0x2e),(0x1a,0x2e), | |
(0x09,0x2f),(0x0a,0x2f),(0x0b,0x2f), (0x0f,0x2f),(0x10,0x2f),(0x11,0x2f),(0x12,0x2f),(0x13,0x2f),(0x14,0x2f), (0x17,0x2f),(0x18,0x2f),(0x19,0x2f),(0x1a,0x2f), | |
(0x09,0x30),(0x0a,0x30),(0x0b,0x30),(0x0c,0x30),(0x0d,0x30),(0x0e,0x30),(0x0f,0x30),(0x10,0x30),(0x11,0x30),(0x12,0x30),(0x13,0x30),(0x14,0x30), (0x17,0x30),(0x18,0x30),(0x19,0x30),(0x1a,0x30), | |
(0x09,0x31),(0x0a,0x31), (0x0c,0x31),(0x0d,0x31),(0x0e,0x31),(0x0f,0x31),(0x10,0x31),(0x11,0x31),(0x12,0x31),(0x13,0x31),(0x14,0x31),(0x15,0x31),(0x16,0x31),(0x17,0x31),(0x18,0x31),(0x19,0x31),(0x1a,0x31), | |
(0x09,0x32),(0x0a,0x32),(0x0b,0x32),(0x0c,0x32),(0x0d,0x32),(0x0e,0x32),(0x0f,0x32),(0x10,0x32),(0x11,0x32),(0x12,0x32),(0x13,0x32),(0x14,0x32),(0x15,0x32),(0x16,0x32),(0x17,0x32),(0x18,0x32),(0x19,0x32),(0x1a,0x32), | |
(0x09,0x33),(0x0a,0x33),(0x0b,0x33),(0x0c,0x33),(0x0d,0x33),(0x0e,0x33),(0x0f,0x33),(0x10,0x33),(0x11,0x33),(0x12,0x33),(0x13,0x33),(0x14,0x33),(0x15,0x33),(0x16,0x33),(0x17,0x33),(0x18,0x33),(0x19,0x33),(0x1a,0x33), | |
) | |
SPAWN_COUNT = 4 | |
def getDailyRandom(seed): | |
if seed & 0x80000000 != 0: | |
return 0x100000000 - seed | |
else: | |
return seed | |
def lotPoint(seed): | |
daily_split = [0] * SPAWN_COUNT | |
daily_rand = getDailyRandom(seed) | |
for i in range(SPAWN_COUNT): | |
daily_split[i] = daily_rand >> (8 * (SPAWN_COUNT - 1 - i)) & 0xff | |
total_tiles = len(TILE_DATA) | |
section_length = total_tiles // SPAWN_COUNT | |
add_extra = total_tiles % SPAWN_COUNT | |
result = [0] * SPAWN_COUNT | |
extra = 0 | |
for i in range(SPAWN_COUNT): | |
result[i] = extra + section_length * i + daily_split[i] % section_length | |
if i < add_extra: | |
extra += 1 | |
return result | |
if __name__ == '__main__': | |
import sys | |
lotto = int(sys.argv[1]) | |
seed_low = (lotto * 0xeeb9eb65 + 0xfc77a683) & 0xffff | |
print([TILE_DATA[x] for x in lotPoint(seed_low)[2:]]) | |
print([TILE_DATA[x] for x in lotPoint(seed_low | 0x80000000)[2:]]) |
What are the sold sphere/Drill sphere checks about and where can I find that info?
Does this work on the Nintendo DS version?
Can someone explain in detail what kind of informations we need to insert for the new algorithm? Why nobody has still done a video about it ? Thaaankss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@TimHe95
With the 1.1.3 update there is a new version of this same calculator tool. But instead of just providing one Lotto ID number, the new tool requires at least 2 days-worth of Lotto IDs and Swarm info (which route there appears to be a lot of a specific Pokémon for a given day—you can find this by opening your menu and checking the ‘current objective’) in order to help narrow down your exact game seed…and thus accurately determine the four tiles that spawn Feebas on a given day.