Advertisement
Guest User

YT: Vynxly

a guest
Dec 12th, 2019
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1.  
  2.  
  3. // GPC Online Library
  4. // automated_turbo_button_press.gpc
  5.  
  6. //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.
  7. //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!
  8.  
  9.  
  10. // Customizing: Choose what buttons to start or stop the automation, and which button to press.
  11.  
  12. define StartButton = PS4_R3;
  13. define ComboButton = PS4_L2;
  14. //Hold: How long to hold down the Combo button
  15. define HoldTime = 200;
  16. //Rest: How long to wait before pressing the Combo button again
  17. define RestTime = 200;
  18.  
  19. // No need to change anything else
  20.  
  21. int led, currentled, run;
  22. init {
  23. //This led stuff shamelessly copied from RubberBand script by vkrouso
  24. led = 0;
  25. reset_leds();
  26. while(led<4){
  27. if(get_led(led)==1) currentled = led;
  28. led = led+1;
  29. }
  30. }
  31.  
  32. main {
  33. if(run > 0) {
  34. combo_run(AutomatedCombo);
  35. } else {
  36. combo_stop(AutomatedCombo);
  37. reset_leds();
  38. }
  39.  
  40. if(event_press(StartButton)) {
  41. if(run == 1) {
  42. run = 0;
  43. } else {
  44. run = 1;
  45. }
  46. }
  47. }
  48.  
  49. combo AutomatedCombo {
  50. set_val(ComboButton, 100);
  51. set_led(currentled,1);
  52. wait(HoldTime);
  53. set_val(ComboButton, 100);
  54. set_led(currentled,0);
  55. wait(RestTime);
  56. set_val(ComboButton,0);
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement