Mandrew

ShinyChecks.py - test if you can get two unique PIDs shiny

Sep 9th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. # ShinyChecks.py - provided any two of PID, TID, and SID,
  2. # will solve all possible combinations of the other value
  3. # which result in the shiny check returning true. The
  4. # solutions are contained in a list of new values.
  5. import argparse
  6.  
  7. def ShinyCheckerPIDOut(TID,SID):
  8.     ShinyPID = []
  9.     for TestPID in range(0,0xFFFFFFFF):
  10.         TrainerXOR = TID ^ SID
  11.         PIDHiNib = (TestPID & 0xFFFF0000) >> 16
  12.         PIDLoNib = TestPID & 0x0000FFFF
  13.         PokemonXOR = PIDHiNib ^ PIDLoNib
  14.         if TrainerXOR ^ PokemonXOR < 8:
  15.             ShinyPID.append(TestPID)
  16.         if len(ShinyPID) = 524288
  17.             break
  18.     return ShinyPID
  19.  
  20. def ShinyCheckerTIDOut(PID,SID):
  21.     PIDHiNib = (PID & 0xFFFF0000) >> 16
  22.     PIDLoNib = PID & 0x0000FFFF
  23.     ShinyTID = []
  24.     for TestTID in range(0,65535):
  25.         TrainerXOR = TestTID  ^ SID
  26.         PokemonXOR = PIDHiNib ^ PIDLoNib
  27.         if TrainerXOR ^ PokemonXOR < 8:
  28.             ShinyTID.append(TestTID)
  29.         if len(ShinyTID) = 8
  30.             break
  31.     return ShinyTID
  32.  
  33. def ShinyCheckerSIDOut(PID,TID):
  34.     PIDHiNib = (PID & 0xFFFF0000) >> 16
  35.     PIDLoNib = PID & 0x0000FFFF
  36.     ShinySID = []
  37.     for TestSID in range(0,65535):
  38.         TrainerXOR = TID      ^ TestSID
  39.         PokemonXOR = PIDHiNib ^ PIDLoNib
  40.         if TrainerXOR ^ PokemonXOR < 8:
  41.             ShinySID.append(TestSID)
  42.         if len(ShinySID) = 8
  43.             break
  44.     return ShinySID
Advertisement
Add Comment
Please, Sign In to add comment