Can somebody get rid of this error on this script please?

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

Can somebody get rid of this error on this script please?

Postby al_allan » Mon Apr 03, 2023 3:41 pm

GPC error: div2_v8.3.gpc(1940): Invalid symbol redefinition 'combo afk'


const string settings_str[] = { "WEAPONS PROFILE", " WEAPON SETUP"," SENSITIVITY", " OTHER SETTINGS"," AUTO RUN"," STRAFE ", " ANTIRECOIL", " AIM ABUSE", " HEAD HELPER", " AFK" }
const string settings_down1_str[] = {" choose ", " Change ur", " ads & hip", " Customize", " set up", " choose ", " choose ", " choose ", " select" , " YOU WANNA" }
const string settings_down2_str[] = {" profle" , "weapon stat", "sensitivity", "the script", " auto-run", " type ", " type ", " power", " the hieght ", " DANCE?" }
const string arrows[]={"<",">"}
const string on_off[]={"ON","OFF"}
const string yes_no[]={"NO","YES"}
const string strafes[]= {"off", "fast-cut", "left-cut", "right-cut", "auto-cut", "auto-xbox", "like-AWD"}
const string strafes_[]= {" ", " <-x-x->", " <-x->-x", " x-<-x->", " <-<->->", " <-0-0->", "for beginers"}
const string rpm_mas[]={"NO","172","177","182","188","194","200","207","215","223","231","240","250","261","273","286","300","316","334","353","375","400","428","462","500","545","600"}//300,50
const string save[]={"OPTIONS to save","OPTIONS","save"}
const string recoils[]= {" Casual","SmartCntrl","HardCntrl","SensCurve"}
const string profiles[]={"empty"," 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9"," 10"}

//weapon settings
define _profile = 0
define _empty = 0
define _weapon_settings = 1

define _x = 0
define _y = 1
define _rpm = 2

//sensitivity
define _sens_settings = 2
define _ads_x = 0
define _ads_y = 1
define _hip_x = 2
define _hip_y = 3
define _center = 4

//bool gameplay functions
define _other_settings = 3

//other
define _sensboost = 0
define _ads_strafe = 1
define _quick_scope = 2
define _button_swap = 3
//define _afk = 7

//autorun settings
define _auto_run_settings = 4
define _autorun = 0
//define _cut_strafe = 1
define _angle = 1
define _autorun_dz = 2


//strafes
define _hip_strafe_settings = 5
define _l3_strafe = 0
define _r2_strafe = 1

define _f_cat = 1
define _left_cat = 2
define _right_cat = 3
define _auto_cat = 4
define _xbox = 5
define _awd = 6

//antirecoils
define _antirecoil = 6
define _casual_ar = 0
define _smart_control_ar = 1
define _hard_control_ar = 2
define _sens_ar = 3

//other
define _aim_abuse = 7
define _head_helper = 8

// remap
define L1 = PS4_L1
define L2 = PS4_L2
define L3 = PS4_L3
define LY = PS4_LY
define LX = PS4_LX

define R1 = PS4_R1
define R2 = PS4_R2
define R3 = PS4_R3
define RY = PS4_RY
define RX = PS4_RX

define CROSS = PS4_CROSS
define CIRCLE = PS4_CIRCLE
define TRIANGLE = PS4_TRIANGLE
define SQUARE = PS4_SQUARE

define UP = PS4_UP
define LEFT = PS4_LEFT
define DOWN = PS4_DOWN
define RIGHT = PS4_RIGHT

define TOUCH = PS4_TOUCH
define PS = PS4_PS
define SHARE = PS4_SHARE
define OPTIONS = PS4_OPTIONS

function block_all_input()
{
set_val(UP , 0 ); set_val(DOWN , 0 ); set_val(LEFT , 0 ); set_val(RIGHT , 0);
set_val(CROSS , 0 ); set_val(CIRCLE, 0 ); set_val(SQUARE, 0 ); set_val(TRIANGLE, 0);
set_val(L1 , 0 ); set_val(R1 , 0 ); set_val(L3 , 0 ); set_val(R3 , 0);
set_val(OPTIONS, 0 ); set_val(SHARE , 0 ); set_val(TOUCH , 0 ); set_val(PS , 0);
set_val(LX, 0); set_val(LY, 0); set_val(RX, 0); set_val(RY, 0);
set_val(L2, 0); set_val(R2, 0);
}

const string num[]=
{"-100","-99","-98","-97","-96","-95","-94","-93","-92","91","-90","-89","-88","-87","-86","-85","-84","-83","-82","-81","-80",
"-79","-78","-77","-76","-75","-74","-73","-72","-71","-70","-69","-68","-67","-66","-65","-64","-63", "-62","-61","-60","-59",
"-58","-57","-56","-55","-54","-53","-52","-51","-50","-49","-48","-47","-46","-45","-44","-43","-42","-41","-40","-39","-38",
"-37","-36","-35","-34","-33","-32","-31","-30","-29","-25","-27","-26","-25","-24","-23","-22", "-21", "-20","-19","-18","-17",
"-16","-15","-14","-13", "-12","-11","-10","-9","-8","-7","-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6","7","8","9",
"10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34",
"35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59",
"60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84",
"85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100"}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// maain screen //
const string main_text[]={"haku-haku"," div2 v8.3.1","L2+2xOPTIONS-menu"}

function main_print()
{
cls_oled(0)
print( 5, 17 , 1, 1, main_text[0])
print( 20, 3 , 0, 1, main_text[1])
print( 0, 54 , 0, 1, main_text[2])
combo_run(weapon)
}
combo screen_cleaner
{
cls_oled(0)
wait(100)
main_print()
reset_leds()

}
///////////////////////////////////////////////////////////////////////////////////////////
// init //
init
{
vm_tctrl(10)
draw_logo()
load_settings()
//main_print()
}

function load_settings()
{
profile=get_pvar(SPVAR_1,1,2147483647,1)
antirecoil=get_pvar(SPVAR_2,0,10,0)
aim_assist_zone=get_pvar(SPVAR_3,1,100,8)
head_helper=get_pvar(SPVAR_4,0,100,0)

load_sens_info()
load_weapon_info()
load_other_settings()
load_auto_run_settings()
load_hip_strafe_settings()

}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
int colour

define BLUE = 0
define PINK = 1
define GREEN = 2
define YELLOW = 3
define WHITE = 4
define RED = 5

function led(colour)
{
if ( colour == BLUE)
{
set_led(LED_1, 2);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
if ( colour == PINK)
{
set_led(LED_1, 2);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
if ( colour == GREEN)
{
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 2);
set_led(LED_4, 0);
}
if ( colour == YELLOW)
{
set_led(LED_1, 0);
set_led(LED_2, 2);
set_led(LED_3, 2);
set_led(LED_4, 0);
}
if ( colour == WHITE)
{
set_led(LED_1, 2);
set_led(LED_2, 2);
set_led(LED_3, 2);
set_led(LED_4, 0);
}
if ( colour == RED)
{
set_led(LED_1, 0);
set_led(LED_2, 2);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// interface + save/load //
int settings,settings_choice

int change_weapon_stats

function settings()
{
block_all_input()
led(WHITE)

if(!function_settings)
{
block_all_input()
if(event_press(RIGHT) || event_press(LEFT)) combo_run(draw_settings)

if(event_press(LEFT))
{
settings_choice--
combo_run(press_button_left)
}
if(event_press(RIGHT))
{
settings_choice++
combo_run(press_button_right)
}

if(settings_choice < 0) settings_choice =0
if(settings_choice > 8) settings_choice =8

if(event_press(CROSS))
{
if(settings_choice > _profile && settings_choice <_antirecoil)
{
fuction = settings_choice
combo_run(load_and_draw_function)
settings=FALSE

}
else
{
get_function_value()
function_settings=TRUE
combo_run(draw_function_settings)
f_step=function_characteristic[settings_choice][2]
f_min=function_characteristic[settings_choice][0]
f_max=function_characteristic[settings_choice][1]
}
}

}

}

combo draw_settings
{
wait(10)
cls_oled(0)

rect_oled(0, 0, 128, 19, 0, 1);
rect_oled(0, 0, 128, 64, 0, 1);

print( 10, 6 , 0, 1, settings_str[settings_choice]);
print( 5, 25 , 1, 1, settings_down1_str[settings_choice]);
print( 3, 45 , 1, 1, settings_down2_str[settings_choice]);

if(settings_choice < 8) print( 117, 1 , 1, 0, arrows[1])
if(settings_choice > 0) print( 1, 1 , 1, 0, arrows[0])
}

int function_settings, function_value

int f_step,f_min,f_max
//int all_settings[11]

const int function_characteristic[][]=
{
//min/max/step
{0,10,1}, //profile
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
{0,3,1}, //anti recoil
{8,50,2}, //aim assist
{0,100,5} //head_helper
}
function function_settings()
{
block_all_input()

if((event_press(RIGHT) || event_press(LEFT) ) && !combo_running(saved)) combo_run(draw_function_settings)

if(event_press(LEFT))
{
function_value-= f_step
combo_run(press_button_left)
}
if(event_press(RIGHT))
{
function_value+= f_step
combo_run(press_button_right)
}

if(function_value < f_min) function_value =f_min
if(function_value > f_max) function_value =f_max

if(event_press(OPTIONS))
{
save_function_value()
save()
combo_run(saved)
}

//if(event_press(CIRCLE)) function_settings=FALSE
}

const string NO = "NO"
const string off = " off"
combo draw_function_settings
{
wait(10)
cls_oled(1)

print( 10, 6 , 0, 0, settings_str[settings_choice]);
rect_oled(12, 16, 104, 36,0, 0);
print( 7, 55 , 0, 0, save[0])

if(function_value > f_min)print( 1, 25 , 1, 0, arrows[0])
if(function_value < f_max)print( 117, 25 , 1, 0, arrows[1])

if(settings_choice == _profile ) print(40, 25 , 1, 0,profiles[function_value])

if(settings_choice == _antirecoil)print(15, 25 , 1, 0, recoils[function_value]) //antirecoil
if(settings_choice == _aim_abuse) //aim_assist
{
if(function_value == 8) print( 20, 25 , 1, 0, off[0])
else print( 55, 25 , 1, 0, num[100+function_value])
}
if(settings_choice == _head_helper) //head_helper
{
if(function_value == 0) print( 20, 25 , 1, 0, off[0])
else print( 55, 25 , 1, 0, num[100+function_value])
}

}

//////////////////////////////////////////////////////////////////////////////////////////////
function save_function_value()
{
if(settings_choice == _profile)
{
profile = function_value
load_weapon_info()
}
if(settings_choice == _antirecoil) antirecoil = function_value
if(settings_choice == _aim_abuse) aim_assist_zone = function_value
if(settings_choice == _head_helper) head_helper = function_value
}
function get_function_value()
{
if(settings_choice == _profile) function_value = profile
if(settings_choice == _antirecoil) function_value = antirecoil
if(settings_choice == _aim_abuse) function_value = aim_assist_zone
if(settings_choice == _head_helper) function_value = head_helper
}




//////////////////////////////////////////////////////////////////////////////////////////////////////////////
int draw_function, fuction

function draw_function(fuction)
{
if(fuction == _weapon_settings)change_weapon_stats()
if(fuction == _sens_settings)sens_settings()
if(fuction == _other_settings)other_settings()
if(fuction == _auto_run_settings) auto_run_settings()
if(fuction == _hip_strafe_settings) hip_strafe_settings()

}
combo load_and_draw_function
{
wait(10)
if(fuction == _weapon_settings)
{
load_weapon_info()
combo_run(draw_weapon_stats)
}
if(fuction == _sens_settings)
{
load_sens_info()
combo_run(draw_sens_settings)
}
if(fuction == _other_settings)
{
load_other_settings()
combo_run(draw_other_settings)
}
if(fuction == _auto_run_settings)
{
load_auto_run_settings()
combo_run(draw_auto_run_settings)
}
if(fuction == _hip_strafe_settings)
{
load_hip_strafe_settings()
combo_run(draw_hip_strafe_settings)
}

draw_function=TRUE
vertical_choice=0
}
/////////////////////////////////////////////////////////////////////////////////////////////////
const string X[]={"x:"}
const string Y[]={"y:"}
const string RPM[]={"rpm:"}

int vertical_choice

int primary_info,secondary_info,pistol_info

int primary=TRUE,secondary,pistol
int primary_weapon[3];
int secondary_weapon[3];
int pistol_weapon[3];
int x,y,rpm
int hold_time

const string weapons[]={"primary ","secondary ","pistol "}

function change_weapon_stats()
{
block_all_input()
led(PINK)

if((event_press(DOWN) || event_press(UP) || event_press(LEFT) || event_press(RIGHT) || event_press(TRIANGLE)) && !combo_running(saved))
{
combo_run(draw_weapon_stats)
}

if(event_press(TRIANGLE) && profile != _empty)
{
if(pistol) pistol=FALSE
else
{
primary=!primary
secondary=!secondary
}
if(get_brtime(TRIANGLE)<200) pistol=TRUE

weapon_info_unpacking()
}

if(event_press(OPTIONS))
{
make_weapon_info()
save_weapon_info()
weapon_swap()
combo_run(saved)
}

if(vertical_choice > _rpm) vertical_choice = _rpm
if(vertical_choice < _x) vertical_choice = _x

if(event_press(DOWN)) vertical_choice++
if(event_press(UP)) vertical_choice--

if(event_press(LEFT))
{
if(vertical_choice == _x) x--
if(vertical_choice == _y) y--
if(vertical_choice == _rpm) rpm-=10
}
if(event_press(RIGHT))
{
if(vertical_choice == _x) x++
if(vertical_choice == _y) y++
if(vertical_choice == _rpm) rpm+=10
}

if(y < 0) y = 0
if(y > 99) y = 99
if(x < -50) x = -50
if(x > 50) x = 50
if(rpm < 40) rpm = 40
if(rpm > 300) rpm = 300
}

function weapon_swap()
{
if(primary && !pistol)
{
x=primary_weapon[_x]
y=primary_weapon[_y]
rpm=primary_weapon[_rpm]

}
if(secondary && !pistol)
{
x=secondary_weapon[_x]
y=secondary_weapon[_y]
rpm=secondary_weapon[_rpm]
}
if(pistol)
{
x=pistol_weapon[_x]
y=pistol_weapon[_y]
rpm=pistol_weapon[_rpm]
}
hold_time = 350 - rpm + 5
}

const int center[]={31,37}

combo draw_weapon_stats
{
wait(10)
cls_oled(0)

print( 80, 13 , 0, 1, X[0])
print( 80, 23 , 0, 1, Y[0])
print( 65, 33 , 0, 1, RPM[0])

rect_oled(65, 45, 50, 20 ,1, 1);
print( 65, 46 , 0, 0, save[1])
print( 75, 55 , 0, 0, save[2])

line_oled(center[0]-25, center[1], center[0] + 25, center[1], 1, 1); //x
line_oled(center[0], center[1] -25, center[0], center[1] + 25, 1, 1); //y

line_oled(center[0], center[1], center[0] + x, center[1] + y/2, 1, 1); //antirecoil
circle_oled(center[0] + x, center[1] + y/2, 1, 1, 1);

if(primary && !pistol) print( 35, 3 , 0, 1, weapons[0])
if(secondary && !pistol) print( 35, 3 , 0, 1, weapons[1])
if(pistol) print( 35, 3 , 0, 1, weapons[2])

if(vertical_choice == 0) print( 101, 12 , 0, 0, num[100 + x])
else print( 99, 13 , 0, 1, num[100 + x])
if(vertical_choice == 1) print( 101, 22 , 0, 0, num[100 + y])
else print( 99, 23 , 0, 1, num[100 + y])
if(vertical_choice == 2) print( 101, 32 , 0, 0, rpm_mas[ (rpm - 40)/10])
else print( 99, 33 , 0, 1, rpm_mas[ (rpm - 40)/10])


}

function weapon_info_unpacking()
{
primary_weapon[_x]= primary_info/100000
primary_weapon[_y]=(abs(primary_info)-abs(primary_weapon[_x])*100000)/1000
primary_weapon[_rpm]=abs(primary_info)- abs(primary_weapon[_x])*100000 - primary_weapon[_y]*1000

secondary_weapon[_x]= secondary_info/100000
secondary_weapon[_y]=abs((secondary_info-(secondary_weapon[_x])*100000)/1000)
secondary_weapon[_rpm]=abs((secondary_info-(secondary_weapon[_x])*100000)) - secondary_weapon[_y]*1000

pistol_weapon[_x]= pistol_info/100000
pistol_weapon[_y]=abs((pistol_info-(pistol_weapon[_x])*100000)/1000)
pistol_weapon[_rpm]=abs((pistol_info-(pistol_weapon[_x])*100000)) - pistol_weapon[_y]*1000

weapon_swap()
}

int profile

function load_weapon_info()
{
if(profile == 1)
{
primary_info=get_pvar(SPVAR_10,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_11,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_12,-2147483648,2147483647,0)
}
if(profile == 2)
{
primary_info=get_pvar(SPVAR_13,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_14,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_15,-2147483648,2147483647,0)
}
if(profile == 3)
{
primary_info=get_pvar(SPVAR_16,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_17,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_18,-2147483648,2147483647,0)
}
if(profile == 4)
{
primary_info=get_pvar(SPVAR_19,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_20,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_21,-2147483648,2147483647,0)
}
if(profile == 5)
{
primary_info=get_pvar(SPVAR_22,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_23,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_24,-2147483648,2147483647,0)
}
if(profile == 6)
{
primary_info=get_pvar(SPVAR_25,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_26,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_27,-2147483648,2147483647,0)
}
if(profile == 7)
{
primary_info=get_pvar(SPVAR_28,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_29,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_30,-2147483648,2147483647,0)
}
if(profile == 8)
{
primary_info=get_pvar(SPVAR_31,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_32,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_33,-2147483648,2147483647,0)
}
if(profile == 9)
{
primary_info=get_pvar(SPVAR_34,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_35,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_36,-2147483648,2147483647,0)
}
if(profile == 10)
{
primary_info=get_pvar(SPVAR_37,-2147483648,2147483647,0)
secondary_info=get_pvar(SPVAR_38,-2147483648,2147483647,0)
pistol_info=get_pvar(SPVAR_39,-2147483648,2147483647,0)
}

weapon_info_unpacking()
}

function make_weapon_info()
{
if(primary && !pistol && x>=0)
{
primary_info=x*100000+y*1000+rpm
}
if(primary && !pistol && x<0)
{
primary_info=x*100000-y*1000-rpm
}
if(secondary && !pistol && x>=0)
{
secondary_info=x*100000+y*1000+rpm
}
if(secondary && !pistol && x<0)
{
secondary_info=x*100000-y*1000-rpm
}
if(pistol && x>=0)
{
pistol_info=x*100000+y*1000+rpm
}
if(pistol && x<0)
{
pistol_info=x*100000-y*1000-rpm
}
}

function save_weapon_info()
{
if(profile == 1)
{
set_pvar(SPVAR_10,primary_info)
set_pvar(SPVAR_11,secondary_info)
set_pvar(SPVAR_12,pistol_info)
}
if(profile == 2)
{
set_pvar(SPVAR_13,primary_info)
set_pvar(SPVAR_14,secondary_info)
set_pvar(SPVAR_15,pistol_info)
}
if(profile == 3)
{
set_pvar(SPVAR_16,primary_info)
set_pvar(SPVAR_17,secondary_info)
set_pvar(SPVAR_18,pistol_info)
}
if(profile == 4)
{
set_pvar(SPVAR_19,primary_info)
set_pvar(SPVAR_20,secondary_info)
set_pvar(SPVAR_21,pistol_info)
}
if(profile == 5)
{
set_pvar(SPVAR_22,primary_info)
set_pvar(SPVAR_23,secondary_info)
set_pvar(SPVAR_24,pistol_info)
}
if(profile == 6)
{
set_pvar(SPVAR_25,primary_info)
set_pvar(SPVAR_26,secondary_info)
set_pvar(SPVAR_27,pistol_info)
}
if(profile == 7)
{
set_pvar(SPVAR_28,primary_info)
set_pvar(SPVAR_29,secondary_info)
set_pvar(SPVAR_30,pistol_info)
}
if(profile == 8)
{
set_pvar(SPVAR_31,primary_info)
set_pvar(SPVAR_32,secondary_info)
set_pvar(SPVAR_33,pistol_info)
}
if(profile == 9)
{
set_pvar(SPVAR_34,primary_info)
set_pvar(SPVAR_35,secondary_info)
set_pvar(SPVAR_36,pistol_info)
}
if(profile == 10)
{
set_pvar(SPVAR_37,primary_info)
set_pvar(SPVAR_38,secondary_info)
set_pvar(SPVAR_39,pistol_info)
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
int x_ads,y_ads,x_hip,y_hip,curve_center
function sens_settings()
{
block_all_input()
led(BLUE)

if((event_press(DOWN) || event_press(UP) || event_press(LEFT) || event_press(RIGHT) || event_press(TRIANGLE) )&& !combo_running(saved))
{
combo_run(draw_sens_settings)
}

if(vertical_choice > _center) vertical_choice = _center
if(vertical_choice < _ads_x) vertical_choice = _ads_x

if(event_press(DOWN)) vertical_choice++
if(event_press(UP)) vertical_choice--

if(event_press(LEFT))
{
if(vertical_choice == _ads_x) x_ads-=5
if(vertical_choice == _ads_y) y_ads-=5
if(vertical_choice == _hip_x) x_hip-=5
if(vertical_choice == _hip_y) y_hip-=5
if(vertical_choice == _center) curve_center-=5
}
if(event_press(RIGHT))
{
if(vertical_choice == _ads_x) x_ads+=5
if(vertical_choice == _ads_y) y_ads+=5
if(vertical_choice == _hip_x) x_hip+=5
if(vertical_choice == _hip_y) y_hip+=5
if(vertical_choice == _center) curve_center+=5
}

if(event_press(OPTIONS))
{
make_sens_info()
save()
combo_run(saved)
}

if(x_ads > 100) x_ads = 100
if(x_ads < -100) x_ads = -100
if(y_ads > 100) y_ads = 100
if(y_ads < -100) y_ads = -100
if(x_hip > 100) x_hip = 100
if(x_hip < -100) x_hip = -100
if(y_hip > 100) y_hip = 100
if(y_hip < -100) y_hip = -100
if(curve_center > 100) curve_center = 100
if(curve_center < 0) curve_center = 0

}

const string sens_settings[]={"Sens settings"}
const string sens_parameters[]={"ads x:","ads y:","hip x:","hip y:","center:"}

combo draw_sens_settings
{
wait(10)
cls_oled(0)

print( 20, 3 , 0, 1, sens_settings[0])

print( 5, 15 , 0, 1, sens_parameters[_ads_x])
print( 5, 25 , 0, 1, sens_parameters[_ads_y])
print( 5, 35 , 0, 1, sens_parameters[_hip_x])
print( 5, 45 , 0, 1, sens_parameters[_hip_y])
print( 5, 55 , 0, 1, sens_parameters[_center])

rect_oled(75, 45, 50, 20 ,1, 1);
print( 75, 46 , 0, 0, save[1])
print( 85, 55 , 0, 0, save[2])

if(vertical_choice == _ads_x) print( 55, 15 , 0, 0, num[100 + x_ads])
else print( 50, 15 , 0, 1, num[100 + x_ads])
if(vertical_choice == _ads_y) print( 55, 25 , 0, 0, num[100 + y_ads])
else print( 50, 25 , 0, 1, num[100 + y_ads])
if(vertical_choice == _hip_x) print( 55, 35 , 0, 0, num[100 + x_hip])
else print( 50, 35 , 0, 1, num[100 + x_hip])
if(vertical_choice == _hip_y) print( 55, 45 , 0, 0, num[100 + y_hip])
else print( 50, 45 , 0, 1, num[100 + y_hip])
if(vertical_choice == _center) print( 60, 55 , 0, 0, num[100 + curve_center])
else print( 55, 55 , 0, 1, num[100 + curve_center])

}

int sens_info,number_sign
int _sens_info[5]

int i

function sens_info_unpacking()
{
_sens_info[_center] = sens_info/100000000
_sens_info[_hip_y] = (sens_info - _sens_info[_center]*100000000)/1000000
_sens_info[_hip_x] = (sens_info - _sens_info[_center]*100000000 - _sens_info[_hip_y]* 1000000)/10000
_sens_info[_ads_y] =(sens_info - _sens_info[_center]*100000000 - _sens_info[_hip_y]* 1000000 - _sens_info[_hip_x]*10000)/100
_sens_info[_ads_x] =sens_info - _sens_info[_center]*100000000 - _sens_info[_hip_y]* 1000000 - _sens_info[_hip_x]*10000 - _sens_info[_ads_y]*100

i=0
while(i<5)
{
_sens_info[i]=_sens_info[i]*5
i++
}

if(test_bit(number_sign,_ads_x)) _sens_info[_ads_x]= - _sens_info[_ads_x]
if(test_bit(number_sign,_ads_y)) _sens_info[_ads_y]= - _sens_info[_ads_y]
if(test_bit(number_sign,_hip_x)) _sens_info[_hip_x]= - _sens_info[_hip_x]
if(test_bit(number_sign,_hip_y)) _sens_info[_hip_y]= - _sens_info[_hip_y]

x_ads = _sens_info[_ads_x]
y_ads = _sens_info[_ads_y]
x_hip = _sens_info[_hip_x]
y_hip = _sens_info[_hip_y]
curve_center = _sens_info[_center]
}

function load_sens_info()
{
number_sign=get_pvar(SPVAR_8,-2147483648,2147483647,0)
sens_info=get_pvar(SPVAR_9,1,2147483647,1006070000)

sens_info_unpacking()
}

function make_sens_info()
{
_sens_info[_ads_x] = x_ads
_sens_info[_ads_y] = y_ads
_sens_info[_hip_x] = x_hip
_sens_info[_hip_y] = y_hip
_sens_info[_center] = curve_center

i=0
sens_info=0
while(i < 5)
{
if(_sens_info[i]<0) set_bit(number_sign,i)
else clear_bit(number_sign,i)
sens_info+=abs(_sens_info[i]/5)*pow(10,2*i)

i++
}

}
///////////////////////////////////////////////////////////////////////////////////////////////
function save()
{
set_pvar(SPVAR_1,profile)
set_pvar(SPVAR_2,antirecoil)
set_pvar(SPVAR_3,aim_assist_zone)
set_pvar(SPVAR_4,head_helper)

set_pvar(SPVAR_5,hip_strafe_info)
set_pvar(SPVAR_6,auto_run_info)
set_pvar(SPVAR_7,other_settings)

set_pvar(SPVAR_8,number_sign)
set_pvar(SPVAR_9,sens_info)
}
////////////////////////////////////////////////////////////////////////////////////////////
int quick_scope,ads_strafe,button_swap,sens_boost
function other_settings()
{
block_all_input()
led(PINK)

if((event_press(DOWN) || event_press(UP) || event_press(LEFT) || event_press(RIGHT) || event_press(TRIANGLE) )&& !combo_running(saved))
{
combo_run(draw_other_settings)
}

if(vertical_choice < 0) vertical_choice = 0
if(vertical_choice > 3) vertical_choice = 3
if(quick_scope && vertical_choice < 1) vertical_choice = 1

if(event_press(DOWN)) vertical_choice++
if(event_press(UP)) vertical_choice--

if(event_press(LEFT))
{
if(vertical_choice == _sensboost) sens_boost=0
if(vertical_choice == _ads_strafe) ads_strafe=0
if(vertical_choice == _button_swap) button_swap=0
if(vertical_choice == _quick_scope) quick_scope=0
}
if(event_press(RIGHT))
{
if(vertical_choice == _sensboost) sens_boost=1
if(vertical_choice == _ads_strafe) ads_strafe=1
if(vertical_choice == _button_swap) button_swap=1
if(vertical_choice == _quick_scope) quick_scope=1
}

if(event_press(OPTIONS))
{
make_other_settings()
save()
combo_run(saved)
}

if(sens_boost < 0) sens_boost=0
if(ads_strafe < 0) ads_strafe=0
if(button_swap < 0) button_swap=0
if(quick_scope < 0) quick_scope=0
if(sens_boost > 1) sens_boost=1
if(ads_strafe > 1) ads_strafe=1
if(button_swap > 1) button_swap=1
if(quick_scope > 1) quick_scope=1

}

const string other_function[]={"Other functions"}
const string other_functions[]={"sensboost","ads strafe","quick-scope","button swap"}

combo draw_other_settings
{
wait(10)
cls_oled(0)

print( 10, 2 , 0, 1, other_function[0])

if(!quick_scope) print( 5, 12 , 0, 1, other_functions[_sensboost])
print( 5, 22 , 0, 1, other_functions[_ads_strafe])
print( 5, 32 , 0, 1, other_functions[_quick_scope])
print( 5, 42 , 0, 1, other_functions[_button_swap])

print( 10, 54 , 0, 0, save[0])

if(!quick_scope)
{
if(vertical_choice == _sensboost) print( 95, 12 , 0, 0, yes_no[sens_boost])
else print( 90, 12 , 0, 1, yes_no[sens_boost])
}
if(vertical_choice == 1) print( 95, 22 , 0, 0, yes_no[ads_strafe])
else print( 90, 22 , 0, 1,yes_no[ads_strafe])
if(vertical_choice == _quick_scope) print( 95, 32 , 0, 0, yes_no[quick_scope])
else print( 90, 32 , 0, 1, yes_no[quick_scope])
if(vertical_choice == _button_swap) print( 95, 42 , 0, 0, yes_no[button_swap])
else print( 90, 42 , 0, 1, yes_no[button_swap])

}

int other_settings
function load_other_settings()
{
other_settings=get_pvar(SPVAR_7,-2147483648,2147483647,0)

sens_boost = test_bit(other_settings,_sensboost)
ads_strafe = test_bit(other_settings,_ads_strafe)
quick_scope = test_bit(other_settings,_quick_scope)
button_swap = test_bit(other_settings,_button_swap)

}

function make_other_settings()
{
if(sens_boost)set_bit(other_settings,_sensboost)
else clear_bit(other_settings,_sensboost)
if(ads_strafe)set_bit(other_settings,_ads_strafe)
else clear_bit(other_settings,_ads_strafe)
if(quick_scope)set_bit(other_settings,_quick_scope)
else clear_bit(other_settings,_quick_scope)
if(button_swap)set_bit(other_settings,_button_swap)
else clear_bit(other_settings,_button_swap)
}
/////////////////////////////////////////////////////////
int auto_run=TRUE,angle,auto_run_dz,cut_strafe
const string auto_run_settings = "Auto-run settings"
const string auto_run_functions[]={"auto-run","angle","dz"} //"cut-strafe",

function auto_run_settings()
{
block_all_input()
led(GREEN)

if((event_press(DOWN) || event_press(UP) || event_press(LEFT) || event_press(RIGHT) || event_press(TRIANGLE) )&& !combo_running(saved))
{
combo_run(draw_auto_run_settings)
}

if(vertical_choice < 0) vertical_choice = 0
if(vertical_choice > 3) vertical_choice = 3
if(!auto_run && vertical_choice > 0) vertical_choice = 0

if(event_press(DOWN)) vertical_choice++
if(event_press(UP)) vertical_choice--
if(event_press(LEFT))
{
if(vertical_choice == _autorun) auto_run--
//if(vertical_choice == _cut_strafe) cut_strafe--
if(vertical_choice == _angle) angle-=5
if(vertical_choice == _autorun_dz) auto_run_dz--

}
if(event_press(RIGHT))
{
if(vertical_choice == _autorun) auto_run++
//if(vertical_choice == _cut_strafe) cut_strafe++
if(vertical_choice == _angle) angle+=5
if(vertical_choice == _autorun_dz) auto_run_dz++

}

if(event_press(OPTIONS))
{
make_auto_run_info()
save()
combo_run(saved)
}

if(auto_run < 0) auto_run=0
if(cut_strafe < 0) cut_strafe=0
if(angle < 45) angle=40
if(auto_run_dz < 5) auto_run_dz=5


if(auto_run > 1) auto_run=1
if(cut_strafe > 1) cut_strafe=1
if(angle > 100) angle=100
if(auto_run_dz > 70) auto_run_dz=70

}

combo draw_auto_run_settings
{
wait(10)
cls_oled(0)

print( 5, 2 , 0, 1, auto_run_settings[0])
line_oled(0,12,127,12,1,1);

print( 5, 13 , 0, 1, auto_run_functions[_autorun])
if(auto_run)
{
//print( 5, 23 , 0, 1, auto_run_functions[_cut_strafe])
print( 20, 33 , 0, 1, auto_run_functions[_angle])
print( 35, 43 , 0, 1, auto_run_functions[_autorun_dz])
}

print( 10, 54 , 0, 0, save[0])

if(vertical_choice == _autorun) print( 70, 13 , 0, 0, yes_no[auto_run])
else print( 75, 13 , 0, 1, yes_no[auto_run])
if(auto_run)
{
//if(vertical_choice == _cut_strafe) print( 75, 23 , 0, 0, yes_no[cut_strafe])
//else print( 80, 23 , 0, 1, yes_no[cut_strafe])
if(vertical_choice == _angle && angle > 40) print( 65, 33 , 0, 0, num[100 + angle])
else if(vertical_choice != _angle && angle > 40) print( 70, 33 , 0, 1,num[100 + angle])
if(vertical_choice == _angle && angle == 40) print( 65, 33 , 0, 0,NO[0])
else if(vertical_choice != _angle && angle == 40) print( 70, 33 , 0, 1,NO[0])

if(vertical_choice == _autorun_dz) print( 65, 43 , 0, 0, num[100 + auto_run_dz])
else print( 70, 43 , 0, 1, num[100 + auto_run_dz])
}


}

function make_auto_run_info()
{
auto_run_info = auto_run_dz + angle*100 + cut_strafe*10000 + auto_run*100000
save()
}

int auto_run_info
function load_auto_run_settings()
{
auto_run_info=get_pvar(SPVAR_6,1,2147483647,104015)

auto_run = auto_run_info/100000
cut_strafe = (auto_run_info - auto_run*100000)/10000
angle = (auto_run_info - auto_run*100000 - cut_strafe*10000 )/100
auto_run_dz = auto_run_info - auto_run*100000 - cut_strafe*10000 - angle*100

}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
const string hip_strafe_settings = "Hip-strafe settings"
const string L3_strafe = "L3-strafe"
const string R2_strafe = "R2-strafe"
const string R1_strafe = "R1-strafe"
const string L2_strafe = "L2-strafe"
const string L1_strafe = "L1-strafe"

int l3_strafe,r2_strafe
function hip_strafe_settings()
{
block_all_input()
led(WHITE)

if((event_press(DOWN) || event_press(UP) || event_press(LEFT) || event_press(RIGHT) )&& !combo_running(saved))
{
combo_run(draw_hip_strafe_settings)
}

if(vertical_choice < 0) vertical_choice = 0
if(vertical_choice > 1) vertical_choice = 1
//if(quick_scope && vertical_choice > 0) vertical_choice = 0

if(event_press(DOWN)) vertical_choice++
if(event_press(UP)) vertical_choice--

if(event_press(LEFT))
{
if(vertical_choice == _l3_strafe) l3_strafe--
if(vertical_choice == _r2_strafe) r2_strafe--
}
if(event_press(RIGHT))
{
if(vertical_choice == _l3_strafe) l3_strafe++
if(vertical_choice == _r2_strafe) r2_strafe++
}

if(event_press(OPTIONS))
{
make_hip_strafe_info()
save()
combo_run(saved)
}

if(l3_strafe < 0) l3_strafe=0
if(r2_strafe < 0) r2_strafe=0

if(l3_strafe > 6) l3_strafe=6
if(r2_strafe > 6) r2_strafe=6

}

combo draw_hip_strafe_settings
{
wait(10)
cls_oled(0)

print( 0, 0 , 0, 1, hip_strafe_settings[0])
line_oled(0,10,127,10,1,1);
print( 1, 15 , 0, 1, L3_strafe[0])
if(!quick_scope && !button_swap) print( 1, 25 , 0, 1, R2_strafe[0])
if(quick_scope && !button_swap) print( 1, 25 , 0, 1, L2_strafe[0])
if(quick_scope && button_swap) print( 1, 25 , 0, 1, L1_strafe[0])
if(!quick_scope && button_swap) print( 1, 25 , 0, 1, R1_strafe[0])

print( 10, 54 , 0, 0, save[0])

if(vertical_choice == _l3_strafe)
{
print( 68, 15 , 0, 0, strafes[l3_strafe])
print( 20, 40 , 0, 1, strafes_[l3_strafe])
}
else print( 70, 15 , 0, 1, strafes[l3_strafe])
if(vertical_choice == _r2_strafe)
{
print( 68, 25 , 0, 0, strafes[r2_strafe])
print( 20, 40 , 0, 1, strafes_[r2_strafe])
}
else print( 70, 25 , 0, 1, strafes[r2_strafe])
}


function make_hip_strafe_info()
{
hip_strafe_info = r2_strafe + l3_strafe*10
save()
}

int hip_strafe_info
function load_hip_strafe_settings()
{
hip_strafe_info=get_pvar(SPVAR_5,1,2147483647,10)

l3_strafe = hip_strafe_info/10
r2_strafe = hip_strafe_info - l3_strafe*10

}
//////////////////////////////////////////////////////////////////////////////////////////////////
int killer
const string killer_str[]={" script"," stopped","CIRCLE x2 TO LEAVE"}

combo killer
{
wait(100)
cls_oled(0);
led(RED)
print( 20, 12 , 1, 1, killer_str[0]);
print( 15, 30 , 1, 1, killer_str[1]);
print( 0, 55 , 0, 1, killer_str[2]);
}

/////////////////////////////////////////////////////////////////////////////////////////////////

int antirecoil,afk,aim_assist_zone
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MAIN //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
main
{
//////////////////////////////
if(button_swap)
{
swap(L1,L2)
swap(R1,R2)
}
//////////////////////////
if(logo)
{
if(event_press(TRIANGLE) || event_press(OPTIONS))
{
logo=FALSE
combo_run(screen_cleaner);
}
}
if((get_ival(L2) || get_keyboard(KEY_M)) && !combo_running(saved))
{
if(event_press(OPTIONS) && get_brtime(OPTIONS)<200)
{
settings=TRUE
killer=FALSE;
combo_run(draw_settings)
combo_run(mini_vib)
}
}

if((event_press(PS) || event_press(OPTIONS) || event_press(SHARE)) && !get_ival(L2) && !draw_function && !settings)
{
killer=TRUE
combo_run(killer)
}
if( event_press(DOWN) && get_brtime(DOWN)<300 && !get_val(L2) && !draw_function && !settings)
{
killer=TRUE;
combo_run(killer)
}

if(killer)
{
if(event_press(CIRCLE) && get_brtime(CIRCLE)<200 )
{
killer=FALSE;
combo_run(screen_cleaner);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(settings)
{
settings();

if(event_press(CIRCLE) && !function_settings)
{
settings=FALSE
combo_run(screen_cleaner)
}
}
if(function_settings && !draw_function)
{
function_settings();

if(event_press(CIRCLE) && !combo_running(saved))
{
function_settings=FALSE
combo_run(draw_settings)
}
}

/////////////////////////////////////////////////////////////////////////////////
if(draw_function)
{

draw_function(settings_choice)
if(event_press(CIRCLE) && !combo_running(saved))
{
draw_function=FALSE
combo_run(screen_cleaner)
}

}
///////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(!killer && !settings && !draw_function)
{
if(event_press(UP) && get_brtime(UP)<200) //go to primary
{
primary=TRUE
secondary=FALSE
pistol=FALSE
combo_run(weapon)
weapon_swap()
}
if(event_press(TRIANGLE) && profile != _empty)
{
if(pistol) pistol=FALSE
else
{
primary=!primary
secondary=!secondary
}
if(get_brtime(TRIANGLE)<200) pistol=TRUE
weapon_swap()
combo_run(weapon)
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(quick_scope)
{
if(get_val(PS4_R2) && !get_val(PS4_L2))
{
set_val(PS4_L2,100)
}

}
//////////////////////////////////////////////////////////////////////////
if(get_val(L2)) //scope sens
{
sensitivity(RX, 50, 100 + x_ads)
sensitivity(RY, 50, 100 + y_ads)
}
else //hip sens
{
sensitivity(RX, curve_center, 100 + x_hip)
sensitivity(RY, curve_center, 100 + y_hip)
}
//////////////////////////////////////////////////
if(aim_assist_zone >8)
{
if(get_val(PS4_L2))
{
aim_assist()
}
else combo_stop(asu)
}

//////////////////////////////////////////////////////////////////////////////
if (y > 0 || x!=0)
{
if((get_val(L2)) && (get_val(R2))) //отдача
{
if(antirecoil == _casual_ar) casual_anti_recoil();
if(antirecoil == _smart_control_ar) smart_control_anti_recoil();
if(antirecoil == _hard_control_ar) hard_control_anti_recoil();
if(antirecoil == _sens_ar) sens_anti_recoil();
}
}
/////////////////////////////////////////////////////////////
if(rpm > 40) //кликер
{
if(get_val(R2) && get_val(L2)) combo_run(rapid_fire_fire)
else combo_stop(rapid_fire_fire)
}


//////////////////////////////////////////////////////////
if(auto_run) //бег
{
if (get_ipolar(POLAR_LS,POLAR_RADIUS) > auto_run_dz*100 && (!get_val(L2) && !quick_scope || quick_scope && !get_val(R2)))
{

if(!get_val(R2) && !get_val(L2) && angle > 40) auto_run();
if(!get_val(R2) && !get_val(L2) && cut_strafe) cut_strafe()
if(l3_strafe && get_val(L3)) //
{
set_val(L2,0)
set_val(R2,0)
strafe(l3_strafe)
in_strafe=TRUE
}
else if((r2_strafe || sens_boost) && (get_val(R2) || quick_scope && get_val(L2)))
{
set_val(L2,0)
set_val(R2,0)
if(sens_boost) sensitivity(RX, 10, 200)
if(r2_strafe)
{

if(event_release(L3)) stop_strafes()
in_strafe=TRUE
strafe(r2_strafe)
}
}
else if(in_strafe) stop_strafes()
set_val(L3,100)
}
else if(in_strafe) stop_strafes()
}

if(get_val(L2) && (get_ptime(R2) < 100 || get_ptime(R1) < 100 || get_ptime(L2) < 100 || get_ptime(L1) < 100)) stop_strafes()

if (ads_strafe)
{
if(get_val(L2) && get_val(R2) && (get_val(LY) > 50) )combo_run(strafe)
else combo_stop(strafe)
}
///////////////////////////////////////////////
if(get_val(L2) && event_press(LEFT) && get_brtime(LEFT)<200) afk=!afk
if(afk)
{
afk()
if(event_press(CIRCLE)) afk=FALSE
}

if(head_helper != 0 ) // head_helper
{
if(get_val(PS4_L2)) combo_run(head_helper)
if(!get_val(PS4_L2)) combo_stop(head_helper)
}

}
//set_val(TRACE_1,bool_l)
//set_val(TRACE_2,bool_r)}}
///////////////////////////////////////////////////////////////////////////////////
int lr
function auto_run() //автобег
{
if (get_val(LX)<-5) lr=-100
if (get_val(LX)>5) lr=100
if (get_val(LY)<-15 && 2*abs(get_val(LX)) < abs(get_val(LY))) set_val(LY,-100)
if ( get_val(LY)<-10 && 2*abs(get_val(LX))>= abs(get_val(LY)) && abs(get_val(LX))<2*abs(get_val(LY))) // up
{
set_val(LY,inv(angle))
set_val(LX,lr)
}
if (abs(get_val(LX))>3*abs(get_val(LY))) set_val(LX,lr) //meadle

}

function cut_strafe() //автобег
{

if (get_val(LX) < 0 && get_val(LY) > 0) //left
{
if (get_val(RX) > 0 )
{
set_val(LY,-100) // -100/-70
set_val(LX,+70)
}
if (get_val(RX) < 0 )
{
set_val(LY,75)
set_val(LX,-75)
}
}
if (get_val(LX) > 0 && get_val(LY) > 0) //right
{
if (get_val(RX) < 0 )
{
set_val(LY,-100) // -100/-70
set_val(LX,-70)
}
if (get_val(RX) > 0 )
{
set_val(LY,75)
set_val(LX,75)
}
}
}
////////////////////////////////////////////////////////////////////////////////
int in_strafe,strafe_side,strafe_timing
///////////////////////////////////////////////////////////////////////
function stop_strafes()
{
combo_stop(fast_cat_left)
combo_stop(fast_cat_right)
combo_stop(l_cut)
combo_stop(r_cut)
combo_stop(xbox_left)
combo_stop(xbox_right)
combo_stop(awd_left)
combo_stop(awd_right)
in_strafe=FALSE
}
/*
int bool_l,bool_r
function check()
{
if(get_val(LX)>0--)
if(combo_running(check_l) && !bool_r) combo_stop(check_r)
if(combo_running(check_r) && !bool_l) combo_stop(check_r)
combo_run(check_l)
combo_run(check_r)
}
combo check_l
{
if(get_val(LX) < 0) {
bool_r=FALSE
bool_l=TRUE
}
wait(750)
if(get_val(LX) < 0) bool_r=TRUE
wait(5000)

}
combo check_r
{
if(get_val(LX) > 0) {
bool_l=FALSE
bool_r=TRUE
}
wait(750)
if(get_val(LX) > 0) bool_l=TRUE
wait(5000)
}
*/
int strafe_type
function strafe(strafe_type) //распределение стрейфов, не трогать
{
if(strafe_type == _f_cat)
{ //fast cat strf
//sensitivity(RX, 50, 95)
if(get_val(LX) < -50) combo_run(fast_cat_left)
else combo_stop(fast_cat_left)
if(get_val(LX)> 50) combo_run(fast_cat_right)
else combo_stop(fast_cat_right)

//sensitivity(RX, 10, 200)
//combo_stop(sl2);combo_stop(sr2);combo_stop(sl3);combo_stop(sr3);combo_stop(sl4);combo_stop(sr4)
}
if(strafe_type == _left_cat)
{ //cat strf left
if (get_val(LX) > 0 )
{
set_val(LY,-100) // -100/-70
set_val(LX,+70)
}
if (get_val(LX) < 0 )
{
set_val(LY,75)
set_val(LX,-75)
}
//sensitivity(RX, 10, 200)
//combo_stop(sl2);combo_stop(sr2);combo_stop(sl3);combo_stop(sr3);combo_stop(sl4);combo_stop(sr4)
}
if(strafe_type == _right_cat ) //cat strf right
{
if(get_val(LX) < 0 ) // лево верх
{
set_val(LY,-100) // -100/-70
set_val(LX,-70)
}
if(get_val(LX) > 0 ) // парво врех
{
set_val(LY,75)
set_val(LX,75)
}
}
if(strafe_type == _auto_cat ) // auto cat-strf
{
if(get_val(LX) < 0) combo_run(l_cut)
//else combo_stop(auto_cat_left)
if(get_val(LX) > 0) combo_run(r_cut)
//else combo_stop(auto_cat_right)
}
if(strafe_type == _xbox) //xbox
{
//sensitivity(RX, 10, 200)
if(get_val(LX) < 0 ) combo_run(xbox_left)
else combo_stop(xbox_left)
if(get_val(LX)>0) combo_run(xbox_right)
else combo_stop(xbox_right)
}
if(strafe_type == _awd) // awd
{
//sensitivity(RX, 10, 200)
if(get_val(LX)<0) combo_run(awd_left)
else combo_stop(awd_left)
if(get_val(LX)>0) combo_run(awd_right)
else combo_stop(awd_right)
}
//if(run_fire==6)
}
///////////////////////////////////////////////////////////////
combo r_cut
{
set_val(LY,75)
set_val(LX,75)
wait(500)
set_val(LY,-100)
set_val(LX,-70)
wait(550)
}
combo l_cut
{
set_val(LY,75)
set_val(LX,-75)
wait(500)
set_val(LY,-100)
set_val(LX,70)
wait(550)
}
/////////////////////////////////////////////////////////////////////////////
combo fast_cat_right
{
set_val(LY,-100)
set_val(LX,-100)
wait(120)
set_val(LY,75)
set_val(LX,75)
wait(10000)
}
combo fast_cat_left
{
set_val(LY,-100)
set_val(LX,100)
wait(120)
set_val(LY,75)
set_val(LX,-75)
wait(10000)
}
/*
combo auto_cat_left // cat strf
{
//combo_stop(sr2);combo_stop(sl3);combo_stop(sr3);combo_stop(sl4);combo_stop(sr4)
set_val(LY,-100); // u can do lx & ly 80, and change wait to 350
set_val(LX,-100)
set_val(L3,100)
wait(300)
set_val(LY,50);
set_val(LX,-100)
set_val(L3,100)
wait(32000)
}

combo auto_cat_right
{
//combo_stop(sl2);combo_stop(sl3);combo_stop(sr3);combo_stop(sl4);combo_stop(sr4)
set_val(LY,-100);
set_val(LX,100)
set_val(L3,100)
wait(300)
set_val(LY,50);
set_val(LX,100)
set_val(L3,100)
wait(32000)
}
*/
////////
combo xbox_left // xbox
{
//combo_stop(sl2);combo_stop(sr2);combo_stop(sr3);combo_stop(sl4);combo_stop(sr4)
set_val(LY,-100);
set_val(LX,-100)
set_val(L3,00)
wait(150)

set_val(LY,50);
set_val(LX,-100)
set_val(L3,100)
wait(32000)
}
combo xbox_right
{
//combo_stop(sl2);combo_stop(sr2);combo_stop(sl3);combo_stop(sl4);combo_stop(sr4)
set_val(LY,-100);
set_val(LX,100)
set_val(L3,00)
wait(150)

set_val(LY,50);
set_val(LX,100)
set_val(L3,100)
wait(32000)
}
//////////////
combo awd_left //awd
{
//combo_stop(sl2);combo_stop(sr2);combo_stop(sl3);combo_stop(sr3);combo_stop(sr4)
set_val(LY,-85);
set_val(LX,-85)
set_val(L3,100)
wait(290) //250-300

set_val(LY,0);
set_val(LX,-100)
set_val(L3,100)
wait(32000)
}

combo awd_right
{
//combo_stop(sl2);combo_stop(sr2);combo_stop(sl3);combo_stop(sr3);combo_stop(sl4);
set_val(LY,-85);
set_val(LX,85)
set_val(L3,100)
wait(290)

set_val(LY,0);
set_val(LX,100)
set_val(L3,100)
wait(32000)
}
/////////////////////////////////////////////////////////////////////////
int strafe_time=100
combo strafe
{
set_val(LX,100)
set_val(LY,0)
wait(strafe_time)
set_val(LX,0)
set_val(LY,100)
wait(strafe_time)
set_val(LX,-100)
set_val(LY,0)
wait(strafe_time)
set_val(LX,0)
set_val(LY,-100)
wait(strafe_time)

}
//////////////////////////////////////////////////////////////////////////
int x1,y1

function casual_anti_recoil() // как в паке камьюнити
{
x1=x
y1=y
if (x1 < -100) x1= -100
if (x1 > 100) x1= 100
if (y1 < -100) y1= -100
if (y1 > 100) y1= 100
if((get_val(RY) < -5) || (get_val(RY) > y)) y1=get_val(RY)
if(abs(get_val(RX))> abs(x)) x1=get_val(RX)
set_val(RX,x1)
set_val(RY,y1)
}

function smart_control_anti_recoil() // отдача прикладного матекматика(моя)
{
x1=x+get_val(RX)
y1=y+get_val(RY)
if (x1 < -100) x1= -100
if (x1 > 100) x1= 100
if(get_val(RY)<0 && get_val(RY)> inv(y)) y1=y+get_val(RY)*2
if(get_val(RY)<= inv(y)) y1=get_val(RY)
if(get_val(RY)>0 && get_val(RY)< 2*y) y1=y+get_val(RY)/2
if(get_val(RY)>= 2*y) y1=get_val(RY)
set_val(RX,x1)
set_val(RY,y1)
}

function hard_control_anti_recoil() // предвигает центр - оч редко полезна
{
x1=x+get_val(RX)
y1=y+get_val(RY)
if (x1 < -100) x1= -100
if (x1 > 100) x1= 100
if(get_val(RY)<0 && get_val(RY)> inv(y)) y1=y+get_val(RY)*2
if(get_val(RY)<= inv(y)) y1=get_val(RY)
if(get_val(RX)>90) x1=100
if(get_val(RX)<-90) x1=-100
set_val(RX,x1)
set_val(RY,y1)
}

function sens_anti_recoil() //меняет сенсу во время стрельбы / change sense while u shooting
{
sensitivity(RY, 50, 100+ y )
sensitivity(RX, 50, 100+ x )
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
combo rapid_fire_fire // кликер - rapid_fire fire
{
set_val(R2, 100)
wait(50)
set_val(R2, 0)
wait(hold_time)//hold time
set_val(R2, 0)
}

///////////////////////////////////////////////////////////////////////////////////////////////////////
combo mini_vib
{
set_rumble(RUMBLE_B,75)
set_rumble(RUMBLE_A,75)
wait(100)
reset_rumble();
reset_leds();
//cls_oled(0);
}

const string saved[]={"saved"}
combo saved
{
cls_oled(0)
print( 20, 20 , 2, 1,saved[0])
set_rumble(RUMBLE_B,30)
set_rumble(RUMBLE_A,30)
led(GREEN)
wait(100)
print( 20, 20 , 2, 0,saved[0])
set_rumble(RUMBLE_B,90)
set_rumble(RUMBLE_A,90)
led(WHITE)
wait(100)
print( 20, 20 , 2, 1,saved[0])
set_rumble(RUMBLE_B,30)
set_rumble(RUMBLE_A,30)
led(GREEN)
wait(100)
print( 20, 20 , 2, 0,saved[0])
set_rumble(RUMBLE_B,90)
set_rumble(RUMBLE_A,90)
led(WHITE)
wait(100)
print( 20, 20 , 2, 1,saved[0])
set_rumble(RUMBLE_B,70)
set_rumble(RUMBLE_A,70)
led(GREEN)
wait(250)
print( 20, 20 , 2, 0,saved[0])
set_rumble(RUMBLE_B,70)
set_rumble(RUMBLE_A,70)
led(WHITE)
wait(250)
reset_rumble();
reset_leds();

if(settings_choice > _profile && settings_choice <_antirecoil ) combo_run(load_and_draw_function)
else combo_run(draw_function_settings)

}
///////////////////////////////////////////////////////////////////////////////////////////
combo weapon
{
if(primary && !pistol) print( 10, 35 , 0, 1, weapons[0])
if(secondary && !pistol) print( 10, 35 , 0, 1, weapons[1])
if(pistol) print( 10, 35 , 0, 1, weapons[2])
wait(10)
}

///////////////////////////////////////////////////////////////////////////////////////////////////
int press_left,press_right;
combo press_button_left
{
if(function_settings)
{
if(function_value > f_min)print( 1, 25 , 1, 1, arrows[0])
}
else
{
if(settings_choice > 0) print( 1, 1 , 1, 1, arrows[0])
}

wait(100)

if(function_settings)
{
if(function_value > f_min)print( 1, 25 , 1, 0, arrows[0])
}
else
{
if(settings_choice > 0) print( 1, 1 , 1, 0, arrows[0])
}
}
combo press_button_right
{
if(function_settings)
{
if(function_value < f_max)print( 117, 25 , 1, 1, arrows[1])
}
else
{
if(settings_choice < 3) print( 117, 1 , 1, 1, arrows[1])
}

wait(100)

if(function_settings)
{
if(function_value < f_max)print( 117, 25 , 1, 0, arrows[1])
}
else
{
if(settings_choice < 3) print( 117, 1 , 1, 0, arrows[1])
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int head_helper
combo head_helper{
wait(180)
set_val(PS4_RY,-100)
wait(10+head_helper)
wait(15000)
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int afk_time;
const string afk_str[]={"AFK"}
function afk()
{
cls_oled(0)
afk_time=200 - get_val(RX)
combo_run(afk)
print( 40, 20 , 2, 1, afk_str[0])
print( 60, 45 , 0, 1, num[200 + inv((afk_time - 100)/ 2)])
}
combo afk
{
led(PINK)
set_val(LY,20)
set_val(LX,-40)
wait(afk_time)
led(WHITE)
set_val(LY,-20)
set_val(LX,40)
wait(afk_time)
reset_leds();
cls_oled(0)
}
////////////////////////////////////////////////////////////////////
User avatar
al_allan
Private
Private
 
Posts: 1
Joined: Sat Apr 01, 2023 1:27 pm

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 147 guests

cron