Script error need help fixing
8 posts
• Page 1 of 1
Script error need help fixing
GPC Online Library
device.gpc
device.gpc
- Code: Select all
//#pragma METAINFO("COBO4 XL T2/CM", 1, 2, "device")
//#include <titanone.gph>
/*
*V1.2
Built for device & Titan2 / works with all consoles
Titan 2 users: remove `//` in line 1 & 2
__ __ ___ __ ___
/ ` /\ | | / \ |__ | \ | | | \ /
\__, /~~\ |___ |___ \__/ | |__/ \__/ | |
__ __ __ __ __
|__) | /\ / ` |__/ / \ |__) /__` | \ /
|__) |___ /~~\ \__, | \ \__/ | .__/ | \/
_ _ ____ ___ _ ___ _ ____ _ _
\/ | |___ | \ | | | | | |\ |
_/\_ |___ |___ |__/ | | | |__| | \|
A GPC Power Script By
__
/ __ _ __ _ |V| _ | | _ _ __
\__ | (_)| ||_|_> | |(_|>< ___|_|_> (/_ |
Credits: Excalibur, Batts, Spegeli and others here at device!
--------------------------------------------------------------------------------------------------------
,---------------------------.
INSTRUCTIONS: https://tinyurl.com/XLEDITION __@ ' | READ THE INSTRUCTIONS !!! |
( ..) -_)--------------------------'
---------------------------------------------------------ooO--(_)--Ooo----------------------------------
!!To read the intructions you need to open the link above in your internet browser!!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |U|S|E|R| |C|O|N|F|I|G|U|R|A|T|I|O|N|| | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//--/ START USER CONFIG--*/
define AIM__INVERTED=FALSE; // IF YOU PLAY WITH AIM INVERTED SET "TRUE;"
define EASY__RUN=TRUE; // EASY RUN
define RUN__SENS=-25; // SENSITIVITY WHEN EASY RUN SHOULD ACTIVATE
define EASY__SLIDE_DROP=TRUE; // EASY SLIDE/DROP
define CNCL__RELOAD=TRUE; // AUTO CANCEL RELOAD
define RELOAD__TIME=2000; // SET LONGEST RELOAD TIME IN YOUR SCRIPT
define EASY__MELEE=TRUE; // EASY MELEE
define AUTO__HEAL=FALSE; // AUTO HEAL AFTER YOU FIRED AND RELOADED
int AIM__CORRECT=TRUE; // AIM CORRECTIONS
int NO__RECOIL;TRUE // ANTI RECOIL
int STICKY__AIM=TRUE; // AIM ASSIST
//ACTIVATION SWITCH FOR SUPER POWER:
define SUPER__POWER__SW=13; //13=UP, 14=DOWN, 15=LEFT, 16=RIGHT, 6=L1/LB, 26=OFF
//ACTIVATION SWITCH FOR KILL STREAK
define KILL__STREAK__SW=15; //13=UP, 14=DOWN, 15=LEFT, 16=RIGHT, 6=L1/LB, 26=OFF
//KILL SWITCH EASY DROP/SLIDE:
define KILL__SW__EASY_SLIDE=14; //13=UP, 14=DOWN, 15=LEFT, 16=RIGHT, 6=L1/LB, 26=OFF
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |C|O|N|T|R|O|L|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
define HOME=0; //PS4_PS / XB1_XBOX
define VIEW_reset=1; //PS4_SHARE / XB1_VIEW
define MENU_save=2; //PS4_OPTIONS / XB1_MENU
define LETHAL=3; //PS4_R1 / XB1_RB
define FIRE=4; //PS4_R2 / XB1_RT
define PRONE=5; //PS4_R3 / XB1_RS
define TACTICAL=6; //PS4_L1 / XB1_LB
define ADS=7; //PS4_L2 / XB1_LT
define SPRINT=8; //PS4_L3 / XB1_LS
define RX=9; //PS4_RX / XB1_RX
define RY=10; //PS4_RY / XB1_RY
define LX=11; //PS4_LX / XB1_LX
define LY=12; //PS4_LY / XB1_LY
define UP=13; //PS4_UP / XB1_UP
define DOWN=14; //PS4_DOWN / XB1_DOWN
define LEFT=15; //PS4_LEFT / XB1_LEFT
define RIGHT=16; //PS4_RIGHT / XB1_RIGHT
define SW_WEAPON=17; //PS4_TRIANGLE / XB1_Y
define MELEE=18; //PS4_CIRCLE / XB1_B
define JUMP=19; //PS4_CROSS / XB1_A
define RELOAD=20; //PS4_SQUARE / XB1_X
define GYROX_PR1=24; //PS4_GYROX / XB1_PR1
define GYROY_PR2=25; //PS4_GYROY / XB1_PR2
define GYROZ_PL1=26; //PS4_GYROZ / XB1_PL1
define TOUCH_PL2=27; //PS4_TOUCH / XB1_PL2
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
define Off=0;
define Green=1;
define Blue=2;
define Pink=3;
define Red=4;
define SkyBlue=5;
define Yellow=6;
define White=7;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |D|A|T|A| | | | | | | | | | | | | | | | | | | | | | || | | | | | || | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
data(
0,0,0,0,//Off
0,0,2,0,//Green
2,0,0,0,//Blue
0,0,0,2,//Pink
0,2,0,0,//Red
2,0,2,0,//SkyBlue
0,2,2,0,//Yellow
2,2,2,2//White
);
//RUMBLES
define rumble__output=TRUE;
define rumble__on= RUMBLE_A;
define rumble__off=RUMBLE_B;
define turbo__trigger=TRUE;
//AIM CORRECTION SENSITIVITY VALUES:
int ADS_SENS=90, GEN_SENS=110, HIP_SENS=100, ADS_FIRE_SENS=100, Use_sens, midpoint=50;
/*
--/ END USER CONFIG
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
int r__type, r__cycle;
int q__k = 0;
int q;
int double__tap[30];
int recoil__y, recoil__x;
int NO__RECOIL__Y, NO__RECOIL__X;
int G__M=TRUE;
int hold_time=35;
int rest_time=35;
int PrimaryWeapon=TRUE;
int RF_KS=FALSE;
int R2F_K2S=FALSE;
int KS=FALSE;
int b_reload;
int aa_p=24;
int aa_n=-24;
int aa_delay=20;
int release=25;
int Secondary=FALSE; //set to TRUE if you preffer to load the script with rapid fire for seconday weapon by default.
int Jitter=FALSE;
int MENU_ADS=TRUE;
int TimelimitA=6000; // 1 timer
int TimerA=0;
int LedTime=650;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |I|N|I|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
init {
while(q < 30) {
double__tap[q] = -1;
q++;
}
NO__RECOIL__Y = get_pvar(SPVAR_8,-100,+100,+31);
NO__RECOIL__X = get_pvar(SPVAR_9,-100,+100,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|A|I|N| |B|L|O|C|K| |S|T|A|R|T|S| |H|E|R|E| | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
main {
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |L|O|A|D| |M|O|D|E|S| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN)) {//HOLD DOWN
if (double_click(2)) { //DOUBLE TAP PS4_OPTIONS / XB1_MENU
G__M = !G__M;
Rumble(G__M, TRUE);
}
set_val(2,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|O|G|G|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN) && get_val (ADS)){
if (event_press (19)){//TAP A
NO__RECOIL = !NO__RECOIL;
Rumble(!NO__RECOIL, TRUE);}
set_val(19,0);
if (event_press (18)){//TAP B
AIM__CORRECT = !AIM__CORRECT;
Rumble(!AIM__CORRECT, TRUE);}
set_val (18,0);
if (event_press (17)){//TAP Y
STICKY__AIM = !STICKY__AIM;
Rumble (!STICKY__AIM, TRUE);}
set_val (17,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |S|L|I|D|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(EASY__SLIDE_DROP && !KS){
if(get_val(PRONE)) combo_run(DROP_SHOT);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|U|R|B|O| |B|T|N| |A|.|K|.| |H|A|I|R| |T|R|I|G|G|E|R|S| | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
turbo(FIRE);
turbo(ADS);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(AIM__CORRECT){
Aim__Correction (Use_sens);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|U|T|O| |H|E|A|L| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (event_release (FIRE)) {TimerA=TimelimitA;}
if (TimerA>0)
{
TimerA=TimerA - get_rtime();
if (TimerA<=6000 && event_press (RELOAD)){ combo_run (Heal);}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (NO__RECOIL){
No__recoil(NO__RECOIL__X, NO__RECOIL__Y);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|U|M|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (q__k < r__cycle)
combo_run(RumbleNotifier);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|O|D|E| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
P__M(G__M);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |R|U|N| | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
easy__run (RUN__SENS);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |M|E|L|E|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (EASY__MELEE){
if (get_val(SPRINT)) set_val(MELEE, 100);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
menu__ads (MENU_ADS);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|A|P|I|D| |F|I|R|E| |&| |J|I|T|T|E|R| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//-- RF PRIMARY
if (PrimaryWeapon && RF_KS && get_val(FIRE))combo_run (RAPID_FIRE);
//- RF SECONDARY
if(!PrimaryWeapon && R2F_K2S)
if(get_val(FIRE)) {
combo_run (RAPID_FIRE);
}
//- JITTER (for single shot and burst weaspons, this is NOT A SHOT GUN JITTER)
if (Jitter){
if (get_val(FIRE) && get_val(ADS)) {
combo_run(aim___fire);
}
if (get_val(FIRE)) {
combo_run(fire__only);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|E|S|E|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(event_release(RELOAD) && get_ptime(RELOAD)> 200 &&(Secondary)){ PrimaryWeapon = TRUE; Rumble(PrimaryWeapon,FALSE);}
if (Secondary){
if(event_release(SW_WEAPON)&& get_ptime(SW_WEAPON)< 200 && !get_val (14)){
PrimaryWeapon = !PrimaryWeapon; Rumble(PrimaryWeapon,TRUE);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (CNCL__RELOAD) {
if(event_press(FIRE) && b_reload){combo_run(CANCEL_RLD); }
if(event_press(ADS) && b_reload){combo_run(CANCEL_RLD);}
if(event_release(RELOAD) && get_ptime(RELOAD)< 200){
combo_run(RELOAD_END); }
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(STICKY__AIM){
if(get_val(ADS)) combo_run(AA_XY);
else combo_stop(AA_XY);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |K|I|L|L| |S|W|I|T|C|H| |&| |S|U|P|E|R| |P|W| |S|W|I|T|C|H| | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//switches are prepared to work normally even if Jitter mod is used by adding a little press time.
if(event_press(KILL__SW__EASY_SLIDE) && !get_val (ADS) && get_ptime(KILL__SW__EASY_SLIDE)< 15 && G__M) {combo_run(SwOFF);}
if(event_press (SUPER__POWER__SW) && !get_val (ADS) && get_ptime(SUPER__POWER__SW)< 15 && G__M) { combo_run(SPECIAL);}
if(event_press (KILL__STREAK__SW) && !get_val (ADS) && get_ptime(KILL__STREAK__SW)< 15 && G__M) { combo_run(KILL);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
PLAY__LEDS ();
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
combo AA_XY {
set_val(10,xy_val(10,aa_p));
wait(aa_delay);
set_val(9,xy_val(9,aa_p));
set_val(11,xy_val(11,aa_p));
wait(aa_delay);
set_val(10,xy_val(10,aa_n));
wait(aa_delay);
set_val(9,xy_val(9,aa_n));
set_val(11,xy_val(11,aa_n));
wait(aa_delay);
}
combo RumbleNotifier {
set_rumble(r__type, 100);
wait(200);
set_rumble(r__type, 0);
wait(Val__dyn(r__cycle, TRUE, 2, 100, 0));
q__k++;
}
combo RAPID_FIRE {
set_val(FIRE,100);
wait(hold_time);
set_val(FIRE, 0);
wait(rest_time);
}
combo RELOAD_END {
b_reload=TRUE;
wait(RELOAD__TIME);
b_reload=FALSE;
}
combo BLINK_AR {
wait(LedTime);
color_led(Off);
wait(650);
reset_leds ();
}
combo Heal {
wait (RELOAD__TIME);
if (AUTO__HEAL)
set_val(TACTICAL,100);
wait(100);
}
combo CANCEL_RLD {
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
b_reload=FALSE;
}
combo SPECIAL {
set_val(LETHAL,100);
set_val(TACTICAL,100);
wait(100);
wait(40);
}
combo KILL {
set_val (SW_WEAPON, 100);
wait(400);
set_val (SW_WEAPON,0);
wait(40);
}
combo fire__only {
set_val(LEFT, 100);
wait(11);
set_val(LEFT, 0);
wait(11);
set_val(LEFT, 0);
}
combo aim___fire {
set_val(FIRE, 100);
wait(10);
set_val(FIRE, 0);
}
combo SwOFF {
KS = TRUE;
wait(30000);
KS = FALSE;
Rumble(!KS,TRUE);
}
combo DROP_SHOT{
set_val(PRONE,100);
wait(700);
}
combo EASY_RUN {
set_val(SPRINT,100);
wait(30);
wait(100);
}
function P__M(program__mode) {
if (program__mode) return;
if (get_val(DOWN)) {
NO__RECOIL__Y = Variable__Var(NO__RECOIL__Y, -100, 100, 3, 4);
NO__RECOIL__X = Variable__Var(NO__RECOIL__X, -100, 100, 6, 7);
}
save_pvars();
}
function menu__ads (MENU_ADS){
if (!MENU_ADS) return;
if(get_val(ADS)){//hold ADS button
//--RESET EPROM TO DEFAULT VALUES
if(get_val(VIEW_reset)&&get_ptime(VIEW_reset)>600){
RESET_Defaults();
}
//--RAPID FIRE ON SECONDARY
if(event_press(UP)){//D-pad UP
RF_KS=FALSE;
R2F_K2S=TRUE;
Secondary=TRUE;
Jitter=FALSE;
Rumble (R2F_K2S, TRUE);
}
//--RAPID FIRE OFF
if(event_press(DOWN)){//D-pad DOWN
RF_KS=FALSE;
R2F_K2S=FALSE;
Secondary=FALSE;
Jitter=FALSE;
Rumble (RF_KS, FALSE);
}
//--RAPID FIRE ON
if(event_press(RIGHT)){//D-pad RIGHT
RF_KS=TRUE;
R2F_K2S=TRUE ;
Secondary=FALSE;
Jitter=FALSE;
Rumble (RF_KS, TRUE);
}
//--JITTER
if(event_press(LEFT)){//D-pad LEFT
RF_KS=FALSE;
R2F_K2S=FALSE;
Secondary=FALSE;
Jitter=TRUE;
Rumble (Jitter, TRUE);
}
set_val(1,0);
}
}
function Variable__Var(var__val, min_val, max_val, btn_up, btn_down) {
if(event_press(btn_up) && var__val < max_val) {
var__val++;
Rumble(TRUE, FALSE);
}
if(event_press(btn_down) && var__val > min_val) {
var__val--;
Rumble(FALSE, FALSE);
}
return var__val;
}
function Aim__Correction (Use_sens){
if(get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_FIRE_SENS;
}
if(get_val(FIRE) && !get_val(ADS)) {
Use_sens = HIP_SENS;
}
if(!get_val(FIRE) && !get_val(ADS)) {
Use_sens = GEN_SENS;
}
if(!get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_SENS;
}
sensitivity(9, midpoint ,Use_sens);
sensitivity(10, midpoint ,Use_sens);
}
function RESET_Defaults () {
Rumble(TRUE, FALSE);
NO__RECOIL__Y = 31;
NO__RECOIL__X = 0;
save_pvars();
}
function turbo(btn) {
if (!turbo__trigger || !get_val(btn)) return;
set_val(btn, 100);
}
function Rumble(Poz__rum, Neg__rum) {
if (!rumble__output) return;
if (Poz__rum) r__type = rumble__on; else r__type = rumble__off;
if (Poz__rum || !Neg__rum) r__cycle = 1; else r__cycle = 2;
q__k = 0;
}
function easy__run(sens) {
if (EASY__RUN == FALSE || get_val(LY) > sens || get_val(ADS)) return;
combo_run (EASY_RUN);
}
function No__recoil(No__recoil__x, No__recoil__y) {
if (get_val(FIRE)) {
if (isqrt(pow(get_val(RX), 2) + pow(get_val(RY), 2)) <= abs(No__recoil__y)) {
if (abs(get_val(RY)) <= abs(No__recoil__y)) {
recoil__x = (get_val(RX) + (No__recoil__x*(100-abs(get_val(RX))))/100);
set_val(RX, recoil__x);
if (AIM__INVERTED)
recoil__y = (get_val(RY) - (No__recoil__y*(100-abs(get_val(RY))))/100); // Y-axis invert
else
recoil__y = (get_val(RY) + (No__recoil__y*(100-abs(get_val(RY))))/100);
if (recoil__y > No__recoil__y) recoil__y = No__recoil__y;
set_val(RY, recoil__y);
}
}
}
}
function xy_val(f_axis,f_val) {
if(abs(get_val(f_axis)) < release)
return f_val;
return get_val(f_axis);
}
function Val__dyn(var__val, op, val, Completed, Default) {
if (op == TRUE && var__val == val) return Completed;
else if (op == FALSE && var__val != val) return Completed;
return Default;
}
function double_click(button) {
if (double__tap[button] >= 0) {
double__tap[button] += get_rtime();
if (double__tap[button] > 450)
double__tap[button] = -1;
}
if (event_release(button) && get_ptime(button) <= 200) {
if (double__tap[button] < 0) {
double__tap[button] = 0;
} else {
double__tap[button] = -1;
return 1;
}
}
return 0;
}
function PLAY__LEDS (){
if(PrimaryWeapon) color_led (Blue);
if (!PrimaryWeapon && R2F_K2S) color_led (Red);
if(PrimaryWeapon && RF_KS) color_led (White);
if(Jitter && PrimaryWeapon) color_led(SkyBlue);
if(STICKY__AIM && get_val (ADS)) color_led(Pink);
if(AIM__CORRECT && get_val (FIRE)) color_led(Pink);
if(NO__RECOIL) combo_run (BLINK_AR);
}
function save_pvars() {
set_pvar(SPVAR_8, NO__RECOIL__Y);
set_pvar(SPVAR_9, NO__RECOIL__X);
}
function color_led(colour) {
set_led(LED_1, dbyte(colour * 4));
set_led(LED_2, dbyte((colour * 4) + 1));
set_led(LED_3, dbyte((colour * 4) + 2));
set_led(LED_4, dbyte((colour * 4) + 3));
}
-
uncleswayy - Staff Sergeant
- Posts: 14
- Joined: Wed Nov 14, 2018 7:16 pm
Re: Script error need help fixing
Use the T1 Code tag.
-
alanmcgregor - Major
- Posts: 988
- Joined: Tue Mar 27, 2018 8:38 am
Re: Script error need help fixing
alanmcgregor wrote:Use the T1 Code tag.
It is the T1 section so it looks like he want to get this to work on a T1, not on a T2 (with the titanone.gph header).
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Script error need help fixing
Scachi wrote:alanmcgregor wrote:Use the T1 Code tag.
It is the T1 section so it looks like he want to get this to work on a T1, not on a T2 (with the titanone.gph header).
Since the OP did not remove the '//' in line 1 and 2. Like the instructions say. Your assumption is most likely correct.uncleswayy wrote://#pragma METAINFO("COBO4 XL T2/CM", 1, 2, "device")
//#include <titanone.gph>
/*
*V1.2
Built for device & Titan2 / works with all consoles
Titan 2 users: remove `//` in line 1 & 2 . . .
But I'm not sure if you were replying to Alan comment.
Alan was referring to the T1 code block, that you can use in the editor.
- Code: Select all
//[code=GPC1]
main{ }
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Script error need help fixing
Sillyasskid wrote:Scachi wrote:alanmcgregor wrote:Use the T1 Code tag.
It is the T1 section so it looks like he want to get this to work on a T1, not on a T2 (with the titanone.gph header).Since the OP did not remove the '//' in line 1 and 2. Like the instructions say. Your assumption is most likely correct.uncleswayy wrote://#pragma METAINFO("COBO4 XL T2/CM", 1, 2, "device")
//#include <titanone.gph>
/*
*V1.2
Built for device & Titan2 / works with all consoles
Titan 2 users: remove `//` in line 1 & 2 . . .
But I'm not sure if you were replying to Alan comment.
Alan was referring to the T1 code block, that you can use in the editor.He wanted the OP to use this
- Code: Select all
//[code=GPC1]
main{ }
lol, you are right, I completely misunderstood that. I am sorry..
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Script error need help fixing
i also have an issue with this script but for me its with the (button) part in the function double_click(button)....Line 592 unexpected token 'button' ....(i got an error on line 53 with it being
Define RUN__SENS=-25; but i can't use negative numbers with define so i changed it to "int" because it allows negative numbers. was that the right thing to do?
Define RUN__SENS=-25; but i can't use negative numbers with define so i changed it to "int" because it allows negative numbers. was that the right thing to do?
- Code: Select all
// GPC Online Library
// cod_black_ops_4_-xs_edition_-_rapid_fire,_aim_assist,_easy_sprint_&_anti_recoil_(device&_titan2).gpc
//#pragma METAINFO("COBO4 XL T2/CM", 2, 2, "device")
//#include <titanone.gph>
/*
*V2.2
Built for device & Titan2 / works with all consoles
Titan 2 users: remove `//` in line 1 & 2
Added WW2 reload times / so script can be used with WW2 as well
__ __ ___ __ ___
/ ` /\ | | / \ |__ | \ | | | \ /
\__, /~~\ |___ |___ \__/ | |__/ \__/ | |
__ __ __ __ __
|__) | /\ / ` |__/ / \ |__) /__` | \ /
|__) |___ /~~\ \__, | \ \__/ | .__/ | \/
_ _ ____ ____ ___ _ ___ _ ____ _ _
\/ [__ |___ | \ | | | | | |\ |
_/\_ ___] |___ |__/ | | | |__| | \|
A GPC Power Script By
__
/ __ _ __ _ |V| _ | | _ _ __
\__ | (_)| ||_|_> | |(_|>< ___|_|_> (/_ |
Credits: Excalibur, Batts, Spegeli and others here at device!
--------------------------------------------------------------------------------------------------------
,---------------------------.
INSTRUCTIONS: https://tinyurl.com/scriptinstructions __@ ' | READ THE INSTRUCTIONS !!! |
( ..) -_)--------------------------'
---------------------------------------------------------ooO--(_)--Ooo----------------------------------
!!To read the intructions you need to open the link above in your internet browser!!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |U|S|E|R| |C|O|N|F|I|G|U|R|A|T|I|O|N| | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IN THE USER CONFIG SECTION YOU CAN SET THE DEFAULT SETTINGS
FOR YOUR SCRIPT, SO WHICH MODS SHOULD BE LOADED BY DEFAULT
AND WHICH NOT. CHANGE "TRUE" TO "FALSE" AND VICE VERSA.
"TRUE" MEANS ON BY DEFAULT, "FALSE" MEANS OFF BY DEFAULT.
//---------------------------/ START USER CONFIG---------------------------------------*/
define AIM__INVERTED=FALSE; // IF YOU PLAY WITH AIM INVERTED SET "TRUE;"
define EASY__RUN=TRUE; // EASY RUN
int RUN__SENS=-25; // SENSITIVITY WHEN EASY RUN SHOULD ACTIVATE
define CNCL__RELOAD=TRUE; // AUTO CANCEL RELOAD
define RELOAD__TIME=2000; // SET LONGEST RELOAD TIME IN YOUR SCRIPT
define EASY__MELEE=TRUE; // EASY MELEE
define turbo__trigger=TRUE; // HAIR TRIGGERS ON BY DEFAULT FOR BOTH TRIGGERS
define EASY__SLIDE_DROP=TRUE; // TAP PRONE BTN TO CROUCH. HOLD FOR A SECOND TO PRONE
define Time__b__Prone=150; // YOU CAN CHANGE THE TIME BEFORE PRONE HERE (SO FOR HOW
/* LONG YOU MUST PRESS THE PRONE BTN FOR EASY SLIDE/DROP)
IF FILL OUT VALUE 0, YOU WILL IMMEDIATELY SLIDE OR PRONE
(BUT YOU WILL NOT BE ABLE TO PRONE AT ALL IN THE GAME)
/*
THE MODS BELOW ("INT") ARE VARIABLES WITH TOGGLES THAT YOU CAN
SWITCH OFF AND ON IN THE GAME. THE TOGGLES ARE EXPLAINED IN THE
MANUAL (SEE TINY URL AT THE TOP OF THE SCRIPT). LIKE ABOVE YOU
CAN SET THEM ON AND OFF BY DEFAULT, BUT THE TOGGLES WILL STILL WORK
EVEN IF YOU SET THE OFF BY DEFAULT. */
int NO__RECOIL=TRUE; // ANTI RECOIL
int STICKY__AIM=TRUE; // AIM ASSIST
int AIM__CORRECT=TRUE; // AIM CORRECTIONS
int AKIMBO__AUTO_AIM=FALSE; // AKIMBO / AUTO AIM, PRESSING FIRE WILL AUTO PRESS AIM
/*
AUTO HEALING: WITH THE MEDIC EQUIPMENT SELECTED AS GEAR IN THE GAME YOU CAN HAVE YOUR
CHARACTER AUTO HEAL HIM/HER SELF. BECAUSE BLACK OUT AND MULTI PLAYER HAVE DIFFERENT
FUNCTIONALITY FOR HEALING, THERE ARE TWO OPTIONS BELOW. ONE FOR MULTIPLAYER, ONE FOR BLACK
OUT. YOU SWITCH BETWEEN THE GAME MODES? NO PROBLEM AT ALL, BOTH AUTO HEAL FUNCTIONS HAVE
TOGGLES SO YOU CAN SWITCH THEM ON AND OFF AT ANY TIME. TO KNOW WHICH TOGGLES ARE IN USE
READ THE MANUAL.
*/
int AUTO__HEAL=FALSE;
int A__HEAL_BLACK_OUT=FALSE;
/* AIM CORRECTION SENSITIVITY VALUES:
ADS SENS = SENS WHEN AIMING
GEN SENS = GENERAL STICK SENS
HIP SENS = SENS WHEN HIP FIRING
ADS FIRE SENS = SENS WHEN AIMING AND FIRING WEAPON
DO NOT CHANGE MIDPOINT
AIM CORRECTION SENSITIVITY VALUES: */
int ADS_SENS=95, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS=85, Use_sens, midpoint=50;
/* BELOW YOU CAN SET THE SWITCH FOR ACTIVATING A KILL STREAK and THE SPECIAL POWER
OF YOUR CHARACTER. THIS WILL ALLOW YOU TO ACTIVATE EITHER OF THEM WITH JUST ONE TAP
OFF A BUTTON. CHOOSE ONE OF THESE BUTTON:
13 = D-PAD UP
14 = D-PAD DOWN
15 = D-PAD LEFT
16 = D-PAD RIGHT
6 = PS4_L1 / XB1_LB
26 = OFF (SO YOU ACTIVATE THE KILLS STREAK AND SUPER POWER MANUALLY IN THE GAME)
ACTIVATION SWITCH FOR SUPER POWER & KILL STREAK: */
define SUPER__POWER__SW=26;
define KILL__STREAK__SW=26;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |C|O|N|T|R|O|L|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
define HOME=0; //PS4_PS / XB1_XBOX
define VIEW_reset=1; //PS4_SHARE / XB1_VIEW
define MENU_save=2; //PS4_OPTIONS / XB1_MENU
define LETHAL=3; //PS4_R1 / XB1_RB
define FIRE=4; //PS4_R2 / XB1_RT
define PRONE=5; //PS4_R3 / XB1_RS
define TACTICAL=6; //PS4_L1 / XB1_LB
define ADS=7; //PS4_L2 / XB1_LT
define SPRINT=8; //PS4_L3 / XB1_LS
define RX=9; //PS4_RX / XB1_RX
define RY=10; //PS4_RY / XB1_RY
define LX=11; //PS4_LX / XB1_LX
define LY=12; //PS4_LY / XB1_LY
define UP=13; //PS4_UP / XB1_UP
define DOWN=14; //PS4_DOWN / XB1_DOWN
define LEFT=15; //PS4_LEFT / XB1_LEFT
define RIGHT=16; //PS4_RIGHT / XB1_RIGHT
define SW_WEAPON=17; //PS4_TRIANGLE / XB1_Y
define MELEE=18; //PS4_CIRCLE / XB1_B
define JUMP=19; //PS4_CROSS / XB1_A
define RELOAD=20; //PS4_SQUARE / XB1_X
define GYROX_PR1=24; //PS4_GYROX / XB1_PR1
define GYROY_PR2=25; //PS4_GYROY / XB1_PR2
define GYROZ_PL1=26; //PS4_GYROZ / XB1_PL1
define TOUCH_PL2=27; //PS4_TOUCH / XB1_PL2
/*
----------------------/ END USER CONFIG /-----------------------------------------------
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
int q;
int double__tap[30];
int recoil__y, recoil__x;
int NO__RECOIL__Y, NO__RECOIL__X;
int G__M=TRUE;
int hold_time=35;
int rest_time=35;
int PrimaryWeapon=TRUE;
int RF_KS=FALSE;
int R2F_K2S=FALSE;
int b_reload;
int aa_p=24;
int aa_n=-24;
int aa_delay=20;
int release=25;
int Secondary=FALSE; //set to TRUE if you preffer to load the script with rapid fire for seconday weapon by default.
int TimelimitA=6000; // 1 timer
int TimerA=0;
int easy_run_KS=FALSE;
int reload__WW2;
int KS_time;
int A__H_time;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |I|N|I|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
init {
while(q < 30) {
double__tap[q] = -1;
q++;
}
NO__RECOIL__Y = get_pvar(SPVAR_8,-100,+100,+38);
NO__RECOIL__X = get_pvar(SPVAR_9,-100,+100,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|A|I|N| |B|L|O|C|K| |S|T|A|R|T|S| |H|E|R|E| | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
main {
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |L|O|A|D| |M|O|D|E|S| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN)) {//HOLD DOWN
if (double_click(2)) { //DOUBLE TAP PS4_OPTIONS / XB1_MENU
G__M = !G__M;
if (G__M) combo_run (Rumb);
if (!G__M) combo_run (RumbTwo);
}
set_val(2,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(ADS)){//hold ADS button
//--RESET EPROM TO DEFAULT VALUES
if(get_val(VIEW_reset)&&get_ptime(VIEW_reset)>600){
RESET_Defaults();
}
//--RAPID FIRE ON SECONDARY
if(event_press(UP)){//D-pad UP
PrimaryWeapon=TRUE;
RF_KS=FALSE;
R2F_K2S=TRUE;
Secondary=TRUE;
if (Secondary) combo_run (RumbTwo);
}
//--RAPID FIRE OFF
if(event_press(DOWN)){//D-pad DOWN
PrimaryWeapon=TRUE;
RF_KS=FALSE;
R2F_K2S=FALSE;
Secondary=FALSE;
if (!R2F_K2S) combo_run (Rumb);
}
//--RAPID FIRE ON
if(event_press(RIGHT)){//D-pad RIGHT
PrimaryWeapon=TRUE;
RF_KS=TRUE;
R2F_K2S=TRUE;
Secondary=FALSE;
if (RF_KS) combo_run (RumbTwo);
}
//--AKIMBO
if(event_press(LEFT)){//D-pad LEFT
AKIMBO__AUTO_AIM = !AKIMBO__AUTO_AIM;
if (AKIMBO__AUTO_AIM) combo_run (RumbTwo);
if (!AKIMBO__AUTO_AIM) combo_run (Rumb);
PrimaryWeapon=TRUE;
Secondary=TRUE;
}
set_val(1,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|O|G|G|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN) && get_val (ADS)){
if (event_press (19)){//TAP A
NO__RECOIL = !NO__RECOIL;
if (NO__RECOIL) combo_run (RumbTwo);
if (!NO__RECOIL) combo_run (Rumb);
}
if (event_press (18)){//TAP B
AIM__CORRECT = !AIM__CORRECT;
if (AIM__CORRECT) combo_run (RumbTwo);
if (!AIM__CORRECT) combo_run (Rumb);
}
if (event_press (17)){//TAP Y
STICKY__AIM = !STICKY__AIM;
if (STICKY__AIM) combo_run (RumbTwo);
if (!STICKY__AIM) combo_run (Rumb);
}
if (event_press (20)){//TAP X
reload__WW2 = !reload__WW2;
if (reload__WW2) combo_run (RumbTwo);
if (!reload__WW2) combo_run (Rumb);
}
if (event_press (FIRE)){//FIRE BTN
AKIMBO__AUTO_AIM = !AKIMBO__AUTO_AIM;
if (AKIMBO__AUTO_AIM) combo_run (RumbTwo);
if (!AKIMBO__AUTO_AIM) combo_run (Rumb);
}
if (double_click(TACTICAL)){
AUTO__HEAL = !AUTO__HEAL;
A__HEAL_BLACK_OUT = !A__HEAL_BLACK_OUT;
if (A__HEAL_BLACK_OUT) combo_run (RumbTwo);
if (!A__HEAL_BLACK_OUT) combo_run (Rumb);
}
if(event_release(TACTICAL) && get_ptime(TACTICAL)> 200){
AUTO__HEAL = !AUTO__HEAL;
if (AUTO__HEAL) combo_run (RumbTwo);
if (!AUTO__HEAL) combo_run (Rumb);
}
set_val (FIRE,0);set_val (TACTICAL,0);set_val(19,0);set_val (18,0);set_val (17,0); set_val (20,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |S|L|I|D|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(EASY__SLIDE_DROP){
if (event_release(PRONE) && get_ptime(PRONE)> Time__b__Prone){
combo_run(DROP_SHOT);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|K|I|M|B|O| |/|A|U|T|O| |A|I|M| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(AKIMBO__AUTO_AIM) {
if(PrimaryWeapon && get_val(FIRE))
set_val(ADS,100);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|E|L|O|A|D| |T|I|M|E|S| |W|W|2| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (reload__WW2){
KS_time= 2000;}
else KS_time=0;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|U|R|B|O| |B|T|N| |A|.|K|.| |H|A|I|R| |T|R|I|G|G|E|R|S| | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
turbo(FIRE);
turbo(ADS);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(AIM__CORRECT){
Aim__Correction (Use_sens);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|U|T|O| |H|E|A|L| |B|L|A|C|K| |O|U|T| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (A__HEAL_BLACK_OUT){
A__H_time= 4000;}
else A__H_time= 0;
/*
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|U|T|O| |H|E|A|L| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (event_release (FIRE)) {TimerA=TimelimitA;}
if (TimerA>0)
{
TimerA=TimerA - get_rtime();
if (TimerA<=6000 && event_press (RELOAD)){ combo_run (Heal);}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (NO__RECOIL){
No__recoil(NO__RECOIL__X, NO__RECOIL__Y);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|O|D|E| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
P__M(G__M);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |R|U|N| | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (EASY__RUN){
if (!easy_run_KS && get_val(LY) < RUN__SENS && !get_val(ADS)) {
combo_run (EASY_RUN);}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |M|E|L|E|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (EASY__MELEE){
if (get_val(SPRINT)) set_val(MELEE, 100);}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|A|P|I|D| |F|I|R|E| |&| |J|I|T|T|E|R| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//-- RF PRIMARY
if (PrimaryWeapon && RF_KS && get_val(FIRE))combo_run (RAPID_FIRE);
//- RF SECONDARY
if(!PrimaryWeapon && R2F_K2S)
if(get_val(FIRE)) {
combo_run (RAPID_FIRE);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|E|S|E|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(event_release(RELOAD) && get_ptime(RELOAD)> 200 &&(Secondary)){ PrimaryWeapon = TRUE; combo_run (Rumb);}
if (Secondary){
if(event_release(SW_WEAPON)&& get_ptime(SW_WEAPON)< 200 && !get_val (14)){
PrimaryWeapon = !PrimaryWeapon;
if (!PrimaryWeapon) combo_run (RumbTwo);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (CNCL__RELOAD) {
if(event_press(FIRE) && b_reload){combo_run(CANCEL_RLD); }
if(event_press(ADS) && b_reload){combo_run(CANCEL_RLD);}
if(event_release(RELOAD) && get_ptime(RELOAD)< 200){
combo_run (STOP_SPRINT); combo_run(RELOAD_END); }
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(STICKY__AIM){
if(get_val(ADS)) combo_run(AA_XY);
else combo_stop(AA_XY);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |K|I|L|L| |S|W|I|T|C|H| |&| |S|U|P|E|R| |P|W| |S|W|I|T|C|H| | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//switches are prepared to work normally even if Jitter mod is used by adding a little press time.
if(event_press (SUPER__POWER__SW) && !get_val (ADS) && get_ptime(SUPER__POWER__SW)< 15 && G__M) { combo_run(SPECIAL);}
if(event_press (KILL__STREAK__SW) && !get_val (ADS) && get_ptime(KILL__STREAK__SW)< 15 && G__M) { combo_run(KILL);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
combo AA_XY {
set_val(10,xy_val(10,aa_p));
wait(aa_delay);
set_val(9,xy_val(9,aa_p));
set_val(11,xy_val(11,aa_p));
wait(aa_delay);
set_val(10,xy_val(10,aa_n));
wait(aa_delay);
set_val(9,xy_val(9,aa_n));
set_val(11,xy_val(11,aa_n));
wait(aa_delay);
}
combo Rumb{
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait(150);
reset_rumble();
}
combo RumbTwo {
wait(300);
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait (150);
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait(150);
reset_rumble();
}
combo STOP_SPRINT {
easy_run_KS = TRUE;
wait(KS_time);
easy_run_KS = FALSE;
}
combo RAPID_FIRE {
set_val(FIRE,100);
wait(hold_time);
set_val(FIRE, 0);
wait(rest_time);
}
combo RELOAD_END {
b_reload=TRUE;
wait(RELOAD__TIME);
b_reload=FALSE;
}
combo Heal {
wait (RELOAD__TIME);
if (AUTO__HEAL)
set_val(TACTICAL,100);
wait(A__H_time);
}
combo CANCEL_RLD {
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
b_reload=FALSE;
}
combo SPECIAL {
set_val(LETHAL,100);
set_val(TACTICAL,100);
wait(100);
wait(40);
}
combo KILL {
set_val (SW_WEAPON, 100);
wait(400);
set_val (SW_WEAPON,0);
wait(40);
}
combo DROP_SHOT{
set_val(PRONE,100);
wait(700);
}
combo EASY_RUN {
set_val(SPRINT,100);
wait(30);
wait(100);
}
function P__M(program__mode) {
if (program__mode) return;
if (get_val(DOWN)) {
NO__RECOIL__Y = Variable__Var(NO__RECOIL__Y, -100, 100, 3, 4);
NO__RECOIL__X = Variable__Var(NO__RECOIL__X, -100, 100, 6, 7);
set_val (3,0); set_val (4,0); set_val (7,0); set_val (7,0);
}
save_pvars();
}
function Variable__Var(var__val, min_val, max_val, btn_up, btn_down) {
if(event_press(btn_up) && var__val < max_val) {
var__val++;
combo_run (Rumb);
}
if(event_press(btn_down) && var__val > min_val) {
var__val--;
combo_run (Rumb);
}
return var__val;
}
function Aim__Correction (Use_sens){
if(get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_FIRE_SENS;
}
if(get_val(FIRE) && !get_val(ADS)) {
Use_sens = HIP_SENS;
}
if(!get_val(FIRE) && !get_val(ADS)) {
Use_sens = GEN_SENS;
}
if(!get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_SENS;
}
sensitivity(9, midpoint ,Use_sens);
sensitivity(10, midpoint ,Use_sens);
}
function RESET_Defaults () {
combo_run (Rumb);
NO__RECOIL__Y = +38;
NO__RECOIL__X = 0;
save_pvars();
}
function turbo(btn) {
if (!turbo__trigger || !get_val(btn)) return;
set_val(btn, 100);
}
function No__recoil(No__recoil__x, No__recoil__y) {
if (get_val(FIRE)) {
if (isqrt(pow(get_val(RX), 2) + pow(get_val(RY), 2)) <= abs(No__recoil__y)) {
if (abs(get_val(RY)) <= abs(No__recoil__y)) {
recoil__x = (get_val(RX) + (No__recoil__x*(100-abs(get_val(RX))))/100);
set_val(RX, recoil__x);
if (AIM__INVERTED)
recoil__y = (get_val(RY) - (No__recoil__y*(100-abs(get_val(RY))))/100); // Y-axis invert
else
recoil__y = (get_val(RY) + (No__recoil__y*(100-abs(get_val(RY))))/100);
if (recoil__y > No__recoil__y) recoil__y = No__recoil__y;
set_val(RY, recoil__y);
}
}
}
}
function xy_val(f_axis,f_val) {
if(abs(get_val(f_axis)) < release)
return f_val;
return get_val(f_axis);
}
function double_click(button) {
if (double__tap[button] >= 0) {
double__tap[button] += get_rtime();
if (double__tap[button] > 450)
double__tap[button] = -1;
}
if (event_release(button) && get_ptime(button) <= 200) {
if (double__tap[button] < 0) {
double__tap[button] = 0;
} else {
double__tap[button] = -1;
return 1;
}
}
return 0;
}
function save_pvars() {
set_pvar(SPVAR_8, NO__RECOIL__Y);
set_pvar(SPVAR_9, NO__RECOIL__X);
}
-
Premium308 - Sergeant First Class
- Posts: 22
- Joined: Thu Aug 25, 2016 6:08 am
Re: Script error need help fixing
I think your change should work.
The problem with the button thing is the "+=" ..
change this line:
to
and it should compile.
Here it is with that change done:
The problem with the button thing is the "+=" ..
change this line:
- Code: Select all
double__tap[button] += get_rtime();
to
- Code: Select all
double__tap[button] = double__tap[button] + get_rtime();
and it should compile.
Here it is with that change done:
- Code: Select all
// GPC Online Library
// cod_black_ops_4_-xs_edition_-_rapid_fire,_aim_assist,_easy_sprint_&_anti_recoil_(device&_titan2).gpc
//#pragma METAINFO("COBO4 XL T2/CM", 2, 2, "device")
//#include <titanone.gph>
/*
*V2.2
Built for device & Titan2 / works with all consoles
Titan 2 users: remove `//` in line 1 & 2
Added WW2 reload times / so script can be used with WW2 as well
__ __ ___ __ ___
/ ` /\ | | / \ |__ | \ | | | \ /
\__, /~~\ |___ |___ \__/ | |__/ \__/ | |
__ __ __ __ __
|__) | /\ / ` |__/ / \ |__) /__` | \ /
|__) |___ /~~\ \__, | \ \__/ | .__/ | \/
_ _ ____ ____ ___ _ ___ _ ____ _ _
\/ [__ |___ | \ | | | | | |\ |
_/\_ ___] |___ |__/ | | | |__| | \|
A GPC Power Script By
__
/ __ _ __ _ |V| _ | | _ _ __
\__ | (_)| ||_|_> | |(_|>< ___|_|_> (/_ |
Credits: Excalibur, Batts, Spegeli and others here at device!
--------------------------------------------------------------------------------------------------------
,---------------------------.
INSTRUCTIONS: https://tinyurl.com/scriptinstructions __@ ' | READ THE INSTRUCTIONS !!! |
( ..) -_)--------------------------'
---------------------------------------------------------ooO--(_)--Ooo----------------------------------
!!To read the intructions you need to open the link above in your internet browser!!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |U|S|E|R| |C|O|N|F|I|G|U|R|A|T|I|O|N| | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IN THE USER CONFIG SECTION YOU CAN SET THE DEFAULT SETTINGS
FOR YOUR SCRIPT, SO WHICH MODS SHOULD BE LOADED BY DEFAULT
AND WHICH NOT. CHANGE "TRUE" TO "FALSE" AND VICE VERSA.
"TRUE" MEANS ON BY DEFAULT, "FALSE" MEANS OFF BY DEFAULT.
//---------------------------/ START USER CONFIG---------------------------------------*/
define AIM__INVERTED=FALSE; // IF YOU PLAY WITH AIM INVERTED SET "TRUE;"
define EASY__RUN=TRUE; // EASY RUN
int RUN__SENS=-25; // SENSITIVITY WHEN EASY RUN SHOULD ACTIVATE
define CNCL__RELOAD=TRUE; // AUTO CANCEL RELOAD
define RELOAD__TIME=2000; // SET LONGEST RELOAD TIME IN YOUR SCRIPT
define EASY__MELEE=TRUE; // EASY MELEE
define turbo__trigger=TRUE; // HAIR TRIGGERS ON BY DEFAULT FOR BOTH TRIGGERS
define EASY__SLIDE_DROP=TRUE; // TAP PRONE BTN TO CROUCH. HOLD FOR A SECOND TO PRONE
define Time__b__Prone=150; // YOU CAN CHANGE THE TIME BEFORE PRONE HERE (SO FOR HOW
/* LONG YOU MUST PRESS THE PRONE BTN FOR EASY SLIDE/DROP)
IF FILL OUT VALUE 0, YOU WILL IMMEDIATELY SLIDE OR PRONE
(BUT YOU WILL NOT BE ABLE TO PRONE AT ALL IN THE GAME)
/*
THE MODS BELOW ("INT") ARE VARIABLES WITH TOGGLES THAT YOU CAN
SWITCH OFF AND ON IN THE GAME. THE TOGGLES ARE EXPLAINED IN THE
MANUAL (SEE TINY URL AT THE TOP OF THE SCRIPT). LIKE ABOVE YOU
CAN SET THEM ON AND OFF BY DEFAULT, BUT THE TOGGLES WILL STILL WORK
EVEN IF YOU SET THE OFF BY DEFAULT. */
int NO__RECOIL=TRUE; // ANTI RECOIL
int STICKY__AIM=TRUE; // AIM ASSIST
int AIM__CORRECT=TRUE; // AIM CORRECTIONS
int AKIMBO__AUTO_AIM=FALSE; // AKIMBO / AUTO AIM, PRESSING FIRE WILL AUTO PRESS AIM
/*
AUTO HEALING: WITH THE MEDIC EQUIPMENT SELECTED AS GEAR IN THE GAME YOU CAN HAVE YOUR
CHARACTER AUTO HEAL HIM/HER SELF. BECAUSE BLACK OUT AND MULTI PLAYER HAVE DIFFERENT
FUNCTIONALITY FOR HEALING, THERE ARE TWO OPTIONS BELOW. ONE FOR MULTIPLAYER, ONE FOR BLACK
OUT. YOU SWITCH BETWEEN THE GAME MODES? NO PROBLEM AT ALL, BOTH AUTO HEAL FUNCTIONS HAVE
TOGGLES SO YOU CAN SWITCH THEM ON AND OFF AT ANY TIME. TO KNOW WHICH TOGGLES ARE IN USE
READ THE MANUAL.
*/
int AUTO__HEAL=FALSE;
int A__HEAL_BLACK_OUT=FALSE;
/* AIM CORRECTION SENSITIVITY VALUES:
ADS SENS = SENS WHEN AIMING
GEN SENS = GENERAL STICK SENS
HIP SENS = SENS WHEN HIP FIRING
ADS FIRE SENS = SENS WHEN AIMING AND FIRING WEAPON
DO NOT CHANGE MIDPOINT
AIM CORRECTION SENSITIVITY VALUES: */
int ADS_SENS=95, GEN_SENS=100, HIP_SENS=100, ADS_FIRE_SENS=85, Use_sens, midpoint=50;
/* BELOW YOU CAN SET THE SWITCH FOR ACTIVATING A KILL STREAK and THE SPECIAL POWER
OF YOUR CHARACTER. THIS WILL ALLOW YOU TO ACTIVATE EITHER OF THEM WITH JUST ONE TAP
OFF A BUTTON. CHOOSE ONE OF THESE BUTTON:
13 = D-PAD UP
14 = D-PAD DOWN
15 = D-PAD LEFT
16 = D-PAD RIGHT
6 = PS4_L1 / XB1_LB
26 = OFF (SO YOU ACTIVATE THE KILLS STREAK AND SUPER POWER MANUALLY IN THE GAME)
ACTIVATION SWITCH FOR SUPER POWER & KILL STREAK: */
define SUPER__POWER__SW=26;
define KILL__STREAK__SW=26;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |C|O|N|T|R|O|L|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
define HOME=0; //PS4_PS / XB1_XBOX
define VIEW_reset=1; //PS4_SHARE / XB1_VIEW
define MENU_save=2; //PS4_OPTIONS / XB1_MENU
define LETHAL=3; //PS4_R1 / XB1_RB
define FIRE=4; //PS4_R2 / XB1_RT
define PRONE=5; //PS4_R3 / XB1_RS
define TACTICAL=6; //PS4_L1 / XB1_LB
define ADS=7; //PS4_L2 / XB1_LT
define SPRINT=8; //PS4_L3 / XB1_LS
define RX=9; //PS4_RX / XB1_RX
define RY=10; //PS4_RY / XB1_RY
define LX=11; //PS4_LX / XB1_LX
define LY=12; //PS4_LY / XB1_LY
define UP=13; //PS4_UP / XB1_UP
define DOWN=14; //PS4_DOWN / XB1_DOWN
define LEFT=15; //PS4_LEFT / XB1_LEFT
define RIGHT=16; //PS4_RIGHT / XB1_RIGHT
define SW_WEAPON=17; //PS4_TRIANGLE / XB1_Y
define MELEE=18; //PS4_CIRCLE / XB1_B
define JUMP=19; //PS4_CROSS / XB1_A
define RELOAD=20; //PS4_SQUARE / XB1_X
define GYROX_PR1=24; //PS4_GYROX / XB1_PR1
define GYROY_PR2=25; //PS4_GYROY / XB1_PR2
define GYROZ_PL1=26; //PS4_GYROZ / XB1_PL1
define TOUCH_PL2=27; //PS4_TOUCH / XB1_PL2
/*
----------------------/ END USER CONFIG /-----------------------------------------------
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
int q;
int double__tap[30];
int recoil__y, recoil__x;
int NO__RECOIL__Y, NO__RECOIL__X;
int G__M=TRUE;
int hold_time=35;
int rest_time=35;
int PrimaryWeapon=TRUE;
int RF_KS=FALSE;
int R2F_K2S=FALSE;
int b_reload;
int aa_p=24;
int aa_n=-24;
int aa_delay=20;
int release=25;
int Secondary=FALSE; //set to TRUE if you preffer to load the script with rapid fire for seconday weapon by default.
int TimelimitA=6000; // 1 timer
int TimerA=0;
int easy_run_KS=FALSE;
int reload__WW2;
int KS_time;
int A__H_time;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |I|N|I|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
init {
while(q < 30) {
double__tap[q] = -1;
q++;
}
NO__RECOIL__Y = get_pvar(SPVAR_8,-100,+100,+38);
NO__RECOIL__X = get_pvar(SPVAR_9,-100,+100,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|A|I|N| |B|L|O|C|K| |S|T|A|R|T|S| |H|E|R|E| | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
main {
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |L|O|A|D| |M|O|D|E|S| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN)) {//HOLD DOWN
if (double_click(2)) { //DOUBLE TAP PS4_OPTIONS / XB1_MENU
G__M = !G__M;
if (G__M) combo_run (Rumb);
if (!G__M) combo_run (RumbTwo);
}
set_val(2,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(ADS)){//hold ADS button
//--RESET EPROM TO DEFAULT VALUES
if(get_val(VIEW_reset)&&get_ptime(VIEW_reset)>600){
RESET_Defaults();
}
//--RAPID FIRE ON SECONDARY
if(event_press(UP)){//D-pad UP
PrimaryWeapon=TRUE;
RF_KS=FALSE;
R2F_K2S=TRUE;
Secondary=TRUE;
if (Secondary) combo_run (RumbTwo);
}
//--RAPID FIRE OFF
if(event_press(DOWN)){//D-pad DOWN
PrimaryWeapon=TRUE;
RF_KS=FALSE;
R2F_K2S=FALSE;
Secondary=FALSE;
if (!R2F_K2S) combo_run (Rumb);
}
//--RAPID FIRE ON
if(event_press(RIGHT)){//D-pad RIGHT
PrimaryWeapon=TRUE;
RF_KS=TRUE;
R2F_K2S=TRUE;
Secondary=FALSE;
if (RF_KS) combo_run (RumbTwo);
}
//--AKIMBO
if(event_press(LEFT)){//D-pad LEFT
AKIMBO__AUTO_AIM = !AKIMBO__AUTO_AIM;
if (AKIMBO__AUTO_AIM) combo_run (RumbTwo);
if (!AKIMBO__AUTO_AIM) combo_run (Rumb);
PrimaryWeapon=TRUE;
Secondary=TRUE;
}
set_val(1,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|O|G|G|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(get_val(DOWN) && get_val (ADS)){
if (event_press (19)){//TAP A
NO__RECOIL = !NO__RECOIL;
if (NO__RECOIL) combo_run (RumbTwo);
if (!NO__RECOIL) combo_run (Rumb);
}
if (event_press (18)){//TAP B
AIM__CORRECT = !AIM__CORRECT;
if (AIM__CORRECT) combo_run (RumbTwo);
if (!AIM__CORRECT) combo_run (Rumb);
}
if (event_press (17)){//TAP Y
STICKY__AIM = !STICKY__AIM;
if (STICKY__AIM) combo_run (RumbTwo);
if (!STICKY__AIM) combo_run (Rumb);
}
if (event_press (20)){//TAP X
reload__WW2 = !reload__WW2;
if (reload__WW2) combo_run (RumbTwo);
if (!reload__WW2) combo_run (Rumb);
}
if (event_press (FIRE)){//FIRE BTN
AKIMBO__AUTO_AIM = !AKIMBO__AUTO_AIM;
if (AKIMBO__AUTO_AIM) combo_run (RumbTwo);
if (!AKIMBO__AUTO_AIM) combo_run (Rumb);
}
if (double_click(TACTICAL)){
AUTO__HEAL = !AUTO__HEAL;
A__HEAL_BLACK_OUT = !A__HEAL_BLACK_OUT;
if (A__HEAL_BLACK_OUT) combo_run (RumbTwo);
if (!A__HEAL_BLACK_OUT) combo_run (Rumb);
}
if(event_release(TACTICAL) && get_ptime(TACTICAL)> 200){
AUTO__HEAL = !AUTO__HEAL;
if (AUTO__HEAL) combo_run (RumbTwo);
if (!AUTO__HEAL) combo_run (Rumb);
}
set_val (FIRE,0);set_val (TACTICAL,0);set_val(19,0);set_val (18,0);set_val (17,0); set_val (20,0);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |S|L|I|D|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(EASY__SLIDE_DROP){
if (event_release(PRONE) && get_ptime(PRONE)> Time__b__Prone){
combo_run(DROP_SHOT);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|K|I|M|B|O| |/|A|U|T|O| |A|I|M| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(AKIMBO__AUTO_AIM) {
if(PrimaryWeapon && get_val(FIRE))
set_val(ADS,100);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|E|L|O|A|D| |T|I|M|E|S| |W|W|2| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (reload__WW2){
KS_time= 2000;}
else KS_time=0;
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |T|U|R|B|O| |B|T|N| |A|.|K|.| |H|A|I|R| |T|R|I|G|G|E|R|S| | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
turbo(FIRE);
turbo(ADS);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(AIM__CORRECT){
Aim__Correction (Use_sens);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|U|T|O| |H|E|A|L| |B|L|A|C|K| |O|U|T| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (A__HEAL_BLACK_OUT){
A__H_time= 4000;}
else A__H_time= 0;
/*
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|U|T|O| |H|E|A|L| | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (event_release (FIRE)) {TimerA=TimelimitA;}
if (TimerA>0)
{
TimerA=TimerA - get_rtime();
if (TimerA<=6000 && event_press (RELOAD)){ combo_run (Heal);}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (NO__RECOIL){
No__recoil(NO__RECOIL__X, NO__RECOIL__Y);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|O|D|E| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
P__M(G__M);
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |R|U|N| | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (EASY__RUN){
if (!easy_run_KS && get_val(LY) < RUN__SENS && !get_val(ADS)) {
combo_run (EASY_RUN);}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |E|A|S|Y| |M|E|L|E|E| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (EASY__MELEE){
if (get_val(SPRINT)) set_val(MELEE, 100);}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|A|P|I|D| |F|I|R|E| |&| |J|I|T|T|E|R| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//-- RF PRIMARY
if (PrimaryWeapon && RF_KS && get_val(FIRE))combo_run (RAPID_FIRE);
//- RF SECONDARY
if(!PrimaryWeapon && R2F_K2S)
if(get_val(FIRE)) {
combo_run (RAPID_FIRE);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |R|E|S|E|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(event_release(RELOAD) && get_ptime(RELOAD)> 200 &&(Secondary)){ PrimaryWeapon = TRUE; combo_run (Rumb);}
if (Secondary){
if(event_release(SW_WEAPON)&& get_ptime(SW_WEAPON)< 200 && !get_val (14)){
PrimaryWeapon = !PrimaryWeapon;
if (!PrimaryWeapon) combo_run (RumbTwo);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|A|N|C|E|L| |R|E|L|O|A|D| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if (CNCL__RELOAD) {
if(event_press(FIRE) && b_reload){combo_run(CANCEL_RLD); }
if(event_press(ADS) && b_reload){combo_run(CANCEL_RLD);}
if(event_release(RELOAD) && get_ptime(RELOAD)< 200){
combo_run (STOP_SPRINT); combo_run(RELOAD_END); }
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
if(STICKY__AIM){
if(get_val(ADS)) combo_run(AA_XY);
else combo_stop(AA_XY);
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | |K|I|L|L| |S|W|I|T|C|H| |&| |S|U|P|E|R| |P|W| |S|W|I|T|C|H| | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
//switches are prepared to work normally even if Jitter mod is used by adding a little press time.
if(event_press (SUPER__POWER__SW) && !get_val (ADS) && get_ptime(SUPER__POWER__SW)< 15 && G__M) { combo_run(SPECIAL);}
if(event_press (KILL__STREAK__SW) && !get_val (ADS) && get_ptime(KILL__STREAK__SW)< 15 && G__M) { combo_run(KILL);
}
}
/*
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
combo AA_XY {
set_val(10,xy_val(10,aa_p));
wait(aa_delay);
set_val(9,xy_val(9,aa_p));
set_val(11,xy_val(11,aa_p));
wait(aa_delay);
set_val(10,xy_val(10,aa_n));
wait(aa_delay);
set_val(9,xy_val(9,aa_n));
set_val(11,xy_val(11,aa_n));
wait(aa_delay);
}
combo Rumb{
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait(150);
reset_rumble();
}
combo RumbTwo {
wait(300);
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait (150);
set_rumble(RUMBLE_B, 100);
wait(150);
set_rumble(RUMBLE_B, 0);
wait(150);
reset_rumble();
}
combo STOP_SPRINT {
easy_run_KS = TRUE;
wait(KS_time);
easy_run_KS = FALSE;
}
combo RAPID_FIRE {
set_val(FIRE,100);
wait(hold_time);
set_val(FIRE, 0);
wait(rest_time);
}
combo RELOAD_END {
b_reload=TRUE;
wait(RELOAD__TIME);
b_reload=FALSE;
}
combo Heal {
wait (RELOAD__TIME);
if (AUTO__HEAL)
set_val(TACTICAL,100);
wait(A__H_time);
}
combo CANCEL_RLD {
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
set_val(SW_WEAPON, 100);
wait(30);
set_val(SW_WEAPON, 0);
wait(20);
b_reload=FALSE;
}
combo SPECIAL {
set_val(LETHAL,100);
set_val(TACTICAL,100);
wait(100);
wait(40);
}
combo KILL {
set_val (SW_WEAPON, 100);
wait(400);
set_val (SW_WEAPON,0);
wait(40);
}
combo DROP_SHOT{
set_val(PRONE,100);
wait(700);
}
combo EASY_RUN {
set_val(SPRINT,100);
wait(30);
wait(100);
}
function P__M(program__mode) {
if (program__mode) return;
if (get_val(DOWN)) {
NO__RECOIL__Y = Variable__Var(NO__RECOIL__Y, -100, 100, 3, 4);
NO__RECOIL__X = Variable__Var(NO__RECOIL__X, -100, 100, 6, 7);
set_val (3,0); set_val (4,0); set_val (7,0); set_val (7,0);
}
save_pvars();
}
function Variable__Var(var__val, min_val, max_val, btn_up, btn_down) {
if(event_press(btn_up) && var__val < max_val) {
var__val++;
combo_run (Rumb);
}
if(event_press(btn_down) && var__val > min_val) {
var__val--;
combo_run (Rumb);
}
return var__val;
}
function Aim__Correction (Use_sens){
if(get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_FIRE_SENS;
}
if(get_val(FIRE) && !get_val(ADS)) {
Use_sens = HIP_SENS;
}
if(!get_val(FIRE) && !get_val(ADS)) {
Use_sens = GEN_SENS;
}
if(!get_val(FIRE) && get_val(ADS)) {
Use_sens = ADS_SENS;
}
sensitivity(9, midpoint ,Use_sens);
sensitivity(10, midpoint ,Use_sens);
}
function RESET_Defaults () {
combo_run (Rumb);
NO__RECOIL__Y = +38;
NO__RECOIL__X = 0;
save_pvars();
}
function turbo(btn) {
if (!turbo__trigger || !get_val(btn)) return;
set_val(btn, 100);
}
function No__recoil(No__recoil__x, No__recoil__y) {
if (get_val(FIRE)) {
if (isqrt(pow(get_val(RX), 2) + pow(get_val(RY), 2)) <= abs(No__recoil__y)) {
if (abs(get_val(RY)) <= abs(No__recoil__y)) {
recoil__x = (get_val(RX) + (No__recoil__x*(100-abs(get_val(RX))))/100);
set_val(RX, recoil__x);
if (AIM__INVERTED)
recoil__y = (get_val(RY) - (No__recoil__y*(100-abs(get_val(RY))))/100); // Y-axis invert
else
recoil__y = (get_val(RY) + (No__recoil__y*(100-abs(get_val(RY))))/100);
if (recoil__y > No__recoil__y) recoil__y = No__recoil__y;
set_val(RY, recoil__y);
}
}
}
}
function xy_val(f_axis,f_val) {
if(abs(get_val(f_axis)) < release)
return f_val;
return get_val(f_axis);
}
function double_click(button) {
if (double__tap[button] >= 0) {
//double__tap[button] += get_rtime();
double__tap[button] = double__tap[button] + get_rtime();
if (double__tap[button] > 450)
double__tap[button] = -1;
}
if (event_release(button) && get_ptime(button) <= 200) {
if (double__tap[button] < 0) {
double__tap[button] = 0;
} else {
double__tap[button] = -1;
return 1;
}
}
return 0;
}
function save_pvars() {
set_pvar(SPVAR_8, NO__RECOIL__Y);
set_pvar(SPVAR_9, NO__RECOIL__X);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Script error need help fixing
awesome thanks
-
Premium308 - Sergeant First Class
- Posts: 22
- Joined: Thu Aug 25, 2016 6:08 am
8 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 80 guests