Pokemon Sword and Shield ShinyHunt V0.21 (Nintendo Switch)

Script to automate grinding of eggs. Still a work in progress but it is working so I thought some might find some value in it. Use at your own caution and the Spins will have to be adjusted depending on the Egg Cycle of the Pokemon you are hunting.
Version0.21
Authorssrat5
Publish DateThu, 2 Jan 2020 - 20:40
Last UpdateThu, 2 Jan 2020 - 20:40
Downloads98
RATE


6

0

Code: Select all
/* *
* Pokemon Sword and Shield ShinyHunt V0.21
* ssRat5
* Requirements
* 1. Have Oval Charm (Increased Egg Spawn rate)
* 2. Have Shiny Charm (Increased Shiny chance)
* 3. Have 1st slot Pokemon with flame body ability (Like Coalossal)(Descreases Egg hatch time)
* 4. Equip Rotom Bike
* 5. Able to replace 2nd slot Pokemon
* 6. Town Map highlighted on Menu
* 7. Egg ready at Wild Area Nursery (NOT Route 5 Nursery)(Use Masuda Method)
* 8. Be at Wild Area Nursery
* 9. Adjust EggHatchTime if needed
* *********************************************************** */

define WaitTimeShort=100;
define OneSec=1000;
define TwoSec=2000;
define ThreeSec=3000;
define FourSec=4000;
define circle=95;
 
int toggle;
//int counter;
 
main {
  // LT + Dpad UP to toggle on/off
    if(get_val(SWITCH_L) && event_press(SWITCH_UP)) toggle=!toggle;
//    /*Uglyway
    if(toggle) {
    combo_run(HatchEgg);
    }
//    Ugly way*/
 
/*    Not working.......
    if(toggle) {
    combo_run(HatchEgg);
    } else if(combo_running(HatchEgg)) {
        combo_stop(HatchEgg);
    } else if(toggle && !combo_running(HatchEgg)) {
        counter = 0
        while (counter < 100) {
            combo_run(Spin);
            counter = counter +1;
        }
    }
not working  */

}
 
combo HatchEgg {
set_val(SWITCH_X, 100); //Menu
wait(WaitTimeShort);
set_val(SWITCH_X, 0);
wait(OneSec);
set_val(SWITCH_A, 100); //Select Town Map
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(ThreeSec);
set_val(SWITCH_A, 100); //Select Nursery
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(OneSec);
set_val(SWITCH_A, 100); //Confirm
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
set_val(SWITCH_LY, 100); //Move to Nursery
wait(700);
set_val(SWITCH_LX, 100);
wait(300);
set_val(SWITCH_A, 100); //Start dialog
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(OneSec);
set_val(SWITCH_A, 100); //Accept egg
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
set_val(SWITCH_A, 100); //Message advance
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(ThreeSec);
set_val(SWITCH_A, 100); //Add to party
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(OneSec);
set_val(SWITCH_A, 100); //Message advance
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(TwoSec);
set_val(SWITCH_LY, 100); //Move to 2nd slot
wait(WaitTimeShort);
set_val(SWITCH_A, 100); //Select Pokemon
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
set_val(SWITCH_A, 100); //Message advance
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
set_val(SWITCH_A, 100); //Message advance
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(TwoSec);
set_val(SWITCH_LY, -100); //Move to safe area
wait(500);
set_val(SWITCH_LX, 100);
wait(500);
wait(OneSec);
//*Ugly for now
// 15EggCycle = x < 49  | 20EggCycle = 62 < x < 80
call(Spin12);
call(Spin12);
call(Spin12);
call(Spin12);
call(Spin12);
call(Spin12);
//Ugly*/
set_val(SWITCH_A, 100); //Egg hatching
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
wait(FourSec);
wait(FourSec);
wait(FourSec);
set_val(SWITCH_A, 100); //Message advance
wait(WaitTimeShort);
set_val(SWITCH_A, 0);
wait(FourSec);
}
 
combo Spin {
    // RIGHT
    set_val(SWITCH_LX100);
    set_val(SWITCH_LY,    0);
    wait(circle);
 
    // RIGHT-DOWN
    set_val(SWITCH_LX100);
    set_val(SWITCH_LY100);
    wait(circle);
 
    // DOWN
    set_val(SWITCH_LX,    0);
    set_val(SWITCH_LY100);
    wait(circle);
 
    // DOWN-LEFT
    set_val(SWITCH_LX, -100);
    set_val(SWITCH_LY100);
    wait(circle);
 
    // LEFT
    set_val(SWITCH_LX, -100);
    set_val(SWITCH_LY,    0);
    wait(circle);
 
    // LEFT-UP
    set_val(SWITCH_LX, -100);
    set_val(SWITCH_LY, -100);
    wait(circle);
 
    // UP
    set_val(SWITCH_LX,    0);
    set_val(SWITCH_LY, -100);
    wait(circle);
 
    // UP-RIGHT
    set_val(SWITCH_LX100);
    set_val(SWITCH_LY, -100);
    wait(circle);
 
    // RIGHT
    set_val(SWITCH_LX100);
    set_val(SWITCH_LY,    0);
    wait(circle);
}
 
combo Spin12 {
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
    call(Spin);
}