Possible script combine

GPC2 script programming for Titan Two. Code examples, questions, requests.

Re: Possible script combine

Postby Scachi » Fri Jun 07, 2019 5:18 pm

Muex wrote:Wow lol i kinda understand a lilttle bit more thank you.. ok ive went in and added more code that was related to aim correction. i went from 53 errors to 23 most being wrong brackets.

The error message count is lower but the result is worse. Coyping something without understanding it isn't helping much.
As I said it isn't easy to do as a beginner. YOu need help from a person with a bit more experience or stick to the T2 Gamepack or usermade scripts that are already available in the "Online Resource" and try those first, configuring them and spend some time testing their settings/options.
There is documentation for the Gamepack available : https://www.consoletuner.com/wiki/index ... blackops_4

When you know how to configure them you'll know how to access the Interactive Configuration of the usermade scripts too (if they have one). Do not forget to hit the "Save and Run" button when changing settings of a script/Gemapack via the Interactive Configuration. Without that the changes will be only active after switching back and forth the T2 slots.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Possible script combine

Postby bonefisher » Fri Jun 07, 2019 5:40 pm

When I get back from doctor's I'll put a T2 aim stabilizer in the script instead of a T1 one! Might be later on tonight though!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Possible script combine

Postby Mad » Fri Jun 07, 2019 5:46 pm

The "aim correction" is pretty useless it's just made to sound cool.

HIP/GEN SENS - You can change your sensitivity in game 1-14
ADS SENS - You can also change this in game - 0.75% is most common

The only part you cant do is change the sens when firing. Here's what it would look like for titan two:

Code: Select all
#define FIRE_SENS 0.8
 
if(is_active(4)){
    set_val(STICK_1_X, get_actual(STICK_1_X)* FIRE_SENS);
    set_val(STICK_1_Y, get_actual(STICK_1_Y)* FIRE_SENS);
}


But i agree with Scachi, check out the online resource section :smile0517:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Possible script combine

Postby bonefisher » Sat Jun 08, 2019 1:13 am

Code: Select all
 
#pragma METAINFO("BO4 Special Edtion", 1, 0, "bonefisher")
 
/* *****************************************************************************
<cfgdesc>
[BO4 Special Edtion]
color          = #008000
shortdesc      = <font color="green">Runtime operations Use Interactive Configurations for changes to settings.
control        = info
 
[RAPID FIRE SETTINGS:]
color          = #008000
collapsible    = 2
shortdesc      = <font color="brown">ENABLE:<font color="green">Rapid Fire?</font>
byteoffset     = 0
bitsize        = 8
control        = radiobox
default        = 0
item           = Rapidfire OFF
item           = Rapidfire ON
 
[RAPID FIRE OPTIONS:]
groupcol       = true
shortdesc      = <font color="brown">SHOTS PER SECOND:</font> <font color="green">   Set to desired sps setting 1~25 sps.</font>
byteoffset     = 1
bitsize        = 32
control        = spinboxf
default        = 165
minimum        = 10
maximum        = 250
step           = 05
decimals       = 1
 
[ANTI RECOIL SETTINGS:]
color          = #008000
collapsible    = 2
shortdesc      = <font color="brown">ENABLE:<font color="green"> Anti Recoil?
byteoffset     = 10
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 1
item           = Anti Recoil ON
 
[Min Anti Recoil Percent]
group          = true
shortdesc      = <font color="brown">Minimum Percentage:<font color="green"> Anti Recoil to apply during aim stick movement.
byteoffset     = 11
bitsize        = 32
control        = spinboxf
default        = 200
minimum        = 0
maximum        = 1000
step           = 10
decimals       = 1
 
[Stick Noise Remover]
group          = true
shortdesc      = <font color="brown">STICK NOISE:<font color="green"> Set to the resting dead zone values for your right stick.
byteoffset     = 15
bitsize        = 32
control        = spinboxf
default        = 800
minimum        = 0
maximum        = 10000
step           = 50
decimals       = 2
 
[Anti Recoil Delay]
group          = true
shortdesc      = <font color="brown">Anti Recoil Delay:<font color="green"> (In MS) after fire button is pressed.
byteoffset     = 19
bitsize        = 16
control        = slider
default        = 0
minimum        = 0
maximum        = 1000
step           = 5
 
[Standing Anti Recoil Settings]
groupcol          = true
shortdesc      = <font color="brown">Anti Recoil:<font color="green"> vertical pull force compensation.
byteoffset     = 21
bitsize        = 32
control        = spinboxf
default        = 1800
minimum        = -10000
maximum        = 10000
step           = 10
decimals       = 2
 
[Standing Anti Recoil H Settings]
group          = true
shortdesc      = <font color="brown">Anti Recoil:<font color="green"> horizontal pull force compensation.
byteoffset     = 25
bitsize        = 32
control        = spinboxf
default        = 00000
minimum        = -10000
maximum        = 10000
step           = 10
decimals       = 2
 
[Anti Recoil Timed]
group          = true
shortdesc      = <font color="brown">Anti Recoil Timed:<font color="green"> (In MS) length of top setting compensation then applying second settings.
byteoffset     = 29
bitsize        = 16
control        = slider
default        = 500
minimum        = 0
maximum        = 2500
step           = 5
 
[Anti Recoil Settings]
group          = true
shortdesc      = <font color="brown">Anti Recoil:<font color="green"> vertical pull force compensation.
byteoffset     = 31
bitsize        = 32
control        = spinboxf
default        = 1800
minimum        = -10000
maximum        = 10000
step           = 10
decimals       = 2
 
[Anti Recoil H Settings]
group          = true
shortdesc      = <font color="brown">Anti Recoil:<font color="green"> horizontal pull force compensation.
byteoffset     = 35
bitsize        = 32
control        = spinboxf
default        = 00000
minimum        = -10000
maximum        = 10000
step           = 10
decimals       = 2
 
[AIM ASSIST SETTINGS:]
color       = #008000
collapsible = 2
 
[AIM ASSIST]
group       = true
shortdesc   = <font color="green">Works when ads is applied or fired.</font>
byteoffset  = 39
bitsize     = 1
bitoffset   = 7
control     = checkbox
default     = 1
item        =  Enable Aim assist
 
[AIM STABILIZER SETTINGS:]
color       = #008000
collapsible = 2
 
[AIM STABILIZER]
group       = true
shortdesc   = <font color="green">Works when ads is applied and firing.</font>
byteoffset  = 40
bitsize     = 1
bitoffset   = 7
control     = checkbox
default     = 1
item        =  Enable Aim stabilizer
 
[Hip adjustment]
group       = true
shortdesc   = <br><b><font color="green">Hip Fire Aim Adjustable Setting: 1.0 is default game setting. Higher than 1.0 is faster and below 1.0 slows stick down.</font></b>
byteoffset  = 41
bitsize     = 32
control     = spinboxf
default     = 10
minimum     = 0
maximum     = 20
step        = 1
decimals    = 1
 
[ADS adjustment]
group       = true
shortdesc   = <br><b><font color="green">ADS plus Fire Aim Adjustable Setting: 1.0 is default game setting. Higher than 1.0 is faster and below 1.0 slows stick down.</font></b>
byteoffset  = 45
bitsize     = 32
control     = spinboxf
default     = 10
minimum     = 0
maximum     = 20
step        = 1
decimals    = 1
 
[adjustment hip]
group       = true
shortdesc   = <br><b><font color="green">Hip Aim Adjustable Setting: 1.0 is default game setting. Higher than 1.0 is faster and below 1.0 slows stick down.</font></b>
byteoffset  = 49
bitsize     = 32
control     = spinboxf
default     = 10
minimum     = 0
maximum     = 20
step        = 1
decimals    = 1
 
[adjustment ads]
group       = true
shortdesc   = <br><b><font color="green">ADS Aim Adjustable Setting: 1.0 is default game setting. Higher than 1.0 is faster and below 1.0 slows stick down.</font></b>
byteoffset  = 53
bitsize     = 32
control     = spinboxf
default     = 10
minimum     = 0
maximum     = 20
step        = 1
decimals    = 1
 
[TURBO MELEE SETTINGS:]
color       = #008000
collapsible = 2
 
[TURBO MELEE MODz]
group       = true
shortdesc   = <font color="green">Options for Turbo Melee.</font>
byteoffset  = 57
bitsize     = 8
control     = radiobox
default     = 2
item        = Disable
item        = Hold for normal press or double tap for turbo melee.
item        = Hold for turbo melee or double tap for normal press.
 
 
[AIM ABUSE SETTINGS:]
color       = #008000
collapsible = 2
 
[Aim_Abuse Settings]
group          = true
shortdesc      = <font color="green">Enable Aim Abuse?</font>
byteoffset     = 58
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 0
item           = Aim Abuse
 
[Auto Aim Hold Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Hold Time:</font> <font color="green">Configure the time period, in milli-seconds, of which the ADS(Scope) button should be pressed when the aim-assist abuse is activated.</font>
byteoffset     = 59
bitsize        = 16
control        = spinbox
default        = 150
minimum        = 20
maximum        = 5000
step           = 50
 
[Auto Aim Release Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Release Time:</font> <font color="green">Configure the time period, in milli-seconds, of which the ADS(Scope) button should be released when the aim-assist abuse is activated.</font>
byteoffset     = 61
bitsize        = 16
control        = spinbox
default        = 50
minimum        = 10
maximum        = 5000
step           = 5
 
[Auto Aim Fire Pre Pause Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Fire Pre Pause Time:</font> <font color="green">Configure the time period, in milli-seconds, to pause rapid fire for given time before ads release.</font>
byteoffset     = 63
bitsize        = 16
control        = spinbox
default        = 5
minimum        = 0
maximum        = 5000
step           = 5
 
[Auto Aim Fire Post Pause Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Fire Post Pause Time:</font> <font color="green">Configure the time period, in milli-seconds, to pause rapid fire for given time after ads release.</font>
byteoffset     = 65
bitsize        = 16
control        = spinbox
default        = 50
minimum        = 0
maximum        = 5000
step           = 5
 
[AUTO SPRINT SETTINGS:]
color       = #008000
collapsible = 2
 
[Auto Sprint]
group          = true
shortdesc   = <font color="green">Easy sprint: hold left stick forward too sprint. Adjust reload delay for weapon so you don't sprint cancel reload. Adjust reload cancel the same as delay just incase anytime of reloading and enemy is near engage stick forward fast to get out of reloading.</font>
byteoffset     = 67
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 1
item           =  Enable Easy Sprint
 
[Reload Delay]
group          = true
shortdesc      = <font color="brown">Reload Delay:<font color="green"> (In MS) length that it takes when you first press reload to when magazine clicks in weapon.
byteoffset     = 68
bitsize        = 16
control        = slider
default        = 2000
minimum        = 0
maximum        = 3500
step           = 5
 
[Reload Cancel]
group          = true
shortdesc      = <font color="brown">Reload Cancel:<font color="green"> (In MS) length of time you sprint cancel reloading in case needing break out to fire on enemy.
byteoffset     = 70
bitsize        = 16
control        = slider
default        = 2000
minimum        = 0
maximum        = 3500
step           = 5
 
[STRAFE SETTINGS:]
color       = #008000
collapsible = 2
 
[Strafe MODz]
group       = true
shortdesc   = <font color="green">Strafe option.</font>
byteoffset  = 115
bitsize     = 8
control     = radiobox
default     = 0
item        = Disabled
item        = Enabled Strafe (Adjustable)
item        = Enabled Strafe(Hip only)(Adjustable)
 
[Strafe Adjustable Setting]
group       = true
shortdesc   = <br><b><font color="green">Strafe Adjustable Setting:</font></b>
byteoffset  = 116
bitsize     = 32
control     = spinbox
default     = 200
minimum     = 0
maximum     = 2000
step        = 1
 
</cfgdesc>
***************************************************************************** */

 
#include <display.gph>
#define wait(a)  wait((int)a);
#define float  fix32
 
uint8 rapid_fire;
fix32 sps;
fix32 hold_time, rest_time;
uint8 bUseAntiRecoil;
float ARecoil_H;
float ARecoil_V;
uint16 ARecoilDelay;
float ARecoil_H2;
float ARecoil_V2;
uint16 ARecoilTimed;
float MinARecoilPercent;
float StickNoise;
//Aim Abuse
bool bUseAimAbuse = FALSE;
int AutoAimHoldTime;
int AutoAimReleaseTime;
int AutoAimFirePrePauseTime;
int AutoAimFirePostPauseTime;
bool bAutoAimPauseFire = FALSE;
bool sprint_toggle;
bool AimAssist;
bool AimStabilizer;
fix32 Hip_Stabilizer;
fix32 ads_fire_Stabilizer;
fix32 Stabilizer_Hip;
fix32 Stabilizer_ads;
//Turbo Melee
uint8 bUseTurboMelee = 2;
bool turboMelee = TRUE;
bool  fast_melee;
uint8   STRAFE_MODz;
uint32  STRAFE_SHUFFLE;
uint16 reload_cancel;
uint16 reload_delay;
bool break_out;
bool Specialist;
bool med = TRUE;
init
{
    pmem_load();
    rapid_fire = pmem_read(0);
    pmem_read(1, &sps);
    printf("<center><font style='color:blue;font-size:14px;',><br>RAPID FIRE: %u", rapid_fire);
    update_rapidfire();
 
    bUseAntiRecoil = (pmem_read(10) >> 7) & 0b1;
    printf("<center><font style='color:red;font-size:14px;',><br>ANTI RECOIL: %d", bUseAntiRecoil);
    pmem_read(11, &MinARecoilPercent);
    pmem_read(15, &StickNoise);
    pmem_read(19, &ARecoilDelay);
    pmem_read(21, &ARecoil_V);
    pmem_read(25, &ARecoil_H);
    pmem_read(29, &ARecoilTimed);
    pmem_read(31, &ARecoil_V2);
    pmem_read(35, &ARecoil_H2);
    update_anti_recoil();
    AimAssist = (pmem_read(39) >> 7) & 0b1;
    AimStabilizer = (pmem_read(40) >> 7) & 0b1;
    pmem_read(41, &Hip_Stabilizer);
    pmem_read(45, &ads_fire_Stabilizer);
    pmem_read(49, &Stabilizer_Hip);
    pmem_read(53, &Stabilizer_ads);
    bUseTurboMelee = pmem_read(57);
    bUseAimAbuse = (pmem_read(58) >> 7) & 0b1;
    pmem_read(59, &AutoAimHoldTime);
    pmem_read(61, &AutoAimReleaseTime);
    pmem_read(63, &AutoAimFirePrePauseTime);
    pmem_read(65, &AutoAimFirePostPauseTime);
    sprint_toggle = (pmem_read(67) >> 7) & 0b1;
    pmem_read(68, &reload_delay);
    pmem_read(70, &reload_cancel);
    STRAFE_MODz = pmem_read(115);
    pmem_read(116, &STRAFE_SHUFFLE);
}
 
main {
 
    // - RAPIDFIRE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if(get_actual(BUTTON_5)) {
    if (bAutoAimPauseFire == FALSE)
    {
        set_val(BUTTON_5, 100.0);
    if(rapid_fire == 1)
        combo_run(RapidFire);
    }
    }else combo_stop(RapidFire);
 
    if (bUseAntiRecoil)
    {
 
        if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
        if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
        if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
        if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
 
        if (event_active(BUTTON_5))
        {
            combo_run(recoil_compensation);
        }
        if(event_release(BUTTON_5))
        {
            combo_stop(recoil_compensation);
        }
    }
    if(AimStabilizer == 1)
    {
        if(!get_actual(BUTTON_8) && get_actual(BUTTON_5)) {
            set_val(STICK_1_X, clamp(get_val(STICK_1_X) * Hip_Stabilizer, -100.0, 100.0));
            set_val(STICK_1_Y, clamp(get_val(STICK_1_Y) * Hip_Stabilizer, -100.0, 100.0));
        }
        if(get_actual(BUTTON_8) && get_actual(BUTTON_5)) {
            set_val(STICK_1_X, clamp(get_val(STICK_1_X) * ads_fire_Stabilizer, -100.0, 100.0));
            set_val(STICK_1_Y, clamp(get_val(STICK_1_Y) * ads_fire_Stabilizer, -100.0, 100.0));
        }
        if(!get_actual(BUTTON_8) && !get_actual(BUTTON_5)) {
            set_val(STICK_1_X, clamp(get_val(STICK_1_X) * Stabilizer_Hip, -100.0, 100.0));
            set_val(STICK_1_Y, clamp(get_val(STICK_1_Y) * Stabilizer_Hip, -100.0, 100.0));
        }
        if(get_actual(BUTTON_8) && !get_actual(BUTTON_5)) {
            set_val(STICK_1_X, clamp(get_val(STICK_1_X) * Stabilizer_ads, -100.0, 100.0));
            set_val(STICK_1_Y, clamp(get_val(STICK_1_Y) * Stabilizer_ads, -100.0, 100.0));
        }
    }
    if(AimAssist == 1)
    {
    if(get_val(BUTTON_8)&& !get_actual(BUTTON_5)) {
        combo_run(ARA);
    } else
    if(get_val(BUTTON_5)) {
        combo_run(ARAF);
    }
    if(is_active(STICK_1_X)){combo_stop(ARA);combo_stop(ARAF);}
    if(is_active(STICK_1_Y)){combo_stop(ARA);combo_stop(ARAF);}
    }
    if(turboMelee == 1)
    {
    if(bUseTurboMelee == 1)
        {
        if(fast_melee)
              {
            if(get_val(BUTTON_6))
                    {
                combo_run(TurboMelee);
 
            }else
                        {
                fast_melee = 0;
            }
            }else if(event_active(BUTTON_6) && time_release(BUTTON_6) < 140)
                        {
                fast_melee = 1;
            }
        }
    if(bUseTurboMelee == 2)
        {
          if(get_actual(BUTTON_6))
              {
            combo_run(TurboMelee);
 
        }else if(event_release(BUTTON_6))
                {
            combo_stop(TurboMelee);
        }
        if(event_active(BUTTON_6) && time_release(BUTTON_6) < 140)
                {
            fast_melee = !fast_melee;
 
        }else if(event_release(BUTTON_6) && time_active(BUTTON_6) <= 140)
                {
            fast_melee = !fast_melee;
        }
        if(fast_melee)
        {
            if(get_actual(BUTTON_6))
            {
                combo_stop(TurboMelee);
 
                set_val(BUTTON_6, 100.0);
 
            }else if(event_release(BUTTON_6))
                        {
                fast_melee = FALSE;
            }
        }
    }
    }
    if (bUseAimAbuse)
    {
        if (get_actual(BUTTON_8) && !get_actual(BUTTON_5))
        {
            combo_run(AimAbuse);
        }
        else
        {
            bAutoAimPauseFire = FALSE;
            combo_stop(AimAbuse);
        }
    }
    if(sprint_toggle)
    {
    if(is_active(STICK_2_X))
    {
    if(event_active(BUTTON_15))combo_run(auto_slide);
    }
    if(get_actual(BUTTON_8))
    {
        combo_stop(auto_slide);
    if(is_active(BUTTON_15))set_val(BUTTON_15, 100.0);
    }
 
    // - SPRINT MOD - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if(get_val(STICK_2_Y) < -90.0) {
        combo_run(EasySprint);
    }
    if(get_actual(BUTTON_5) || get_actual(BUTTON_8) ||
       get_actual(BUTTON_4) || get_actual(BUTTON_7)) {
        combo_stop(EasySprint);
    }
    if(is_release(BUTTON_17) && time_active(BUTTON_17) <= reload_delay) {
        combo_stop(EasySprint);
    }
    if(is_active(STICK_2_Y) && time_active(STICK_2_Y) < reload_cancel)reload_delay = 0;
    }
    if(STRAFE_MODz == 1) {
    if(get_val(BUTTON_5)) {
        combo_run(strafe);
    }else if(event_release(BUTTON_5)) {
        combo_stop(strafe);
    }
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_stop(strafe);
    }
    }
    if(STRAFE_MODz == 2) {
    if((!get_val(BUTTON_8) && get_val(BUTTON_5)) || (event_release(BUTTON_8) && get_val(BUTTON_5))) {
        combo_run(strafe);
    }else if(event_release(BUTTON_5)) {
        combo_stop(strafe);
    }
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_stop(strafe);
    }
    }
    //-----------------------------Specialist-------------------------------------//   
    if(Specialist == 0 && event_release(BUTTON_17)){
        Specialist = 1;
    }else if(check_release(BUTTON_17, 240)){
        Specialist = 0;
    }
    if(Specialist == 1){set_val(BUTTON_17, 0.0);}
 
    if(event_active(BUTTON_17) && time_release(BUTTON_17) < 240) {
    if(event_active(BUTTON_17) && time_active(BUTTON_17) <= 240)set_val(BUTTON_17, 0.0);
        break_out = 1;
        led_reset();
        led_set(LED_3, -1.0, 0);
        display_overlay(_R_, 2000);
    }else if(break_out == 1 && event_release(BUTTON_17)) {
        break_out = 0;
        led_reset();
        display_overlay(_X_, 2000);
    }
    if(break_out == 1){
        combo_run(show_down);
    }
    if(event_active(BUTTON_7)) {
    if(med == 0) {
        med = 1;
        led_reset();
        led_set(LED_3, -1.0, 0);
        display_overlay(_R_, 2000);
    }else if(med == 1) {
        med = 0;
        led_reset();
        display_overlay(_X_, 2000);
    }
    }
    if(med == 1){
    if(event_release(BUTTON_5)){
        combo_run(med_shot);
    }else if(get_actual(BUTTON_5)){
        combo_stop(med_shot);
    }
    }
}
 
combo RapidFire
{
    set_val(BUTTON_5, hold_time ? 100.0 : 0.0);
    wait(hold_time);
    set_val(BUTTON_5, rest_time ? 0.0 : 100.0);
    wait(rest_time);
    set_val(BUTTON_5, rest_time ? 0.0 : 100.0);
}
 
combo recoil_compensation
{
    wait(ARecoilDelay);
    AntiRecoil(STICK_1_X, ARecoil_H);
    AntiRecoil(STICK_1_Y, ARecoil_V);
    wait(ARecoilTimed);
    AntiRecoil(STICK_1_X, ARecoil_H2);
    AntiRecoil(STICK_1_Y, ARecoil_V2);
    wait(2000);
}
 
combo AimAbuse
{
    bAutoAimPauseFire = FALSE;
    set_val(BUTTON_8, 100);
    wait(AutoAimHoldTime - AutoAimFirePrePauseTime);
    bAutoAimPauseFire = TRUE;
    wait(AutoAimFirePrePauseTime);
    set_val(BUTTON_8, 0.0);
    wait(AutoAimReleaseTime);
    set_val(BUTTON_8, 100);
    wait(AutoAimFirePostPauseTime);   
}
 
combo ARA
{
    set_val(STICK_1_X, irand(24, 16));
    wait(40);
    set_val(STICK_1_Y, irand(24, 16));
    wait(40);
    set_val(STICK_1_X, irand(-24, -16));
    wait(40);
    set_val(STICK_1_Y, irand(-24, -16));
    wait(40);
}
combo ARAF
{
    set_val(STICK_1_X, irand(40, 16));
    wait(40);
    set_val(STICK_1_Y, irand(40, 16));
    wait(40);
    set_val(STICK_1_X, irand(-40, -16));
    wait(40);
    set_val(STICK_1_Y, irand(-40, -16));
    wait(40);
}
 
combo TurboMelee
{
    set_val(BUTTON_6, 100.0);
    wait(40);
    set_val(BUTTON_6, 0.0);
    wait(40);
    set_val(BUTTON_6, 0.0);
}
 
combo EasySprint
{
    set_val(BUTTON_9, 100.0);
    wait(40);
    set_val(BUTTON_9, 0.0);
    wait(40);
    set_val(BUTTON_9, 0.0);
    reload_delay = 2000;
}
 
combo auto_slide {
    set_val(BUTTON_9, 100.00);
    set_val(BUTTON_15, 0.00);
    set_val(STICK_2_X, 100.00);
    set_val(STICK_2_Y, -100.00);
    wait(20);
    set_val(BUTTON_9, 100.00);
    set_val(BUTTON_15, 100.00);
    set_val(STICK_2_Y, -100.00);
    wait(20);
    set_val(BUTTON_9, 0.00);
    set_val(BUTTON_15, 100.00);
    set_val(STICK_2_Y, -100.00);
    wait(40);
    set_val(BUTTON_9, 100.00);
    set_val(BUTTON_15, 100.00);
    set_val(STICK_2_Y, -100.00);
    wait(20);
    set_val(BUTTON_9, 0.00);
    set_val(BUTTON_15, 100.00);
    set_val(STICK_2_Y, -100.00);
    wait(60);
}
 
combo strafe
{
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE/2);
    set_val(STICK_2_X, 100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE/2);
    set_val(STICK_2_X, 100);
}
 
combo show_down
{
    set_val(BUTTON_4, 100.0);
    set_val(BUTTON_7, 100.0);
    wait(200);
}
 
combo med_shot
{
    wait(100);
    set_val(BUTTON_7, 100.0);
    wait(200);
}
 
void update_rapidfire() {
    printf("<center><font style='color:blue;font-size:14px;',><br>SHOTS PER SECOND: %.04f", sps);
 
    hold_time = 500.0 / sps;
    rest_time = hold_time - 1.0;
    if(rest_time < 0.0) rest_time = 0.0;   
 
    return;
}
 
void update_anti_recoil(){
    printf("<center><font style='color:red;font-size:14px;',><br>VERTICAL RECOIL COMPENSATION: %.04f", ARecoil_V);
    printf("<center><font style='color:brown;font-size:14px;',><br>HORIZONTAL RECOIL COMPENSATION: %.04f", ARecoil_H);
    printf("<center><font style='color:red;font-size:14px;',><br>VERTICAL RECOIL COMPENSATION 2: %.04f", ARecoil_V2);
    printf("<center><font style='color:brown;font-size:14px;',><br>HORIZONTAL RECOIL COMPENSATION 2: %.04f", ARecoil_H2);
 
    return;
}
 
int irand(int vmin, int vmax) {
    return(((int)(rand() * (fix32)(vmax + 1 - vmin))) + vmin);
}
 
void AntiRecoil(uint8 AxisToApply, float ARecoilToApply)
{
    float CurrentX = get_val(STICK_1_X);
    float CurrentY = get_val(STICK_1_Y);
    float MinARecoilFactor = MinARecoilPercent / 100.0;
    float MinARecoilToApply = MinARecoilFactor * ARecoilToApply;
    //This sets the ARecoil to be dependent on both X and Y axis movement. With more emphasis on Y
    float MovementARecoilToApply = (1.0 - MinARecoilFactor) * ((ARecoilToApply * (100.0 - sqrt(CurrentX*CurrentX + CurrentY*CurrentY))) / (100.0 + abs(CurrentX) + (CurrentY*CurrentY*0.5)));
    set_val(AxisToApply,clamp(MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply),-100.00,100.00 - MinARecoilToApply));
}
 
 
 
 

here try this out!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: Possible script combine

Postby Muex » Sat Jun 08, 2019 1:51 am

Y’all wanna know something funny? I’ve been refreshing this all day hoping I’d get more feedback from y’all right....I didn’t see that I had a page two lmbo.

Anywho


I’ve tried a multitude of scripts created and besides Pablo qol pack I’ve just grown attached to bonefisher scripts. They just seem to resonate and their not hard to understand being a beginner (no riding lol) coming to his script allowed me to use less of the g502 and more of mice that actually fit my hand. The (all the good stuff) pack has EVERYTHING I need as far as click sprint to slide, aim to cancel reload etc it took away my need for the g502 completely


Sorry for the long wind lol.

Also thank you bonefisher.
Thank y’all mad and s for helping me as well.
I’ll try the script in the morning.
I’ll keep my request to a minimum lol thank y’all for the help again
User avatar
Muex
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Wed Jun 05, 2019 2:44 am

Re: Possible script combine

Postby Muex » Fri Sep 04, 2020 3:39 am

ive been trying to add hold breath to this script is that possible?
User avatar
Muex
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Wed Jun 05, 2019 2:44 am

Previous

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 139 guests