help im a noob

Gtuner IV general support. Operation, questions, updates, feature request.

help im a noob

Postby CRONUSLAGs » Wed Feb 24, 2021 11:35 pm

wow this titan two is awesome unfortunately my code is not, the currenty script i use is great but i wanted to see if someone could help me update it to gpc2 tysm!!
Code: Select all
 
#include <titanone.gph>
define ONLY_WITH_SCOPE = TRUE;
define AR_Release = 75;
 
define FIRE_BTN = 4;
define R_X      = 9;
define R_Y      = 10;
 
int ANTI_RECOIL;        // For AntiRecoil combo
int ANTI_RECOIL_LEFT;   // For AntiRecoil combo
int ANTI_RECOIL_RIGHT;  // For AntiRecoil combo
 
int anti_recoil;        // For AntiRecoil combo
int anti_recoil_left;   // For AntiRecoil combo
int anti_recoil_right;  // For AntiRecoil combo
 
 
 
main {
 
 
//
    ANTI_RECOIL = 0; // DON'T MODIFY THIS VALUE, ANTIRECOIL VALUES ARE BELOW
 
    if(get_val(XB1_LT) && get_ptime(XB1_RT) >= 0) {  // Burst before antirecoil
        ANTI_RECOIL = 27; // After 450ms fireing, antirecoil = 20 up to 700ms fireing
        }
 
    if(get_val(XB1_LT) && get_ptime(XB1_RT) >= 350) {  // +500
        ANTI_RECOIL = 29; // After 700ms fireing, antirecoil = 51 up to 1450ms fireing
        }
 
    if(get_val(XB1_LT) && get_ptime(XB1_RT) >= 750) { // +500
        ANTI_RECOIL = 32; // After 1450ms fireing, antirecoil = 40 until you release Fire Button
        }
 
        if(get_val(XB1_LB) && get_ptime(XB1_RT) >= 0) {  // Burst before antirecoil
        ANTI_RECOIL = 25; // After 450ms fireing, antirecoil = 20 up to 700ms fireing
        }
 
    if(get_val(XB1_LB) && get_ptime(XB1_RT) >= 350) {  // +500
        ANTI_RECOIL = 26; // After 700ms fireing, antirecoil = 51 up to 1450ms fireing
        }
 
    if(get_val(XB1_LB) && get_ptime(XB1_RT) >= 700) { // +500
        ANTI_RECOIL = 27; // After 1450ms fireing, antirecoil = 40 until you release Fire Button
        }
 
////////////////////////////////////////////////////////////////////       
  if(get_val(FIRE_BTN)){
        combo_run(AntiRecoil);
        }
        else if(event_release(FIRE_BTN)) {
            combo_stop(AntiRecoil);
            }
    if(abs(get_val(R_Y)) > AR_Release || abs(get_val(R_X)) > AR_Release) { 
        combo_stop (AntiRecoil);
    }
    if(get_val(XB1_RT)) {
        set_val(XB1_RT, 100);
        }
        if(((get_val(XB1_LT)) && (get_val(XB1_RT)) && (event_press(XB1_LS)))){
        combo_run(rip);
        }
        else if(event_release(XB1_RT)) {
            combo_stop(rip);
            }
             if(((get_val(XB1_LB)) && (get_val(XB1_RT)) && (event_press(XB1_LS)))){
        combo_run(rip);
        }
        else if(event_release(XB1_LB)) {
            combo_stop(rip);
            }
if((get_val(XB1_RT)) && (get_val(XB1_LB))){
        combo_run(R1_RapidFire); // ... then: run R1_RapidFire combo routine.
    }}
 
    // If R1 is been pressed ..}}
////////////////////////////////////////////////////////////////////}   
combo rip {
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    }
 
combo R1_RapidFire {
    set_val(XB1_RT, 100);
    wait(30);
    ANTI_RECOIL = 34;
    set_val(XB1_RT, 0);
    wait(80);
}
 
combo AntiRecoil {
     anti_recoil = get_val(R_Y) + ANTI_RECOIL;
     if(anti_recoil > 100) anti_recoil = 100;
     set_val(R_Y, anti_recoil);
     anti_recoil_left = get_val(R_X) - ANTI_RECOIL_LEFT;
     if(anti_recoil_left > 100) anti_recoil_left = 100;
     set_val(R_X, anti_recoil_left);
     anti_recoil_right = get_val(R_X) + ANTI_RECOIL_RIGHT;
     if(anti_recoil_right > 100) anti_recoil_right = 100;
     set_val(R_X, anti_recoil_right);
    }
 
User avatar
CRONUSLAGs
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Feb 21, 2021 11:04 pm

Re: help im a noob

Postby Mad » Thu Feb 25, 2021 1:37 am

Welcome. :smile0201:
Code: Select all
#include <ps4.gph>
#include <xb1.gph>
#define ONLY_WITH_SCOPE TRUE
#define AR_Release 75f
 
#define FIRE_BTN 4
 
uint8 ANTI_RECOIL;        // For AntiRecoil combo
uint8 ANTI_RECOIL_LEFT;   // For AntiRecoil combo
uint8 ANTI_RECOIL_RIGHT;  // For AntiRecoil combo
 
uint8 anti_recoil;        // For AntiRecoil combo
uint8 anti_recoil_left;   // For AntiRecoil combo
uint8 anti_recoil_right;  // For AntiRecoil combo
 
main {
 
//
    ANTI_RECOIL = 0; // DON'T MODIFY THIS VALUE, ANTIRECOIL VALUES ARE BELOW
 
    if(is_active(XB1_LT) && is_active(XB1_RT)) {  // Burst before antirecoil
        ANTI_RECOIL = 27; // After 450ms fireing, antirecoil = 20 up to 700ms fireing
        }
 
    if(get_val(XB1_LT) && check_active(XB1_RT, 350)) {  // +500
        ANTI_RECOIL = 29; // After 700ms fireing, antirecoil = 51 up to 1450ms fireing
        }
 
    if(get_val(XB1_LT) && check_active(XB1_RT, 750)) { // +500
        ANTI_RECOIL = 32; // After 1450ms fireing, antirecoil = 40 until you release Fire Button
        }
 
        if(get_val(XB1_LB) && is_active(XB1_RT)) {  // Burst before antirecoil
        ANTI_RECOIL = 25; // After 450ms fireing, antirecoil = 20 up to 700ms fireing
        }
 
    if(get_val(XB1_LB) && check_active(XB1_RT, 350)) {  // +500
        ANTI_RECOIL = 26; // After 700ms fireing, antirecoil = 51 up to 1450ms fireing
        }
 
    if(get_val(XB1_LB) && check_active(XB1_RT, 700)) { // +500
        ANTI_RECOIL = 27; // After 1450ms fireing, antirecoil = 40 until you release Fire Button
        }
 
////////////////////////////////////////////////////////////////////       
  if(get_val(FIRE_BTN)){
        combo_run(AntiRecoil);
        }
        else if(event_release(FIRE_BTN)) {
            combo_stop(AntiRecoil);
            }
    if(abs(get_val(XB1_RY)) > AR_Release || abs(get_val(XB1_RY)) > AR_Release) { 
        combo_stop (AntiRecoil);
    }
    if(get_val(XB1_RT)) {
        set_val(XB1_RT, 100);
        }
        if(((get_val(XB1_LT)) && (get_val(XB1_RT)) && (event_active(XB1_LS)))){
        combo_run(rip);
        }
        else if(event_release(XB1_RT)) {
            combo_stop(rip);
            }
             if(((get_val(XB1_LB)) && (get_val(XB1_RT)) && (event_active(XB1_LS)))){
        combo_run(rip);
        }
        else if(event_release(XB1_LB)) {
            combo_stop(rip);
            }
if((get_val(XB1_RT)) && (get_val(XB1_LB))){
        combo_run(R1_RapidFire); // ... then: run R1_RapidFire combo routine.
    }}
 
    // If R1 is been pressed ..}}
////////////////////////////////////////////////////////////////////}   
combo rip {
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    set_val(PS4_L3, 100);
    wait(30);
    set_val(PS4_L3, 0);
    wait(52);
    set_val(PS4_R3, 100);
    wait(30);
    set_val(PS4_R3, 0);
    wait(52);
    }
 
combo R1_RapidFire {
    set_val(XB1_RT, 100);
    wait(30);
    ANTI_RECOIL = 34;
    set_val(XB1_RT, 0);
    wait(80);
}
 
combo AntiRecoil {
     anti_recoil = (uint8)get_val(XB1_RY) + ANTI_RECOIL;
     if(anti_recoil > 100) anti_recoil = 100;
     set_val(XB1_RY, anti_recoil);
     anti_recoil_left = (uint8)get_val(XB1_RX) - ANTI_RECOIL_LEFT;
     if(anti_recoil_left > 100) anti_recoil_left = 100;
     set_val(XB1_RX, anti_recoil_left);
     anti_recoil_right = (uint8)get_val(XB1_RX) + ANTI_RECOIL_RIGHT;
     if(anti_recoil_right > 100) anti_recoil_right = 100;
     set_val(XB1_RX, anti_recoil_right);
    }
 
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: help im a noob

Postby CRONUSLAGs » Thu Feb 25, 2021 10:56 pm

you are a saint thank you !!!!!!
User avatar
CRONUSLAGs
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Feb 21, 2021 11:04 pm


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 135 guests