0% found this document useful (0 votes)
98 views4 pages

Optimized Warzone Script

The document outlines a configuration script for a PS5 controller, detailing button mappings, variables for weapon management, aim assist, and anti-recoil features. It includes functions for applying dead zones, activating/deactivating the script, and handling rapid fire and aim assist modes. Additionally, it incorporates haptic feedback notifications for various actions such as weapon changes and mode adjustments.

Uploaded by

chrispich72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views4 pages

Optimized Warzone Script

The document outlines a configuration script for a PS5 controller, detailing button mappings, variables for weapon management, aim assist, and anti-recoil features. It includes functions for applying dead zones, activating/deactivating the script, and handling rapid fire and aim assist modes. Additionally, it incorporates haptic feedback notifications for various actions such as weapon changes and mode adjustments.

Uploaded by

chrispich72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

// Configuration des boutons et axes

// Utiliser soit les constantes système, soit vos propres définitions


// Si vous utilisez les constantes système, supprimez ces définitions
int MY_PS5_LX = 1;
int MY_PS5_LY = 2;
int MY_PS5_RX = 3;
int MY_PS5_RY = 4;
int MY_PS5_L2 = 7;
int MY_PS5_R2 = 8;
int MY_PS5_OPTIONS = 9;
int MY_PS5_TRIANGLE = 12;
int MY_PS5_UP = 14;
int MY_PS5_L3 = 10;
int MY_PS5_SQUARE = 13;

// Variables principales
int script_enabled = TRUE;
int weapon_slot = 1;
int ping_timer = 0;
int ping_interval = 3000;
int rapid_fire_delay = 40;

// Variables pour l'aim assist optimisé


int aim_assist_intensity_x = 25; // Intensité horizontale (1-100)
int aim_assist_intensity_y = 10; // Intensité verticale (1-100)
int aim_assist_speed = 8; // Vitesse d'oscillation (plus petit = plus
rapide)
int aim_assist_mode = 1; // 1 = standard, 2 = précision, 3 = agressif

// Variables pour les zones mortes


int left_stick_deadzone = 8; // Zone morte du joystick gauche (0-100)
int right_stick_deadzone = 6; // Zone morte du joystick droit (0-100)

// Variables pour l'anti-recul


int recoil_comp_vert_1 = 25; // Compensation verticale pour l'arme 1
int recoil_comp_vert_2 = 15; // Compensation verticale pour l'arme 2

// Fonction pour appliquer la zone morte


int apply_deadzone(int input, int deadzone) {
if (abs(input) < deadzone) {
return 0;
} else {
int direction = (input > 0) ? 1 : -1;
return direction * (abs(input) - deadzone) * 100 / (100 - deadzone);
}
}

main {
// Gestion des zones mortes (ATTENTION: Pour utiliser cette partie, assurez-
vous que votre version de GPC supporte abs() et ces opérations)
// Si cette partie cause des erreurs, vous pouvez la désactiver en la
commentant
/*
int lx_val = get_val(PS5_LX);
int ly_val = get_val(PS5_LY);
int rx_val = get_val(PS5_RX);
int ry_val = get_val(PS5_RY);

lx_val = apply_deadzone(lx_val, left_stick_deadzone);


ly_val = apply_deadzone(ly_val, left_stick_deadzone);
rx_val = apply_deadzone(rx_val, right_stick_deadzone);
ry_val = apply_deadzone(ry_val, right_stick_deadzone);

set_val(PS5_LX, lx_val);
set_val(PS5_LY, ly_val);
set_val(PS5_RX, rx_val);
set_val(PS5_RY, ry_val);
*/

// Activation/désactivation du script
if (get_val(PS5_L2) && event_press(PS5_OPTIONS)) {
script_enabled = !script_enabled;
combo_run(RumbleNotify);
}

if (script_enabled) {
// Changement d'arme
if (event_press(PS5_TRIANGLE)) {
if (weapon_slot == 1) {
weapon_slot = 2;
} else {
weapon_slot = 1;
}
combo_run(RumbleSlot);
}

// Raccourcis pour sélectionner l'arme directement


if (event_press(PS5_L3)) {
weapon_slot = 1;
combo_run(RumbleSlot);
}

if (event_press(PS5_UP)) {
weapon_slot = 2;
combo_run(RumbleSlot);
}

// Changement de mode d'aim assist


if (get_val(PS5_L2) && event_press(PS5_SQUARE)) {
aim_assist_mode = aim_assist_mode + 1;
if (aim_assist_mode > 3) aim_assist_mode = 1;
combo_run(RumbleMode);
}

// Anti-recul
if (get_val(PS5_R2) && get_val(PS5_L2)) {
if (weapon_slot == 1) set_val(PS5_LY, recoil_comp_vert_1);
else if (weapon_slot == 2) set_val(PS5_LY, recoil_comp_vert_2);
}

// Tir rapide
if (get_val(PS5_R2) && !get_val(PS5_L2)) {
combo_run(RapidFire);
}

// Aim assist
if (get_val(PS5_L2)) {
combo_run(AimAssist);
} else {
combo_stop(AimAssist);
}

// Ping automatique
if (ping_timer <= 0) {
combo_run(AutoPing);
ping_timer = ping_interval;
} else {
ping_timer -= get_rtime();
}
} else {
set_val(PS5_LY, 0);
}
}

// Combo tir rapide


combo RapidFire {
set_val(PS5_R2, 100);
wait(20);
set_val(PS5_R2, 0);
wait(rapid_fire_delay);
}

// Combo aim assist amélioré


combo AimAssist {
if (aim_assist_mode == 1) {
// Mode standard - oscillation douce
set_val(PS5_RX, aim_assist_intensity_x);
set_val(PS5_RY, aim_assist_intensity_y);
wait(aim_assist_speed);
set_val(PS5_RX, -aim_assist_intensity_x);
set_val(PS5_RY, -aim_assist_intensity_y);
wait(aim_assist_speed);
}
else if (aim_assist_mode == 2) {
// Mode précision - petits mouvements, plus adaptés au sniping
set_val(PS5_RX, aim_assist_intensity_x / 2);
set_val(PS5_RY, aim_assist_intensity_y / 3);
wait(aim_assist_speed * 2);
set_val(PS5_RX, -aim_assist_intensity_x / 2);
set_val(PS5_RY, -aim_assist_intensity_y / 3);
wait(aim_assist_speed * 2);
}
else if (aim_assist_mode == 3) {
// Mode agressif - pour combat rapproché
set_val(PS5_RX, aim_assist_intensity_x * 1.2);
set_val(PS5_RY, aim_assist_intensity_y);
wait(aim_assist_speed / 2);
set_val(PS5_RX, -aim_assist_intensity_x * 1.2);
set_val(PS5_RY, -aim_assist_intensity_y);
wait(aim_assist_speed / 2);
}
}

// Combo ping automatique


combo AutoPing {
set_val(PS5_UP, 100);
wait(100);
set_val(PS5_UP, 0);
}

// Retour haptique pour notification


combo RumbleNotify {
set_rumble(RUMBLE_A, 100);
wait(300);
reset_rumble();
}

// Retour haptique pour changement d'arme


combo RumbleSlot {
set_rumble(RUMBLE_A, 100);
wait(200);
reset_rumble();
wait(100);
set_rumble(RUMBLE_A, 100);
wait(200);
reset_rumble();
}

// Retour haptique pour changement de mode


combo RumbleMode {
int i;
for (i = 0; i < aim_assist_mode; i++) {
set_rumble(RUMBLE_A, 100);
wait(100);
reset_rumble();
wait(100);
}
}

You might also like