0% found this document useful (0 votes)
364 views8 pages

Optimized Warzone Script

The document is a configuration script for a PS5 controller, detailing button mappings, variables for gameplay features like aim assist and rapid fire, and a menu for adjusting settings. It includes functions for applying dead zones, managing weapon slots, and providing haptic feedback for various actions. The script allows users to customize their gaming experience by modifying parameters related to aim assist intensity, recoil compensation, and more.

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)
364 views8 pages

Optimized Warzone Script

The document is a configuration script for a PS5 controller, detailing button mappings, variables for gameplay features like aim assist and rapid fire, and a menu for adjusting settings. It includes functions for applying dead zones, managing weapon slots, and providing haptic feedback for various actions. The script allows users to customize their gaming experience by modifying parameters related to aim assist intensity, recoil compensation, and more.

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_DOWN = 15;
int MY_PS5_LEFT = 16;
int MY_PS5_RIGHT = 17;
int MY_PS5_L3 = 10;
int MY_PS5_R3 = 11;
int MY_PS5_SQUARE = 13;
int MY_PS5_CIRCLE = 5;
int MY_PS5_X = 6;

// 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 le menu de configuration


int in_menu = FALSE;
int menu_page = 1;
int menu_option = 1;
int menu_max_pages = 3;
int menu_max_options = 5;

// 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);
}

// Activation du menu de configuration (maintenir L3+R3)


if (get_val(PS5_L3) && get_val(PS5_R3) && event_press(PS5_OPTIONS)) {
in_menu = !in_menu;
if (in_menu) {
menu_page = 1;
menu_option = 1;
combo_run(RumbleMenu);
} else {
combo_run(RumbleNotify);
}
}

// Si dans le menu de configuration


if (in_menu) {
// Navigation dans le menu
if (event_press(PS5_RIGHT)) {
menu_page++;
if (menu_page > menu_max_pages) menu_page = 1;
menu_option = 1;
combo_run(RumbleOption);
}

if (event_press(PS5_LEFT)) {
menu_page--;
if (menu_page < 1) menu_page = menu_max_pages;
menu_option = 1;
combo_run(RumbleOption);
}

if (event_press(PS5_UP)) {
menu_option--;
if (menu_option < 1) menu_option = menu_max_options;
combo_run(RumbleOption);
}

if (event_press(PS5_DOWN)) {
menu_option++;
if (menu_option > menu_max_options) menu_option = 1;
combo_run(RumbleOption);
}

// Ajustement des valeurs avec X (augmenter) et Circle (diminuer)


if (menu_page == 1) { // Page 1: Aim Assist
if (menu_option == 1) { // Mode Aim Assist
if (event_press(PS5_X)) {
aim_assist_mode++;
if (aim_assist_mode > 3) aim_assist_mode = 1;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
aim_assist_mode--;
if (aim_assist_mode < 1) aim_assist_mode = 3;
combo_run(RumbleValue);
}
}
else if (menu_option == 2) { // Intensité X
if (event_press(PS5_X)) {
aim_assist_intensity_x += 5;
if (aim_assist_intensity_x > 100) aim_assist_intensity_x = 100;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
aim_assist_intensity_x -= 5;
if (aim_assist_intensity_x < 0) aim_assist_intensity_x = 0;
combo_run(RumbleValue);
}
}
else if (menu_option == 3) { // Intensité Y
if (event_press(PS5_X)) {
aim_assist_intensity_y += 5;
if (aim_assist_intensity_y > 100) aim_assist_intensity_y = 100;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
aim_assist_intensity_y -= 5;
if (aim_assist_intensity_y < 0) aim_assist_intensity_y = 0;
combo_run(RumbleValue);
}
}
else if (menu_option == 4) { // Vitesse
if (event_press(PS5_X)) {
aim_assist_speed += 1;
if (aim_assist_speed > 20) aim_assist_speed = 20;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
aim_assist_speed -= 1;
if (aim_assist_speed < 1) aim_assist_speed = 1;
combo_run(RumbleValue);
}
}
}
else if (menu_page == 2) { // Page 2: Anti-recul
if (menu_option == 1) { // Anti-recul arme 1
if (event_press(PS5_X)) {
recoil_comp_vert_1 += 5;
if (recoil_comp_vert_1 > 100) recoil_comp_vert_1 = 100;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
recoil_comp_vert_1 -= 5;
if (recoil_comp_vert_1 < 0) recoil_comp_vert_1 = 0;
combo_run(RumbleValue);
}
}
else if (menu_option == 2) { // Anti-recul arme 2
if (event_press(PS5_X)) {
recoil_comp_vert_2 += 5;
if (recoil_comp_vert_2 > 100) recoil_comp_vert_2 = 100;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
recoil_comp_vert_2 -= 5;
if (recoil_comp_vert_2 < 0) recoil_comp_vert_2 = 0;
combo_run(RumbleValue);
}
}
}
else if (menu_page == 3) { // Page 3: Autres réglages
if (menu_option == 1) { // Délai Tir Rapide
if (event_press(PS5_X)) {
rapid_fire_delay += 5;
if (rapid_fire_delay > 100) rapid_fire_delay = 100;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
rapid_fire_delay -= 5;
if (rapid_fire_delay < 10) rapid_fire_delay = 10;
combo_run(RumbleValue);
}
}
else if (menu_option == 2) { // Intervalle Ping
if (event_press(PS5_X)) {
ping_interval += 500;
if (ping_interval > 10000) ping_interval = 10000;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
ping_interval -= 500;
if (ping_interval < 0) ping_interval = 0;
combo_run(RumbleValue);
}
}
else if (menu_option == 3) { // Zone morte joystick gauche
if (event_press(PS5_X)) {
left_stick_deadzone += 1;
if (left_stick_deadzone > 20) left_stick_deadzone = 20;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
left_stick_deadzone -= 1;
if (left_stick_deadzone < 0) left_stick_deadzone = 0;
combo_run(RumbleValue);
}
}
else if (menu_option == 4) { // Zone morte joystick droit
if (event_press(PS5_X)) {
right_stick_deadzone += 1;
if (right_stick_deadzone > 20) right_stick_deadzone = 20;
combo_run(RumbleValue);
}
if (event_press(PS5_CIRCLE)) {
right_stick_deadzone -= 1;
if (right_stick_deadzone < 0) right_stick_deadzone = 0;
combo_run(RumbleValue);
}
}
}
}
else 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);
}
}

// Retour haptique pour le menu


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

// Retour haptique pour option du menu


combo RumbleOption {
set_rumble(RUMBLE_A, 50);
wait(50);
reset_rumble();
}
// Retour haptique pour valeur modifiée
combo RumbleValue {
set_rumble(RUMBLE_A, 30);
wait(30);
reset_rumble();
}

You might also like