/*============================================================================================================================| | Please read the instructions before programming the script to the zen. READ THE INSTRUCTIONS -- READ THE INSTRUCTIONS | | This section below you can change a few buttons to your own personal preference. TRUE; means ON FALSE means OFF | /*============================================================================================================================| /* User Defines - DON'T CHANGE BELOW */ define SINGLE_SLOT = 0, LEGACY = 0, RUMBLE = 1, DJANGO = 2; /* Done User Defines - DON'T CHANGE ABOVE *//* |=============================================================================================================================| | Choose OLED background color. TRUE for White background, FALSE for Black background*/ int oled_bg_white = FALSE; /* | |=============================================================================================================================| | Lamp Mod | | Choose you double press button for turn On/Off Lamp |*/ int lamp_button_press = PS4_OPTIONS; /* | |=============================================================================================================================| | Slots System - Enter Slots numbers where you put this script on. | | It should be comma seperated and the last element without comma. Possible Values: Between 1 and 8. | | ~ Examples ~ | | { 1, 4, 5 } | Equal to: You have the script on slots 1 2 and 3. | | { SINGLE_SLOT } | Equal to: You have the script only on one slot. | | NOTE: The order you set the slots will be the order of switching between them. | | |*/ const int8 slots[] = { SINGLE_SLOT }; /* | |=============================================================================================================================| | Sensitivity and Deadzone |*/ define ingamesens = 5; /* | | Match those as in your Game |*/ define ingamedz = 5; /* | |=============================================================================================================================| | Main Menu Buttons. |*/ define mod_menu_button_hold = PS4_L2; /* | | |*/ define mod_menu_button_press = PS4_OPTIONS; /* | |=============================================================================================================================| | Loadout Menu Buttons. |*/ define loadout_menu_button_hold = PS4_OPTIONS; /* | | |*/ define loadout_menu_button_load = PS4_L2; /* | | |*/ define loadout_menu_button_save = PS4_L1; /* | |=============================================================================================================================| | Weapons Menu Buttons. |*/ define weapons_menu_button_hold = PS4_L2; /* | | |*/ define weapons_menu_button_press = PS4_PS; /* | |=============================================================================================================================| | Gulag Mod Buttons. |*/ define gulag_button_hold = PS4_OPTIONS; /* | | |*/ define gulag_button_press = PS4_TRIANGLE; /* | |=============================================================================================================================| | Kill Switch Buttons. |*/ define killswitch_button_hold = PS4_L2; /* | | |*/ define killswitch_button_press = PS4_SHARE; /* | |=============================================================================================================================| | Slot System Buttons. |*/ define slot_system_button_hold = PS4_OPTIONS; /* | | |*/ define slot_system_button_next = PS4_RIGHT; /* | | |*/ define slot_system_button_prev = PS4_LEFT; /* | |=============================================================================================================================| | Enable or Disable If you want to use 1 button to switch profiles 1 or 2 |*/ define one_button_press = TRUE; /* | |=============================================================================| | | Enable or Disable If you want to use 2 buttons to switch profiles 1 or 2 |*/ define two_button_press = TRUE; /* | | Choose your buttons for 2 buttons to switch profiles |*/ define profile_switch_button_hold = PS4_L2; /* | | |*/ define profile_switch_button_prim = PS4_TRIANGLE;/* | | |*/ define profile_switch_button_sec = PS4_CIRCLE; /* | |=============================================================================================================================| | Master Switch for WeaponAI Presets RapidFire. | | Disable will disable for any semi auto guns. |*/ int WAI_RAPIDFIRE = TRUE; /* | |=============================================================================================================================| | Aim Assist - Steady Aim: | | Set to TRUE to Enable or FALSE to Disable. | | Right now for Polar Only. |*/ int toggle_steadyaim = TRUE; /* | |=============================================================================================================================| | Easy Fire - Choose your desire mode: | | 0 - On ADS, Fire. | | 1 - On Fire, ADS. | | 2 - Both (0) and (1) modes. |*/ int easyfire_mode = 2; /* | | NOTE: Turn On/Off from the menu. | |=============================================================================================================================| | Shot Mods (Prone Shot, Strafe Shot, Ghost Peek) | | Choose your desire mode: | | 0 - Activate On Fire. | | 1 - Activate On Fire Without ADS. | | 2 - Activate On Fire With ADS. | | Choose individual mode per Shotmod. { Prone Shot, Strafe Shot, Ghost Peek } | | NOTE: Turn On/Off from the menu. |*/ const int8 shotmods_mode[] = { 1, 1, 1 }; /* | |=============================================================================================================================| | Hair Triggers Mod - If TRUE will be ON, If FALSE will be OFF |*/ define toggle_hairtrigger = FALSE; /* | |=============================================================================================================================| | Smart Grenade throw values. |*/ define smartgrenade_throwdelay = 2600; /* | | NOTE: Turn On/Off from the menu. |*/ define smartgrenade_safedelay = 3200; /* | |=============================================================================================================================| | Loadouts Names - You can change the names of the Loadouts | | NOTE: Max characters (including spaces) for the text is 17 !!! | |*/ const string LOADOUTS_TEXT[] = { "Custom Loadout 1", "Custom Loadout 2", "Custom Loadout 3", "Custom Loadout 4", "Custom Loadout 5", "MAX SIZE POSSIBLE"}; /* LEAVE_AS_IS_DONT_TOUCH | |=============================================================================================================================| | Slide Cancel Mode | | Choose between LEGACY or LEGACYPLUS or DJANGO Mode | | LEGACY - When walk and press Crouch Button will perform SlideCancel. | | RUMBLE - Same as LEGACY but working with InGame Rumble to detect slide. | | DJANGO - Smart Activate - When Walk, Sprint and press Crouch button will perform SlideCancel. | | NOTE: If you running Any kind of InGame AutoRun - Choose LEGACY or RUMBLE. |*/ int slide_cancel_mode = RUMBLE; /* | |=============================================================================================================================| | Slide Cancel Delay - Was at 120. |*/ define slide_delay = 80; /* | |=============================================================================================================================| PLEASE READ THE INSTRUCTIONS BELOW ON HOW TO ACTIVATE MODS ============================================================================================================================ ==== Enter Mod Menu ===== Hold L2/LT and tap OPTIONS/MENU === ============================================================================================================================ ==== To edit any mods in the modMenu ===== Press CROSS/A to EDIT === ============================================================================================================================ ==== Navigate between every mod and toggles on the ZEN Menu ===== Tap LEFT or RIGHT on the D-PAD === ============================================================================================================================ ==== Enable or Disable the diplayed mod ===== Tap UP for ON == Tap DOWN for OFF === ============================================================================================================================ ==== Switch Loadouts In Mod Menu ===== Tap Y/TRIANGLE === ============================================================================================================================ ==== Switch Loadouts In Game ===== USER DEFINED BUTTONS === ============================================================================================================================ ==== Edit availble Mods ===== Press CROSS/A OR Press CIRCLE/B to Exit Mod === ============================================================================================================================ ==== Edit Values In available Mods ===== Hold L2/LT & Tap RIGHT to increase + 1 === ===== Tap LEFT to decrease - 1 === ===== Tap UP to increase + 10 === ===== Tap DOWN to decrease - 10 === ============================================================================================================================ ==== Navigate between values available in the editable mods ===== Tap LEFT Or RIGHT === ============================================================================================================================ ==== To SAVE all mods that have been edited & enabled ===== Press XBOX/PS Button == Screen Will display "SAVED" === ============================================================================================================================ ==== To exit Mod Menu once you have saved it ===== Hold L2/LT and Tap OPTIONS/MENU === ============================================================================================================================ ==== Kill Switch (Disable Everything) ===== Hold LT/L2 & Double Tap SHARE/VIEW === /*========================================================================================================================== = Credits for Mods, Script structure, and Tests = = SweetEvil, LegitCloudzzz, FrenZY, DontAtMe, Dogz, Noozbar, ItzSnacks, Skadezy. = ============================================================================================================================*/ const string TITLE = "DK 6.8RC.4"; int Pin = 684; int Code; const string PRESS_A_TO_CONTINUE = "Press A to Edit"; const string TOGGLEONLY = "Toggles Only"; const string ALLPROFILES = "All Profiles"; const string OFF = "OFF"; const string ON = "ON"; const string SAVE = "SAVED"; const string LOAD = "LOADED"; const string PROFILE_1 = "Primary"; const string PROFILE_2 = "Secondary"; const string LOADOUTIDX = "L"; const string SLOTIDX = "S"; const string FLIPPED = "Flipped"; const string GULAGMOD = "Gulag" define MODS_TEXT_IDX = 0; define VALUES_TEXT_IDX = 1; define VALUES2_TEXT_IDX = 2; define AR_TEXT_IDX = 3; define AA_TEXT_IDX = 4; define PING_TEXT_IDX = 5; define WAI_CATEGORY_TEXT_IDX = 6; define WAI_WEAPON_TEXT_IDX = 7; define LOADOUTS_TEXT_IDX = 8; define LOADOUTS_STATE_TEXT_IDX = 9; define BTN_LAYOUT_TEXT_IDX = 10; define POLARAIM = 0, POLARAIMV2 = 1, STICKYAIM = 2, LEGITAIM = 3; define LOADS = 1, SAVES = 2; define AMOUNT_OF_PROFILES = 2; const string MODS_TEXT[] = { "AntiRecoil", "AimAssist", "TrickShot", "ADS/Fire", "Warzone", "Global", "Settings", "Rapid Fire", "" }; define AMOUNT_OF_MODNAME_IDX = 6; const string VALUES_TEXT[] = { "Type", "Type", "Prone Shot", "Strafe Shot", "Ghost Peek", "FastReload", "QuickScope", "SmartGrenade", "EasyFire", "Drive Mod", "EnemyPing", "Easy Plates", "Easy Revive", "AutoRun", "Turbo Melee", "CancelSlide", "Bunny Hop", "AdvanceSens", "AFK Mode", "Inverted Y", "Buttons layout", "BlockRumble", "" }; define AMOUNT_OF_VALNAME_IDX = 21; const int8 MODS_TO_VALUES[][] = { {0 , 0 , 0 , 1}, {1 , 1 , 1 , 2}, {2 , 2 , 4 , 1}, {3 , 5 , 8 , 2}, {4 , 9 , 12 , 2}, {5 , 13 , 16 , 2}, {6 , 17 , 21 , 0} }; const string VALUES2_TEXT[] = { "Strength", "Horizontal", "ARV Start", "ARV End", "ARV Time", "ARH Start", "ARH End", "ARH Time", "Radius" , "Steps", "SteadyAim", "Sticky Size", "Sticky Time", "Radius", "Steps", "Type", "General", "ADS Close", "ADS Far", "Fire", "ADS Fire", "Grenade", "Button Layout", "" }; define AMOUNT_OF_VALNAME2_IDX = 22; const int8 VALUES_TO_VALUES2[][] = { {0 , 0 , 7 }, {1 , 8 , 14 }, {2 , -1, -1 }, {3 , -1, -1 }, {4 , -1, -1 }, {5 , -1, -1 }, {6 , -1, -1 }, {7 , -1, -1 }, {8 , -1, -1 }, {9 , -1, -1 }, {10 , 15, 15 }, {11 , -1, -1 }, {12 , -1, -1 }, {13 , -1, -1 }, {14 , -1, -1 }, {15 , -1, -1 }, {16 , -1, -1 }, {17 , 16, 21 }, {18 , -1, -1 }, {19 , -1, -1 }, {20 , 22, 22 }, {21 , -1, -1 } }; const string AR_TEXT[] = { "SmartRecoil", "Trainer AR", ""}; const string AA_TEXT[] = { "Polar", "Polar V2", "StickyAim", "LegitAim", ""}; const string PING_TEXT[] = { "On ADS", "On Fire", "On ADS+Fire", ""}; const string LOADOUTS_STATE_TEXT[] = {"LOAD Loadout", "SAVE Loadout",""}; int buttons_layout; int BTN_LETHAL, BTN_FIRE, BTN_MELEE, BTN_TACTICAL, BTN_AIM, BTN_SPRINT, BTN_CROUCH, BTN_JUMP, BTN_USE, BTN_SWAP, BTN_PING; const string BTN_LAYOUT_TEXT[] = { "Default", "Tactical", "Lefty", "N0M4D/Charlie", "N0M4D/Charlie Tac.", "N0M4D/Charlie Left", "Bumper Jumper", "Bumper Jumper Tac.", "1-Hand-Gunslinger", "Stick and Move", "Brawler", "Beast", "Bumper Ping", "Bumper Ping Tac.", "" }; const string WAI_CATEGORY_TEXT[] = { "General", "Assault R.", "SMG", "ShotGun", "LMG", "Rifle", "Sniper", "HandGun", "" }; define amount_weapon_category = 7; const string WAI_WEAPON_TEXT[] = { "RegularFire", "RapidFire" , "Sniper", "Kilo 141" , "FAL" , "M4A1" , "FR 5.56" , "Oden" , "M13" , "FN Scar 17" , "AK-47" , "RAM 7" , "GRAU 5.56" , "CR-56 AMAX" , "AN-94" , "AS VAL", "AUG" , "P90" , "MP5" , "Uzi" , "PP19 Bizon" ,"MP7" , "Striker 45" , "Fennec" , "ISO" , "Model 680" , "R9-0" , "725" , "Origin 12" , "VLK Rogue" , "JAK-12", "PKM" , "SA87" , "M91" , "MG34" , "Holger-26" , "Bruen Mk9" , "Finn" , "EBR-14" , "MK2 Carbine" , "Kar98k" , "Crossbow" , "SKS" , "SP-R 208" , "Dragunov" , "HDR" , "AX-50" , "Rytec AMR" , "X16" , "1911" , ".357" , "M19" , ".50GS" , "Renetti", ""}; const int8 WAI_WEAPON_TO_CATEGORY[][] = { {0 , 0 , 2}, {1 , 3 , 15}, {2 , 16 , 24}, {3 , 25 , 30}, {4 , 31 , 37}, {5 , 38 , 43}, {6 , 44 , 47}, {7 , 48 , 53} }; const int16 WAI_WEAPON_GENERAL_DATA[][] = { {0 , 0 , 0 , 0}, {1 , 0 , 0 , 0}, {0 , 0 , 1 , 1} , {0 , 1400 , 0 , 0}, {1 , 1990 , 0 , 0}, {0 , 1400 , 0 , 0}, {1 , 1700 , 0 , 0}, {0 , 2060 , 0 , 0}, {0 , 1400 , 0 , 0}, {0 , 1510 , 0 , 0}, {0 , 1250 , 0 , 0}, {0 , 1677 , 0 , 0}, {0 , 1400 , 0 , 0}, {0 , 1820 , 0 , 0}, {0 , 1580 , 0 , 0}, {0 , 1550 , 0 , 0}, {0 , 1670 , 0 , 0}, {0 , 2150 , 0 , 0}, {0 , 1900 , 0 , 0}, {0 , 1820 , 0 , 0}, {0 , 1720 , 0 , 0}, {0 , 1550 , 0 , 0}, {0 , 1730 , 0 , 0}, {0 , 2250 , 0 , 0}, {0 , 1425 , 0 , 0}, {1 , 7088 , 0 , 0}, {1 , 8810 , 0 , 0}, {1 , 2590 , 0 , 0}, {1 , 3150 , 0 , 0}, {1 , 3200 , 0 , 0}, {1 , 1900 , 0 , 0}, {0 , 7240 , 0 , 0}, {0 , 2340 , 0 , 0}, {0 , 6150 , 0 , 0}, {0 , 8000 , 0 , 0}, {0 , 2530 , 0 , 0}, {0 , 4700 , 0 , 0}, {0 , 5000 , 0 , 0}, {1 , 1720 , 0 , 1}, {1 , 1649 , 0 , 1}, {1 , 2020 , 0 , 1}, {1 , 3041 , 0 , 1}, {1 , 1600 , 0 , 1}, {1 , 2200 , 0 , 1}, {0 , 2180 , 1 , 1}, {0 , 2800 , 1 , 1}, {0 , 2300 , 1 , 1}, {0 , 3200 , 1 , 1}, {1 , 1100 , 0 , 0}, {1 , 1090 , 0 , 0}, {1 , 2100 , 0 , 0}, {1 , 1100 , 0 , 0}, {1 , 1300 , 0 , 0}, {1 , 1100 , 0 , 0}}; int toggle_ar[2]; int ar_type[2]; int toggle_aa; int aa_type; int TIMER = 0; int AntirecoilVertical; int AntirecoilHorizontal; int vert_current = 0; int horiz_current = 0 int vert_timer = 0; int horiz_timer = 0; int trainerar_vertical_start[2]; int trainerar_vertical_end[2]; int trainerar_vertical_time[2]; int trainerar_horizontal_start[2]; int trainerar_horizontal_end[2]; int trainerar_horizontal_time[2]; int smartrecoil_base = 100; int smartrecoil_add,smartrecoil_x,smartrecoil_y; int smartrecoil_rumble; int smartrecoil_vertical[2]; int smartrecoil_horizontal[2]; int smartrecoil_str[2]; int LEGITangle; int LEGITSTEPS; int LEGITRADIUS; int toggle_fastreload; int toggle_afk; int msecs = 0; int secs = 0; int afk_tick = 30; int toggle_turbomelee; int turbomelee_flag; int toggle_quickscope; int trigger_toggle; int toggle_trickshot; int toggle_proneshot[2]; int proneshot_flag; int Prone_Speed = 80; int toggle_strafeshot[2]; int strafeshot_flag; int strafeShot_time = 500; int toggle_ghostpeek[2]; int ghostpeek_flag; int ghostpeekdelay = 25; int toggle_smartgrenade; int cooktime; int toggle_rapidfire; int ShowRapidFire; int reloadtime; int reloadrumble; int toggle_cancelslide; int cancelslide_on; int enemy_ping; int ping_type; int GulagMod; int gulag_fire; int toggle_easyfire; int toggle_autorun; int autorun_active; int toggle_bhop; int toggle_drivemod; int easy_revive; int swap_on; int inverted_on; int FIRE_RATE = 11; int easy_plate; int stickyaim_size; int stickyaim_time; define X = XB1_RX; define Y = XB1_RY; define ACTIVE_WHEN_ADS = TRUE; define ACTIVE_WHEN_FIRING = TRUE; int RADIUS; int STEPS; int STEADY_AIM; define STEP_INTERVAL = 1; define VM_INTERVAL = -2; int time; int angle, cos_angle, sin_angle; int actual_X, actual_Y, actual_Magnitude, max_Magnitude, angle_Out; int STEADY_VALUE; const int8 Polar_Array[]={100,100,100,100,100,100,100,100,99,99,99,99,98,98,97,97,97,96,95,95,94,94,93,92,92,91,90,89,89,88,87,86,85,84,83,82,81, 80,79,78,77,75,74,73,72,71,70,69,67,66,65,63,62,61,59,58,56,55,53,52,50,49,47,46,44,43,41,40,38,36,35,33,31,30,28,26,25,23,21,20,18,16,14,13,11,9,7, 6,4,2,0,-1,-3,-5,-7,-8,-10,-12,-13,-15,-17,-19,-20,-22,-24,-25,-27,-29,-30,-32,-34,-35,-37,-39,-40,-42,-43,-45,-46,-48,-50,-51,-53,-54,-55,-57,-58, -60,-61,-62,-64,-65,-66,-68,-69,-70,-71,-73,-74,-75,-76,-77,-78,-79,-80,-81,-82,-83,-84,-85,-86,-87,-88,-89,-89,-90,-91,-92,-92,-93,-93,-94,-95,-95, -96,-96,-97,-97,-97,-98,-98,-99,-99,-99,-99,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-99,-99,-99,-98,-98,-98,-97,-97, -96,-96,-95,-94,-94,-93,-93,-92,-91,-90,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-74,-72,-71,-70,-69,-67,-66,-65,-63,-62,-61, -59,-58,-56,-55,-53,-52,-50,-49,-47,-46,-44,-43,-41,-40,-38,-36,-35,-33,-31,-30,-28,-26,-25,-23,-21,-20,-18,-16,-14,-13,-11,-9,-7,-6,-4,-2,0,2,4,6,7, 9,11,13,14,16,18,20,21,23,25,26,28,30,31,33,35,36,38,40,41,43,44,46,47,49,51,52,54,55,56,58,59,61,62,63,65,66,67,69,70,70,72,73,74,75,77,78,79,80,81, 82,83,84,85,86,87,88,89,89,90,91,92,92,93,94,94,95,95,96,97,97,97,98,98,99,99,99,99,100,100,100,100,100,100,100}; const int8 polar_LUT[] = { -100,-100,-100,-100,-100,-100,-100,-100,-100,-99,-99,-99,-98,-98,-98,-97,-97,-96,-96,-95,-94,-94,-93,-93,-92,-91,-90,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-74,-72,-71,-70,-69,-67,-66,-65,-63,-62,-61,-59,-58,-56,-55,-53,-52,-50,-49,-47,-46,-44,-43,-41,-40,-38,-36,-35,-33,-31,-30,-28,-26,-25,-23,-21,-20,-18,-16,-14,-13,-11,-9,-7,-6,-4,-2,0,2,4,6,7,9,11,13,14,16,18,20,21,23,25,26,28,30,31,33,35,36,38,40,41,43,44,46,47,49,51,52,54,55,56,58,59,61,62,63,65,66,67,69,70,70,72,73,74,75,77,78,79,80,81,82,83,84,85,86,87,88,89,89,90,91,92,92,93,94,94,95,95,96,97,97,97,98,98,99,99,99,99,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,99,99,99,99,98,98,97,97,97,96,95,95,94,94,93,92,92,91,90,89,89,88,87,86,85,84,83,82,81,80,79,78,77,75,74,73,72,71,70,69,67,66,65,63,62,61,59,58,56,55,53,52,50,49,47,46,44,43,41,40,38,36,35,33,31,30,28,26,25,23,21,20,18,16,14,13,11,9,7,6,4,2,0,-1,-3,-5,-7,-8,-10,-12,-13,-15,-17,-19,-20,-22,-24,-25,-27,-29,-30,-32,-34,-35,-37,-39,-40,-42,-43,-45,-46,-48,-50,-51,-53,-54,-55,-57,-58,-60,-61,-62,-64,-65,-66,-68,-69,-70,-71,-73,-74,-75,-76,-77,-78,-79,-80,-81,-82,-83,-84,-85,-86,-87,-88,-89,-89,-90,-91,-92,-92,-93,-93,-94,-95,-95,-96,-96,-97,-97,-97,-98,-98,-99,-99,-99,-99,-100,-100,-100,-100,-100 }; define PXS = FALSE; define PYS = FALSE; int PPFX = PXS; int PPFY = PYS; int PVID; int PFD = TRUE; int PPFD = TRUE; int PPAR,PPAA,PPAY,PPAX; int PXA = 10; define PXA_MIN = 1, PXA_MAX = 40 int PXSE = 25; define PXSE_MIN = 1, PXSE_MAX = 40 int PVSI = 1; define PVSI_MIN = 1, PVSI_MAX = 40 int PYA = -260; define PYA_MIN = -360, PYA_MAX = 360 int PYSE = 260; define PYSE_MIN = -360, PYSE_MAX = 360 int PVS = 130; define PVS_MIN = 1, PVS_MAX = 170 int REL = 25; define REL_MIN = 10, REL_MAX = 40 int toggle_snackssens; int ShowSens; int snackssens_ads_mode; int USE_SENS; int GEN_SENS; int ADS_SENS; int ADS_FAR_SENS; int FIRE_SENS; int ADS_FIRE_SENS; int GRENADE_SENS; int toggle_blockrumble; int currentSlot; int ModLoadout; int loadout_idx = 0, loadout_menu_idx = 0; int loadout_load_or_save; int weapon_category[2]; int weapon_name[2]; int active_name; int name_width; int name_font; int name_y; int cat_width; int cat_font; int profile_width; int profile_font; int profile_y; int ModWeapon; int modweapon_from_modmenu; int modName_idx,valName_idx,valName2_idx,profile_idx; int c,c_val; int index,index2,index3; int current_num = 0; int mask; int pval_data; int ret; define NUM_OF_SPVARS = 64; const int16 SPVARS[] = { 0, SPVAR_1 ,SPVAR_2 ,SPVAR_3 ,SPVAR_4 ,SPVAR_5 ,SPVAR_6 ,SPVAR_7 ,SPVAR_8 ,SPVAR_9 ,SPVAR_10,SPVAR_11,SPVAR_12,SPVAR_13,SPVAR_14,SPVAR_15,SPVAR_16,SPVAR_17,SPVAR_18,SPVAR_19,SPVAR_20, SPVAR_21,SPVAR_22,SPVAR_23,SPVAR_24,SPVAR_25,SPVAR_26,SPVAR_27,SPVAR_28,SPVAR_29,SPVAR_30,SPVAR_31,SPVAR_32,SPVAR_33,SPVAR_34,SPVAR_35,SPVAR_36,SPVAR_37,SPVAR_38,SPVAR_39,SPVAR_40, SPVAR_41,SPVAR_42,SPVAR_43,SPVAR_44,SPVAR_45,SPVAR_46,SPVAR_47,SPVAR_48,SPVAR_49,SPVAR_50,SPVAR_51,SPVAR_52,SPVAR_53,SPVAR_54,SPVAR_55,SPVAR_56,SPVAR_57,SPVAR_58,SPVAR_59,SPVAR_60, SPVAR_61,SPVAR_62,SPVAR_63,SPVAR_64}; int current_spvar = 0,count_spvar = 0; const uint8 ASCII_NUM[] = {48,49,50,51,52,53,54,55,56,57}; int i; data( 1,0,0,0, 0,0,0,1, 1,0,1,0, 0,0,1,0, 0,1,1,0, 1,1,1,0, 0,1,0,0, 0,0,0,0 ); int display_title = TRUE; int display_new; int display_last; int display_black; define debugmode = FALSE; int ModMenu; int ModEdit; int ModEdit2; int KillSwitch; int count_black; int invert; int q; int double__tap[30]; init{ while(q < 30) {double__tap[q] = -1; q++;} load_or_save(LOADS,-1); Set_Buttons_Layout(); currentSlot = get_slot(); } main { if (debugmode) { set_val(TRACE_1, profile_idx); set_val(TRACE_2, modName_idx); set_val(TRACE_3, valName_idx); set_val(TRACE_4, valName2_idx); set_val(TRACE_5, get_total_used_spvar()); set_val(TRACE_6, buttons_layout); } if(get_controller() != PIO_PS4) { if(get_console() == PIO_PS4) { swap(PS4_SHARE,PS4_TOUCH); if(get_val(PS4_R3) && event_press(PS4_TOUCH)) { set_val(PS4_SHARE,100); set_val(PS4_TOUCH,0); set_val(PS4_R3,0); } } } if(!ModMenu && !ModEdit && !ModEdit2 && !ModWeapon && !ModLoadout) { if(get_ival(killswitch_button_hold)) { if(event_press(killswitch_button_press)) { KillSwitch = !KillSwitch; if(KillSwitch) combo_run(RUMBLE_OFF); else combo_run(RUMBLE_ON); display_title = TRUE; } set_val(killswitch_button_press, 0); } if(KillSwitch && (get_val(PS4_CIRCLE) && get_ptime(PS4_CIRCLE) >= 500)) { KillSwitch = FALSE; combo_run(RUMBLE_ON); display_title = TRUE } } if(!KillSwitch) { if(get_ival(gulag_button_hold)) { if(event_press(gulag_button_press)) { GulagMod = !GulagMod; if(!GulagMod) { combo_run(RUMBLE_OFF); } if(GulagMod) { if(ModMenu) { loadout_load_or_save = 2; load_or_save(SAVES,-1); } ModMenu = FALSE; ModEdit = FALSE; ModEdit2 = FALSE; ModWeapon = FALSE; combo_run(RUMBLE_ON); } display_title = TRUE; } set_val(gulag_button_press, 0); } if(GulagMod && (get_val(PS4_CIRCLE) && get_ptime(PS4_CIRCLE) >= 500)) { GulagMod = FALSE; combo_run(RUMBLE_OFF); display_title = TRUE } if(get_ival(loadout_menu_button_hold)) { if(event_press(loadout_menu_button_load) || event_press(loadout_menu_button_save)) { if(!ModMenu && !ModWeapon) ModLoadout = !ModLoadout; else{ if(ModMenu) { loadout_load_or_save = 2; load_or_save(SAVES,-1); } ModMenu = FALSE; ModWeapon = FALSE; } if(!ModLoadout) { combo_run(RUMBLE_OFF); display_title = TRUE; } if(ModLoadout) { ModMenu = FALSE; ModEdit = FALSE; ModEdit2 = FALSE; ModWeapon = FALSE; combo_run(RUMBLE_ON); display_new = TRUE; } loadout_menu_idx = 0; } if(event_press(loadout_menu_button_load)) { loadout_load_or_save = 1; display_new = TRUE; } if(event_press(loadout_menu_button_save)) { loadout_load_or_save = 2; display_new = TRUE; } set_val(loadout_menu_button_load, 0); set_val(loadout_menu_button_save, 0); } if(get_ival(weapons_menu_button_hold)) { if(event_press(weapons_menu_button_press)) { if(!ModMenu && !ModLoadout) ModWeapon = !ModWeapon; else{ if(ModMenu) { loadout_load_or_save = 2; load_or_save(SAVES,-1); } ModMenu = FALSE; ModLoadout = FALSE; } if(!ModWeapon) { combo_run(RUMBLE_OFF); display_title = TRUE; } if(ModWeapon) { modweapon_from_modmenu = FALSE; ModMenu = FALSE; ModEdit = FALSE; ModEdit2 = FALSE; ModLoadout = FALSE; combo_run(RUMBLE_ON); display_new = TRUE; } } set_val(weapons_menu_button_press, 0); } if(get_ival(mod_menu_button_hold)) { if(event_press(mod_menu_button_press)) { if(!ModWeapon && !ModLoadout) ModMenu = !ModMenu; else{ ModWeapon = FALSE; ModLoadout = FALSE; } if(!ModMenu) { loadout_load_or_save = 2; load_or_save(SAVES,-1); ModEdit = FALSE; ModEdit2 = FALSE; display_title = TRUE; } if(ModMenu) { ModWeapon = FALSE; ModLoadout = FALSE; modName_idx = 0; combo_run(RUMBLE_ON); display_new = TRUE; } } set_val(mod_menu_button_press, 0); } if(GulagMod) { if (event_press(PS4_RIGHT)) { gulag_fire++; if(gulag_fire > 2) gulag_fire = 2; display_title = TRUE; } if (event_press(PS4_LEFT)) { gulag_fire--; if(gulag_fire < 0) gulag_fire = 0; display_title = TRUE; } } if(ModLoadout) { if(event_press(PS4_CIRCLE)) { ModLoadout = FALSE; display_title = TRUE; display_new = TRUE; } if (event_press(PS4_UP)) { loadout_menu_idx--; if(loadout_menu_idx < 0) loadout_menu_idx = 4 display_new = TRUE; } if (event_press(PS4_DOWN)) { loadout_menu_idx++; if(loadout_menu_idx > 4) loadout_menu_idx = 0; display_new = TRUE; } if(event_press(PS4_CROSS)) { if(loadout_load_or_save == 1) { load_or_save(LOADS, loadout_menu_idx); loadout_idx = loadout_menu_idx; } if(loadout_load_or_save == 2) { load_or_save(SAVES, loadout_menu_idx); } if(loadout_load_or_save == 1 || loadout_load_or_save == 2 ) { ModLoadout = FALSE; combo_run(RUMBLE_ON); display_title = TRUE; display_new = TRUE; } } } if(ModWeapon) { if(event_press(PS4_CIRCLE)) { if(modweapon_from_modmenu == TRUE) { ModMenu = TRUE; } else { display_title = TRUE; } ModWeapon = FALSE; display_new = TRUE; } if(event_press(PS4_UP) || event_press(PS4_DOWN)) { active_name = !active_name; display_new = TRUE; } if(event_press(PS4_RIGHT)) { if(!active_name){ weapon_category[profile_idx] += 1; weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[weapon_category[profile_idx]][1]; } else weapon_name[profile_idx] += 1; display_new = TRUE; } if(event_press(PS4_LEFT)) { if(!active_name){ weapon_category[profile_idx] -= 1; weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[weapon_category[profile_idx]][1]; } else weapon_name[profile_idx] -= 1; display_new = TRUE; } if(weapon_category[profile_idx] > amount_weapon_category){ weapon_category[profile_idx] = 0; weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[weapon_category[profile_idx]][1]; } else if(weapon_category[profile_idx] < 0) { weapon_category[profile_idx] = amount_weapon_category; weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[weapon_category[profile_idx]][1]; } if (event_press(PS4_RIGHT) || event_press(PS4_LEFT)) { reset_weapons(); } weapon_name_limits(0); weapon_name_limits(1); weapon_name_limits(2); weapon_name_limits(3); weapon_name_limits(4); weapon_name_limits(5); weapon_name_limits(6); weapon_name_limits(7); if(get_ival(PS4_CROSS) && get_ptime(PS4_CROSS) == 500) { reset_weapons(); combo_run(RUMBLE_ON); display_new = TRUE; } } if(ModMenu) { if(isModHasValues()) { if(event_press(PS4_CROSS) && !ModEdit && !ModEdit2) { valName_idx = AMOUNT_OF_VALNAME_IDX + 1; ModEdit = TRUE; display_new = TRUE; } if(event_press(PS4_CIRCLE) && ModEdit && !ModEdit2) { ModEdit = FALSE; display_new = TRUE; } } if(ModEdit) { if(isValuesHasSecondValue() && !(modName_idx == 1 && aa_type == POLARAIMV2)) { if(event_press(PS4_CROSS) && !ModEdit2) { valName2_idx = AMOUNT_OF_VALNAME2_IDX + 1; ModEdit2 = TRUE; display_new = TRUE; } if(event_press(PS4_CIRCLE) && ModEdit2) { ModEdit2 = FALSE; display_new = TRUE; } } if(ModEdit2) { if(get_val(mod_menu_button_hold)) { current_num = 0; smartrecoil_str[profile_idx] = edit_val(valName2_idx, current_num , smartrecoil_str[profile_idx] , 50 , 200 , 1 , 10 ); get_next_num(); smartrecoil_horizontal[profile_idx] = edit_val(valName2_idx, current_num , smartrecoil_horizontal[profile_idx], 99 , 99 , 1 , 10 ); get_next_num(); trainerar_vertical_start[profile_idx] = edit_val(valName2_idx, current_num , trainerar_vertical_start[profile_idx] , 0 , 990 , 1 , 10 ); get_next_num(); trainerar_vertical_end[profile_idx] = edit_val(valName2_idx, current_num , trainerar_vertical_end[profile_idx] , 0 , 990 , 1 , 10 ); get_next_num(); trainerar_vertical_time[profile_idx] = edit_val(valName2_idx, current_num , trainerar_vertical_time[profile_idx] , 0 , 9900 , 1 , 10 ); get_next_num(); trainerar_horizontal_start[profile_idx] = edit_val(valName2_idx, current_num , trainerar_horizontal_start[profile_idx], 990 , 990 , 1 , 10 ); get_next_num(); trainerar_horizontal_end[profile_idx] = edit_val(valName2_idx, current_num , trainerar_horizontal_end[profile_idx], 990 , 990 , 1 , 10 ); get_next_num(); trainerar_horizontal_time[profile_idx] = edit_val(valName2_idx, current_num , trainerar_horizontal_time[profile_idx], 0 , 9900 , 1 , 10 ); get_next_num(); RADIUS = edit_val(valName2_idx, current_num , RADIUS , 0 , 99 , 1 , 10 ); get_next_num(); STEPS = edit_val(valName2_idx, current_num , STEPS , 0 , 99 , 1 , 10 ); get_next_num(); STEADY_AIM = edit_val(valName2_idx, current_num , STEADY_AIM , 0 , 90 , 1 , 10 ); get_next_num(); stickyaim_size = edit_val(valName2_idx, current_num , stickyaim_size , 0 , 50 , 1 , 10 ); get_next_num(); stickyaim_time = edit_val(valName2_idx, current_num , stickyaim_time , 0 , 990, 1 , 10 ); get_next_num(); LEGITRADIUS = edit_val(valName2_idx, current_num , LEGITRADIUS , 0 , 99 , 1 , 10 ); get_next_num(); LEGITSTEPS = edit_val(valName2_idx, current_num , LEGITSTEPS , 0 , 99 , 1 , 10 ); get_next_num(); ping_type = edit_val(valName2_idx, current_num , ping_type , 0 , 2 , 1 , 0 ); get_next_num(); GEN_SENS = edit_val(valName2_idx, current_num , GEN_SENS , 0 , 327 , 1 , 10 ); get_next_num(); ADS_SENS = edit_val(valName2_idx, current_num , ADS_SENS , 0 , 327 , 1 , 10 ); get_next_num(); ADS_FAR_SENS = edit_val(valName2_idx, current_num , ADS_FAR_SENS , 0 , 327 , 1 , 10 ); get_next_num(); FIRE_SENS = edit_val(valName2_idx, current_num , FIRE_SENS , 0 , 327 , 1 , 10 ); get_next_num(); ADS_FIRE_SENS = edit_val(valName2_idx, current_num , ADS_FIRE_SENS , 0 , 327 , 1 , 10 ); get_next_num(); GRENADE_SENS = edit_val(valName2_idx, current_num , GRENADE_SENS , 0 , 327 , 1 , 10 ); get_next_num(); buttons_layout = edit_val(valName2_idx, AMOUNT_OF_VALNAME2_IDX , buttons_layout , 0 , 13 , 1 , 0 ); Set_Buttons_Layout(); } else { if(event_press(PS4_RIGHT)) { valName2_idx += 1; display_new = TRUE; } if(event_press(PS4_LEFT)) { valName2_idx -= 1; display_new = TRUE; } if(valName2_idx == AMOUNT_OF_VALNAME2_IDX && event_press(PS4_SQUARE)) { swap_on = !swap_on; Set_Buttons_Layout(); display_new = TRUE; } for (index = 0; index <= AMOUNT_OF_VALNAME_IDX; index++) { if((index != 0 && index != 1) && valName_idx == index) valName2_idx = vals_available(valName2_idx, VALUES_TO_VALUES2[index][1], VALUES_TO_VALUES2[index][2] ); } if(valName_idx == 0){ if (ar_type[profile_idx] == 0) valName2_idx = vals_available(valName2_idx, 0, 1 ); if (ar_type[profile_idx] == 1) valName2_idx = vals_available(valName2_idx, 2, 7 ); } if(valName_idx == 1){ if (aa_type == POLARAIM) valName2_idx = vals_available(valName2_idx, 8, 10 ); if (aa_type == STICKYAIM) valName2_idx = vals_available(valName2_idx, 11, 12 ); if (aa_type == LEGITAIM) valName2_idx = vals_available(valName2_idx, 13, 14 ); } } } else { if(get_val(mod_menu_button_hold)) { current_num = 0; ar_type[profile_idx] = edit_val(valName_idx, current_num , ar_type[profile_idx] , 0 , 1 , 1 , 0 ); get_next_num(); aa_type = edit_val(valName_idx, current_num , aa_type , 0 , 3 , 1 , 0 ); } else { if(event_press(PS4_RIGHT)) { valName_idx += 1; display_new = TRUE; } if(event_press(PS4_LEFT)) { valName_idx -= 1; display_new = TRUE; } current_num = 2; toggle_proneshot[profile_idx] = toggle(valName_idx, current_num , toggle_proneshot[profile_idx] ); get_next_num(); toggle_strafeshot[profile_idx] = toggle(valName_idx, current_num , toggle_strafeshot[profile_idx] ); get_next_num(); toggle_ghostpeek[profile_idx] = toggle(valName_idx, current_num , toggle_ghostpeek[profile_idx] ); get_next_num(); toggle_fastreload = toggle(valName_idx, current_num , toggle_fastreload ); get_next_num(); toggle_quickscope = toggle(valName_idx, current_num , toggle_quickscope ); get_next_num(); toggle_smartgrenade = toggle(valName_idx, current_num , toggle_smartgrenade ); get_next_num(); toggle_easyfire = toggle(valName_idx, current_num , toggle_easyfire ); get_next_num(); toggle_drivemod = toggle(valName_idx, current_num , toggle_drivemod ); get_next_num(); enemy_ping = toggle(valName_idx, current_num , enemy_ping ); get_next_num(); easy_plate = toggle(valName_idx, current_num , easy_plate); get_next_num(); easy_revive = toggle(valName_idx, current_num , easy_revive); get_next_num(); toggle_autorun = toggle(valName_idx, current_num , toggle_autorun); get_next_num(); toggle_turbomelee = toggle(valName_idx, current_num , toggle_turbomelee ); get_next_num(); toggle_cancelslide = toggle(valName_idx, current_num , toggle_cancelslide ); get_next_num(); toggle_bhop = toggle(valName_idx, current_num , toggle_bhop ); get_next_num(); toggle_snackssens = toggle(valName_idx, current_num , toggle_snackssens ); get_next_num(); toggle_afk = toggle(valName_idx, current_num , toggle_afk ); get_next_num(); inverted_on = toggle(valName_idx, current_num , inverted_on ); get_next_num(); get_next_num(); toggle_blockrumble = toggle(valName_idx, current_num , toggle_blockrumble ); for (index = 0; index <= AMOUNT_OF_MODNAME_IDX; index++) { if(modName_idx == index) valName_idx = vals_available(valName_idx, MODS_TO_VALUES[index][1], MODS_TO_VALUES[index][2] ); } } } } else { if(event_press(PS4_SQUARE)) { modweapon_from_modmenu = TRUE; ModMenu = FALSE; ModWeapon = TRUE; display_new = TRUE; } if(event_press(PS4_RIGHT)) { modName_idx += 1; display_new = TRUE; } if(event_press(PS4_LEFT)) { modName_idx -= 1; display_new = TRUE; } if(modName_idx > AMOUNT_OF_MODNAME_IDX) modName_idx = 0; if(modName_idx < 0) modName_idx = AMOUNT_OF_MODNAME_IDX; toggle_ar[profile_idx] = toggle(modName_idx, 0 , toggle_ar[profile_idx] ); toggle_aa = toggle(modName_idx, 1 , toggle_aa ); toggle_trickshot = toggle(modName_idx, 2 , toggle_trickshot ); } } if(ModMenu || ModWeapon) { if(ModMenu) { if(!get_val(mod_menu_button_hold) && event_press(PS4_PS)){ loadout_load_or_save = 2; load_or_save(SAVES,-1); } } if(!GulagMod && event_press(PS4_TRIANGLE) && !ModEdit) { profile_idx += 1; display_new = TRUE; } if(profile_idx > (AMOUNT_OF_PROFILES - 1)) profile_idx = 0; } if (ModMenu || ModWeapon || ModLoadout) { block_btn(); } smartrecoil_vertical[profile_idx] = 60; if(!ModMenu && !ModWeapon && !ModLoadout) { if(!get_val(BTN_AIM) && !get_val(BTN_FIRE)) { if(abs(get_val(PS4_RX)) <= ingamedz ) set_val(PS4_RX, 0); if(abs(get_val(PS4_RY)) <= ingamedz ) set_val(PS4_RY, 0); if(abs(get_val(PS4_LX)) <= ingamedz ) set_val(PS4_LX, 0); if(abs(get_val(PS4_LY)) <= ingamedz ) set_val(PS4_LY, 0); } if (toggle_hairtrigger || GulagMod) deadzone(BTN_AIM,BTN_FIRE,99,99); toggle_trickshot = speed_toggle(0, 2, -1, -1, BTN_AIM, PS4_DOWN , toggle_trickshot); toggle_rapidfire = speed_toggle(4, -1, -1, -1, BTN_AIM, PS4_RIGHT , toggle_rapidfire); if(toggle_snackssens) snackssens_ads_mode = speed_toggle(3, -1, AMOUNT_OF_VALNAME_IDX - 4, -1, BTN_AIM, PS4_UP , snackssens_ads_mode); Do_AA(); Do_ADS_FIRE(); Do_WARZONE(); Do_Global(); Do_Settings(); if(inverted_on) invert = -1; else invert = 1; if(!GulagMod) { if(two_button_press) { if(get_lval(profile_switch_button_hold)) { if (profile_switch_button_prim == profile_switch_button_sec) { if(event_press(profile_switch_button_prim)) { profile_idx = !profile_idx; if(ModMenu) display_new = TRUE; else display_title = TRUE; } } else if(event_press(profile_switch_button_prim)) { profile_idx = 0; if(ModMenu) display_new = TRUE; else display_title = TRUE; } else if(event_press(profile_switch_button_sec)) { profile_idx = 1; if(ModMenu) display_new = TRUE; else display_title = TRUE; } } else if(one_button_press) { if(double_click2(BTN_SWAP)) { profile_idx = !profile_idx; } if(event_press(BTN_SWAP)) { profile_idx = !profile_idx; if(ModMenu) display_new = TRUE; else display_title = TRUE; } } } else if(one_button_press) { if(double_click2(BTN_SWAP)) { profile_idx = !profile_idx; } if(event_press(BTN_SWAP)) { profile_idx = !profile_idx; if(ModMenu) display_new = TRUE; else display_title = TRUE; } } } } if(!ModWeapon){ Do_AR(); Do_RapidFire(); Do_FastReload(); } if(display_new) { cls_oled(oled_bg_white); count_black = 0 if(ModMenu|| ModEdit || ModEdit2 || ShowSens || ShowRapidFire) line_oled(0, 20, 127, 20, 1, !oled_bg_white); if(ModEdit2) { if(valName2_idx == AMOUNT_OF_VALNAME2_IDX) printf(center_x(get_str(0,VALUES2_TEXT_IDX,valName2_idx), OLED_FONT_SMALL_WIDTH), 0, OLED_FONT_SMALL, !oled_bg_white, get_str(1,VALUES2_TEXT_IDX,valName2_idx)); else printf(center_x(get_str(0,VALUES2_TEXT_IDX,valName2_idx), OLED_FONT_MEDIUM_WIDTH), 0, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,VALUES2_TEXT_IDX,valName2_idx)); current_num = 0; display_edit(valName2_idx, current_num , 0 , smartrecoil_str[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , smartrecoil_horizontal[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_vertical_start[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_vertical_end[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_vertical_time[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_horizontal_start[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_horizontal_end[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , trainerar_horizontal_time[profile_idx] ); get_next_num(); display_edit(valName2_idx, current_num , 0 , RADIUS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , STEPS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , STEADY_AIM ); get_next_num(); display_edit(valName2_idx, current_num , 0 , stickyaim_size ); get_next_num(); display_edit(valName2_idx, current_num , 0 , stickyaim_time ); get_next_num(); display_edit(valName2_idx, current_num , 0 , LEGITRADIUS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , LEGITSTEPS ); get_next_num(); display_edit(valName2_idx, current_num , 1 , ping_type ); get_next_num(); display_edit(valName2_idx, current_num , 0 , GEN_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , ADS_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , ADS_FAR_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , FIRE_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , ADS_FIRE_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 0 , GRENADE_SENS ); get_next_num(); display_edit(valName2_idx, current_num , 1 , buttons_layout ); get_next_num(); } else if(ModEdit) { if(valName_idx == 7 || valName_idx == (AMOUNT_OF_VALNAME_IDX - 1)) printf(center_x(get_str(0,VALUES_TEXT_IDX,valName_idx), OLED_FONT_SMALL_WIDTH), 0, OLED_FONT_SMALL, !oled_bg_white, get_str(1,VALUES_TEXT_IDX,valName_idx)); else printf(center_x(get_str(0,VALUES_TEXT_IDX,valName_idx), OLED_FONT_MEDIUM_WIDTH), 0, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,VALUES_TEXT_IDX,valName_idx)); current_num = 0; display_edit(valName_idx, current_num , 1 , ar_type[profile_idx] ); get_next_num(); display_edit(valName_idx, current_num , 1 , aa_type ); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_proneshot[profile_idx]); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_strafeshot[profile_idx]); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_ghostpeek[profile_idx]); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_fastreload); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_quickscope); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_smartgrenade); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_easyfire); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_drivemod); get_next_num(); display_mod (valName_idx, current_num , 0 , enemy_ping); get_next_num(); display_mod (valName_idx, current_num , 1 , easy_plate); get_next_num(); display_mod (valName_idx, current_num , 1 , easy_revive); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_autorun); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_turbomelee); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_cancelslide); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_bhop); get_next_num(); display_mod (valName_idx, current_num , 0 , toggle_snackssens); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_afk); get_next_num(); display_mod (valName_idx, current_num , 1 , inverted_on); get_next_num(); display_mod (valName_idx, current_num , 2 , 0); get_next_num(); display_mod (valName_idx, current_num , 1 , toggle_blockrumble); get_next_num(); } else if(ModWeapon) { display_profile(); display_weapon(); } else if(ModLoadout) { if (loadout_load_or_save == 1){ printf(center_x(get_str(0,LOADOUTS_STATE_TEXT_IDX,0), OLED_FONT_SMALL_WIDTH),0,OLED_FONT_SMALL,!oled_bg_white,get_str(1,LOADOUTS_STATE_TEXT_IDX,0)); } if (loadout_load_or_save == 2) { printf(center_x(get_str(0,LOADOUTS_STATE_TEXT_IDX,1), OLED_FONT_SMALL_WIDTH),0,OLED_FONT_SMALL,!oled_bg_white,get_str(1,LOADOUTS_STATE_TEXT_IDX,1)); } line_oled(0, 10, 127, 10, 1, !oled_bg_white); index3=15; for (index2=0;index2<5;index2++) { if(loadout_menu_idx == index2) { printf(10,index3,OLED_FONT_SMALL,oled_bg_white,get_str(1,LOADOUTS_TEXT_IDX,index2)); } else { printf(10,index3,OLED_FONT_SMALL,!oled_bg_white,get_str(1,LOADOUTS_TEXT_IDX,index2)); } index3+=10; } } else if(ShowSens) { printf(center_x(get_str(0,VALUES_TEXT_IDX,valName_idx), OLED_FONT_MEDIUM_WIDTH), 0, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,VALUES_TEXT_IDX,valName_idx)); if (snackssens_ads_mode == FALSE) printf(center_x(get_str(0,VALUES2_TEXT_IDX,(AMOUNT_OF_VALNAME2_IDX - 5)), OLED_FONT_MEDIUM_WIDTH), 30, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,VALUES2_TEXT_IDX,(AMOUNT_OF_VALNAME2_IDX - 5))); else printf(center_x(get_str(0,VALUES2_TEXT_IDX,(AMOUNT_OF_VALNAME2_IDX - 4)), OLED_FONT_MEDIUM_WIDTH), 30, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,VALUES2_TEXT_IDX,(AMOUNT_OF_VALNAME2_IDX - 4))); count_black = 5500; } else if (ShowRapidFire) { printf(center_x(get_str(0,MODS_TEXT_IDX,AMOUNT_OF_MODNAME_IDX + 1), OLED_FONT_MEDIUM_WIDTH), 0, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,MODS_TEXT_IDX,AMOUNT_OF_MODNAME_IDX + 1)); if (toggle_rapidfire == FALSE) printf(center_x(sizeof(OFF) - 1, OLED_FONT_LARGE_WIDTH),30,OLED_FONT_LARGE,!oled_bg_white,OFF[0]); else printf(center_x(sizeof(ON) - 1, OLED_FONT_LARGE_WIDTH),30,OLED_FONT_LARGE,!oled_bg_white,ON[0]); count_black = 5500; } else { printf(center_x(get_str(0,MODS_TEXT_IDX,modName_idx), OLED_FONT_MEDIUM_WIDTH), 0, OLED_FONT_MEDIUM, !oled_bg_white, get_str(1,MODS_TEXT_IDX,modName_idx)); current_num = 0; display_mod(modName_idx, current_num , 0 , toggle_ar[profile_idx]); get_next_num(); display_mod(modName_idx, current_num , 0 , toggle_aa); get_next_num(); display_mod(modName_idx, current_num , 0 , toggle_trickshot ); get_next_num(); display_mod(modName_idx, current_num , 2 , 0 ); get_next_num(); display_mod(modName_idx, current_num , 2 , 0 ); get_next_num(); display_mod(modName_idx, current_num , 2 , 0 ); get_next_num(); display_mod(modName_idx, current_num , 2 , 0 ); get_next_num(); } if(!ModLoadout && !ModWeapon && !ModEdit && !ModEdit2 && !ShowSens && !ShowRapidFire) { if(MODS_TO_VALUES[modName_idx][3] == 1) { if(profile_idx == 0) printf(center_x(sizeof(PROFILE_1) - 1,OLED_FONT_SMALL_WIDTH) ,23,OLED_FONT_SMALL,!oled_bg_white,PROFILE_1[0]); else if(profile_idx == 1) printf(center_x(sizeof(PROFILE_2) - 1,OLED_FONT_SMALL_WIDTH) ,23,OLED_FONT_SMALL,!oled_bg_white,PROFILE_2[0]); } else if(MODS_TO_VALUES[modName_idx][3] == 2) { printf(center_x(sizeof(ALLPROFILES) - 1,OLED_FONT_SMALL_WIDTH) ,23,OLED_FONT_SMALL,!oled_bg_white,ALLPROFILES[0]); } } display_black = TRUE; display_new = FALSE; display_last = 1; } } if(display_title) { cls_oled(oled_bg_white); count_black = 0 active_name = FALSE; ShowSens = FALSE; ShowRapidFire = FALSE; if(KillSwitch) { printf(center_x(sizeof(OFF) - 1, OLED_FONT_LARGE_WIDTH),center_y(OLED_FONT_LARGE_HEIGHT),OLED_FONT_LARGE,!oled_bg_white,OFF[0]); } else if(GulagMod) { printf(center_x(sizeof(GULAGMOD) - 1, OLED_FONT_LARGE_WIDTH),4,OLED_FONT_LARGE,!oled_bg_white,GULAGMOD[0]); putc_oled(1,60); puts_oled(7,54,0,1,!oled_bg_white); putc_oled(1,60); puts_oled(17,54,0,1,!oled_bg_white); putc_oled(1,62); puts_oled(107,54,0,1,!oled_bg_white); putc_oled(1,62); puts_oled(117,54,0,1,!oled_bg_white); printf(center_x(get_str(0,WAI_WEAPON_TEXT_IDX, gulag_fire),OLED_FONT_MEDIUM_WIDTH),35,OLED_FONT_MEDIUM,!oled_bg_white,get_str(1,WAI_WEAPON_TEXT_IDX,gulag_fire)); } else { printf(center_x(sizeof(TITLE) - 1, OLED_FONT_MEDIUM_WIDTH), 5, OLED_FONT_MEDIUM, !oled_bg_white, TITLE[0]); printf(3, 29, OLED_FONT_SMALL, !oled_bg_white, LOADOUTIDX[0]); printf(119, 29, OLED_FONT_SMALL, !oled_bg_white, SLOTIDX[0]); number_to_string((loadout_idx + 1), find_digits((loadout_idx + 1)),0,0,0); number_to_string(currentSlot, find_digits(currentSlot),1,0,0); display_weapon(); display_profile(); display_black = TRUE; } display_title = FALSE; display_last = 2; } if(display_black && !ModMenu && !KillSwitch && !GulagMod && !ModLoadout && !ModWeapon) { count_black += get_rtime(); if(count_black >= 7000) { cls_oled(0); count_black = 0; display_black = FALSE; ShowSens = FALSE; ShowRapidFire = FALSE; } } led(profile_idx); if(toggle_blockrumble) block_rumble(); if(double_click2(lamp_button_press)) { cls_oled(oled_bg_white); oled_bg_white = !oled_bg_white; if(display_last == 1) display_new = TRUE; if(display_last == 2) display_title = TRUE; } Do_SwitchSlot(); } function Do_AA() { if(!GulagMod && DriveMod()) return; if(toggle_aa == 1 && aa_type == POLARAIM) { actual_X = get_val(X); actual_Y = get_val(Y); actual_Magnitude = isqrt(pow(actual_X, 2) + pow(actual_Y, 2)); max_Magnitude = (actual_Magnitude < 100); if(!(time++ % STEP_INTERVAL)){ angle += STEPS; } angle = angle % 360; sin_angle = Polar_Array[angle % 360]; cos_angle = Polar_Array[(angle + 270) % 360]; cos_angle = (cos_angle * RADIUS) / 100; sin_angle = (sin_angle * RADIUS) / 100; if((ACTIVE_WHEN_ADS && get_val(BTN_AIM)) || (ACTIVE_WHEN_FIRING && get_val(BTN_FIRE))){ vm_tctrl(VM_INTERVAL); if(actual_Magnitude <= RADIUS){ sin_angle -= actual_Y; cos_angle -= actual_X; } else { sin_angle = (sin_angle * (200 - ((abs(actual_Y) + actual_Magnitude) / 10) * 10) / 200) * max_Magnitude; cos_angle = (cos_angle * (200 - ((abs(actual_X) + actual_Magnitude) / 10) * 10) / 200) * max_Magnitude; } set_val(X, clamp(actual_X + cos_angle, -100, 100)); set_val(Y, clamp(actual_Y + sin_angle, -100, 100)); } else if (!get_ival(BTN_AIM) && !get_ival(BTN_FIRE)) { vm_tctrl(0); } if(toggle_steadyaim) { if(isqrt(abs(get_ival(PS4_RX)) * abs(get_ival(PS4_RX)) + abs(get_ival(PS4_RY)) * abs(get_ival(PS4_RY)))> 10) { STEADY_VALUE = f_atan2(get_val(POLAR_RY)/256,get_val(POLAR_RX)/256); if (get_val(POLAR_RY) > 0) STEADY_VALUE = f_map(0,STEADY_AIM,0,180,(STEADY_VALUE * STEADY_AIM) / 180); else STEADY_VALUE = f_map(0,STEADY_AIM,180,360,(((STEADY_VALUE - 180) * STEADY_AIM) / 180)); f_set_polar(POLAR_RS,STEADY_VALUE,isqrt((get_val(PS4_RX) * get_val(PS4_RX)) + (get_val(PS4_RY) * get_val(PS4_RY))),FALSE); } } } if(toggle_aa == 1 && aa_type == POLARAIMV2) { if (get_ival(BTN_AIM) || get_ival(BTN_FIRE)) { if (abs(get_ival(PS4_RX)) < REL && abs(get_ival(PS4_RY)) < REL) { PPFX = PolarFlow(PPFX,PXS + PXA,PXSE,PVSI,PFD,1); PPFY = PolarFlow(PPFY,PYS + PYA,PYSE,PVS,PPFD,2); PPAY = (abs(get_ival(PS4_RY) / 2)); PPAX = (abs(get_ival(PS4_RX) / 2)); PPAR = (PPFX + ((-PPAY) + (-PPAX))); PPAA = (PPFY + ((-PPAY) + (-PPAX))); set_polar(POLAR_RS,PPAA, 327 * PPAR); } if (abs(get_ival(PS4_RX)) < REL + 30 && abs(get_ival(PS4_RY)) < REL + 30) { combo_run(PPAA); } } } if(toggle_aa == 1 && aa_type == STICKYAIM) { if(get_val(BTN_AIM)) combo_run(STICKY_AIM); else combo_stop(STICKY_AIM); } if(toggle_aa == 1 && aa_type == LEGITAIM) { if(get_val(BTN_AIM)) { if(isqrt(abs(get_val(XB1_RX)) * abs(get_val(XB1_RX)) + abs(get_val(XB1_RY)) * abs(get_val(XB1_RY))) <= LEGITRADIUS) { LEGITangle = (LEGITangle + LEGITSTEPS) % 360; set_polar(POLAR_RS, LEGITangle, LEGITRADIUS * random(326,328)); } } } } function Do_AR() { if(GulagMod) return; if(toggle_ar[profile_idx] == 1 && ar_type[profile_idx] == 0) { smartrecoil_y = smartrecoil_vertical[profile_idx] * invert * -1; smartrecoil_x = smartrecoil_horizontal[profile_idx]; smartrecoil_add = smartrecoil_str[profile_idx] - smartrecoil_base; if(get_val(BTN_AIM) && get_val(BTN_FIRE) && get_rumble(RumbleToUse())) { smartrecoil_rumble = get_rumble(RumbleToUse()); if (smartrecoil_rumble > 10 && smartrecoil_rumble < 90) { if(abs(get_val(PS4_RY)) < (smartrecoil_rumble + smartrecoil_add + smartrecoil_y) && abs(get_val(PS4_RX)) < (smartrecoil_rumble + smartrecoil_add + smartrecoil_x)) { set_val(PS4_RY, (smartrecoil_rumble + smartrecoil_add + smartrecoil_y)); } f_offset(PS4_RX, smartrecoil_x); } } } if(toggle_ar[profile_idx] == 1 && ar_type[profile_idx] == 1) { if(ModMenu && ModEdit2 && (valName2_idx >= 2 && valName2_idx <= 7)) { if(get_val(BTN_AIM) && get_val(BTN_SPRINT)) { if(get_val(BTN_FIRE)) TIMER += get_rtime(); } if(event_release(BTN_SPRINT)) { trainerar_vertical_time[profile_idx] = TIMER; trainerar_horizontal_time[profile_idx] = TIMER; TIMER = 0; display_new = TRUE; } } if(get_val(BTN_AIM)) { if(get_val(BTN_FIRE)) { vert_timer += get_rtime(); horiz_timer += get_rtime(); if (vert_timer < trainerar_vertical_time[profile_idx]) vert_current = trainerar_vertical_start[profile_idx]; else vert_current = trainerar_vertical_end[profile_idx]; if (horiz_timer < trainerar_horizontal_time[profile_idx]) horiz_current = trainerar_horizontal_start[profile_idx]; else horiz_current = trainerar_horizontal_end[profile_idx]; combo_run(ANTIRECOIL); } else { combo_stop(ANTIRECOIL); } } if(event_release(BTN_FIRE)) { vert_timer = 0; horiz_timer = 0; } } } function Do_ADS_FIRE() { if((toggle_quickscope == 1 && WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][3] == 1) || (GulagMod && gulag_fire == 2)) { if(trigger_toggle == TRUE && get_ival(BTN_USE) || trigger_toggle == TRUE && get_ival(BTN_LETHAL)){ set_val(BTN_USE, 0);set_val(BTN_LETHAL, 0); }else if(event_release(BTN_USE) || event_release(BTN_LETHAL)){ trigger_toggle = FALSE; } if(event_press(BTN_AIM)){ trigger_toggle = TRUE; }else if(get_ival(BTN_AIM) && get_ptime(BTN_AIM) > 140) { set_val(BTN_SPRINT, 100); }else if(trigger_toggle == TRUE && event_release(BTN_AIM)) { combo_run(QuickScope); } if(event_press(BTN_SPRINT)){combo_run(HOLD_BREATH);} } if(WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][2] == 1) { if(get_val(BTN_AIM)) set_val(BTN_SPRINT,100); if(get_val(PS4_LY) <-90 && get_val(BTN_AIM) && get_ptime(BTN_AIM) > 200) combo_stop(HOLD_BREATH); if(event_press(BTN_AIM)) combo_run(HOLD_BREATH); if(get_val(BTN_AIM) && get_lval(BTN_SPRINT)) set_val(BTN_SPRINT,0); } if(toggle_smartgrenade == 1) { if(combo_running(Cook_And_Release_Grenade) && (cooktime == smartgrenade_throwdelay) && (main_button_pressed(BTN_LETHAL) || double_click(BTN_LETHAL))){ combo_stop(Cook_And_Release_Grenade); } if(get_ival(BTN_LETHAL) && get_ptime(BTN_LETHAL) < 200) { cooktime = smartgrenade_throwdelay; combo_run(Cook_And_Release_Grenade); } if(get_ival(BTN_LETHAL) && get_ptime(BTN_LETHAL) > 200) { cooktime = smartgrenade_safedelay; combo_run(Cook_And_Release_Grenade); } } if(toggle_easyfire == 1 && !DriveMod()) { if(easyfire_mode == 0) { if(get_val(BTN_AIM)) { if(!WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][0]) set_val(BTN_FIRE, 100); else { set_val(BTN_FIRE, 100); combo_run(RAPIDFIRE); } } } if(easyfire_mode == 1) { if(get_val(BTN_FIRE)) { set_val(BTN_AIM,100); if(WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][0]) combo_run(RAPIDFIRE); } } if(easyfire_mode == 2) { if(get_val(BTN_AIM)) { if(!WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][0]) set_val(BTN_FIRE, 100); else { set_val(BTN_FIRE, 100); combo_run(RAPIDFIRE); } } else if(get_val(BTN_FIRE)) { set_val(BTN_AIM,100); if(WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][0]) combo_run(RAPIDFIRE); } } } if(toggle_trickshot && toggle_proneshot[profile_idx] && !DriveMod()) { if(shotmods_mode[0] == 0) { if(get_val(BTN_FIRE) && get_ptime(BTN_FIRE) > Prone_Speed) set_val(BTN_CROUCH,100); } if(shotmods_mode[0] == 1) { if ((!get_val(BTN_AIM) && get_val(BTN_FIRE)) || (get_val(BTN_FIRE) && !get_val(BTN_AIM))) { proneshot_flag = TRUE; } if(proneshot_flag == TRUE && get_val(BTN_FIRE) && get_ptime(BTN_FIRE) > Prone_Speed) { set_val(BTN_CROUCH,100); } else { proneshot_flag = FALSE; } } if(shotmods_mode[0] == 2) { if(get_val(BTN_AIM) && get_val(BTN_FIRE) && get_ptime(BTN_FIRE) > Prone_Speed) set_val(BTN_CROUCH,100); } } if((toggle_trickshot && toggle_strafeshot[profile_idx]) || ZigZagDrive()) { if(ZigZagDrive()) { strafeShot_time = 350; if(get_val(BTN_FIRE)) combo_run(STRAFESHOT); else combo_stop(STRAFESHOT); } else { strafeShot_time = 500; if(shotmods_mode[1] == 0) { if(get_val(BTN_FIRE)) combo_run(STRAFESHOT); else combo_stop(STRAFESHOT); } if(shotmods_mode[1] == 1) { if ((!get_val(BTN_AIM) && get_val(BTN_FIRE)) || (get_val(BTN_FIRE) && !get_val(BTN_AIM))) { strafeshot_flag = TRUE; } if(strafeshot_flag == TRUE && get_val(BTN_FIRE)) { combo_run(STRAFESHOT); } else { strafeshot_flag = FALSE; combo_stop(STRAFESHOT); } } if(shotmods_mode[1] == 2) { if(get_val(BTN_AIM) && get_val(BTN_FIRE)) combo_run(STRAFESHOT); else combo_stop(STRAFESHOT); } } } if (toggle_trickshot && toggle_ghostpeek[profile_idx] && !DriveMod()) { if(shotmods_mode[2] == 0) { if(get_val(BTN_FIRE)){ combo_run(GhostPeek); } else { combo_stop(GhostPeek); } } if(shotmods_mode[2] == 1) { if ((!get_val(BTN_AIM) && get_val(BTN_FIRE)) || (get_val(BTN_FIRE) && !get_val(BTN_AIM))) { ghostpeek_flag = TRUE; } if(ghostpeek_flag == TRUE && get_val(BTN_FIRE)) { combo_run(GhostPeek); } else { ghostpeek_flag = FALSE; combo_stop(GhostPeek); } } if(shotmods_mode[2] == 2) { if(get_val(BTN_AIM) && get_val(BTN_FIRE)) combo_run(GhostPeek); else combo_stop(GhostPeek); } } } function Do_WARZONE() { if(GulagMod) return; if(enemy_ping) { if(ping_type == 0) { if(event_press(BTN_AIM)) combo_run(auto_ping); } if(ping_type == 1) { if(event_press(BTN_FIRE)) combo_run(auto_ping); } if(ping_type == 2) { if(get_val(BTN_AIM) && event_press(BTN_FIRE)) combo_run(auto_ping); } } if(easy_plate) { if(get_val(BTN_SWAP)&&get_ptime(BTN_SWAP)>350) combo_run(easy_plate); if(get_val(BTN_AIM)>10 || get_val(BTN_FIRE)>10 || get_val(BTN_USE) || get_val(BTN_JUMP)) combo_stop(easy_plate); } if(easy_revive) { if(get_val(BTN_USE)&&get_ptime(BTN_USE)>350) combo_run(easy_revive); if(get_val(BTN_AIM)>10 || get_val(BTN_FIRE)>10 || get_val(BTN_SWAP) || get_val(BTN_JUMP)) combo_stop(easy_revive); } } function Do_Global() { if(toggle_autorun == 1) { if(get_val(PS4_LY) < -60 && double_click(BTN_SPRINT)) autorun_active = TRUE; if(get_val(PS4_LY) > 20 || get_val(PS4_LX) > 20 || get_val(PS4_LX) < -20 || event_press(BTN_SPRINT)|| event_press(BTN_FIRE)|| event_press(BTN_AIM)) autorun_active = FALSE; if(autorun_active) combo_run(AUTO_RUN); else combo_stop(AUTO_RUN); } if(toggle_turbomelee == 1) { if(double_click2(BTN_MELEE)) turbomelee_flag = TRUE; if (turbomelee_flag && get_val(BTN_MELEE)) { combo_run(TURBO_MELEE); } else { combo_stop(TURBO_MELEE); turbomelee_flag = FALSE; } } if(toggle_cancelslide) { if((get_val(PS4_LY) < -60) || (get_val(PS4_LY) > 60) || (get_val(PS4_LX) < -60) || (get_val(PS4_LX) > 60)) { if (slide_cancel_mode == LEGACY) { if(event_release(BTN_CROUCH)) combo_run(CANCEL_SLIDE) } else if (slide_cancel_mode == RUMBLE) { if(get_rumble(RUMBLE_A) == 87) { cancelslide_on = TRUE } if(get_rumble(RUMBLE_A) == 0) { cancelslide_on = FALSE } if(cancelslide_on) { if(event_release (BTN_CROUCH)) { combo_run(CANCEL_SLIDE) } } } else if (slide_cancel_mode == DJANGO) { if(get_val(BTN_SPRINT) ^^ get_lval(BTN_SPRINT)){ cancelslide_on = TRUE; } if(cancelslide_on && event_release(BTN_CROUCH)) { combo_run(CANCEL_SLIDE); cancelslide_on = FALSE; } } } } if(toggle_bhop == 1) { if (get_ival(BTN_JUMP) && get_ptime(BTN_JUMP) > 200) { combo_run(BUNNYHOP); } else { combo_stop(BUNNYHOP); } } } function Do_Settings() { if(toggle_snackssens == 1) { if(WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][3] == 1 && double_click2(BTN_AIM)){ snackssens_ads_mode = TRUE; wake_display_at_screen(3, -1, AMOUNT_OF_VALNAME_IDX - 4, -1); } if(!get_val(BTN_AIM) && !get_val(BTN_FIRE) && !get_val(BTN_LETHAL)) { USE_SENS=GEN_SENS;} else if(get_val(BTN_AIM) && !get_val(BTN_FIRE)) { if (snackssens_ads_mode == FALSE) USE_SENS=ADS_SENS; else USE_SENS=ADS_FAR_SENS; } else if(!get_val(BTN_AIM) && get_val(BTN_FIRE)) { USE_SENS=FIRE_SENS;} else if(get_val(BTN_AIM) && get_val(BTN_FIRE)) { if (snackssens_ads_mode == FALSE) USE_SENS=ADS_FIRE_SENS; else USE_SENS=ADS_FAR_SENS; } else if(get_val(BTN_LETHAL)) { USE_SENS=GRENADE_SENS;} sensitivity(PS4_RY,NOT_USE,USE_SENS); sensitivity(PS4_RX,NOT_USE,USE_SENS); } if(event_release(BTN_AIM)&& snackssens_ads_mode) { snackssens_ads_mode = FALSE; } if(toggle_afk) { if(any_button_pressed()) { msecs = 0; secs = 0; combo_stop(AFK); combo_stop(BLINK); } else { if (secs < afk_tick) msecs += get_rtime(); else if(secs == afk_tick) { combo_run(AFK); combo_run(BLINK); } } if(msecs >= 1000) { msecs -= 1000; secs += 1; } set_val(TRACE_1,secs); set_val(TRACE_2,msecs); set_val(TRACE_3,afk_tick); } else { combo_stop(AFK); combo_stop(BLINK); } } function Do_RapidFire() { if(toggle_rapidfire || (WAI_RAPIDFIRE == 1 && WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][0]) || (GulagMod && gulag_fire == 1)) { if(get_val(BTN_FIRE)){ combo_run(RAPIDFIRE); } else combo_stop(RAPIDFIRE); } } function Do_FastReload() { if(GulagMod) return; if(toggle_fastreload == 1) { if(WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][1] > 0) { if(event_release(BTN_USE)) { reloadtime = TRUE; } if(reloadtime) { reloadtime = reloadtime + get_rtime(); if(reloadrumble == 0) reloadrumble = get_rumble(RumbleToUse()) > 36; } if (reloadtime && (event_press(BTN_FIRE) || event_press(BTN_AIM))) { combo_run(FastReload); } if(reloadtime - 1 == WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][1] && reloadrumble == TRUE) { combo_run(FastReload); } if(reloadtime >= WAI_WEAPON_GENERAL_DATA[weapon_name[profile_idx]][1] || event_press(BTN_SWAP)) { reloadtime = 0; reloadrumble = 0; } } } } function DriveMod() { return toggle_drivemod == 1 && get_val(BTN_TACTICAL); } function ZigZagDrive() { return DriveMod() && get_val(BTN_SPRINT); } combo PPAA { f_offset(PS4_RX, PPAX); f_offset(PS4_RY, PPAY); wait(10); f_offset(PS4_RX, PPAX * -1); f_offset(PS4_RY, PPAY * -1); wait(10); } combo STICKY_AIM { set_val(PS4_RY,xy_val(PS4_RY, stickyaim_size)); wait(stickyaim_time); set_val(PS4_RX,xy_val(PS4_RX, stickyaim_size)); set_val(PS4_LX,xy_val(PS4_LX, stickyaim_size)); wait(stickyaim_time); set_val(PS4_RY,xy_val(PS4_RY, stickyaim_size * -1)); wait(stickyaim_time); set_val(PS4_RX,xy_val(PS4_RX, stickyaim_size * -1)); set_val(PS4_LX,xy_val(PS4_LX, stickyaim_size * -1)); wait(stickyaim_time); } combo ANTIRECOIL { AntirecoilVertical = get_val(PS4_RY) + vert_current; if(AntirecoilVertical > 100) AntirecoilVertical = 100; if(abs(get_val(PS4_RY)) < abs(vert_current) + 5) set_val(PS4_RY, (AntirecoilVertical * invert)); AntirecoilHorizontal = get_val(PS4_RX) + horiz_current; if(AntirecoilHorizontal > 100) AntirecoilHorizontal = 100; if(abs(get_val(PS4_RX)) < abs(vert_current) + 5) set_val(PS4_RX, AntirecoilHorizontal); } combo RAPIDFIRE { set_val(BTN_FIRE,100); wait(FIRE_RATE); set_val(BTN_FIRE,0); wait(FIRE_RATE); } combo FastReload { set_val(BTN_SWAP, 100); wait(30); wait(20); set_val(BTN_SWAP, 100); wait(30); wait(20); reloadtime=FALSE; } combo AFK { set_val(BTN_AIM, 100); wait(200); set_val(BTN_AIM, 100); wait(200); set_val(BTN_AIM,0); } combo AUTO_RUN { set_val(PS4_LY, -100); wait(140); set_val(BTN_SPRINT, 100); set_val(PS4_LY, -100); wait(120); set_val(BTN_SPRINT, 0); set_val(PS4_LY, -100); wait(40); set_val(BTN_SPRINT, 100); set_val(PS4_LY, -100); wait(4000); set_val(BTN_SPRINT, 100); wait(30); set_val(BTN_SPRINT, 0); wait(100); } combo CANCEL_SLIDE { set_val(BTN_CROUCH, 100); wait(slide_delay); set_val(BTN_CROUCH, 0); wait(60); set_val(BTN_CROUCH, 100); wait(50); set_val(BTN_CROUCH, 100); set_val(BTN_JUMP, 100); wait(60); set_val(BTN_CROUCH, 0); set_val(BTN_JUMP, 100); wait(10); set_val(BTN_JUMP, 0); } combo GhostPeek { set_val(BTN_CROUCH,100); wait(20); wait(10); set_val(BTN_FIRE,100); wait(30); set_val(BTN_CROUCH,100); wait(ghostpeekdelay); wait(4); } combo BUNNYHOP { set_val(BTN_JUMP, 100); wait(30); set_val(BTN_JUMP, 0); wait(30); set_val(BTN_JUMP, 100); wait(30); set_val(BTN_JUMP, 0); wait(30); } combo QuickScope { set_val(BTN_AIM, 100); set_val(BTN_SPRINT, 100); set_val(BTN_FIRE, 100); wait(50); set_val(BTN_AIM, 100); wait(50); } combo HOLD_BREATH { set_val(BTN_SPRINT, 0); wait(80); set_val(BTN_SPRINT, 100); wait(100); set_val(BTN_SPRINT, 0); wait(80); } combo Cook_And_Release_Grenade() { if (cooktime == smartgrenade_throwdelay) set_val(BTN_LETHAL,100); wait(cooktime); set_val(BTN_LETHAL,0); wait(100); } combo TURBO_MELEE { set_val(BTN_MELEE, 100); wait(40); set_val(BTN_MELEE, 0); wait(30); } combo auto_ping { set_val(BTN_PING,100); wait(20); set_val(BTN_PING,0); wait(20); set_val(BTN_PING,100); wait(20); set_val(BTN_PING,0); } combo STRAFESHOT { set_val(PS4_LX, 100); wait(strafeShot_time); wait(50); set_val(PS4_LX, -100); wait(strafeShot_time); wait(50); } combo easy_plate { wait(200); set_val(BTN_SWAP,100); wait(6000) } combo easy_revive { wait(200); set_val(BTN_USE,100); wait(10000); } combo RUMBLE_ON { set_ledx(2, 2); set_rumble(RUMBLE_B, 50); wait(150); reset_rumble(); wait(100); set_rumble(RUMBLE_B, 50); wait(150); reset_rumble(); } combo RUMBLE_OFF { set_ledx(1, 1); set_rumble(RUMBLE_A, 50); wait(300); reset_rumble(); wait(400); } combo BLINK { led(profile_idx); wait(150); led(7); wait(300); } combo LOAD_SAVE { cls_oled(oled_bg_white); if (loadout_load_or_save == 0 || loadout_load_or_save == 2) printf(center_x(sizeof(SAVE) - 1,OLED_FONT_LARGE_WIDTH),center_y(OLED_FONT_LARGE_HEIGHT),OLED_FONT_LARGE,!oled_bg_white,SAVE[0]); else printf(center_x(sizeof(LOAD) - 1,OLED_FONT_LARGE_WIDTH),center_y(OLED_FONT_LARGE_HEIGHT),OLED_FONT_LARGE,!oled_bg_white,LOAD[0]); wait(10) call(RUMBLE_ON); wait(150); call(RUMBLE_ON); wait(100); modName_idx = 0; valName_idx = 0; loadout_load_or_save = 0; display_title = TRUE; ModMenu = FALSE; ModEdit = FALSE; ModEdit2 = FALSE; } function reset_weapons(){ smartrecoil_str[profile_idx] = smartrecoil_base; smartrecoil_horizontal[profile_idx] = 0; } function weapon_name_limits(f_cat) { if(weapon_category[profile_idx] == f_cat) { if(weapon_name[profile_idx] > WAI_WEAPON_TO_CATEGORY[f_cat][2]) weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[f_cat][1]; if(weapon_name[profile_idx] < WAI_WEAPON_TO_CATEGORY[f_cat][1]) weapon_name[profile_idx] = WAI_WEAPON_TO_CATEGORY[f_cat][2]; } } function vals_available(f_name,f_min, f_max) { if(f_name < f_min) f_name = f_max; if(f_name > f_max) f_name = f_min; return f_name; } function edit_val(f_name,f_idx, f_val, f_min, f_max, f_inc1, f_inc2) { if(f_name == f_idx) { f_val = value_change( f_val ,PS4_LEFT , inv(f_inc1), f_min, f_max ); f_val = value_change( f_val ,PS4_RIGHT, f_inc1 , f_min, f_max ); f_val = value_change( f_val ,PS4_DOWN , inv(f_inc2), f_min, f_max ); f_val = value_change( f_val ,PS4_UP , f_inc2 , f_min, f_max ); } return f_val; } function wake_display_at_screen(f_mode, f_idx, f_idx2, f_idx3) { if(f_mode == 0 && f_mode <= 2) { modName_idx = f_idx; if(f_idx2 != -1) { valName_idx = f_idx2; ModEdit = TRUE; } if(f_idx3 != -1) { valName2_idx = f_idx3; ModEdit2 = TRUE; } } if(f_mode == 3) { valName_idx = f_idx2; ShowSens = TRUE; } if(f_mode == 4) { ShowRapidFire = TRUE; } display_new = TRUE; } function speed_toggle(f_mode, f_idx, f_idx2, f_idx3, f_hold, f_press, f_val) { if(get_val(f_hold)) { if(get_val(f_press) && get_ptime(f_press) == (get_rtime() * 30)) { if(f_val == 0) { f_val = 1; combo_run(RUMBLE_ON); } else { f_val = 0; combo_run(RUMBLE_OFF); } wake_display_at_screen(f_mode, f_idx, f_idx2, f_idx3); } set_val(f_press, 0) } return f_val; } function toggle(f_name,f_idx, f_val) { if(event_press(PS4_UP)) { if(f_name == f_idx) { f_val = 1; combo_run(RUMBLE_ON); } display_new = TRUE; } if(event_press(PS4_DOWN)) { if(f_name == f_idx) { f_val = 0; combo_run(RUMBLE_OFF); } display_new = TRUE; } return f_val; } function display_edit(f_name, f_idx, f_mode, f_val) { if(f_name == f_idx) { if (f_mode == 0) { number_to_string(f_val, find_digits(f_val),-1,0,1); } if (f_mode == 1) { putc_oled(1,60); puts_oled(7,54,0,1,!oled_bg_white); putc_oled(1,60); puts_oled(17,54,0,1,!oled_bg_white); putc_oled(1,62); puts_oled(107,54,0,1,!oled_bg_white); putc_oled(1,62); puts_oled(117,54,0,1,!oled_bg_white); if(modName_idx == 0 && ModEdit && !ModEdit2) { printf(center_x(get_str(0,AR_TEXT_IDX,f_val),OLED_FONT_MEDIUM_WIDTH),24,OLED_FONT_MEDIUM,!oled_bg_white, get_str(1,AR_TEXT_IDX,f_val)); printf(center_x(sizeof(PRESS_A_TO_CONTINUE) - 1, OLED_FONT_SMALL_WIDTH),43,OLED_FONT_SMALL,!oled_bg_white,PRESS_A_TO_CONTINUE[0]); } if(modName_idx == 1 && ModEdit && !ModEdit2) { printf(center_x(get_str(0,AA_TEXT_IDX,f_val),OLED_FONT_MEDIUM_WIDTH),24,OLED_FONT_MEDIUM,!oled_bg_white, get_str(1,AA_TEXT_IDX,f_val)); if(aa_type != POLARAIMV2) printf(center_x(sizeof(PRESS_A_TO_CONTINUE) - 1, OLED_FONT_SMALL_WIDTH),43,OLED_FONT_SMALL,!oled_bg_white,PRESS_A_TO_CONTINUE[0]); } if(valName_idx == 10 && ModEdit && ModEdit2) { printf(center_x(get_str(0,PING_TEXT_IDX,f_val),OLED_FONT_MEDIUM_WIDTH),25,OLED_FONT_MEDIUM,!oled_bg_white,get_str(1,PING_TEXT_IDX,f_val)); } if(valName_idx == (AMOUNT_OF_VALNAME_IDX - 1) && ModEdit && ModEdit2) { printf(center_x(get_str(0,BTN_LAYOUT_TEXT_IDX,f_val),OLED_FONT_SMALL_WIDTH),30,OLED_FONT_SMALL,!oled_bg_white,get_str(1,BTN_LAYOUT_TEXT_IDX,f_val)); if(swap_on) printf(center_x(sizeof(FLIPPED) - 1, OLED_FONT_SMALL_WIDTH), 50, OLED_FONT_SMALL, !oled_bg_white, FLIPPED[0]); } } } } function display_mod(f_name,f_idx, f_mode, f_toggle) { if(f_name == f_idx) { if(f_mode != 2) { if(f_toggle == 1) printf(center_x(sizeof(ON) + 10, OLED_FONT_SMALL_WIDTH),37,OLED_FONT_SMALL,!oled_bg_white,ON[0]); else if(f_toggle == 0) printf(center_x(sizeof(OFF) - 13,OLED_FONT_SMALL_WIDTH),37,OLED_FONT_SMALL,!oled_bg_white, OFF[0]); } if (f_mode == 1) { if(f_toggle == 1) printf(center_x(sizeof(ON) + 10, OLED_FONT_SMALL_WIDTH),37,OLED_FONT_SMALL,!oled_bg_white,ON[0]); else if(f_toggle == 0) printf(center_x(sizeof(OFF) - 13,OLED_FONT_SMALL_WIDTH),37,OLED_FONT_SMALL,!oled_bg_white, OFF[0]); printf(center_x(sizeof(TOGGLEONLY) - 1, OLED_FONT_SMALL_WIDTH),50,OLED_FONT_SMALL,!oled_bg_white,TOGGLEONLY[0]); } if(f_mode != 1) { printf(center_x(sizeof(PRESS_A_TO_CONTINUE) - 1, OLED_FONT_SMALL_WIDTH),50,OLED_FONT_SMALL,!oled_bg_white,PRESS_A_TO_CONTINUE[0]); } } } function display_profile() { if(display_title) { profile_width = OLED_FONT_SMALL_WIDTH; profile_font = OLED_FONT_SMALL; profile_y = 34; } if(display_new) { if(ModWeapon) { profile_width = OLED_FONT_MEDIUM_WIDTH; profile_font = OLED_FONT_MEDIUM; profile_y = 3; } else { profile_width = OLED_FONT_SMALL_WIDTH; profile_font = OLED_FONT_SMALL; profile_y = 23; } } if(profile_idx == 0) printf(center_x(sizeof(PROFILE_1) - 1, profile_width),profile_y,profile_font,!oled_bg_white,PROFILE_1[0]); else if(profile_idx == 1) printf(center_x(sizeof(PROFILE_2) - 1, profile_width),profile_y,profile_font,!oled_bg_white,PROFILE_2[0]); } function display_weapon() { line_oled(0, 25, 127, 25, 1, !oled_bg_white); if(!active_name) { name_width = OLED_FONT_SMALL_WIDTH; name_font = OLED_FONT_SMALL; name_y = 50; cat_width = OLED_FONT_MEDIUM_WIDTH; cat_font = OLED_FONT_MEDIUM; } else { name_width = OLED_FONT_MEDIUM_WIDTH; name_font = OLED_FONT_MEDIUM; name_y = 43; cat_width = OLED_FONT_SMALL_WIDTH; cat_font = OLED_FONT_SMALL; } if(display_new) printf(center_x(get_str(0,WAI_CATEGORY_TEXT_IDX, weapon_category[profile_idx]), cat_width),30,cat_font,!oled_bg_white,get_str(1,WAI_CATEGORY_TEXT_IDX,weapon_category[profile_idx])); printf(center_x(get_str(0,WAI_WEAPON_TEXT_IDX, weapon_name[profile_idx]),name_width),name_y,name_font,!oled_bg_white,get_str(1,WAI_WEAPON_TEXT_IDX,weapon_name[profile_idx])); } function value_change(f_val,f_btn,f_inc, f_rng_min, f_rng_max) { if(press_hold(f_btn)) { f_val += f_inc; if(f_val < inv(f_rng_min)) f_val = inv(f_rng_min); if(f_val > f_rng_max) f_val = f_rng_max; display_new = TRUE; } return f_val; } function number_to_string(f_val,f_digits,f_mode, f_offset, f_neg) { i = 1; c_val = 10000; if(f_val < 0) { if (f_neg) { putc_oled(i,45); i += 1; } f_val = abs(f_val); } for(c = 5; c >= 1; c--) { if(f_digits >= c) { putc_oled(i,ASCII_NUM[f_val / c_val]); f_val = f_val % c_val; i += 1; if(c == 4) { putc_oled(i,44); i += 1; } } c_val /= 10; } if(display_title) if(f_mode == 0) puts_oled(3, 39, OLED_FONT_SMALL, i - 1, !oled_bg_white); else if(f_mode == 1) puts_oled(120, 39, OLED_FONT_SMALL, i - 1, !oled_bg_white); if(f_mode == 2) puts_oled(center_x(i - 1,OLED_FONT_LARGE_WIDTH)+ f_offset,37,OLED_FONT_LARGE,i - 1,!oled_bg_white); if(f_mode == -1) puts_oled(center_x(i - 1,OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,i - 1,!oled_bg_white); } function find_digits(f_num) { f_num = abs(f_num); if(f_num / 10000 > 0) return 5; if(f_num / 1000 > 0) return 4; if(f_num / 100 > 0) return 3; if(f_num / 10 > 0) return 2; return 1; } function center_x(f_chars,f_font) { return (OLED_WIDTH / 2) - ((f_chars * f_font) / 2); } function center_y(f_size) { return (OLED_HEIGHT / 2) - (f_size / 2); } function press_hold(f_btn) { return event_press(f_btn) || get_val(f_btn) && get_ptime(f_btn) > 250 && get_ptime(f_btn) % (get_rtime() * 8) == 0; } 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 double_click2(button) { return event_press(button) && get_brtime(button) < 200; } function led(f_color) { for(i = 0; i <= 3; i++) { set_led(i,duint8((f_color * 4) + i)); } } function f_set_polar(stick, angle, radius, OFFSET) { if (angle < 0) angle = 360 + (angle % 360); angle = (angle + 90) % 360; sin_angle = polar_LUT[angle]; cos_angle = polar_LUT[(angle + 90) % 360]; if (OFFSET){ f_offset(7 + stick, (cos_angle * radius) / 100); f_offset(8 + stick, (sin_angle * radius) / 100); } else { set_val(7 + stick, clamp((cos_angle * radius) / 100, -100, 100)); set_val(8 + stick, clamp((sin_angle * radius) / 100, -100, 100)); } return; } function f_atan2(y, x) { if (x >= 0 && y > 0) angle_Out = -90; else if (x < 0 && y >= 0) angle_Out = 90; else if (x <= 0 && y < 0) angle_Out = -270; else angle_Out = 270; x = abs(x); y = abs(y); if (x < y) angle_Out += (x * 45 / y); else if (x > y) angle_Out += 90 - (y * 45 / x); else angle_Out += 45; angle_Out = abs(angle_Out % 360); return (angle_Out); } function f_offset(axis, offset_val) { set_val(axis, clamp(offset_val * (100 - abs(get_val(axis))) / 100 + get_val(axis), -100, 100)); return; } function f_map(inMin, inMax, outMin, outMax, x) { return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin; } function PolarFlow(PFB,PSV,PFV,PV,PF,PID) { if(PF) { PFB += PV; if(PFB <= PFV) return PFB; if(PFB > PFV) { PVID[PID] = 0; return PFB - PV; } } else { PFB -= PV; if(PFB >= PSV) return PFB; if(PFB < PSV) { PVID[PID] = 1; return PFB + PV; } } return FALSE; } function xy_val(f_axis,f_val) { if(abs(get_val(f_axis)) < stickyaim_size + 1) return f_val; return get_val(f_axis); } function RumbleToUse(){ if(get_rumble(RUMBLE_A) == get_rumble(RUMBLE_B)){ return RUMBLE_A; } if(get_rumble(RUMBLE_A) == 100){ return RUMBLE_B; } if(get_rumble(RUMBLE_B) == 100){ return RUMBLE_A; } if(get_rumble(RUMBLE_A) > get_rumble(RUMBLE_B)){ return RUMBLE_A; } if(get_rumble(RUMBLE_A) < get_rumble(RUMBLE_B)){ return RUMBLE_B; } return 0; } function pack_usigned(int pvar, int ret, int position, int number_of_bits) { for(i = position; i< (number_of_bits + position); i++) { pvar = pvar & (~(1 << i)); } pvar = pvar | (ret<> position; return ret; } function pack_int8_to_int16(int var1, int var2) { ret = 0; if(var1 < 0) { var1 = abs(var1) | 0x80; } ret = (abs(var2)<<8)|var1; if(var2<0) ret *= -1; return ret; } function unpack_int16_to_int8(int pvar, int var) { ret = 0; if(var == 0) { ret = 0x80 & abs(pvar) ; ret = ret >> 7; ret = ((-2) * ret) + 1; ret = ( abs(pvar) & 0x7F) * ret; } else { ret = pvar>>8; if(pvar<0) { ret += 1; } } return ret; } function get_next_spvar() { if(current_spvar <= NUM_OF_SPVARS) { current_spvar++; count_spvar++; return SPVARS[current_spvar - 1]; } return 0; } function get_total_used_spvar() { return count_spvar; } function get_next_num() { current_num++; } function get_str(mode, arr_idx, x){ if (mode == 0) { if(arr_idx == MODS_TEXT_IDX) { if (MODS_TEXT[x + 1] != -1) return MODS_TEXT[x + 1] - MODS_TEXT[x] - 1; return sizeof(MODS_TEXT) - MODS_TEXT[x]; } if(arr_idx == VALUES_TEXT_IDX) { if (VALUES_TEXT[x + 1] != -1) return VALUES_TEXT[x + 1] - VALUES_TEXT[x] - 1; return sizeof(VALUES_TEXT) - VALUES_TEXT[x]; } if(arr_idx == VALUES2_TEXT_IDX) { if (VALUES2_TEXT[x + 1] != -1) return VALUES2_TEXT[x + 1] - VALUES2_TEXT[x] - 1; return sizeof(VALUES2_TEXT) - VALUES2_TEXT[x]; } if(arr_idx == AR_TEXT_IDX) { if (AR_TEXT[x + 1] != -1) return AR_TEXT[x + 1] - AR_TEXT[x] - 1; return sizeof(AR_TEXT) - AR_TEXT[x]; } if(arr_idx == AA_TEXT_IDX) { if (AA_TEXT[x + 1] != -1) return AA_TEXT[x + 1] - AA_TEXT[x] - 1; return sizeof(AA_TEXT) - AA_TEXT[x]; } if(arr_idx == PING_TEXT_IDX) { if (PING_TEXT[x + 1] != -1) return PING_TEXT[x + 1] - PING_TEXT[x] - 1; return sizeof(PING_TEXT) - PING_TEXT[x]; } if(arr_idx == WAI_CATEGORY_TEXT_IDX) { if (WAI_CATEGORY_TEXT[x + 1] != -1) return WAI_CATEGORY_TEXT[x + 1] - WAI_CATEGORY_TEXT[x] - 1; return sizeof(WAI_CATEGORY_TEXT) - WAI_CATEGORY_TEXT[x]; } if(arr_idx == WAI_WEAPON_TEXT_IDX) { if (WAI_WEAPON_TEXT[x + 1] != -1) return WAI_WEAPON_TEXT[x + 1] - WAI_WEAPON_TEXT[x] - 1; return sizeof(WAI_WEAPON_TEXT) - WAI_WEAPON_TEXT[x]; } if(arr_idx == LOADOUTS_TEXT_IDX) { if (LOADOUTS_TEXT[x + 1] != -1) return LOADOUTS_TEXT[x + 1] - LOADOUTS_TEXT[x] - 1; return sizeof(LOADOUTS_TEXT) - LOADOUTS_TEXT[x]; } if(arr_idx == LOADOUTS_STATE_TEXT_IDX) { if (LOADOUTS_STATE_TEXT[x + 1] != -1) return LOADOUTS_STATE_TEXT[x + 1] - LOADOUTS_STATE_TEXT[x] - 1; return sizeof(LOADOUTS_STATE_TEXT) - LOADOUTS_STATE_TEXT[x]; } if(arr_idx == BTN_LAYOUT_TEXT_IDX) { if (BTN_LAYOUT_TEXT[x + 1] != -1) return BTN_LAYOUT_TEXT[x + 1] - BTN_LAYOUT_TEXT[x] - 1; return sizeof(BTN_LAYOUT_TEXT) - BTN_LAYOUT_TEXT[x]; } } if (mode == 1) { if(arr_idx == MODS_TEXT_IDX) return MODS_TEXT[x]; if(arr_idx == VALUES_TEXT_IDX) return VALUES_TEXT[x]; if(arr_idx == VALUES2_TEXT_IDX) return VALUES2_TEXT[x]; if(arr_idx == AR_TEXT_IDX) return AR_TEXT[x]; if(arr_idx == AA_TEXT_IDX) return AA_TEXT[x]; if(arr_idx == PING_TEXT_IDX) return PING_TEXT[x]; if(arr_idx == WAI_CATEGORY_TEXT_IDX) return WAI_CATEGORY_TEXT[x]; if(arr_idx == WAI_WEAPON_TEXT_IDX) return WAI_WEAPON_TEXT[x]; if(arr_idx == LOADOUTS_TEXT_IDX) return LOADOUTS_TEXT[x]; if(arr_idx == LOADOUTS_STATE_TEXT_IDX) return LOADOUTS_STATE_TEXT[x]; if(arr_idx == BTN_LAYOUT_TEXT_IDX) return BTN_LAYOUT_TEXT[x]; } return -1; } function isModHasValues() { if((modName_idx == MODS_TO_VALUES[modName_idx][0]) && (MODS_TO_VALUES[modName_idx][1] != -1)) return TRUE; return FALSE; } function isValuesHasSecondValue(){ if((valName_idx == VALUES_TO_VALUES2[valName_idx][0]) && (VALUES_TO_VALUES2[valName_idx][1] != -1)) return TRUE; return FALSE; } function Do_SwitchSlot() { if(get_val(slot_system_button_hold) && get_ptime(slot_system_button_hold) > 200 && event_press(slot_system_button_next)) { if(currentSlot != get_next_slot(1)) { load_slot(get_next_slot(1)); } display_title = TRUE; } if(get_val(slot_system_button_hold) && get_ptime(slot_system_button_hold) > 200 && event_press(slot_system_button_prev)) { if(currentSlot != get_next_slot(-1)) { load_slot(get_next_slot(-1)); } display_title = TRUE; } } function get_next_slot(int direction) { if(sizeof(slots) <= 1) return currentSlot; for(index=0;index < sizeof(slots);index++) { if(currentSlot == slots[index]) { if(direction == 1) { if(index + 1 == sizeof(slots) && (slots[0] >= 1 && slots[0] <= 8)) return slots[0]; if(slots[index + 1] >= 1 && slots[index + 1] <= 8) return slots[index + 1]; } else if(direction == -1) { if(index == 0 && (slots[sizeof(slots) - 1] >= 1 && slots[sizeof(slots) - 1] <= 8)) return slots[sizeof(slots) - 1]; if(slots[index - 1] >= 1 && slots[index - 1] <= 8) return slots[index - 1]; } return currentSlot; } } return currentSlot; } function Set_Buttons_Layout() { if (buttons_layout >= 0 && buttons_layout <= 11) { BTN_PING = PS4_UP; } BTN_JUMP = PS4_CROSS; BTN_TACTICAL = PS4_L1; BTN_CROUCH = PS4_CIRCLE; BTN_LETHAL = PS4_R1; BTN_USE = PS4_SQUARE; BTN_AIM = PS4_L2; BTN_SWAP = PS4_TRIANGLE; BTN_FIRE = PS4_R2; BTN_SPRINT = PS4_L3; BTN_MELEE = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_TACTICAL = PS4_L2; BTN_LETHAL = PS4_R2; } if (buttons_layout == 1) { BTN_MELEE = PS4_CIRCLE; BTN_CROUCH = PS4_R3; } else if (buttons_layout == 2) { BTN_LETHAL = PS4_L1; BTN_TACTICAL = PS4_R1; BTN_FIRE = PS4_L2; BTN_AIM = PS4_R2; BTN_MELEE = PS4_L3; BTN_SPRINT = PS4_R3; if (swap_on){ BTN_FIRE = PS4_L1; BTN_AIM = PS4_R1; BTN_LETHAL = PS4_L2; BTN_TACTICAL = PS4_R2; } } else if (buttons_layout == 3) { BTN_AIM = PS4_R1; BTN_LETHAL = PS4_L2; if (swap_on){ BTN_LETHAL = PS4_L1; BTN_FIRE = PS4_R1; BTN_TACTICAL = PS4_L2; BTN_AIM = PS4_R2; } } else if (buttons_layout == 4) { BTN_MELEE = PS4_CIRCLE; BTN_AIM = PS4_R1; BTN_LETHAL = PS4_L2; BTN_CROUCH = PS4_R3; if (swap_on){ BTN_LETHAL = PS4_L1; BTN_FIRE = PS4_R1; BTN_TACTICAL = PS4_L2; BTN_AIM = PS4_R2; } } else if (buttons_layout == 5) { BTN_AIM = PS4_L1; BTN_TACTICAL = PS4_R1; BTN_FIRE = PS4_L2; BTN_LETHAL = PS4_R2; BTN_MELEE = PS4_L3; BTN_SPRINT = PS4_R3; if (swap_on){ BTN_FIRE = PS4_L1; BTN_LETHAL = PS4_R1; BTN_AIM = PS4_L2; BTN_TACTICAL = PS4_R2; } } else if (buttons_layout == 6) { BTN_TACTICAL = PS4_CROSS; BTN_JUMP = PS4_L1; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_JUMP = PS4_L2; BTN_LETHAL = PS4_R2; } } else if (buttons_layout == 7) { BTN_TACTICAL = PS4_CROSS; BTN_JUMP = PS4_L1; BTN_MELEE = PS4_CIRCLE; BTN_CROUCH = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_JUMP = PS4_L2; BTN_LETHAL = PS4_R2; } } else if (buttons_layout == 8) { BTN_FIRE = PS4_L1; BTN_TACTICAL = PS4_R1; BTN_LETHAL = PS4_R2; if (swap_on){ BTN_AIM = PS4_L1; BTN_LETHAL = PS4_R1; BTN_FIRE = PS4_L2; BTN_TACTICAL = PS4_R2; } } else if (buttons_layout == 9) { BTN_MELEE = PS4_CROSS; BTN_JUMP = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_TACTICAL = PS4_L2; BTN_LETHAL = PS4_R2; } } else if (buttons_layout == 10) { BTN_MELEE = PS4_R1; BTN_LETHAL = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_TACTICAL = PS4_L2; BTN_MELEE = PS4_R2; } } else if (buttons_layout == 11) { BTN_TACTICAL = PS4_CROSS; BTN_JUMP = PS4_L1; BTN_MELEE = PS4_R1; BTN_LETHAL = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_JUMP = PS4_L2; BTN_MELEE = PS4_R2; } } else if (buttons_layout == 12) { BTN_PING = PS4_L1; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_PING = PS4_L2; BTN_LETHAL = PS4_R2; } BTN_TACTICAL = BTN_PING; } else if (buttons_layout == 13) { BTN_PING = PS4_L1; BTN_MELEE = PS4_CIRCLE; BTN_CROUCH = PS4_R3; if (swap_on){ BTN_AIM = PS4_L1; BTN_FIRE = PS4_R1; BTN_PING = PS4_L2; BTN_LETHAL = PS4_R2; } BTN_TACTICAL = BTN_PING; } } function any_button_pressed() { if (event_press(0) || event_press(1) || event_press(2) || event_press(3) || event_press(4) || event_press(5) || event_press(6) || event_press(7) || event_press(8) || event_press(9) || event_press(10) || event_press(11) || event_press(12) || event_press(13) || event_press(14) || event_press(15) || event_press(16) || event_press(17) || event_press(18) || event_press(19) || event_press(20) || event_press(21) || event_press(22) || event_press(23) || event_press(24) || event_press(25) || event_press(26) || event_press(27) || event_press(28) || event_press(29) || event_press(30) || event_press(31) || event_press(32) || event_press(33) || event_press(34) || event_press(35) || event_press(36) || event_press(37) || event_press(38) || event_press(39) || event_press(40) || event_press(41) || event_press(42) || event_press(43)) return TRUE; return FALSE; } function main_button_pressed(except) { if(except != -1 && event_press(except)) return FALSE; if (event_press(BTN_JUMP) || event_press(BTN_CROUCH) || event_press(BTN_USE) || event_press(BTN_SWAP) || event_press(BTN_TACTICAL) || event_press(BTN_LETHAL) || event_press(BTN_AIM) || event_press(BTN_FIRE) || event_press(BTN_SPRINT) || event_press(BTN_MELEE)) return TRUE; return FALSE; } function block_btn() { set_val(PS4_UP , 0 ); set_val(PS4_DOWN , 0 ); set_val(PS4_LEFT , 0 ); set_val(PS4_RIGHT , 0); set_val(BTN_JUMP , 0 ); set_val(BTN_CROUCH, 0 ); set_val(BTN_MELEE , 0); set_val(PS4_SHARE , 0 ); set_val(PS4_TOUCH , 0 ); set_val(PS4_PS , 0); set_val(XB1_PL1 , 0 ); set_val(XB1_PL2 , 0 ); set_val(XB1_PR1 , 0 ); set_val(XB1_PR2 , 0); } int def; function load_or_save(mode, loadout){ if(mode == LOADS) { if(loadout == -1) { STEADY_AIM = (360 / (min(90, max(STEADY_AIM, 2)))) / 2; current_spvar = 1; Code = get_pvar(get_next_spvar(), 1, 32767, Pin); set_val(TRACE_1,Pin);set_val(TRACE_2,Code); if(Code == Pin) { def = pack_usigned(def,1,3,1); pval_data = get_pvar(get_next_spvar(), 1, 32767, def); toggle_ar[0] = unpack_usigned(pval_data, 0, 1); toggle_ar[1] = unpack_usigned(pval_data, 1, 1); toggle_aa = unpack_usigned(pval_data, 2, 1); toggle_fastreload = unpack_usigned(pval_data, 3, 1); toggle_smartgrenade = unpack_usigned(pval_data, 4, 1); toggle_proneshot[0] = unpack_usigned(pval_data, 5, 1); toggle_proneshot[1] = unpack_usigned(pval_data, 6, 1); toggle_strafeshot[0]= unpack_usigned(pval_data, 7, 1); toggle_strafeshot[1]= unpack_usigned(pval_data, 8, 1); toggle_ghostpeek[0] = unpack_usigned(pval_data, 9, 1); toggle_ghostpeek[1] = unpack_usigned(pval_data, 10, 1); toggle_turbomelee = unpack_usigned(pval_data, 11, 1); toggle_cancelslide = unpack_usigned(pval_data, 12, 1); toggle_bhop = unpack_usigned(pval_data, 13, 1); toggle_drivemod = unpack_usigned(pval_data, 14, 1); def = 0; def = pack_usigned(def,1,0,1); def = pack_usigned(def,1,3,1); pval_data = get_pvar(get_next_spvar(), 1, 32767, def); toggle_quickscope = unpack_usigned(pval_data, 0, 1); swap_on = unpack_usigned(pval_data, 1, 1); inverted_on = unpack_usigned(pval_data, 2, 1); toggle_blockrumble = unpack_usigned(pval_data, 3, 1); toggle_easyfire = unpack_usigned(pval_data, 4, 1); toggle_autorun = unpack_usigned(pval_data, 5, 1); easy_revive = unpack_usigned(pval_data, 6, 1); toggle_afk = unpack_usigned(pval_data, 7, 1); enemy_ping = unpack_usigned(pval_data, 8, 1); easy_plate = unpack_usigned(pval_data, 9, 1); toggle_snackssens = unpack_usigned(pval_data, 10, 1); toggle_trickshot = unpack_usigned(pval_data, 11, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, 0); ping_type = unpack_int16_to_int8(pval_data, 0); buttons_layout = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, 0); ar_type[0] = unpack_int16_to_int8(pval_data, 0); ar_type[1] = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, pack_int8_to_int16(0,25)); aa_type = unpack_int16_to_int8(pval_data, 0); STEADY_AIM = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, pack_int8_to_int16(20,15)); RADIUS = unpack_int16_to_int8(pval_data, 0); STEPS = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, pack_int8_to_int16(20,20)); stickyaim_size = unpack_int16_to_int8(pval_data, 0); stickyaim_time = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, pack_int8_to_int16(13,10)); LEGITRADIUS = unpack_int16_to_int8(pval_data, 0); LEGITSTEPS = unpack_int16_to_int8(pval_data, 1); GEN_SENS = get_pvar(get_next_spvar(), 1, 327,100); ADS_SENS = get_pvar(get_next_spvar(), 1, 327,100); ADS_FAR_SENS = get_pvar(get_next_spvar(), 1, 327,50); FIRE_SENS = get_pvar(get_next_spvar(), 1, 327,100); ADS_FIRE_SENS = get_pvar(get_next_spvar(), 1, 327,100); GRENADE_SENS = get_pvar(get_next_spvar(), 1, 327,100); trainerar_vertical_start[0] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_vertical_end[0] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_vertical_time[0] = get_pvar(get_next_spvar(), -9900, 9900, 0); trainerar_horizontal_start[0] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_horizontal_end[0] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_horizontal_time[0] = get_pvar(get_next_spvar(), -9900, 9900, 0); trainerar_vertical_start[1] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_vertical_end[1] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_vertical_time[1] = get_pvar(get_next_spvar(), -9900, 9900, 0); trainerar_horizontal_start[1] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_horizontal_end[1] = get_pvar(get_next_spvar(), -99, 99, 0); trainerar_horizontal_time[1] = get_pvar(get_next_spvar(), -9900, 9900, 0); } } if(Code == Pin) { if(loadout == 0 || loadout == -1) current_spvar = 39; if(loadout == 1) current_spvar = 44; if(loadout == 2) current_spvar = 49; if(loadout == 3) current_spvar = 54; if(loadout == 4) current_spvar = 59; if(loadout >= -1 && loadout <= 4) { if(loadout != -1) combo_run(LOAD_SAVE); pval_data = get_pvar(get_next_spvar(), 1, 32767, 0); weapon_category[0] = unpack_int16_to_int8(pval_data, 0); weapon_category[1] = unpack_int16_to_int8(pval_data, 1); pval_data = get_pvar(get_next_spvar(), 1, 32767, 0); weapon_name[0] = unpack_int16_to_int8(pval_data, 0); weapon_name[1] = unpack_int16_to_int8(pval_data, 1); smartrecoil_str[0] = get_pvar(get_next_spvar(), 50, 200, 100); smartrecoil_str[1] = get_pvar(get_next_spvar(), 50, 200, 100); pval_data = get_pvar(get_next_spvar(), -32768, 32767, 0); smartrecoil_horizontal[0] = unpack_int16_to_int8(pval_data, 0); smartrecoil_horizontal[1] = unpack_int16_to_int8(pval_data, 1); } count_spvar += 20; } if(Code != Pin && loadout == -1) { toggle_fastreload = 1; toggle_quickscope = 1; toggle_blockrumble = 1; STEADY_AIM = 25; RADIUS = 20; STEPS = 15; stickyaim_size = 20; stickyaim_time = 20; LEGITRADIUS = 13; LEGITSTEPS = 10; GEN_SENS = 100; ADS_SENS = 100; ADS_FAR_SENS = 50; FIRE_SENS = 100; ADS_FIRE_SENS = 100; GRENADE_SENS = 100; smartrecoil_str[0] = 100; smartrecoil_str[1] = 100; } } else if(mode == SAVES) { combo_run(LOAD_SAVE); if(loadout == -1) { current_spvar = 1; set_pvar(get_next_spvar(),Pin); pval_data = pack_usigned(pval_data, toggle_ar[0], 0, 1); pval_data = pack_usigned(pval_data, toggle_ar[1], 1, 1); pval_data = pack_usigned(pval_data, toggle_aa, 2, 1); pval_data = pack_usigned(pval_data, toggle_fastreload, 3, 1); pval_data = pack_usigned(pval_data, toggle_smartgrenade, 4, 1); pval_data = pack_usigned(pval_data, toggle_proneshot[0], 5, 1); pval_data = pack_usigned(pval_data, toggle_proneshot[1], 6, 1); pval_data = pack_usigned(pval_data, toggle_strafeshot[0],7, 1); pval_data = pack_usigned(pval_data, toggle_strafeshot[1],8, 1); pval_data = pack_usigned(pval_data, toggle_ghostpeek[0], 9, 1); pval_data = pack_usigned(pval_data, toggle_ghostpeek[1], 10, 1); pval_data = pack_usigned(pval_data, toggle_turbomelee, 11, 1); pval_data = pack_usigned(pval_data, toggle_cancelslide, 12, 1); pval_data = pack_usigned(pval_data, toggle_bhop, 13, 1); pval_data = pack_usigned(pval_data, toggle_drivemod, 14, 1); set_pvar(get_next_spvar(),pval_data); pval_data = pack_usigned(pval_data, toggle_quickscope, 0, 1); pval_data = pack_usigned(pval_data, swap_on, 1, 1); pval_data = pack_usigned(pval_data, inverted_on, 2, 1); pval_data = pack_usigned(pval_data, toggle_blockrumble, 3, 1); pval_data = pack_usigned(pval_data, toggle_easyfire, 4, 1); pval_data = pack_usigned(pval_data, toggle_autorun, 5, 1); pval_data = pack_usigned(pval_data, easy_revive, 6, 1); pval_data = pack_usigned(pval_data, toggle_afk, 7, 1); pval_data = pack_usigned(pval_data, enemy_ping, 8, 1); pval_data = pack_usigned(pval_data, easy_plate, 9, 1); pval_data = pack_usigned(pval_data, toggle_snackssens, 10, 1); pval_data = pack_usigned(pval_data, toggle_trickshot, 11, 1); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(ping_type, buttons_layout); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(ar_type[0], ar_type[1]); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(aa_type,STEADY_AIM); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(RADIUS, STEPS); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(stickyaim_size, stickyaim_time); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(LEGITRADIUS, LEGITSTEPS); set_pvar(get_next_spvar(),pval_data); set_pvar(get_next_spvar(),GEN_SENS); set_pvar(get_next_spvar(),ADS_SENS); set_pvar(get_next_spvar(),ADS_FAR_SENS); set_pvar(get_next_spvar(),FIRE_SENS); set_pvar(get_next_spvar(),ADS_FIRE_SENS); set_pvar(get_next_spvar(),GRENADE_SENS); set_pvar(get_next_spvar(),trainerar_vertical_start[0]); set_pvar(get_next_spvar(),trainerar_vertical_end[0]); set_pvar(get_next_spvar(),trainerar_vertical_time[0]); set_pvar(get_next_spvar(),trainerar_horizontal_start[0]); set_pvar(get_next_spvar(),trainerar_horizontal_end[0]); set_pvar(get_next_spvar(),trainerar_horizontal_time[0]); set_pvar(get_next_spvar(),trainerar_vertical_start[1]); set_pvar(get_next_spvar(),trainerar_vertical_end[1]); set_pvar(get_next_spvar(),trainerar_vertical_time[1]); set_pvar(get_next_spvar(),trainerar_horizontal_start[1]); set_pvar(get_next_spvar(),trainerar_horizontal_end[1]); set_pvar(get_next_spvar(),trainerar_horizontal_time[1]); } if(loadout == 0) current_spvar = 39; if(loadout == 1) current_spvar = 44; if(loadout == 2) current_spvar = 49; if(loadout == 3) current_spvar = 54; if(loadout == 4) current_spvar = 59; if(loadout >= 0 && loadout <= 4) { pval_data = pack_int8_to_int16(weapon_category[0], weapon_category[1]); set_pvar(get_next_spvar(),pval_data); pval_data = pack_int8_to_int16(weapon_name[0], weapon_name[1]); set_pvar(get_next_spvar(),pval_data); set_pvar(get_next_spvar(),smartrecoil_str[0]); set_pvar(get_next_spvar(),smartrecoil_str[1]); pval_data = pack_int8_to_int16(smartrecoil_horizontal[0], smartrecoil_horizontal[1]); set_pvar(get_next_spvar(),pval_data); } } }