CM BO4 AA and AntiRecoil + Simple Script Combination Request

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

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby antithesis » Tue Apr 09, 2019 10:28 pm

Nup, I don't use right-stick AA. I have several mods built into a BO4 script so I can change the pattern on-the-fly for testing, but none of them work as well as left-stick AA. Worth a shot though :)
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 2:21 am

NICE, I am SO close to what I need as I have little pieces that just need to put together now. How do i combine scripts? Basically with this one the last thing i am missing is the auto aim scripts from ps4 but fixed. I created a video on my stream so you can see the results. REALLY NICE! I can get in and out the hit box nice too. Thanks Bone fisher for letting me writing me these and antithesis for the theory behind the game mechanics

Only thing:
These are what I need combined:
-AA that you just provided
-Strafing that adjustable
-Auto Aim which I am demonstrating in the video, It's not active when I fire, but helpful around corners. it's just spamming ads and it should be adjustable but when I press ads and fire at the same time it stops.
-Easy Sprint (the one from pablos qol scripts, This is because the others have an error when I ADS and get out of ads it doesn't sprint again)
-Easy slide (Pablo scripts preferred)
- ARyanx Anti-Recoil
viewtopic.php?f=26&t=11201
-Hair Triggers
-Fast Melee



Here is the one you made for me bonefisher with most of it:
viewtopic.php?f=26&t=12065

My you tube:
I am using an apex, it works very well with keeping it inside the AA bubble. I apologize for my movement as I didn't have auto sprint. I also demonstrate ADS spam i want when I press the ADS, but I don't want it when ADS and Firing
https://www.youtube.com/watch?v=dr9jphfs3Xc

Only scripting need done is basically just ads auto aim abuse
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 2:45 am

i don't want toggles that can change the script via buttons, just through the program. If there is a true and false for each script to turn it on or off that would be awesome!
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby bonefisher » Wed Apr 10, 2019 5:37 pm

Code: Select all
 
#pragma METAINFO("ASA", 1, 0, "bonefisher")
 
main
{
    if(get_actual(BUTTON_8))set_val(BUTTON_8, irand(100, 0));
 
    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);}
 
}
combo ARA
{
    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 ARAF
{
    set_val(STICK_1_Y, irand(50, 16));
    set_val(STICK_1_X, irand(50, 16));
    set_val(STICK_1_X, irand(-50, -16));
    wait(40);
    set_val(STICK_1_Y, irand(-50, -16));
    set_val(STICK_1_X, irand(-50, -16));
    set_val(STICK_1_X, irand(50, 16));
    wait(40);
}
 
int irand(int vmin, int vmax) {
    return(((int)(rand() * (fix32)(vmax + 1 - vmin))) + vmin);
}
 

Try this new one!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 6:33 pm

after working all night on trying to figure it out, did i do this corrrectly?

Code: Select all
 
#pragma METAINFO("ads and fire", 1, 00, "AryanX")
 
 
/* *****************************************************************************
<cfgdesc>
[BATTLEFIELD V AC]
color = #008000
shortdesc = Automatically detects crouch/stand/prone to use appropriate recoil. Runtime operations for manual overrides. Press Jump button to reset to standing. <br /><br /> <b><u>Runtime Operations</b></u> <br /><br />Press <b>[Touch-Click|View] + [CROSS|A]</b> to quickly enable/disable the mod. <br /> Press <b>[Touch-Click|View] + DPAD UP</b> to manually set <b>Standing Anti Recoil</b> mode<br /> Press <b>[Touch-Click|View] + DPAD Down</b> to manually set <b>Crouch Anti Recoil</b> mode<br /> Press <b>[Touch-Click|View] + DPAD Left</b> to manually set <b>Prone Anti Recoil</b> mode<br /> Press <b>[Touch-Click|View] + DPAD Right</b> to manually set <b>Custom Anti Recoil</b> mode. Can only be set manually.
control = info
 
[One Click Config]
color = #008000
collapsible = 2
shortdesc = One click predefined configurations. To create one, click on copy configuration after modification, go to script "One Click Config" and add to items
control = config
item = maddox Base:00001900000019000080001900140000000451EC001200000000000000120000000000000012000000000000001200000000000080800064000F000A000A
item = lit Tree:GIVICFG:00001900000019000080001900140000000451EC001200000000000000120000000000000012000000000000001200000000000080800064000F000A000A
item = SUPPORT LEWIS LRRL Tree:8002BC000000320000800014001E0000000451EC0013851F000240000011B3340002451F000F26670001B3340019000000000000808003E8001E000A0096
 
[Rapidfire Settings]
color = #008000
collapsible = 2
shortdesc = Enable Rapid Fire?
byteoffset = 0
bitsize = 1
bitoffset = 7
control = checkbox
default = 1
item = Rapidfire ON
 
[Rapidfire Hold Time]
group = true
shortdesc = Rapidfire Hold Time
byteoffset = 1
bitsize = 16
control = spinbox
default = 25
minimum = 10
maximum = 5000
step = 1
 
[Rapidfire Release Time]
group = true
shortdesc = Rapidfire Release Time
byteoffset = 5
bitsize = 16
control = spinbox
default = 25
minimum = 10
maximum = 5000
step = 1
 
[Anti Recoil Settings]
color = #008000
shortdesc = Enable Anti Recoil?
byteoffset = 9
bitsize = 1
bitoffset = 7
control = checkbox
default = 1
item = Anti Recoil ON
 
[Anti Recoil Delay]
group = true
shortdesc = Anti Recoil Delay (In MS) after fire button is pressed.
byteoffset = 10
bitsize = 16
control = slider
default = 75
minimum = 0
maximum = 1000
step = 5
 
[Min Anti Recoil Percent]
group = true
shortdesc = Minimum Percentage of Anti Recoil to apply during aim stick movement.
byteoffset = 12
bitsize = 32
control = spinboxf
default = 300
minimum = 0
maximum = 1000
step = 100
decimals = 1
 
[Antithesis Apex Dead Zone Remover]
group = true
shortdesc = Stick Noise. Set to the resting dead zone values for your right stick.
byteoffset = 16
bitsize = 32
control = spinboxf
default = 432
minimum = 0
maximum = 10000
step = 100
decimals = 2
 
[Standing Anti Recoil Settings]
collapsible = 2
shortdesc = Standing: Anti Recoil vertical pull force compensation.
byteoffset = 20
bitsize = 32
control = spinboxf
default = 2500
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Standing Anti Recoil H Settings]
group = true
shortdesc = Standing: Anti Recoil horizontal pull force compensation.
byteoffset = 24
bitsize = 32
control = spinboxf
default = 00000
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Crouch Anti Recoil Settings]
collapsible = 2
shortdesc = Crouch: Anti Recoil vertical pull force compensation.
byteoffset = 28
bitsize = 32
control = spinboxf
default = 2500
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Crouch Anti Recoil H Settings]
group = true
shortdesc = Crouch: Anti Recoil horizontal pull force compensation.
byteoffset = 32
bitsize = 32
control = spinboxf
default = 00000
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Prone Anti Recoil Settings]
collapsible = 2
shortdesc = Prone: Anti Recoil vertical pull force compensation.
byteoffset = 36
bitsize = 32
control = spinboxf
default = 2500
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Prone Anti Recoil H Settings]
group = true
shortdesc = Prone: Anti Recoil horizontal pull force compensation.
byteoffset = 40
bitsize = 32
control = spinboxf
default = 00000
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Custom Anti Recoil Settings]
collapsible = 2
shortdesc = Custom: Anti Recoil vertical pull force compensation.
byteoffset = 44
bitsize = 32
control = spinboxf
default = 2500
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Custom Anti Recoil H Settings]
group = true
shortdesc = Custom: Anti Recoil horizontal pull force compensation.
byteoffset = 48
bitsize = 32
control = spinboxf
default = 00000
minimum = -10000
maximum = 10000
step = 30
decimals = 2
 
[Extra Features Settings]
color = #008000
collapsible = 2
byteoffset = 52
bitsize = 1
bitoffset = 7
control = checkbox
default = 1
item = Turbo Melee
 
[Aim Abuse Settings]
group = true
byteoffset = 53
bitsize = 1
bitoffset = 7
control = checkbox
default = 0
item = Aim Abuse
 
[Auto Aim Hold Time]
group = true
shortdesc = Auto Aim Hold Time: Configure the time period, in milli-seconds, of which the ADS(Scope) button should be pressed when the aim-assist abuse is activated.
byteoffset = 54
bitsize = 16
control = spinbox
default = 300
minimum = 20
maximum = 5000
step = 50
 
[Auto Aim Release Time]
group = true
shortdesc = Auto Aim Release Time: Configure the time period, in milli-seconds, of which the ADS(Scope) button should be released when the aim-assist abuse is activated.
byteoffset = 56
bitsize = 16
control = spinbox
default = 30
minimum = 10
maximum = 5000
step = 5
 
[Auto Aim Fire Pre Pause Time]
group = true
shortdesc = Auto Aim Fire Pre Pause Time: Configure the time period, in milli-seconds, to pause rapid fire for given time before ads release.
byteoffset = 58
bitsize = 16
control = spinbox
default = 10
minimum = 0
maximum = 5000
step = 5
 
[Auto Aim Fire Post Pause Time]
group = true
shortdesc = Auto Aim Fire Post Pause Time: Configure the time period, in milli-seconds, to pause rapid fire for given time after ads release.
byteoffset = 60
bitsize = 16
control = spinbox
default = 10
minimum = 0
maximum = 5000
step = 5
 
</cfgdesc>
***************************************************************************** */

 
 
/////////////////////////////////////////////////////////////////////////////////
// Button Defines
/////////////////////////////////////////////////////////////////////////////////
#define STK_MOVE_X STICK_2_X
#define STK_MOVE_Y STICK_2_Y
#define STK_AIM_X STICK_1_X
#define STK_AIM_Y STICK_1_Y
#define BTN_JUMP BUTTON_16
#define BTN_SPRINT BUTTON_9
#define BTN_CROUCH BUTTON_15
#define BTN_RELOAD BUTTON_17
#define BTN_CHANGE_WEAPON BUTTON_14
#define BTN_COMMO_ROSE BUTTON_4
#define BTN_GRENADE BUTTON_7
#define BTN_ADS BUTTON_8
#define BTN_SHOOT BUTTON_5
#define BTN_MELEE BUTTON_6
#define BTN_DPAD_UP BUTTON_10
#define BTN_DPAD_DOWN BUTTON_11
#define BTN_DPAD_LEFT BUTTON_12
#define BTN_DPAD_RIGHT BUTTON_13
#define BTN_MENU BUTTON_3
#define BTN_PS BUTTON_1
#define BTN_TOUCHPAD BUTTON_18
#define BTN_SHARE BUTTON_18
#define float fix32
/////////////////////////////////////////////////////////////////////////////////
// Character State Defines
/////////////////////////////////////////////////////////////////////////////////
#define STATE_STANDING 0 //[Touch-Click|View] + DPAD UP
#define STATE_CROUCH 1 //[Touch-Click|View] + DPAD DOWN
#define STATE_PRONE 2 //[Touch-Click|View] + DPAD LEFT
#define STATE_CUSTOM 3 //[Touch-Click|View] + DPAD RIGHT
 
/////////////////////////////////////////////////////////////////////////////////
// Configurable Variables
/////////////////////////////////////////////////////////////////////////////////
 
//Rapid Fire
bool bUseRapidFire = TRUE;
int RapidHold = 25;
int RapidRelease = 25;
 
//Anti Recoil
bool bUseAntiRecoil = TRUE;
float ARecoil_H_Standing = 0.0;
float ARecoil_V_Standing = 25.0;
float ARecoil_H_Crouch = 0.0;
float ARecoil_V_Crouch = 25.0;
float ARecoil_H_Prone = 0.0;
float ARecoil_V_Prone = 25.0;
float ARecoil_H_Custom = 0.0;
float ARecoil_V_Custom = 25.0;
uint16 ARecoilDelay = 75;
 
//Percent of anti ARecoil to always apply regardless of aim movement
float MinARecoilPercent = 30.0;
 
//Apex Dead zone Remover
float StickNoise = 4.32;
 
//Turbo Melee
bool bUseTurboMelee = TRUE;
 
//Aim Abuse
bool bUseAimAbuse = FALSE;
int AutoAimHoldTime = 300;
int AutoAimReleaseTime = 30;
int AutoAimFirePrePauseTime = 10;
int AutoAimFirePostPauseTime = 10;
 
/////////////////////////////////////////////////////////////////////////////////
// Dev Variables
/////////////////////////////////////////////////////////////////////////////////
//Mod Enable
bool bModOn = TRUE;
 
//Anti Recoil
float ARecoil_H_ToUse = 0.0;
float ARecoil_V_ToUse = 0.0;
 
//Character State Related
int CharacterStateCurrent = STATE_STANDING;
int32 TimeInState = 0;
 
//Debug Related
int DebugLevel = 1;
//int PauseTimeCounter = 0;
 
//Runtime Operations Related
int RuntimeClickWindow = 700;
 
//Crouch/Prone
int ProneHoldTime = 195; //it is around 180 but fluctuates so 195 to be safe
 
//Auto Aim Pause Fire
int irand(int vmin, int vmax) {
return(((int)(rand() * (fix32)(vmax + 1 - vmin))) + vmin);
}
bool bAutoAimPauseFire = FALSE;
 
/////////////////////////////////////////////////////////////////////////////////
// Init
/////////////////////////////////////////////////////////////////////////////////
init
{
pmem_load(); // Load permanent memory before use any pmem operation
 
// Store the values from the permanent memory (the configuration values)
// into variables.
bUseRapidFire = (pmem_read(0) >> 7) & 0b1;
pmem_read(1, &RapidHold);
pmem_read(5, &RapidRelease);
 
bUseAntiRecoil = (pmem_read(9) >> 7) & 0b1;
pmem_read(10, &ARecoilDelay);
pmem_read(12, &MinARecoilPercent);
pmem_read(16, &StickNoise);
pmem_read(20, &ARecoil_V_Standing);
pmem_read(24, &ARecoil_H_Standing);
pmem_read(28, &ARecoil_V_Crouch);
pmem_read(32, &ARecoil_H_Crouch);
pmem_read(36, &ARecoil_V_Prone);
pmem_read(40, &ARecoil_H_Prone);
pmem_read(44, &ARecoil_V_Custom);
pmem_read(48, &ARecoil_H_Custom);
 
bUseTurboMelee = (pmem_read(52) >> 7) & 0b1;
bUseAimAbuse = (pmem_read(53) >> 7) & 0b1;
pmem_read(54, &AutoAimHoldTime);
pmem_read(56, &AutoAimReleaseTime);
pmem_read(58, &AutoAimFirePrePauseTime);
pmem_read(60, &AutoAimFirePostPauseTime);
 
printf("bUseRapidFire: %d", bUseRapidFire);
printf("RapidHold: %d", RapidHold);
printf("RapidRelease: %d", RapidRelease);
 
printf("bUseAntiRecoil: %d", bUseAntiRecoil);
printf("ARecoilDelay: %d", ARecoilDelay);
printf("MinARecoilPercent: %.02f", MinARecoilPercent);
printf("StickNoise: %.02f", StickNoise);
printf("ARecoil_V_Standing: %.02f", ARecoil_V_Standing);
printf("ARecoil_H_Standing: %.02f", ARecoil_H_Standing);
printf("ARecoil_V_Crouch: %.02f", ARecoil_V_Crouch);
printf("ARecoil_H_Crouch: %.02f", ARecoil_H_Crouch);
printf("ARecoil_V_Prone: %.02f", ARecoil_V_Prone);
printf("ARecoil_H_Prone: %.02f", ARecoil_H_Prone);
printf("ARecoil_V_Custom: %.02f", ARecoil_V_Custom);
printf("ARecoil_H_Custom: %.02f", ARecoil_H_Custom);
 
printf("bUseTurboMelee: %d", bUseTurboMelee);
printf("bUseAimAbuse: %d", bUseAimAbuse);
printf("AutoAimHoldTime: %d", AutoAimHoldTime);
printf("AutoAimReleaseTime: %d", AutoAimReleaseTime);
printf("AutoAimFirePrePauseTime: %d", AutoAimFirePrePauseTime);
printf("AutoAimFirePostPauseTime: %d", AutoAimFirePostPauseTime);
 
}
 
/////////////////////////////////////////////////////////////////////////////////
// Main loops
/////////////////////////////////////////////////////////////////////////////////
main
{
//////////////////////////////////////////////////////////////////////////
//Runtime Operations
//////////////////////////////////////////////////////////////////////////
 
// Press [Touch-Click|View] + [CROSS|A] to quickly enable/disable the mod
if(event_release(BUTTON_15) && time_active(BUTTON_15) < 160)
{
combo_run(BO4_Slide);
}
if(get_val(STICK_2_Y)) {
combo_run(EASY_RUN);
}
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 (get_actual(BTN_TOUCHPAD))
{
//Disabling relevant input during runtime click window
if (time_active(BTN_TOUCHPAD) < RuntimeClickWindow)
{
set_val(BTN_TOUCHPAD, 0.0);
 
if (event_active(BTN_JUMP))
{
bModOn = !bModOn;
if (bModOn)
DebugString(1, "Mod On");
else
DebugString(1, "Mod Off");
}
set_val(BTN_JUMP, 0.0);
 
if (event_active(BTN_DPAD_UP))
{
SetCharacterState(STATE_STANDING);
}
set_val(BTN_DPAD_UP, 0.0);
 
if (event_active(BTN_DPAD_DOWN))
{
SetCharacterState(STATE_CROUCH);
}
set_val(BTN_DPAD_DOWN, 0.0);
 
if (event_active(BTN_DPAD_LEFT))
{
SetCharacterState(STATE_PRONE);
}
set_val(BTN_DPAD_LEFT, 0.0);
 
if (event_active(BTN_DPAD_RIGHT))
{
SetCharacterState(STATE_CUSTOM);
}
set_val(BTN_DPAD_RIGHT, 0.0);
 
}
}
 
 
if (bModOn)
{
//////////////////////////////////////////////////////////////////////////
//Character State Checking
//////////////////////////////////////////////////////////////////////////
TimeInState += elapsed_time();
clamp(TimeInState, 0, 10000000);
 
//Regardless of any state when jump button is pressed, the character goes standing
if (event_active(BTN_JUMP))
{
SetCharacterState(STATE_STANDING);
}
 
//Standing State to other state checks
if (CharacterStateCurrent == STATE_STANDING && TimeInState > 0)
{
if (event_release(BTN_CROUCH))
{
if (time_active(BTN_CROUCH) < ProneHoldTime)
{
SetCharacterState(STATE_CROUCH);
}
else
{
SetCharacterState(STATE_PRONE);
}
}
}
 
//Crouch State to other state checks
if (CharacterStateCurrent == STATE_CROUCH && TimeInState > 0)
{
if (event_release(BTN_CROUCH))
{
if (time_active(BTN_CROUCH) < ProneHoldTime)
{
SetCharacterState(STATE_STANDING);
}
else
{
SetCharacterState(STATE_PRONE);
}
}
}
 
//Prone State to other state checks
if (CharacterStateCurrent == STATE_PRONE && TimeInState > 0)
{
if (event_release(BTN_CROUCH))
{
if (time_active(BTN_CROUCH) < ProneHoldTime)
{
SetCharacterState(STATE_CROUCH);
}
else
{
SetCharacterState(STATE_STANDING);
}
}
 
//If character is prone and presses sprint with movement forward and no ads, it goes to standing.
if (get_val(BTN_SPRINT) && (time_active(BTN_SPRINT) < TimeInState) && (get_val(STK_MOVE_Y) <= -40.0) && get_val(BTN_ADS) == 0.0)
{
SetCharacterState(STATE_STANDING);
}
}
 
 
 
//////////////////////////////////////////////////////////////////////////
//Rapid Fire
//////////////////////////////////////////////////////////////////////////
if (bUseRapidFire)
{
if (get_actual(BTN_SHOOT))
{
if (bAutoAimPauseFire == FALSE)
{
combo_run(RapidFire);
}
else
{
set_val(BTN_SHOOT, 0.0);
combo_stop(RapidFire);
}
}
 
if (event_release(BTN_SHOOT))
{
set_val(BTN_SHOOT, 0.0);
combo_stop(RapidFire);
}
}
 
//////////////////////////////////////////////////////////////////////////
//Anti Recoil
//////////////////////////////////////////////////////////////////////////
if (bUseAntiRecoil)
{
if (CharacterStateCurrent == STATE_STANDING)
{
ARecoil_V_ToUse = ARecoil_V_Standing;
ARecoil_H_ToUse = ARecoil_H_Standing;
}
else if (CharacterStateCurrent == STATE_CROUCH)
{
ARecoil_V_ToUse = ARecoil_V_Crouch;
ARecoil_H_ToUse = ARecoil_H_Crouch;
}
else if (CharacterStateCurrent == STATE_PRONE)
{
ARecoil_V_ToUse = ARecoil_V_Prone;
ARecoil_H_ToUse = ARecoil_H_Prone;
}
else if (CharacterStateCurrent == STATE_CUSTOM)
{
ARecoil_V_ToUse = ARecoil_V_Custom;
ARecoil_H_ToUse = ARecoil_H_Custom;
}
 
if (TimeInState == 0)
{
DebugFloat(1, "Anti Recoil V: %.02f", ARecoil_V_ToUse);
DebugFloat(1, "Anti Recoil H: %.02f", ARecoil_H_ToUse);
}
 
if (get_actual(BTN_SHOOT) && time_active(BTN_SHOOT) >= ARecoilDelay)
{
 
if (abs(get_actual(STK_AIM_X)) < StickNoise) set_val(STK_AIM_X, 0.0);
if (abs(get_actual(STK_AIM_Y)) < StickNoise) set_val(STK_AIM_Y, 0.0);
if (abs(get_actual(STK_MOVE_X)) < StickNoise) set_val(STK_MOVE_X, 0.0);
if (abs(get_actual(STK_MOVE_Y)) < StickNoise) set_val(STK_MOVE_Y, 0.0);
 
//We currently only want shoot to be on during the hold phase of rapid fire
if (get_val(BTN_SHOOT))
{
AntiRecoil(STK_AIM_X, ARecoil_H_ToUse);
AntiRecoil(STK_AIM_Y, ARecoil_V_ToUse);
}
}
}
 
//////////////////////////////////////////////////////////////////////////
//Turbo Melee
//////////////////////////////////////////////////////////////////////////
if (bUseTurboMelee)
{
if (get_actual(BTN_MELEE))
{
combo_run(TurboMelee);
}
else
{
set_val(BTN_MELEE, 0.0);
combo_stop(TurboMelee);
}
}
 
//////////////////////////////////////////////////////////////////////////
//Auto Aim Abuse
//////////////////////////////////////////////////////////////////////////
if (bUseAimAbuse)
{
if (get_actual(BTN_ADS)&& get_actual(BTN_SHOOT))
{
combo_run(AimAbuse);
}
else
{
bAutoAimPauseFire = FALSE;
combo_stop(AimAbuse);
}
 
// //Debug only
// if(bAutoAimPauseFire)
// {
// if(PauseTimeCounter > 0)
// {
// DebugInt(1, "bAutoAimPauseFire = true. False for PauseTimeCounter: %d", PauseTimeCounter);
// PauseTimeCounter = 0;
// }
// }
// else
// {
// PauseTimeCounter+=elapsed_time();
// clamp(PauseTimeCounter, 0, 10000);
// }
}
}
 
 
}
 
/////////////////////////////////////////////////////////////////////////////////
// Combos
/////////////////////////////////////////////////////////////////////////////////
combo RapidFire
{
set_val(BTN_SHOOT, 100);
wait(RapidHold);
set_val(BTN_SHOOT, 0);
wait(RapidRelease);
}
 
combo TurboMelee
{
set_val(BTN_MELEE, 100.0);
wait(40);
set_val(BTN_MELEE, 0.0);
wait(40);
}
 
combo AimAbuse
{
bAutoAimPauseFire = FALSE;
set_val(BTN_ADS, 100);
wait(AutoAimHoldTime - AutoAimFirePrePauseTime);
bAutoAimPauseFire = TRUE;
wait(AutoAimFirePrePauseTime);
set_val(BTN_ADS, 0.0);
wait(AutoAimReleaseTime);
set_val(BTN_ADS, 100);
wait(AutoAimFirePostPauseTime);
}
combo ARA
{
set_val(STICK_1_Y, irand(30, 16));
set_val(STICK_1_X, irand(30, 16));
wait(30);
set_val(STICK_1_Y, irand(-30, -16));
set_val(STICK_1_X, irand(-30, -16));
wait(30);
}
combo ARAF
{
set_val(STICK_1_Y, 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));
wait(40);
}
combo EASY_RUN
{
set_val(BUTTON_9, 0.0);
wait(60);
set_val(BUTTON_9, 100.0);
wait(60);
set_val(BUTTON_9, 100.0);
}
combo BO4_Slide
{
set_val(STICK_2_Y,-100.0);
wait(20);
set_val(STICK_2_Y,-100.0);
set_val(BUTTON_9,100.0);
wait(50);
set_val(STICK_2_Y,-100.0);
set_val(BUTTON_15,100.0);
wait(200);
set_val(STICK_2_Y,-100.0);
wait(300);
}
 
/////////////////////////////////////////////////////////////////////////////////
// Functions
/////////////////////////////////////////////////////////////////////////////////
 
void DebugString(int DLevel, char* String)
{
if (DLevel >= DebugLevel)
{
printf(String);
}
}
 
void DebugInt(int DLevel, char* String, int Integer)
{
if (DLevel >= DebugLevel)
{
printf(String, Integer);
}
}
 
void DebugFloat(int DLevel, char* String, float FloatValue)
{
if (DLevel >= DebugLevel)
{
printf(String, FloatValue);
}
}
 
void SetCharacterState(int NewCharacterState)
{
if (NewCharacterState != CharacterStateCurrent)
{
DebugInt(1, "Time In Old State(sec): %d", TimeInState / 1000);
TimeInState = 0;
CharacterStateCurrent = NewCharacterState;
 
if (NewCharacterState == STATE_STANDING)
{
DebugString(1, "New State: STATE_STANDING");
}
else if (NewCharacterState == STATE_CROUCH)
{
DebugString(1, "New State: STATE_CROUCH");
}
else if (NewCharacterState == STATE_PRONE)
{
DebugString(1, "New State: STATE_PRONE");
}
else if (NewCharacterState == STATE_CUSTOM)
{
DebugString(1, "New State: STATE_CUSTOM");
}
}
}
 
void AntiRecoil(uint8 AxisToApply, float ARecoilToApply)
{
float CurrentX = get_val(STK_AIM_X);
float CurrentY = get_val(STK_AIM_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, MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply));
}
 
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 8:46 pm

Bonefisher, that one feels kinda worse. And it doesn't do the ads thing correctly. Aryan made a really nice one. I just wanted to switch it where it did ads abuse only when ADS , not ADS and FIRE. The one you put in does it when ads is activated period. you can use the one I just posted and if you can change it to where it can do that it would be awesome
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby bonefisher » Wed Apr 10, 2019 9:03 pm

It was made for quick killin… lol! Really wouldn't hold it up but only when your going to fire so they don't cry when watching kill cams. lol!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 9:16 pm

bonefisher wrote:It was made for quick killin… lol! Really wouldn't hold it up but only when your going to fire so they don't cry when watching kill cams. lol!


Oh it kills QUICK, I just wished i had a Auto Aim option for only ADS as well, just like the aryan one so I can put them in different intervals
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 9:38 pm

and btw:
I am speaking of the auto ads in the script above, not the aim assist increase you made.
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

Re: CM BO4 AA and AntiRecoil + Simple Script Combination Req

Postby SweatyPapi » Wed Apr 10, 2019 9:57 pm

//////////////////////////////////////////////////////////////////////////
//Auto Aim Abuse
//////////////////////////////////////////////////////////////////////////
if (bUseAimAbuse)
{
if (get_actual(BTN_ADS))
{
combo_run(AimAbuse);
}
{
if (get_actual(BTN_ADS)&& get_actual(BTN_SHOOT)
set_val(BTN_ADS, 100.0) ;
combo_stop(AimAbuse);
}

tried this but it stated unexpected set val and unexpected combo_stop
User avatar
SweatyPapi
Sergeant Major
Sergeant Major
 
Posts: 91
Joined: Fri Feb 08, 2019 12:52 am

PreviousNext

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 83 guests