Ronnie's Five Seven BO2 Rapid Fire

This is for my friend Ronnie. He saw my rapid fire I put on my controller (Mod Chip) and wanted his own. He wanted me to make him his own custom rapid fire modded controller, but for now, this is temporary for his controller. (He has the original Cronus Device, the new Titan One GPC scripts still work for it though)
VersionRonnie
AuthorValant
Publish DateFri, 30 Jan 2015 - 01:17
Last UpdateFri, 30 Jan 2015 - 01:17
Downloads572
RATE


1

0

Code: Select all
// GPC Online Library
// five_seven_anti_recoil_black_ops_2.gpc
 
//M4 Anti Recoil Script
 
 
/* *
* ANTI-RECOIL GPC SCRIPT
* *********************************************************** */

 
 
// Use Anti-recoil only when scoping
define ONLY_WITH_SCOPE = TRUE;
define SPOT_BUTTON = XB360_RB;int autospot = FALSE;
define SENS_INCREASE_BY = 20;
define RATE_OF_FIRE = 9.9;
define SELECT = XB360_A;
// Anti-recoil strongness
// Value range from 0 to 100
// Each weapon may need a specific value
define ANTI_RECOIL = 25;
define RAPIDFIRE_BUTTON = XB360_RT;
define START = XB360_LT;
 
 
//
// No need to make changes in the code below.
//
 
 
//
//  VARIABLES
// ---------------------------------------------------------
int fire_button, scope_button;
int anti_recoil;
int rpgcount =FALSE;
int rapidfire = TRUE;
int rapid_onoff = TRUE;
int hold_time, rest_time;
 
 
//
//  INITIALIZATION
// ---------------------------------------------------------
init {
   if( event_press(CEMU_EXTRA1)){ // PS3 Trigger & Bumper
        fire_button = 3;
        scope_button = 6;
 
 
   hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
    } else { // Natural Trigger & Bumper
        fire_button = 4;
 
 
        scope_button = 7;
   hold_time = 500 / RATE_OF_FIRE;
    rest_time = hold_time - 20;
    if(rest_time < 0) rest_time = 0;
    }
}
 
 
//
//  MAIN PROCEDURE
// ---------------------------------------------------------
main {
    if(!ONLY_WITH_SCOPE || get_val(scope_button)) {
        combo_run(AntiRecoil);
 
 
 
 
    }
 
 
 
 
 if(get_val(SELECT) && event_press(START)) rapid_onoff = !rapid_onoff; //sets variable to TRUE or FALSE when both buttons are pressed.
    if(get_val(RAPIDFIRE_BUTTON) && rapid_onoff) { //Now Looks for a "TRUE" value of rapid_onoff
        combo_run(RapidFire);
    } else if(combo_running(RapidFire)) {
        combo_stop(RapidFire);
    }
 
 
 
 
if(event_release(SPOT_BUTTON) && get_ptime(SPOT_BUTTON) < 140)       
autospot = !autospot;       
 if(autospot && !get_val(SPOT_BUTTON))     
    combo_run(AutoSpot);block(SPOT_BUTTON, 200);}
   combo AutoSpot {   
    set_val(SPOT_BUTTON, 100);   
    wait(40);     
  set_val(SPOT_BUTTON, 0)
      wait(200);
  if(get_val(XB360_LT))
        combo_run(HoldBreath);
 
 
  if(get_val(XB360_LEFT))
        rpgcount = TRUE;
if( rpgcount == TRUE && get_val(XB1_RT))
combo_run(RPG);   
 
 
 
 
}
 
 
combo HoldBreath{
    wait(50);
    set_val(XB360_LS, 100);
    wait(3000);
    set_val(XB360_LS, 0);
   }
//
//  COMBOS
// ---------------------------------------------------------
combo RapidFire {
    set_val(RAPIDFIRE_BUTTON, 100);
    wait(hold_time);
    set_val(RAPIDFIRE_BUTTON, 0);
    wait(rest_time);
    set_val(RAPIDFIRE_BUTTON, 0);
} 
combo RPG {
   wait(3250);
    set_val(XB360_RIGHT, 100);
    wait(120);
    set_val(XB360_RIGHT, 0);
    wait(110);
    set_val(XB360_LEFT, 100);
    wait(110);
    set_val(XB360_LEFT, 0);
  rpgcount = FALSE;
 
 
}
combo AntiRecoil { // This combo must be the last one
    if(get_val(fire_button)) {
        anti_recoil = get_val(10) + ANTI_RECOIL;
        if(anti_recoil > 100) anti_recoil = 100;
        set_val(10, anti_recoil);
    }
 
 
//Rapidfire
 
 
}