Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seeds = []
- tidusrng = [125, 126, 126, 127, 127, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, 141]
- auronrng = [260, 261, 262, 263, 264, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 291, 292, 293, 294]
- initialseed = ""
- seedsbase1 = [2100005341, 1700015771, 247163863, 891644838, 1352476256, 1563244181, 1528068162, 511705468, 1739927914, 398147329, 1278224951, 20980264, 1178761637, 802909981, 1130639188, 1599606659, 952700148, -898770777, -1097979074, -2013480859, -338768120, -625456464, -2049746478, -550389733, -5384772, -128808769, -1756029551, 1379661854, 904938180, -1209494558, -1676357703, -1287910319, 1653802906, 393811311, -824919740, 1837641861, 946029195, 1248183957, -1684075875, -2108396259, -681826312, 1003979812, 1607786269, -585334321, 1285195346, 1997056081, -106688232, 1881479866, 476193932, 307456100, 1290745818, 162507240, -213809065, -1135977230, -1272305475, 1484222417, -1559875058, 1407627502, 1206176750, -1537348094, 638891383, 581678511, 1164589165, -1436620514, 1412081670, -1538191350, -284976976, 706005400]
- seedsbase2 = [10259, 24563, 11177, 56952, 46197, 49826, 27077, 1257, 44164, 56565, 31009, 46618, 64397, 46089, 58119, 13090, 19496, 47700, 21163, 16247, 574, 18658, 60495, 42058, 40532, 13649, 8049, 25369, 9373, 48949, 23157, 32735, 29605, 44013, 16623, 15090, 43767, 51346, 28485, 39192, 40085, 32893, 41400, 1267, 15436, 33645, 37189, 58137, 16264, 59665, 53663, 11528, 37584, 18427, 59827, 49457, 22922, 24212, 62787, 56241, 55318, 9625, 57622, 7580, 56469, 49208, 41671, 36458]
- def s32(n):
- n = n & 0xffffffff
- return (n ^ 0x80000000) - 0x80000000
- def checkforghostencounter(seed):
- if seed % 13 == 8:
- return True
- else:
- return False
- def tohex(val, nbits):
- return hex((val + (1 << nbits)) % (1 << nbits))
- def rngroll(index):
- temp = s32(s32(seeds[index]) * s32(seedsbase1[index]) ^ seedsbase2[index])
- temp = temp
- temp = s32((temp >> 0x10) + (temp << 0x10))
- seeds[index] = temp
- temp = temp & 0x7fffffff
- return temp
- with open('./FFX10minuteSeeds.csv') as f:
- lines = f.readlines()
- print(len(lines))
- Auron1 = int(input("Auron attack 1 damage: "))
- if Auron1 > 294:
- Auron1 /= 2
- Tidus1 = int(input("Tidus attack 1 damage: "))
- if Tidus1 > 141:
- Tidus1 /= 2
- Auron2 = int(input("Auron attack 2 damage: "))
- if Auron2 > 294:
- Auron2 /= 2
- Tidus2 = int(input("Tidus attack 2 damage: "))
- if Tidus2 > 141:
- Tidus2 /= 2
- Auron3 = int(input("Auron attack 3 damage: "))
- if Auron3 > 294:
- Auron3 /= 2
- Tidus3 = int(input("Tidus attack 3 damage: "))
- if Tidus3 > 141:
- Tidus3 /= 2
- searchline = str(int(Auron1)) + "," + str(int(Tidus1)) + "," + str(int(Auron2)) + "," + str(int(Tidus2)) + "," + str(int(Auron3)) + "," + str(int(Tidus3))
- print(searchline)
- for line in lines:
- #print(line[8:-1])
- if searchline in line:
- initialseed = int(line[0:8], 16)
- print("Initial seed:", initialseed, "(", s32(initialseed), ")")
- if initialseed == "":
- print("Initial seed could not be found, exiting.")
- exit()
- initialseed = s32(initialseed)
- #seeds rng array setup based on initial seed
- for i in range(68):
- temp = (s32(initialseed) * s32(0x5d588b65)) + 0x3c35
- temp = s32(temp)
- temp = s32((temp >> 0x10) + (temp << 0x10))
- initialseed = temp
- temp = temp & 0x7fffffff
- seeds.append(temp)
- print(seeds)
- #seeds[1] = 10000
- #print(seeds)
- for _ in range(57):
- rngroll(1)
- for i in range(500):
- roll = rngroll(1)
- #input(roll)
- if checkforghostencounter(roll):
- print("Ghost encounter on random encounter", i + 1, "/ every encounter counted:", i + 1 + 57)
- rngroll(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement