Automated turbo button press

This is a quick and easy script to press a button over and over again in a infinite loop. I made this for coin grinding in "Jetpack Joyride", so it is currently setup to press X about 2 times a second. Press R3 to start/stop the loop.
Version1.00
AuthorCypherNova139
Publish DateSat, 10 May 2014 - 05:26
Last UpdateSat, 10 May 2014 - 05:26
Downloads629
RATE


3

1

Code: Select all
//This script will press a button (defined as ComboButton) over and over again in a infinite loop, which can be enabled and disabled at will. 
//Use case: Use in Jetpack Joyride by equipping the "Beat the House" gadget combo, then start a game round, activate this combo script by pressing the StartButton and leave on for a few hours. Watch them coins fly in!
 
 
// Customizing: Choose what buttons to start or stop the automation, and which button to press.
 
define StartButton = PS3_R3;
define ComboButton = PS3_CROSS;
//Hold: How long to hold down the Combo button
define HoldTime = 250;
//Rest: How long to wait before pressing the Combo button again
define RestTime = 250;
 
// No need to change anything else
 
int led, currentled, run;
init {
//This led stuff shamelessly copied from RubberBand script by vkrouso
    led = 0;
    reset_leds();
    while(led<4){
        if(get_led(led)==1) currentled = led;
        led = led+1;
    }
}
 
main {
    if(run > 0) {
        combo_run(AutomatedCombo);
    } else {
        combo_stop(AutomatedCombo);
        reset_leds();
    }
 
    if(event_press(StartButton)) {
        if(run == 1) {
            run = 0;
        } else {
            run = 1;
        }
    }
}
 
combo AutomatedCombo {
    set_val(ComboButton, 100);
    set_led(currentled,1);
    wait(HoldTime);
    set_val(ComboButton, 0);
    set_led(currentled,0);
    wait(RestTime);
    set_val(ComboButton, 0);
}