HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

GPC1 script programming for Titan One. Code examples, questions, requests.

HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Alfagamer » Fri Jun 25, 2021 5:07 pm

Someone makes me a different antirecoil script than the usual one. I need to enter a high value (55) but the aim drops sharply down. Many people who play my game have managed to have immobile aim and manage to shoot far with the immobile weapon (the weapon would be a three-shot burst weapon) with a different antirecoil. Unfortunately they don't want to pass me their scripts because they are really good. Pls guys help me!! :shocked: :roll:
User avatar
Alfagamer
First Sergeant
First Sergeant
 
Posts: 60
Joined: Fri Sep 04, 2020 7:58 am

Re: HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Mad » Fri Jun 25, 2021 10:42 pm

Alfagamer wrote:I need to enter a high value (55) but the aim drops sharply down.

Why do you need to use 55? If it pulls down to much then the value is to high.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Alfagamer » Fri Jun 25, 2021 10:56 pm

Because the perfect value for my gun is 55
User avatar
Alfagamer
First Sergeant
First Sergeant
 
Posts: 60
Joined: Fri Sep 04, 2020 7:58 am

Re: HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Mad » Sat Jun 26, 2021 1:06 am

You'll need to adjust the values at the top.
Code: Select all
define AR_VALUE    = 55;
define BURST_TIME  = 100; // How long one burst is in milliseconds
define BURST_DELAY = 100; // How long before the next burst in milliseconds
 
main {
    if(get_val(XB1_RT)) combo_run(AR);
    else if(AR) combo_stop(AR);
}
 
combo AR {
    set_val(XB1_RT, 100);
    AntiRecoil(XB1_RY, AR_VALUE);
    wait(BURST_TIME);
    set_val(XB1_RT, 0);
    wait(BURST_DELAY);
}
 
function AntiRecoil(axis, recoil){
    if (get_val(XB1_RT) && (isqrt(XB1_RX*XB1_RX + XB1_RY*XB1_RY)) <= abs(recoil)) {
        if(abs(XB1_RY) <= abs(recoil)) {
            set_val(axis,(recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
        }
    }
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Alfagamer » Sat Jun 26, 2021 8:37 am

Mad thank you. But my rapid fire doesn't work with this. You can help me? And if possibile you can make this combo run with PS4_L2 - PS4_ R2. Oh my weapon with the modifications, changes the rate of fire of the volleys (goes up to 2 upgrades)

Code: Select all
define SHOOT_BUTTON = PS4_R2;
define RAPIDFIRE_BUTTON = PS4_L2;
define RATE_OF_FIRE = 230; // Range: 1 to 25 RPS (Round/s)
 
define AR_VALUE    = 55;
define BURST_TIME  = 530; // How long one burst is in milliseconds
define BURST_DELAY = 100; // How long before the next burst in milliseconds
 
 
    int AP = 30; //Decrease if shake
    int AM = -30; //Decrease if shake
    int Delay = 10; //How fast Aim Assist Run
    int Release = 31; //Must be 1 higher than AP & AM
 
 
//VARIABLES
//--------------------------------------------------------------
// *DO NOT EDIT/DELETE THIS SECTION*
int hold_time;
int rest_time;
 
//INITIALIZATION - init
//--------------------------------------------------------------
init {
hold_time = 6100 / RATE_OF_FIRE;
rest_time = hold_time - 6100;
if(rest_time < 22) rest_time = 0;
}
 
main {
 
 
// COLOR INDICATION FOR the RAPID FIRE ON / OFF
if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) {
combo_run(RapidFire);
} else if(combo_running(RapidFire)) {
combo_stop(RapidFire);
reset_leds(); }
 
 if(get_val(XB1_RT)) combo_run(AR);
    else if(AR) combo_stop(AR);
 
    if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) {combo_run(AS);}
 
 }
// COLOR INDICATION FOR the RAPID SPOT ON / OFF
 
combo AR {
    set_val(XB1_RT, 100);
    AntiRecoil(XB1_RY, AR_VALUE);
    wait(BURST_TIME);
    set_val(XB1_RT, 0);
    wait(BURST_DELAY);
}
combo RapidFire {
set_val(SHOOT_BUTTON, 100);
wait(hold_time);
set_val(SHOOT_BUTTON, 0);
wait(rest_time);
set_val(SHOOT_BUTTON, 0);}
 
combo AS {
    set_val(PS4_RY,a_f(PS4_RY,AP));
    wait(Delay)
    set_val(PS4_RX,a_f(PS4_RX,AP));
    wait(Delay)
    set_val(PS4_RY,a_f(PS4_RY,AM));
    wait(Delay)
    set_val(PS4_RX,a_f(PS4_RX,AM));
    wait(Delay)}
 
function AntiRecoil(axis, recoil){
    if (get_val(XB1_RT) && (isqrt(XB1_RX*XB1_RX + XB1_RY*XB1_RY)) <= abs(recoil)) {
        if(abs(XB1_RY) <= abs(recoil)) {
            set_val(axis,(recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
        }
    }
}
 function a_f(p,m) {
    if(abs(get_val(p)) < Release)
    return m;
    return get_val(p);}
User avatar
Alfagamer
First Sergeant
First Sergeant
 
Posts: 60
Joined: Fri Sep 04, 2020 7:58 am

Re: HELP ME PLS. I'M SEARCHING A GOOD SCRIPT

Postby Mad » Sat Jun 26, 2021 10:03 pm

BURST_TIME and BURST_DELAY are the same as rapidfire HOLD/RELEASE.
Code: Select all
define AR_VALUE    = 55;
define BURST_TIME  = 100; // (HOLD TIME) How long one burst is in milliseconds
define BURST_DELAY = 100; // (RELEASE TIME) How long before the next burst in milliseconds
 
int AP = 30; //Decrease if shake
int AM = -30; //Decrease if shake
int Delay = 10; //How fast Aim Assist Run
int Release = 31; //Must be 1 higher than AP & AM
 
main {
    if(get_val(PS4_L2)) {
        if(get_val(PS4_R2)) combo_run(AR);
        else {
            if(AR) combo_stop(AR);
            combo_run(AS);
        }
    }
    else if(AS) combo_stop(AS);
}
 
combo AR {
    set_val(PS4_R2, 100);
    AntiRecoil(PS4_RY, AR_VALUE);
    wait(BURST_TIME);
    set_val(PS4_R2, 0);
    wait(BURST_DELAY);
}
 
combo AS {
    set_val(PS4_RY,a_f(PS4_RY,AP));
    wait(Delay);
    set_val(PS4_RX,a_f(PS4_RX,AP));
    wait(Delay);
    set_val(PS4_RY,a_f(PS4_RY,AM));
    wait(Delay);
    set_val(PS4_RX,a_f(PS4_RX,AM));
    wait(Delay);
}
 
function a_f(p,m) {
    if(abs(get_val(p)) < Release)
    return m;
    return get_val(p);
}
 
function AntiRecoil(axis, recoil){
    if (get_val(PS4_R2) && (isqrt(PS4_RX*PS4_RX + PS4_RY*PS4_RY)) <= abs(recoil)) {
        if(abs(PS4_RY) <= abs(recoil)) {
            set_val(axis,(recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
        }
    }
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 141 guests