Call of Duty - QoL (Quality of Life) Pack

Documentation, usage tips and configuration guides for the Titan Two scripts and bytecodes published by the community users.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Tue Mar 26, 2019 4:01 am

nutsnbolts wrote:This one I have solved. You are correct, i had it binded to multiple things so I can see how it would try to activate it. Thanks for this one. I doubled checked my mappings and I did have multiple things setup for that one button which made it go wacky.



Ok great to hear you have this fixed. So just to make sure you have this setup right:

1) If you want a stim toggle button, map LB and dpad left to the same button. This will cause menu navigation issues, so;

2) Create a dedicated LB mapping on a separate button for general menu navigation.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Tue Mar 26, 2019 4:02 am

nutsnbolts wrote:One more thing, If I'm using a XIM connected the following:

Mouse, G13, Controller connected to XIM Hub - > Connected to T2 -> T2 connected to Xbox, which input method should i be using?

I would assume mouse and keyboard but I just want to make sure.


It's all to do with how I've optimised movement.

How are you moving? If you're using the analogue stick to move, then choose the first option. If you use the keys on your G13 to navigate then use the second option.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Tue Mar 26, 2019 9:54 am

UPDATE v7.05: I have added some additional guidance text to the XIM dual mappings "Advanced XIM Settings" section to help users better understand how to set them up correctly. I have also changed the Rapid Fire Alt Toggle flag so it now defaults to TRUE instead of FALSE. This can still be changed in the Interactive Configurator of course, but I wanted to return it to its original state by default to avoid confusing long time users of my script.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby SweatyPapi » Sat Apr 06, 2019 12:57 pm

I was wondering if you had time to add some things to this script!
(If you can add a off option for these like the Rapid Alt Toggle that would be great. If you can also lead us to where we can see this script it would be awesome as well so I can try to add these other ones myself on top of your nice QOL script)

1. I have a snaking code from Bonefisher that can be nice to add:
pragma METAINFO("snake", 1, 0, "bonefisher")

main
{
// hold crouch button for 1 second to toggle on.
// fire trigger or ads trigger to cancel turn off.
static bool snake;
if(event_release(BUTTON_15) && time_active(BUTTON_15) > 1000)
{
snake = 1;
}
if(snake == 1)
{
combo_run(Snaking);
}
if(get_actual(BUTTON_5) || get_actual(BUTTON_8))
{
snake = 0;
}
}
combo Snaking
{
set_val(BUTTON_15, 100.0);
wait(600);
set_val(STICK_2_Y, -100.0);
set_val(BUTTON_9, 100.0);
wait(180);
}


2. The ADS Abuse in the game pack. ONE thing you would need to edit is basically when the option is ADS only, it will stop it while firing. The Game pack keeps doing the ads abuse even when firing with that option.

3. A mod if you tap melee twice it will shot punch and if you do it press slide and melee it will perform a slide shot punch.
User avatar
SweatyPapi
First Sergeant
First Sergeant
 
Posts: 66
Joined: Fri Feb 08, 2019 12:52 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Mon Apr 08, 2019 7:09 am

Sorry Papi, my focus is on quality of life improvements, I have zero interest in exploits. Aim abuse makes me cringe. I don't have any issue with people doing this in their own scripts and I've never said a negative word about them in this forum because IMO people are free to do what they want but I'm not interested in supporting them in my scripts.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby SweatyPapi » Wed Apr 17, 2019 2:57 pm

Hey Pablo! I have a fellow ximmer that plays inverted, can you make it so it is possible to do the Anti Recoil Inverted?
User avatar
SweatyPapi
First Sergeant
First Sergeant
 
Posts: 66
Joined: Fri Feb 08, 2019 12:52 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby SweatyPapi » Thu Apr 18, 2019 4:43 pm

And also, Can you make the Slide script and the Auto Sprint script Public for Xim Users. Others do not work well like these scripts that you have on xim and it would be a big help to us to add them to customized T2 scripts we have. I am not requesting entire script to be public, I understand you do not want a huge splurge of questions and I understand your busy. It would be awesome though! thank you!
User avatar
SweatyPapi
First Sergeant
First Sergeant
 
Posts: 66
Joined: Fri Feb 08, 2019 12:52 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Mon Apr 29, 2019 4:56 am

SweatyPapi wrote:Hey Pablo! I have a fellow ximmer that plays inverted, can you make it so it is possible to do the Anti Recoil Inverted?


I have no idea what this is, can you explain this to me in more detail? I don't use inverted and I don't use anti-recoil.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby pablosscripts » Mon Apr 29, 2019 4:58 am

SweatyPapi wrote:And also, Can you make the Slide script and the Auto Sprint script Public for Xim Users. Others do not work well like these scripts that you have on xim and it would be a big help to us to add them to customized T2 scripts we have. I am not requesting entire script to be public, I understand you do not want a huge splurge of questions and I understand your busy. It would be awesome though! thank you!


Sorry I'm ok sharing with sharing my simpler scripts but my more complex ones that have to support a ton of scenarios are spaghetti code and I'm just not interested in supporting all the inevitable questions that will come out of it. It'll be impossible for someone to touch it without messing it up, and I've moved on to work on other scripts so my focus will be on bug fixes at this point. It's not a matter of secrecy it's a matter of support*.


*the exception to this is my future PC scripts. All of those will be locked down, even the simpler ones. I don't want game developers being able to see the logic I'm using and banning users of my script.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Colonel
Colonel
 
Posts: 1911
Joined: Tue Nov 24, 2015 6:27 am

Re: Call of Duty - QoL (Quality of Life) Pack

Postby SweatyPapi » Fri May 10, 2019 7:14 am

pablosscripts wrote:
SweatyPapi wrote:And also, Can you make the Slide script and the Auto Sprint script Public for Xim Users. Others do not work well like these scripts that you have on xim and it would be a big help to us to add them to customized T2 scripts we have. I am not requesting entire script to be public, I understand you do not want a huge splurge of questions and I understand your busy. It would be awesome though! thank you!


Sorry I'm ok sharing with sharing my simpler scripts but my more complex ones that have to support a ton of scenarios are spaghetti code and I'm just not interested in supporting all the inevitable questions that will come out of it. It'll be impossible for someone to touch it without messing it up, and I've moved on to work on other scripts so my focus will be on bug fixes at this point. It's not a matter of secrecy it's a matter of support*.


*the exception to this is my future PC scripts. All of those will be locked down, even the simpler ones. I don't want game developers being able to see the logic I'm using and banning users of my script.


1. your scripts provide some kind of nice movement after ads out. Other scripts I tried doesn't have it and thats a major thing that most people want. Whatever that script is, everybody wants it! I beg!
2. Your Auto Run is almost instant and nice and doesn't provide lag.
3. Inverted is if for example you move your mouse up, your aim will go down. same for opposite movement of mouse, just NOT applied to horizontal I believe.
4. Natural Slide Cancel- Yours is the best
5. Your Sliding Scripts.
This is what I got back from many of my community ximmers. The problem is that most scripts aren't usable because its just not as Flow capable like your QOS. We don't want to change anything, but just want the ability to copy and paste these Items in other scripts.

Example: This is a script made by bonefisher and it has great capabilities, however the auto run and movement is laggy. I even tried changing the ms and still the same results. Another problem is if your ADS, you have the ability to run immediately after with your script or perform any movement you want. However, with bonefisher's script there is a uncomfortable pause and my player ends up walking when i ads out when i expect it to sprint. I even tried to attach a auto slide and it wasn't efficient as yours. This would be a MAJOR help to the xim community and we will greatly appreciate it. Ill send this message on the forums as well.


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:]
group          = 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]
group          = 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
 
[TURBO MELEE SETTINGS:]
color       = #008000
collapsible = 2
 
[TURBO MELEE MODz]
group       = true
shortdesc   = <font color="green">Options for Turbo Melee.</font>
byteoffset  = 54
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     = 56
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     = 57
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     = 59
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     = 61
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     = 63
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 walk/sprint: double tap forward for sprint to be on red led. once on just single press...ads trigger, reload button and crouch button shuts off sprint blue led. fire trigger turns sprint on incase you have to evade battle.</font>
byteoffset     = 67
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 1
item           =  Enable Easy Sprint
 
[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
 
[ADS STOP SETTINGS:]
color       = #008000
collapsible = 2
 
[ADS Stop]
group       = true
shortdesc   = <font color="green">Stalls sprint when appling ADS.</font>
byteoffset  = 120
bitsize     = 1
bitoffset   = 7
control     = checkbox
default     = 1
item        =  Enable Auto Stop ADS
 
</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;
//Turbo Melee
uint8 bUseTurboMelee = 2;
bool turboMelee = TRUE;
bool  fast_melee;
bool ADSstop;
uint8   STRAFE_MODz;
uint32  STRAFE_SHUFFLE;
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;
    bUseTurboMelee = pmem_read(54);
    bUseAimAbuse = (pmem_read(56) >> 7) & 0b1;
    pmem_read(57, &AutoAimHoldTime);
    pmem_read(59, &AutoAimReleaseTime);
    pmem_read(61, &AutoAimFirePrePauseTime);
    pmem_read(63, &AutoAimFirePostPauseTime);
    sprint_toggle = (pmem_read(67) >> 7) & 0b1;
    STRAFE_MODz = pmem_read(115);
    pmem_read(116, &STRAFE_SHUFFLE);
    ADSstop = (pmem_read(120) >> 7) & 0b1;
}
 
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(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)
    {
    // - SPRINT MOD - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define SPRINT_OFF     0
    #define SPRINT_ON      1
    static uint8 sprint;
    if(event_active(BUTTON_16)|| event_active(BUTTON_14)||
        event_active(BUTTON_5)|| event_active(BUTTON_9)||
        event_active(STICK_2_Y))
    {
        sprint = SPRINT_ON;
        goto SPRINT_LIGHTBAR;
    }
    else if(event_active(BUTTON_8)|| event_active(BUTTON_17))
    {
        sprint = SPRINT_OFF;
        goto SPRINT_LIGHTBAR;
 
        if(sprint || !sprint)
        {
            switch(sprint)
            {
                case SPRINT_OFF: sprint = SPRINT_OFF;break;
                case SPRINT_ON:  sprint = SPRINT_ON; break;
            }
    } else sprint = SPRINT_OFF;
        SPRINT_LIGHTBAR:
        switch(sprint)
        {
            case SPRINT_OFF: display_overlay(_W_, 500); break;
            case SPRINT_ON:  display_overlay(_R_, 500); break;
        }
    }
    if(sprint == SPRINT_ON && get_val(STICK_2_Y) < -98.0){
        combo_run(easy_sprint);
    }
    if(sprint == SPRINT_OFF){
        set_val(STICK_2_X, get_val(STICK_2_X) / 1.03);
        set_val(STICK_2_Y, get_val(STICK_2_Y) / 1.03);
    }
    }
    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);
    }
    }
    if(ADSstop == 1)
    {
    if(get_val(BUTTON_8)) {
        if(event_active(BUTTON_8)) {
            combo_run(ADSShot);
        }
    }else combo_stop(ADSShot);
    }
}
 
combo easy_sprint
{
    set_val(BUTTON_9, 0.0);
    wait(40);
    set_val(BUTTON_9, 100.0);
    wait(40);
    set_val(BUTTON_9, 100.0);
}
 
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_Y, irand(24, 16));
    set_val(STICK_1_X, irand(24, 16));
    set_val(STICK_1_X, irand(-24, -16));
    wait(40);
    set_val(STICK_1_Y, irand(-24, -16));
    set_val(STICK_1_X, irand(-24, -16));
    set_val(STICK_1_X, irand(24, 16));
    wait(40);
}
combo ARAF
{
    set_val(STICK_1_Y, irand(40, 16));
    set_val(STICK_1_X, irand(40, 16));
    set_val(STICK_1_X, irand(-40, -16));
    wait(40);
    set_val(STICK_1_Y, irand(-40, -16));
    set_val(STICK_1_X, irand(-40, -16));
    set_val(STICK_1_X, 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 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 ADSShot
{
    combo_stop(easy_sprint);
    set_val(STICK_2_Y,0.0);
    wait(320);
    combo_run(easy_sprint);
}
 
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));
}
 
 
 
 
User avatar
SweatyPapi
First Sergeant
First Sergeant
 
Posts: 66
Joined: Fri Feb 08, 2019 12:52 am

PreviousNext

Return to Scripts Documentation (Titan Two)

Who is online

Users browsing this forum: No registered users and 7 guests