Advertisement
Guest User

prova

a guest
Jan 22nd, 2020
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.20 KB | None | 0 0
  1. //Posted by DarkOfDeath, a member of the Cronus Community - https://cronusmax.com/forums
  2.  
  3. //Posted : Wednesday 22nd of January, 2020 17:42 UTC
  4.  
  5.  
  6. /*
  7. ========================================
  8. === Vertical Anti Recoil Explanation ===
  9. ==========================================================================================
  10. === L2/LT + D-PAD UP Allow you to change the Anti Recoil Values of Vertical Recoil ===
  11. === The LED Will display as GREEN if Enabled now you can Increase/Decrease the Values ===
  12. === L1/LB Will Decrease the Vertical Recoil By -1 ===
  13. === R1/RB Will Increase the Vertical Recoil By +1 ===
  14. ==========================================================================================
  15.  
  16. ==========================================
  17. === Horizontal Anti Recoil Explanation ===
  18. ==========================================================================================
  19. === L2/LT + D-PAD DOWN Allow you to change the Anti Recoil Values of Vertical Recoil ===
  20. === The LED Will display as PINK if Enabled now you can Increase/Decrease the Values ===
  21. === L1/LB Will Decrease the Horizontal Recoil By -1 ===
  22. === R1/RB Will Increase the Horizontal Recoil By +1 ===
  23. ==========================================================================================
  24.  
  25. =================
  26. === Important ===
  27. ==========================================================================================================
  28. === When Increasing a value you will feel a Heavy Rumble ===
  29. === When Decreasing a value you will feel a Light Rumble ===
  30. === When you not able to change Recoil Values of Vertical or Horizontal your LED will display as BLACK ===
  31. ==========================================================================================================
  32. */
  33. //Layout
  34. define PS = PS4_PS; //XBOX
  35. define SHARE = PS4_SHARE; //VIEW
  36. define OPTIONS = PS4_OPTIONS; //MENU
  37. define R1 = PS4_R1; //RB
  38. define R2 = PS4_R2; //RT
  39. define R3 = PS4_R3; //RS
  40. define L1 = PS4_L1; //LB
  41. define L2 = PS4_L2; //LT
  42. define L3 = PS4_L3; //LS
  43. define RX = PS4_RX;
  44. define RY = PS4_RY;
  45. define LX = PS4_LX;
  46. define LY = PS4_LY;
  47. define UP = PS4_UP;
  48. define DOWN = PS4_DOWN;
  49. define LEFT = PS4_LEFT;
  50. define RIGHT = PS4_RIGHT;
  51. define TRIANGLE = PS4_TRIANGLE; //Y
  52. define CIRCLE = PS4_CIRCLE; //B
  53. define CROSS = PS4_CROSS; //A
  54. define SQUARE = PS4_SQUARE //X
  55. define TOUCHPAD = PS4_TOUCH
  56.  
  57. // On the fly recoil from itzsnacks
  58. int AR = 24; //Start Value of Vertical Recoil
  59. int AR_H = 0; //Start Value of Horizontal Recoil
  60. int AR_I = 1; //Change 1 to -1 If you play with Inverted
  61. int ARS,AR_ONOFF,ARH_ONOFF,Flipped = OFF; //Change OFF TO ON If you play with Flipped Triggers
  62. define ON = TRUE;
  63. define OFF = FALSE;
  64.  
  65. // Two aim assist values from itzsnacks
  66. int aa = 22; // Decrease if shake
  67. int aa_delay = 20; // Increase if game lag
  68.  
  69. main {
  70. if(get_val(PS4_R2))
  71. combo_run(AA_XY);
  72. else
  73. combo_stop(AA_XY);
  74.  
  75.  
  76. if(Flipped) {
  77. swap(R1,R2);
  78. swap(L1,L2);}
  79.  
  80. if(get_val(PS4_L2) && get_val(PS4_R2))
  81. combo_run(AR);
  82.  
  83. if(get_val(PS4_L2) && event_press(PS4_UP)) { AR_ONOFF=!AR_ONOFF; ARH_ONOFF = OFF; LED(0,0,3,0);}
  84. if(AR_ONOFF) {
  85. if(event_press(PS4_R1)) {
  86. AR = AR + 1;
  87. combo_run(Increase);}
  88. if(event_press(PS4_L1)) {
  89. AR = AR - 1;
  90. combo_run(Decrease);}
  91. set_val(R1,0); set_val(PS4_L1,0);}
  92.  
  93. if(get_val(PS4_L1) && event_press(PS4_DOWN)) { ARH_ONOFF=!ARH_ONOFF; AR_ONOFF = OFF; LED(0,0,0,3);}
  94. if(ARH_ONOFF) {
  95. if(event_press(PS4_R1)) {
  96. AR_H = AR_H + 1;
  97. combo_run(Increase);}
  98. if(event_press(PS4_L1)) {
  99. AR_H = AR_H - 1;
  100. combo_run(Decrease);}
  101. set_val(R1,0); set_val(PS4_L1,0);}
  102.  
  103. if(!AR_ONOFF && !ARH_ONOFF) {
  104. LED(0,0,0,0);}
  105.  
  106.  
  107. if(abs(get_val(PS4_RY)) > AR + 2 || abs(get_val(PS4_RX)) > AR + 2) {
  108. combo_stop(AR);}}
  109.  
  110. combo AA_XY {
  111. set_val(PS4_RY,xy_val(PS4_RY,aa));
  112. wait(aa_delay)
  113. set_val(PS4_RX,xy_val(PS4_RX,aa));
  114. set_val(PS4_LX,xy_val(PS4_LX,aa));
  115. wait(aa_delay)
  116. set_val(PS4_RY,xy_val(PS4_RY,inv(aa)));
  117. wait(aa_delay)
  118. set_val(PS4_RX,xy_val(PS4_RX,inv(aa)));
  119. set_val(PS4_LX,xy_val(PS4_LX,inv(aa)));
  120. wait(aa_delay)}
  121.  
  122.  
  123. combo AR {
  124. ARS = get_val(RY) + AR;
  125. if(ARS > 100) ARS = 100;
  126. set_val(RY,ARS * AR_I);
  127. ARS = get_val(RX) + AR_H;
  128. if(ARS > 100) ARS = 100;
  129. set_val(RX,ARS);}
  130.  
  131. combo Increase {
  132. set_rumble(RUMBLE_A,100);
  133. wait(100);
  134. reset_rumble();}
  135.  
  136. combo Decrease {
  137. set_rumble(RUMBLE_B,100);
  138. wait(50);
  139. reset_rumble();}
  140.  
  141. function LED(a,b,c,d) {
  142. set_led(LED_1,a);
  143. set_led(LED_2,b);
  144. set_led(LED_3,c);
  145. set_led(LED_4,d);}
  146.  
  147. function xy_val(f_axis,f_val) {
  148. if(abs(get_val(f_axis)) < aa + 1)
  149. return f_val;
  150. return get_val(f_axis);}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement