Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class perfect {
- // ===== CHANGE THIS DATA BASED ON YOUR CURRENT GATCHA
- // Number of different Uber-Super-Rares in this set.
- public static final int UBER_COUNT = 7;
- // Number of different Super-Rares in this set.
- public static final int SUPER_COUNT = 16;
- // Number of different Rares in this set, usually 23.
- public static final int RARE_COUNT = 23;
- // Chance of an Uber-Super-Rare, in this gatcha, in percent.
- // This is 3% in guaranteed events, 5% in most normal events, and 9% in uberfests.
- public static final int UBER_CHANCE = 3;
- // Chance of a Super-Rare, in this gatcha, in percent.
- // This is 22% in guaranteed events, 20% in most normal events, and 26% in uberfests.
- public static final int SUPER_CHANCE = 22;
- // ===== END GATCHA DATA
- // Converting the above percentages to values out of 10,000.
- public static final int UBER_THRESHOLD = 10000 - (UBER_CHANCE * 100);
- public static final int SUPER_THRESHOLD = 10000 - (UBER_CHANCE * 100) - (SUPER_CHANCE * 100);
- static int f(int x) {
- // Calculate a new seed value from the previous one.
- x ^= x << 13;
- x ^= x >> 17;
- x ^= x << 15;
- return x;
- }
- static int rem1(int x){
- // Use the seed to calculate rarity.
- x = Math.abs(x);
- x = x%10000; // 0-9999
- if(x > UBER_THRESHOLD) { // Uber-rares 9% (9100) in uberfest, 5% (9500) in normal, 3% (9700) in guaranteeds
- return 2;
- }else if (x > SUPER_THRESHOLD) { // Super-rares 26% (6500) in uberfest, 20% (7500) in normal, 22% (7500) in guaranteeds
- return 1;
- }else{ // Rares
- return 0;
- }
- }
- static int rem2(int r,int y){
- // Use the seed to choose from the rarity's pool.
- y = Math.abs(y);
- if(r==2){
- return y%UBER_COUNT; // There are # uber-rares in a pool
- }else if (r==1){
- return y%SUPER_COUNT; // There are # super-rares in a pool
- }else {
- return y%RARE_COUNT; // There are # rares in a pool
- }
- }
- public static void main(String[] args){
- // =====
- // CHANGE THIS ARRAY TO YOUR CAT PULLS
- int[][] array = {{1,8}, {0,0}, {0,11}, {1,15}, {1,10}, {0,17}, {0,2}, {0,7}, {0,21}, {0,15}};
- // =====
- for (int i=Integer.MIN_VALUE;i<Integer.MAX_VALUE;i++){
- int seed = i;
- int j = 0;
- boolean Running = true;
- while(j<array.length && Running){
- int rarity = rem1(seed);
- seed = f(seed);
- int slot = rem2(rarity,seed);
- if (rarity != array[j][0]) {
- Running = false;
- }
- if (slot != array[j][1]) {
- Running = false;
- }
- seed = f(seed);
- if (j==9){
- System.out.println("Your seed value is:");
- System.out.println(i);
- }
- j ++;
- }
- }
- System.out.println("Have a nice day! (•̀ᴗ•́)");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement