Help with Scripting error.

GPC script programming for Titan One device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher, Baby Cham, Elvish

Re: Help with Scripting error.

Postby J2Kbr » Fri Dec 19, 2014 10:49 pm

I fixed the Anti-Recoil code. but I didn't tried to understand what the rest of the code does, I assumed everything else is working as you want.

You can change the anti-recoil "force" in the define ANTIRECOIL_FORCE. Higher the value, higher the force that will be applied to aim-down (when firing).

Code: Select all
// DEFINES
define Rate_Of_Fire     =  20; // Range: 1 to 25 RPS (Round/s)

define ANTIRECOIL_FORCE =  35;

define GAME_Y_AIM       =  10; // RY
define GAME_Y_MOV       = 200; // LY
define GAME_FIRE        =   4; // RT

// VARIABLES
int Hold_Time, Rest_Time;
int ar_tmp;

// INITIALIZATION
init {
    Hold_Time = 300 / Rate_Of_Fire;
    Rest_Time = Hold_Time - 20;
    if(Rest_Time < 0) Rest_Time = 0;
}

// MAIN
main {
    if(get_val(4)) {
        combo_run(Turbo_2);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    if(get_val(6) && get_val(4)) {
        swap(6, 7);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    // ANTI-RECOIL
    if(get_val(GAME_FIRE)) {
        combo_run(AntiRecoil);
    } // End ANTI-RECOIL

} // End Main Block

// COMBOS
combo Turbo_2 {
    set_val(6, 100);
    wait(Hold_Time);
    set_val(6, 0);
    wait(Rest_Time);
    set_val(6, 0);
}

combo AntiRecoil { // This combo must be the last one
    ar_tmp = get_val(GAME_Y_AIM) + ANTIRECOIL_FORCE;
    if(ar_tmp > 100) ar_tmp = 100;
    else if(ar_tmp < -100) ar_tmp = -100;
    set_val(GAME_Y_AIM, ar_tmp);
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 16308
Joined: Tue Mar 18, 2014 1:39 pm

Re: Help with Scripting error.

Postby re5lvr » Sat Dec 20, 2014 2:53 am

Okay now we got gas.


I have seen the A_R function! It only functioned when the RT/4 button was depressed.
{ I swapped it to LT/7, not sure if it functioned the same, am testing now, it is odd the game has a auto fire mod that automatically engages firing/RT when an enemy is in the crosshairs. This is how I run the machine gun this is for. (that having been said should be set up to be easily removed for purposes of game pack as this is the only RE game that has this less the soon to release REREV2!) }

Now here's the million dollar question(s). During the charade of attempting the A_R function, the turbo for Rapid_Stab was negated? I will post a script where it worked and well did it work. Then I will post the unmodified script, then the one where I attempted to increase the rate of Rapid_Stab and did do so but only marginally compared to the original rate??

SO close!!!
A Script Rapid_Stab worked well. Hold RT/4:

Code: Select all
   define Rate_Of_Fire = 20; // Range: 1 to 25 RPS (Round/s) // Values higher than 25 would be so fast that the game probably will not detect 100% of the events.
   

    int Hold_Time, Rest_Time;
    init {
    Hold_Time = 300 / Rate_Of_Fire;
    Rest_Time = Hold_Time - 20;
    if(Rest_Time < 0) Rest_Time = 0;
}

main {
    if(get_val(18)) {
        swap(18, 16);
    }
    if(get_val(19)) {
        combo_run(Turbo_1);
    }
    if(get_val(4)) {
        combo_run(Turbo_2);
    }else if (get_val(6) > 1) {
    set_val(4, 100);
    }
    if(get_val(6) && get_val(4)) {
        swap(6, 7);
    }
}

combo Turbo_1 {
    set_val(19, 100);
    wait(50);
    set_val(19, 0);
    wait(40);
    set_val(19, 0);
}

combo Turbo_2 {
    set_val(4, 100);
    wait(Hold_Time);
    set_val(4, 0);
    wait(Rest_Time);
    set_val(4, 0);
}


Original A_R Script as modded by J2Kbr:

Code: Select all
// DEFINES
define Rate_Of_Fire     =  20; // Range: 1 to 25 RPS (Round/s)

define ANTIRECOIL_FORCE =  35;

define GAME_Y_AIM       =  10; // RY
define GAME_Y_MOV       =  35; // LY
define GAME_FIRE        =   4; // RT

// VARIABLES
int Hold_Time, Rest_Time;
int ar_tmp;

// INITIALIZATION
init {
    Hold_Time = 300 / Rate_Of_Fire;
    Rest_Time = Hold_Time - 20;
    if(Rest_Time < 0) Rest_Time = 0;
}

// MAIN
main {
    if(get_val(4)) {
        combo_run(Turbo_2);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    if(get_val(6) && get_val(4)) {
        swap(6, 7);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    // ANTI-RECOIL
    if(get_val(GAME_FIRE)) {
        combo_run(AntiRecoil);
    } // End ANTI-RECOIL

} // End Main Block

// COMBOS
combo Turbo_2 {
    set_val(6, 100);
    wait(Hold_Time);
    set_val(6, 0);
    wait(Rest_Time);
    set_val(6, 0);
}

combo AntiRecoil { // This combo must be the last one
    ar_tmp = get_val(GAME_Y_AIM) + ANTIRECOIL_FORCE;
    if(ar_tmp > 100) ar_tmp = 100;
    else if(ar_tmp < -100) ar_tmp = -100;
    set_val(GAME_Y_AIM, ar_tmp);
}


My Adjusted Version of J2Kbr's original above to restore Rapid_Stab engaged by holding RT/4:

Code: Select all
// DEFINES
define Rate_Of_Fire     =  25; // Range: 1 to 25 RPS (Round/s)

define ANTIRECOIL_FORCE =  30;

define GAME_Y_AIM       =  10; // RY
define GAME_Y_MOV       =  35; // LY
define GAME_FIRE        =   7; // RT

// VARIABLES
int Hold_Time, Rest_Time;
int ar_tmp;

// INITIALIZATION
init {
    Hold_Time = 300 / Rate_Of_Fire;
    Rest_Time = Hold_Time - 10;
    if(Rest_Time < 0) Rest_Time = 0;
}

// MAIN
main {
    if(get_val(4)) {
        combo_run(Turbo_2);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    if(get_val(6) && get_val(4)) {
        swap(6, 7);
    } else if(get_val(6) > 1) {
        set_val(4, 100);
    }

    // ANTI-RECOIL
    if(get_val(GAME_FIRE)) {
        combo_run(AntiRecoil);
    } // End ANTI-RECOIL

} // End Main Block

// COMBOS
combo Turbo_2 {
    set_val(6, 100);
    wait(Hold_Time);
    set_val(6, 0);
    wait(Rest_Time);
    set_val(6, 40);
}

combo AntiRecoil { // This combo must be the last one
    ar_tmp = get_val(GAME_Y_AIM) + ANTIRECOIL_FORCE;
    if(ar_tmp > 100) ar_tmp = 100;
    else if(ar_tmp < -100) ar_tmp = -100;
    set_val(GAME_Y_AIM, ar_tmp);
}


Clarification. Hoping that the last script can be set up so the Rapid_Stab combo will function as rapidly as it did in the first one. MTIA.
User avatar
re5lvr
First Sergeant
First Sergeant
 
Posts: 64
Joined: Thu Dec 11, 2014 1:12 am

Re: Help with Scripting error.

Postby AKHUGHES90 » Sat Dec 20, 2014 3:04 am

Im guessing Turbo 2 is rapid stab? please let me know and ill fix this for you. also, the first script has an extra swap, are you wanting to keep this? and the final script is missing turbo 1, so is this not needed?
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
Major
 
Posts: 927
Joined: Mon Nov 24, 2014 12:19 am
Location: Springfield, IL USA CST (-6:00)

Re: Help with Scripting error.

Postby re5lvr » Sat Dec 20, 2014 3:28 am

Hey yes Turbo 2 is Rapid_Stab. Turbo 1 was Rapid A Button. Proved less useful than hoped due to in game commands. Thanks!
User avatar
re5lvr
First Sergeant
First Sergeant
 
Posts: 64
Joined: Thu Dec 11, 2014 1:12 am

Re: Help with Scripting error.

Postby AKHUGHES90 » Sat Dec 20, 2014 5:05 am

I left you some notes, please read. i assumed LB + RT was how you shot so i made anti recoil bound to that. It was set to work with RT, but you stated that was melee. If I am correct this script will work perfect. :joia:


Code: Select all
define Rate_Of_Fire = 20; // Range: 1 to 25 RPS (Round/s) // Values higher than 25 would be so fast that the game probably will not detect 100% of the events.
define ANTIRECOIL_FORCE =  35;
define GAME_Y_AIM       =  10; // RY
define GAME_Y_MOV       =  35; // LY

 

    int Hold_Time, Rest_Time;
    int ar_tmp;
    init {
    Hold_Time = 300 / Rate_Of_Fire;
    Rest_Time = Hold_Time - 20;
    if(Rest_Time < 0) Rest_Time = 0;
}

main {
   /* if(get_val(18)) {
        swap(18, 16);
    }                       */
   //Dont know if you need this or not, if you do remove the "/*"  "*/"
    if(get_val(4)) {
        combo_run(Rapid_Stab);
    }else if (get_val(6) > 1) {
    set_val(4, 100);
    }
    if(get_val(6) && get_val(4)) {
        swap(6, 7);
        //ANTI RECOIL                             //I ASSUME THIS IS HOW YOU SHOOT IF RT IS STAB IF NOT RECOOL NEEDS ITS OWN IF(GET_VAL(x)) COMBO_RUN LINE
        combo_run(AntiRecoil);
    }

}

combo Rapid_Stab {
    set_val(4, 100);
    wait(Hold_Time);
    set_val(4, 0);
    wait(Rest_Time);
    set_val(4, 0);
}

combo AntiRecoil { // This combo must be the last one
    ar_tmp = get_val(GAME_Y_AIM) + ANTIRECOIL_FORCE;
    if(ar_tmp > 100) ar_tmp = 100;
    else if(ar_tmp < -100) ar_tmp = -100;
    set_val(GAME_Y_AIM, ar_tmp);
}
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
Major
 
Posts: 927
Joined: Mon Nov 24, 2014 12:19 am
Location: Springfield, IL USA CST (-6:00)

Re: Help with Scripting error.

Postby re5lvr » Sat Dec 20, 2014 6:17 am

Alright it is working I can now tweak it out. I had no idea you set it to LB + RT?? None. I only used LB in place of LT + RT for the purpose of charging the magnum.
User avatar
re5lvr
First Sergeant
First Sergeant
 
Posts: 64
Joined: Thu Dec 11, 2014 1:12 am

Re: Help with Scripting error.

Postby AKHUGHES90 » Sat Dec 20, 2014 7:32 am

Glad its working. :joia:
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
Major
 
Posts: 927
Joined: Mon Nov 24, 2014 12:19 am
Location: Springfield, IL USA CST (-6:00)

i am getting the same error can someone help me?

Postby Zohair1609 » Mon Jan 14, 2019 5:48 pm

------ GPC: Build started ------
> 4: crc.gpc* : C:\Users\User\Downloads\crc.gpc
> ERROR line 20: syntax error near unexpected token 'RIGHT_STICK_ADS_VERTICAL_SENSITIVITY'.
Build failed with 1 errors ...
i am getting this error when i try to compile can some help me fix this
Attachments
crc.gpc
(14.85 KiB) Downloaded 4 times
User avatar
Zohair1609
Corporal
Corporal
 
Posts: 4
Joined: Fri Jun 29, 2018 10:23 am

Re: Help with Scripting error.

Postby Scachi » Mon Jan 14, 2019 6:50 pm

Code: Select all
// GPC Online Library
// fadexz's_ultimate_rainbow_six_siege_script_[no_recoil,_jitter_mod,_rapid_fire,_auto_ping,_auto_scan,_crouch_spam,_and_more!].gpc
 
/*
 
  ************************************************************
  ************************************************************
  ***                                                      ***
  ***   Fadexz's Ultimate Rainbow Six Siege Script v1.1    ***
  ***                                                      ***
  ************************************************************
  ************************************************************
 
  -  -  -  -  -  PLEASE CHECK EVERYTHING BELOW!  -  -  -  -  -
 
 ???????????????????????????????????????????????????????????????
 ???????????????????????? Settings ?????????????????????????????   * = Main Values to Change to your Preference
 ???????????????????????????????????????????????????????????????
 ??*/
define RIGHT_STICK_ADS_HORIZONTAL_SENSITIVITY  =   45; /*?? * Right Stick Aim Down Sights Horizontal Sensitivity - Default: 40 - Range [0~327] - Not same speed as in-game sensitivity
 ??*/
define RIGHT_STICK_ADS_VERTICAL_SENSITIVITY    =   40; /*?? * Right Stick Aim Down Sights Vertical Sensitivity - Default: 35 - Range [0~327] - Not same speed as in-game sensitivity
 ??*/
define RIGHT_STICK_LOOK_HORIZONTAL_SENSITIVITY =   77; /*?? * Right Stick Look Horizontal Sensitivity - Default: 72 - Range [0~327] - Not same speed as in-game sensitivity
 ??*/
define RIGHT_STICK_LOOK_VERTICAL_SENSITIVITY   =   57; /*?? * Right Stick Look Vertical Sensitivity - Default: 52 - Range [0~327] - Not same speed as in-game sensitivity
 ??*/
define RIGHT_STICK_HORIZONTAL_MIDPOINT         =   50; /*??   Right Stick Horizontal Midpoint - Default: 50 - Range [0~100] - Point where 50% pull will be, higher value allows for more control over small movement but less control over fast movement
 ??*/
define RIGHT_STICK_VERTICAL_MIDPOINT           =   50; /*??   Right Stick Vertical Midpoint - (Same as Horizontal ^^^)
 ??*/
define LONGEST_PRESS_FOR_TURN_ON               =  250; /*??   Longest Press Time on Menu Button - Default: 250 - Range [0~32767] - To activate "Turn On" (quick 180 spin) - Holding any longer will do the original action (press Menu)
 ??*/
define TIME_FOR_TURN_ON                        =  235; /*??   Time to Turn Until Turned 180º - Default: 235 - Range [0~32767]
 ??*/
int DIRECTION_FOR_TURN_ON                   = -100; /*??   Direction to Turn for Turn On - Default: -100 - Range [-100~100] - -100 for left or 100 for right
 ??*/
int MINIMUM_WALK_SPEED_FOR_SPRINT           =  -14; /*??   Minimum Walk Speed for Sprint Activation - Default: -14 - Range [-100~100] - Allows for sprint to be activated while walking at slower speeds - May need to increase slightly if your deadzone is more than 6
 ??*/
int MINIMUM_SPRINT_SPEED                    =  -84; /*??   Minimum Speed for Sprinting to Activate - Default: -84 - Range [-100~100] - May need to increase a small amount if your LS deadzone is above 6%
 ??*/
define AUTO_PING_AIM_AND_SHOOTING_TIME_REQ     =  150; /*??   Required Time of Aim and Shooting to Auto Ping - Default: 150 - Range [0~32767] - Prevents spotting when tap firing (Destroying Equipment)
 ??*/
int RIGHT_STICK_VERTICAL_DEADZONE_UP           =  -10; /*?? * Block Right Stick Up Input Until Greater than this Amount of Force is Applied - Default: -10 - Range [0~-100] - Use the Device Monitor and put heavy RESTING pressure Up on the Right Stick (This should only be when the stick is being rested in that direction, not forced) and set it one value higher than the highest value you get
 ??*/
int RIGHT_STICK_VERTICAL_DEADZONE_DOWN         =   10; /*?? * Block Right Stick Down Input Until Greater than this Amount of Force is Applied - Default: 10 - Range [0~100] - Use the Device Monitor and put heavy RESTING pressure Down on the Right Stick (This should only be when the stick is being rested in that direction, not forced) and set it one value higher than the highest value you get
 ??*/
int RIGHT_STICK_HORIZONTAL_DEADZONE_LEFT       =  -10; /*?? * Block Right Stick Left Input Until Greater than this Amount of Force is Applied - Default: -10 - Range [0~-100] - Use the Device Monitor and put heavy RESTING pressure Left on the Right Stick (This should only be when the stick is being rested in that direction, not forced) and set it one value higher than the highest value you get
 ??*/
int RIGHT_STICK_HORIZONTAL_DEADZONE_RIGHT      =   10; /*?? * Block Right Stick Right Input Until Greater than this Amount of Force is Applied - Default: 10 - Range [0~100] - Use the Device Monitor and put heavy RESTING pressure Right on the Right Stick (This should only be when the stick is being rested in that direction, not forced) and set it one value higher than the highest value you get
 ???????????????????????????????????????????????????????????????
 
 
 ============================================
 ===   How to use Activations in script   ===
 ============================================
 
 == Activate Toggles ==
 
 At least Short Hold View/Touch Pad Button, then while still holding at the same time press...
  Up D-Pad     = Rapid Fire For Both
  Left D-Pad   = Rapid Fire For Secondary
  Down D-Pad   = Rapid Fire/Jitter Off
  Right D-Pad  = Right Jitter
  LB           = LB Jitter
  RB           = RB Jitter
  B            = Crouch Spam
  LS           = High Anti-Recoil Value
  RS           = Low Anti-Recoil Value
 
 If successful scoreboard will close.
 
 Note: A throwable gadget is required for the jitter mod to work.
 
 == Activate Turn On (180° Spin) ==
 
 Press Menu/Options Button, Quickly Double Tap for 360° Spin
 
 (Hold for more than 250ms for original action (Short Hold for press))
 
 == Activate Auto Scan ==
 
 Long Hold Y/Triangle (for the duration of one scan)
 
 (Tap LT/L2, Y/Triangle or Home/PS (AKA Xbox/Playstaion) buttons to stop it)
 
 
 ======================================
 ===        In-Game Settings        ===
 ======================================
 
 Vertical Sensitivity      = 100
 Horizontal Sensitivity    = 100
 Right Stick Dead Zone (%) = 5     (Not required but recommended to set a custom deadzone in the script)
 Aim Down Sights           = 100
 Drone Deployment          = Advanced
 
*/

 
define RIGHT = XB1_RIGHT;         // Jitter
define RB = XB1_RB;               // Jitter
define LB = XB1_LB;               // Jitter
 
int CAM_SCAN_LOOP;                // Auto Camera Scan
int Hold_Y = 0;                   // Auto Camera Scan
int TURN_ON_DIRECTION;             // Turn On (180 Spin)
int TURN_ON_TIME;                  // Turn On (180 Spin)
int Crouch_Spam;                  // Crouch Spam
int Jitter_Toggle;                // Jitter
int Gadget = XB1_RIGHT;           // Jitter
int Anti_Deploy = XB1_LB;         // Jitter
int Rapid_Fire;                   // Rapid Fire
int Rapid_Fire_Sec;               // Rapid Fire
int Rapid_Fire_Is_Sec;            // Rapid Fire
int AR_Up   = -26;                // Anti-Recoil   // High = 35 | Medium = 29 | Low = 26
int AR_Down =  26;                // Anti-Recoil   // High = 35 | Medium = 29 | Low = 26
int AR_Delay = 17// Switch     // Anti-Recoil
int AR_Release;                   // Anti-Recoil
int v;                            // Anti-Recoil
int SCOREBOARD_BUTTON;            // PS4 Button Fix
int rumb_count;                   // Activation Rumble
int rumb_type;                    // Activation Rumble
 
init {
 
 AR_Release = AR_Down + 1;   // Anti-Recoil   // Anti-Recoil Release Value (Positive)
}
 
main {
 
 vm_tctrl(+7);   // 17 ms update time (from default 10ms) makes use of each frame AKA more inputs per second - Increases input delay slightly
 
 if(get_controller() == PIO_PS4)
  SCOREBOARD_BUTTON = PS4_TOUCH;
  else SCOREBOARD_BUTTON = XB1_VIEW;
 
 if(get_val(XB1_LT))   // LT Hair Trigger
  set_val(XB1_LT,100);
 
 if(get_val(XB1_RT))   // RT Hair Trigger
  set_val(XB1_RT,100);
 
 if(get_val(XB1_LY) <= MINIMUM_WALK_SPEED_FOR_SPRINT && get_val(XB1_LS) && get_val(XB1_LT) == 0)   // Always Allow Sprint While Walking
  set_val(XB1_LY,MINIMUM_SPRINT_SPEED);
 
 if(get_val(XB1_RS) && get_ptime(XB1_RS) >= 400) {   // Ez Melee
  combo_run(MELEE_LOOP);
  set_rumb(1,RUMBLE_B); }
 
 if(get_val(XB1_RT) && get_ptime(XB1_RT) >= AUTO_PING_AIM_AND_SHOOTING_TIME_REQ)   // Auto Ping
  combo_run(Auto_Ping);
 
 if(get_val(XB1_LB) && get_ptime(XB1_LB) >= 3300) {   // Auto Release Frag
  set_val(XB1_LB,0); }
 
 if(get_val(XB1_LB) && get_ptime(XB1_LB) >= 1800) {   // Auto Release Frag
  set_rumb(1,RUMBLE_LT); }
 
 if(event_release(XB1_MENU) && get_ptime(XB1_MENU) <= LONGEST_PRESS_FOR_TURN_ON) {   // Turn On (180 Spin)
  TURN_ON_TIME = TIME_FOR_TURN_ON;
  TURN_ON_DIRECTION = DIRECTION_FOR_TURN_ON; }
 
 if(get_ptime(XB1_MENU) <= LONGEST_PRESS_FOR_TURN_ON)   // Turn On (180 Spin)
  sensitivity(XB1_RX,50,100);
 
 if(get_val(XB1_MENU) && get_ptime(XB1_MENU) <= LONGEST_PRESS_FOR_TURN_ON)   // Turn On (180 Spin)
  set_val(XB1_MENU,0);
 
 if(TURN_ON_TIME >= 0 ) {   // Turn On (180 Spin)
  TURN_ON_TIME = TURN_ON_TIME - get_rtime()
  set_val(XB1_RX,TURN_ON_DIRECTION) }
 
 if(TURN_ON_TIME < 0 && get_val(XB1_LT)) {   // Play ADS Sensitivity
  sensitivity(XB1_RX,RIGHT_STICK_HORIZONTAL_MIDPOINT,RIGHT_STICK_ADS_HORIZONTAL_SENSITIVITY);
  sensitivity(XB1_RY,50,RIGHT_STICK_ADS_VERTICAL_SENSITIVITY); }
 
 if(TURN_ON_TIME < 0 && get_val(XB1_LT) == 0) {   // Play Look Sensitivity
  sensitivity(XB1_RX,RIGHT_STICK_HORIZONTAL_MIDPOINT,RIGHT_STICK_LOOK_HORIZONTAL_SENSITIVITY);
  sensitivity(XB1_RY,50,RIGHT_STICK_LOOK_VERTICAL_SENSITIVITY); }
 
 if(event_release(XB1_Y) && get_ptime(XB1_Y) >= 1225)   // Auto Camera Scan
  CAM_SCAN_LOOP = TRUE;
 
 if(CAM_SCAN_LOOP == TRUE) {   // Auto Camera Scan
  set_rumb(1,RUMBLE_B); }
 
 if(get_val(XB1_Y) || get_val(XB1_XBOX) || get_val(XB1_MENU) || get_val(XB1_LT) && CAM_SCAN_LOOP) {   // Auto Camera Scan
  CAM_SCAN_LOOP = FALSE;
  Hold_Y = 0; }
 
 if(Hold_Y >= 1 || CAM_SCAN_LOOP) {   // Auto Camera Scan
  Hold_Y = Hold_Y - get_rtime()
  set_val(XB1_Y,100);
  if(!CAM_SCAN_LOOP)
   set_val(XB1_DOWN,0);
   else
   if(Hold_Y < 0) set_val(XB1_Y,0);
   if(Hold_Y <= -40) Hold_Y = 1225; }   // Original = 1230 [Testing]
 
 if(Jitter_Toggle) {   // Jitter
  if(get_val(XB1_RT)) {
   combo_run(Swap_Jitter);
   sensitivity(XB1_RX,50,80); }
  if(get_val(XB1_RT) && get_ptime(XB1_RT) >= 1)
   set_val(XB1_LT,100);
  if(Gadget == XB1_LB)
   Anti_Deploy = XB1_RB;
  if(event_release(XB1_RT)) {
   combo_run(Anti_Gadget_Deploy); }
  sensitivity(XB1_RY,50,100); }
 
  // Toggles
 
 if(get_val(SCOREBOARD_BUTTON) && get_ptime(SCOREBOARD_BUTTON) > 200) {   // Rapid Fire   // Jitter   // Crouch Spam   // Anti-Recoil
  if(event_press(XB1_B))   // Crouch Spam
   Crouch_Spam = !Crouch_Spam;
  if(event_press(XB1_DOWN)) {   // Rapid Fire/Jitter Off
   Rapid_Fire = FALSE;
   Rapid_Fire_Sec = FALSE;
   Rapid_Fire_Is_Sec = FALSE;
   Jitter_Toggle = FALSE; }
  if(event_press(XB1_LEFT)) {   // Rapid Fire Secondary
   Rapid_Fire = FALSE;
   Rapid_Fire_Sec = TRUE;
   Rapid_Fire_Is_Sec = FALSE;
   Jitter_Toggle = FALSE; }
  if(event_press(XB1_UP)) {   // Rapid Fire Both
   Rapid_Fire = TRUE;
   Rapid_Fire_Sec = FALSE;
   Jitter_Toggle = FALSE; }
  if(event_press(XB1_RIGHT)) {   // Jitter RIGHT
   Gadget = RIGHT;
   Jitter_Toggle = TRUE; }
  if(event_press(XB1_LB)) {   // Jitter LB
   Gadget = LB;
   Jitter_Toggle = TRUE; }
  if(event_press(XB1_RB)) {   // Jitter RB
   Gadget = RB;
   Jitter_Toggle = TRUE; }
  if(event_press(XB1_LS)) {   // Anti-Recoil
   AR_Down = 28;
   AR_Up = -28; }
  if(event_press(XB1_RS)) {   // Anti-Recoil
   AR_Down = 26;
   AR_Up = -26; }
  if(event_press(XB1_LEFT) || event_press(XB1_UP) || event_press(XB1_DOWN) || event_press(XB1_RIGHT) || event_press(XB1_LB) || event_press(XB1_RB) || event_press(XB1_B) || event_press(XB1_LS) || event_press(XB1_RS))
   combo_run(Close_Scoreboard);
   combo_run(Stop_Button_Activation); }
 
 if(Rapid_Fire == TRUE && get_val(XB1_RT))   // Rapid Fire
  combo_run(cRapid_Fire);
 
 if(Rapid_Fire_Sec == TRUE && event_press(XB1_Y))   // Rapid Fire
  Rapid_Fire_Is_Sec = !Rapid_Fire_Is_Sec;
 
 if(Rapid_Fire_Is_Sec == TRUE && get_val(XB1_RT))   // Rapid Fire
  combo_run(cRapid_Fire);
 
 if(Crouch_Spam && get_val(XB1_LT))
  combo_run(cCrouch_Spam);
 
 combo_run(RS_Deadzones);   // Anti-Recoil
 
 if(get_val(XB1_RT))
  combo_run(Vertical_Anti_Recoil);   // Anti-Recoil
 
 if(rumb_count) {   // Activation Rumble
  combo_run(NOTIFY); }
}
 
combo MELEE_LOOP {   // Ez Melee
 set_val(XB1_RS,0);
 wait(700);
 set_val(XB1_RS,100);
 wait(300); }
 
combo Auto_Ping {   // Auto Ping
 set_val(XB1_LEFT,100);
 wait(40);
 set_val(XB1_LEFT,0);
 wait(40);
 wait(1900); }
 
combo cCrouch_Spam {   // Crouch Spam
 set_val(XB1_B,20);
 wait(47);
 set_val(XB1_B,0);
 wait(17); }
 
combo Swap_Jitter {   // Jitter
 set_val(Gadget,100);
 wait(17);
 set_val(XB1_Y,100);
 wait(17); }
 
combo Anti_Gadget_Deploy {   // Jitter
 wait(17);
 set_val(Anti_Deploy,100);
 wait(17);
 set_val(Anti_Deploy,0);
 wait(17);
 set_val(XB1_Y,100);
 wait(34);
 set_val(XB1_Y,0);
 wait(17); }
 
combo cRapid_Fire {   // Rapid Fire
 set_val(XB1_RT,100);
 wait(17);
 set_val(XB1_RT,0);
 wait(17); }
 
combo Close_Scoreboard {   // Anti-Recoil
 set_val(SCOREBOARD_BUTTON,0);
 wait(34);
 set_rumb(1,RUMBLE_A);
 set_rumb(1,RUMBLE_B);
 wait(68); }
 
combo Stop_Button_Activation {   // Toggles   // Rapid Fire   // Jitter   // Crouch Spam   // Anti-Recoil
 set_val(XB1_UP,0);
 set_val(XB1_DOWN,0);
 set_val(XB1_LEFT,0);
 set_val(XB1_RIGHT,0);
 set_val(XB1_LB,0);
 set_val(XB1_RB,0);
 set_val(XB1_B,0);
 set_val(XB1_LS,0);
 set_val(XB1_RS,0);
 wait(350); }
 
combo RS_Deadzones {   // Anti-Recoil
 set_val(XB1_RX,dz_v(XB1_RX,RIGHT_STICK_HORIZONTAL_DEADZONE_RIGHT,RIGHT_STICK_HORIZONTAL_DEADZONE_LEFT));
 set_val(XB1_RY,dz_v(XB1_RY,RIGHT_STICK_VERTICAL_DEADZONE_DOWN,RIGHT_STICK_VERTICAL_DEADZONE_UP));
 set_val(XB1_LX,dz_v(XB1_LX,RIGHT_STICK_HORIZONTAL_DEADZONE_RIGHT,RIGHT_STICK_HORIZONTAL_DEADZONE_LEFT));
 set_val(XB1_LY,dz_v(XB1_LY,RIGHT_STICK_VERTICAL_DEADZONE_DOWN,RIGHT_STICK_VERTICAL_DEADZONE_UP)); }
 
combo Vertical_Anti_Recoil {   // Anti-Recoil
 set_val(XB1_RY,ar_v(XB1_RY,AR_Down))// Down
 wait(AR_Delay);
 set_val(XB1_RY,ar_v(XB1_RY,AR_Up))// Up
 wait(AR_Delay); }
 
combo NOTIFY {   // Activation Rumble
 set_rumble(rumb_type,2);
 wait(136);
 reset_rumble();
 wait(136);
 rumb_count --; }
 
function ar_v(f_axis,f_val) {   // Return Anti-Recoil Value Or Controller Value If Above Release   // Anti-Recoil
 v = get_val(f_axis);
 if(abs(v) < AR_Release)
  return f_val + v;
  return v; }
 
function dz_v(f_axis,f_pv,f_nv) {   // Return zero if between postive & negative limits   // Anti-Recoil
 if(get_val(f_axis) < f_pv && get_val(f_axis) > f_nv) 
  return 0;
  return get_val(f_axis); }
 
function set_rumb (r_num,r_type) {   // Activation Rumble
 rumb_count = r_num;
 rumb_type = r_type; }
User avatar
Scachi
Colonel
Colonel
 
Posts: 1413
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Help with Scripting error.

Postby LMHC7 » Wed Jan 16, 2019 8:03 pm

Has anyone got Fadexz script working with no errors?
User avatar
LMHC7
Corporal
Corporal
 
Posts: 4
Joined: Wed Jan 16, 2019 4:39 pm

Previous

Return to GPC Script Programming (Titan One)

Who is online

Users browsing this forum: No registered users and 5 guests