GTUNER IV
FILES: 2
THUMBS-UP: 0
DOWNLOADS: 590
v 1.00 - Jun 5, 2020
legitclouds (Verena_srh)
#pragma METAINFO("Apex3", 1, 0, "legitclouds")
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------CONFIG & SETUP SECTION-------------------------------------------------------------------------------------------------------------//
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
#define float fix32
//--Controls
#define VIEW BUTTON_18
#define MENU BUTTON_3
#define RB BUTTON_4
#define RT BUTTON_5
#define RS BUTTON_6
#define LB BUTTON_7
#define LT BUTTON_8
#define LS BUTTON_9
#define RX STICK_1_X
#define RY STICK_1_Y
#define LX STICK_2_X
#define LY STICK_2_Y
#define UP BUTTON_10
#define DOWN BUTTON_11
#define LEFT BUTTON_12
#define RIGHT BUTTON_13
#define Y BUTTON_14
#define B BUTTON_15
#define A BUTTON_16
#define X BUTTON_17
#define NOT_USE 0.0

//ANTI-RECOIL VALUES
bool AntiRecoil = TRUE;
float antirecoil = 33.4;
int delayA = 15;

//Autorun
int AutoRun = TRUE;

//--Dropshot - LT/L2 + A/X
bool DropShot = FALSE;
int dsdown = 20;
int dsup = 210;

//--Rapidfire - LT/L2 + Right
bool RapidFire = FALSE;

// Define the refresh rate of the combo
// Big value --> effect not perceived
// Small value --> cause aim jitter
//
int Sampling_Time = 5;
//
//#################################################################################################
//
// Add speed boost to initial joystick movement
// Big value --> you loose sticky aim bubble
//
float Aim_Boost;
//
//#################################################################################################
//
// Compensate the acceleration of the movement introduced by the boost by reducing this value
//
float Aim_Correction;
//
//#################################################################################################
//
// the algorithm saves two movements positions. the current position and the previous position.
// sampling frequency is defined by Sampling_Time.
// if the difference between the current value and the preceding value doesn't exceeds Aim_Perfection_Limit.
// the aimbot algorithm will execute
// i add this parameter to avoid floaty movement when you try to track a target
//
float Aim_Perfection_Limit = 34.2;
//
//#################################################################################################
//
//operating aim perfection interval
//
float POS_Aim_Limit = 71.4;
//
//#################################################################################################
//
//operating spiroide aim assist interval
//
float POS_Micro_MVT_Limit;
float NEG_Micro_MVT_Limit;
//
//#################################################################################################
//######################################### Script variable #######################################
//#################################################################################################
//
// Dont't change!
//
float X_Last_Value = 0.0;
float Y_Last_Value = 0.0;
float X_Current_Value = 0.0;
float Y_Current_Value = 0.0;
bool Sampling_Done = FALSE;
//
float spiroide_pulse = 0.0;
float fine_pulse = 0.0;
//
// Joystick calibration value
bool Joystick_calibration = FALSE;
float RX_Axis_Joystick_calibrate = -0.39;
float RY_Axis_Joystick_calibrate = -0.39;

//Aim Correction Aim Assist Booster
bool AIM__CORRECT = TRUE;
float IN_GAME_SENS=3.0;

//AIM CORRECTION SENSITIVITY VALUES:
float ADS_SENS, GEN_SENS=100.0, HIP_SENS=100.0, ADS_FIRE_SENS, Use_sens;

//Aim Assist - Default/Starting
bool AimAssist = TRUE;
float aav = 24.3;// AIM ASSIST VALUES
int delay = 5;

//More
float special;
float special1;

//--------------------------------------------------------------------------------------------------------MAIN SECTION----------------------------------------------------------------------------------------------------//
main {
//Aim Correction Stuff
ADS_SENS=105.0-(IN_GAME_SENS*2.0);
ADS_FIRE_SENS=100.0-(IN_GAME_SENS*2.0);

//AIM ASSIST
if (AimAssist) {
if (get_val(LT)> 98.0){ combo_run(cAimAssist);}
}
if (abs(get_val(RX)) > aav || abs(get_val(RY)) > aav){combo_stop(cAimAssist);}

//AutoRun
if(AutoRun){if(abs(get_actual(LY) <= 18.0)){
set_val(LS, 100.0);
}}

//Sweet Evil configurator
//Short Range Values
if(get_actual(LT) > 98.0){
Aim_Boost = 21.2;
Aim_Correction = 31.2;
POS_Micro_MVT_Limit = 35.0;
NEG_Micro_MVT_Limit = -35.0;
special = 28.3;
special1 = 28.3;
}
//Long Range Values
if(get_actual(LT) < 98.0) {
Aim_Boost = 12.2;
Aim_Correction = 18.2;
POS_Micro_MVT_Limit = 25.0;
NEG_Micro_MVT_Limit = -25.0;
special = 24.3;
special1 = 24.3;
}

//Aim Assist Sweet Evil
if (Joystick_calibration == FALSE)
{
RX_Axis_Joystick_calibrate = get_actual(RX);
RY_Axis_Joystick_calibrate = get_actual(RY);
Joystick_calibration = TRUE;
}

X_Last_Value = X_Current_Value;
Y_Last_Value = Y_Current_Value;
X_Current_Value = get_prev(RX)- RX_Axis_Joystick_calibrate;
Y_Current_Value = get_prev(RY)- RY_Axis_Joystick_calibrate;

//--LT pulled
if(get_actual(LT))
{
//--current & last value less than limit
if(abs(X_Current_Value) <= POS_Micro_MVT_Limit && abs(Y_Current_Value) <= POS_Micro_MVT_Limit)
{
//--both have a value
//if(X_Last_Value && X_Current_Value)
//{
//--difference between the 2 values less than 15
if(abs(X_Last_Value - X_Current_Value) < special)
{
combo_stop(Aim_Assist_Perfection);
Sampling_Done = FALSE;

//--RT pulled more than 95%
if(get_actual(RT) > 95.0)
{
combo_stop(Fine_Tune_Aim);
fine_pulse = 0.0;
combo_run(spiroide_Aim_Assit);
}
else
{
combo_stop(spiroide_Aim_Assit);
spiroide_pulse = 0.0;
combo_run(Fine_Tune_Aim);
}
}
}
//--current and last greater than limit
else if(abs(X_Current_Value) <= POS_Aim_Limit && abs(Y_Current_Value) <= POS_Aim_Limit)
{
combo_stop(Fine_Tune_Aim);
combo_stop(spiroide_Aim_Assit);
spiroide_pulse = 0.0;
fine_pulse = 0.0;
combo_run(Aim_Assist_Perfection);
}
}
else //--LT not pulled
{
combo_stop(Fine_Tune_Aim);
combo_stop(spiroide_Aim_Assit);
combo_stop(Aim_Assist_Perfection);
spiroide_pulse = 0.0;
fine_pulse = 0.0;
Sampling_Done = FALSE;
}

//Aim Correction
if(AIM__CORRECT)
{
if(get_val(RT) && get_val(LT))
{
Use_sens = ADS_FIRE_SENS;
}
if(get_val(RT) && !get_val(LT))
{
Use_sens = HIP_SENS;
}
if(!get_val(RT) && !get_val(LT))
{
Use_sens = GEN_SENS;
}
if(!get_val(RT) && get_val(LT))
{
Use_sens = ADS_SENS;
}
if (Use_sens >100.0) Use_sens=100.0;

sensitivity(RX, NOT_USE, Use_sens);
sensitivity(RY, NOT_USE, Use_sens);
}

//--Rapidfire
if(get_val(LT) && event_active(RIGHT)){
rumble_A_if_true(RapidFire);
RapidFire =! RapidFire;
}
if(RapidFire){
if(get_actual(RT)){
combo_run(Rapidfire);
}
}

//ANTI-RECOIL
if(AntiRecoil){
if(get_val(RT))
{combo_run(Antirecoil);}

if(abs(get_actual(RY)) >= antirecoil + 10.0)
{combo_stop(Antirecoil);}
}

//--Dropshot
if(get_val(LT) && event_active(A)){
rumble_A_if_true(DropShot);
DropShot =! DropShot;
}
if(DropShot){
if(get_val(LT)&&get_val(RT)){combo_run(cDropShot);}
}

}
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
//--------------------------------------------------------------------------------------------------------COMBO SECTION-----------------------------------------------------------------------------------------------------------------//
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
combo Antirecoil {
set_val(RY, antirecoil);
wait(delayA);
set_val(RY, antirecoil);
wait(delayA);
}
combo cAimAssist {
set_val(RX, (aav)); wait(delay);
set_val(RY, (aav)); wait(delay);
set_val(RX, aav * -1.0); wait(delay);
set_val(RY, aav * -1.0); wait(delay);
}
combo Aim_Assist_Perfection
{
// Save the first joystick position
X_Last_Value = X_Current_Value;
Y_Last_Value = Y_Current_Value;

// Sampling frequency
wait(Sampling_Time);

// Save the second joystick position
X_Current_Value = get_prev(RX)- RX_Axis_Joystick_calibrate;
Y_Current_Value = get_prev(RY)- RY_Axis_Joystick_calibrate;

if (Sampling_Done == TRUE )
{
//Applying BOOST
//Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS )
Aim_Perfection(X_Last_Value, X_Current_Value, 1.0, 0.0, 1.0, 0.0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 1.0, 0.0, 0.0, 1.0 );
}

X_Last_Value = X_Current_Value;
Y_Last_Value = Y_Current_Value;

// Sampling frequency
wait(Sampling_Time);

// Save the second joystick position
X_Current_Value = get_prev(RX)- RX_Axis_Joystick_calibrate;
Y_Current_Value = get_prev(RY)- RX_Axis_Joystick_calibrate;

if (Sampling_Done == TRUE )
{
//Applying CORRECTION
//Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS )
Aim_Perfection(X_Last_Value, X_Current_Value, 0.0, 1.0, 1.0, 0.0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 0.0, 1.0, 0.0, 1.0 );
}

Sampling_Done = TRUE;
wait(Sampling_Time);
}

combo Fine_Tune_Aim {

set_val(RX,(30.0 - fine_pulse));//right
set_val(LX,(-30.0 + fine_pulse));//move left
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(30.0 - fine_pulse));//right+down
set_val(RY,(20.0 - fine_pulse));
set_val(LX,(-10.0 + fine_pulse));//move left
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);


set_val(RY,(20.0 - fine_pulse));// down
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(-30.0 + fine_pulse));//left+down
set_val(RY,(20.0 - fine_pulse));
set_val(LX,(10.0 - fine_pulse));//move right
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(-30.0 + fine_pulse));// left
set_val(LX,(30.0 - fine_pulse));//move right
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(-30.0 + fine_pulse)); //left + up
set_val(RY,(-20.0 + fine_pulse));
set_val(LX,(10.0 - fine_pulse));//move right
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);

set_val(RY,(-20.0 + fine_pulse)); //up
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(30.0 - fine_pulse));//right+up
set_val(RY,(-20.0 + fine_pulse));
set_val(LX,(-10.0 + fine_pulse));//move left
wait(Sampling_Time);

wait(Sampling_Time);

fine_pulse = fine_pulse + 4.0;


if ( fine_pulse > special1)
{
fine_pulse = 0.0;
}
}

combo spiroide_Aim_Assit {

set_val(RX,(10.0 + spiroide_pulse));//right
set_val(LX,(-30.0+ spiroide_pulse));//move left
wait(Sampling_Time);

wait(Sampling_Time);


set_val(RY,(10.0 + spiroide_pulse));// down
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);

set_val(RX,(-10.0 - spiroide_pulse));//left
set_val(LX,30.0 - spiroide_pulse );//move right
wait(Sampling_Time);

wait(Sampling_Time);

set_val(RY,(10.0 + spiroide_pulse));// down
wait(Sampling_Time);

wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);


spiroide_pulse = spiroide_pulse + 4.0;


if ( spiroide_pulse > special1)
{
spiroide_pulse = 0.0;
}
}

void Aim_Perfection(float Last_Value, float Current_Value, float Boost, float Correction, float X_AXIS, float Y_AXIS )
{
if(abs(Last_Value - Current_Value) < Aim_Perfection_Limit)
{
//--moving right
if(Last_Value < Current_Value)
{
if (Boost)
{
if (X_AXIS)
set_val(RX, (Current_Value + Aim_Boost));

if (Y_AXIS)
set_val(RY, (Current_Value + Aim_Boost));
}

else if(Correction)
{
if (X_AXIS)
set_val(RX, (Current_Value - Aim_Correction));

if (Y_AXIS)
set_val(RY, (Current_Value - Aim_Correction));
}
}
else //--moving left
{

if (Boost)
{
if (X_AXIS)
set_val(RX, (Current_Value - Aim_Boost));

if (Y_AXIS)
set_val(RY, (Current_Value - Aim_Boost));
}


else if(Correction)
{
if (X_AXIS)
set_val(RX, (Current_Value + Aim_Correction));

if (Y_AXIS)
set_val(RY, (Current_Value + Aim_Correction));
}
}
}
}
combo Rapidfire {
set_val(RT, 100.0);
wait(120);
set_val(RT, 0.0);
wait(30);
}
combo VIBRATE {
wait(300);
ffb_reset();
}
void rumble_A_if_true(int var) {
if (var)ffb_set(FFB_1, 100.0, 300);
else ffb_set(FFB_2, 100.0, 300);
combo_run(VIBRATE);
}
void sensitivity(int id, float mid, float sen) {
float val = get_actual(id);

if(mid != NOT_USE) {
float val_s = (val >= 0.0) ? 1.0 : -1.0;
val *= val_s;
if(val <= mid) val = (val * 50.0) / mid;
else val = ((50.0 * (val - mid)) / (100.0 - mid)) + 50.0;
val *= val_s;
}

if(sen != NOT_USE) {
val = (val * sen) / 100.0;
}

set_val(id, clamp(val, -100.0, 100.0));
return;
}
combo cDropShot{
set_val(RS,100);
wait(dsdown);
wait(dsup);
set_val(RS,100);
}
File List:
  • apex2.gbc
  • apex2.gpc
Gtuner IV
Download this work using Gtuner IV software.