Last active
June 9, 2022 20:43
-
-
Save Lusamine/0a967fad366029301f19e14703ffc486 to your computer and use it in GitHub Desktop.
This file contains 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
void Main() | |
{ | |
// Initial state | |
ulong s0 = 0x0123456789ABCDEF; | |
ulong s1 = 0x0123456789ABCDEF; | |
// Set this for how far you want to search. | |
int maxAdvance = 1000; | |
var rng = new Xoroshiro128Plus(s0, s1); | |
for (int advances = 0; advances < maxAdvance; advances++) | |
{ | |
GetStateLotoID(advances, rng); | |
rng.Next(); | |
} | |
} | |
// You can define other methods, fields, classes and namespaces here | |
private void GetStateLotoID(int advance, Xoroshiro128Plus rng) | |
{ | |
/* Hilarious, all it does is roll your 5 digits sequentially. Match the last 5 digits of any TID to win a Master Ball. */ | |
var (s0, s1) = rng.GetState(); | |
var output = $"{advance:000} | {s0:x16} | {s1:x16} | "; | |
var digit1 = rng.NextInt(10); | |
var digit2 = rng.NextInt(10); | |
var digit3 = rng.NextInt(10); | |
var digit4 = rng.NextInt(10); | |
var digit5 = rng.NextInt(10); | |
var TIDoutput = $"{digit1}{digit2}{digit3}{digit4}{digit5}"; | |
output += TIDoutput; | |
var result = Convert.ToDecimal(TIDoutput ); | |
// Add your filters here. | |
if (result != 69958) | |
return; | |
Console.WriteLine(output); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup is:
PKHeX.Core
to second tab,RNG state is locked in right as you click on Rotom PC.
This is simply meant to demonstrate the logic for others to implement in their own end-user tools. You can also use this if you want to give it a try first before those tools are updated. It is not meant to be a polished or complete tool in itself.