Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===============================================================
- // BUTTON LAYOUT
- //===============================================================
- define FIRE_BTN = PS4_R2;
- define ADS_BTN = PS4_L2;
- define SPRINT_BTN = PS4_L3;
- define PRONE_BTN = PS4_CIRCLE;
- define JUMP_BTN = PS4_CROSS;
- define SWITCHWEAPON_BTN = PS4_TRIANGLE;
- define RELOAD_BTN = PS4_SQUARE;
- define MELEE_BTN = PS4_R3;
- define TACTICAL_BTN = PS4_L1;
- define GRANADE_BTN = PS4_R1;
- define UP = PS4_UP;
- define RIGHT = PS4_RIGHT;
- define DOWN = PS4_DOWN;
- define LEFT = PS4_LEFT;
- define RX = PS4_RX;
- define RY = PS4_RY;
- define LX = PS4_LX;
- define LY = PS4_LY;
- //===============================================================
- // ADJUSTABLE VARIABLES
- //===============================================================
- // Index to find Value Name string - switchable in game with left/right in ModEdit
- int valName_idx;
- int drop_shot_hold;
- int drop_shot_rest;
- int RF_hold;
- int RF_release;
- int AR_vertical;
- int AR_horizontal;
- int polar_aasist_radius;
- int polar_aasist_steps;
- int AimAssistTime;
- int AimAssistSize;
- //---Adjustable Variables Count
- define AMOUNT_OF_VALNAME_IDX = 9;
- //const string TITLE = "My Game"; // 18 char max
- const string TITLE = "N"; // 11 char max
- const string OFF = "OFF";
- const string ON = "ON";
- const string SCRIPT_ONOFF = "SCRIPT WAS";
- // modName # of the last Mod Name string - Used for cycle modName_idx
- define MAX_MODS_COUNT = 6;
- // Mod Name - Text to Display
- const string JUMPSHOT = "Jump Shot" ;
- const string DROPSHOT = "Drop Shot" ;
- const string RAPIDFIRE = "Rapid Fire" ;
- const string HOLDBREATH = "Hold Breath" ;
- const string ANTIRECOIL = "Antirecoil" ;
- const string POLARAIMASSIST = "Aim Assist" ;
- const string BATTSSTICKYAIM = "Assist 2" ;
- // Index to find Mod Name string - switchable in game with left/right in ModMenu
- int modName_idx;
- // Toggles
- int jumpshot_onoff = 0 ;
- int dropshot_onoff = 0 ;
- int rapidfire_onoff = 0 ;
- int holdbreath_onoff = 0 ;
- int antirecoil_onoff = 1 ;
- int polar_aim_assist_onoff = 0 ;
- int ToggleBattsStickyAim = 0 ;
- // Mod VALUES - Text to Display
- const string DROPSHOT_HOLD = "DS Hold" ;
- const string DROPSHOT_REST = "DS Rest" ;
- const string RAPIDFIRE_HOLD = "RF Hold";
- const string RAPIDFIRE_RELEASE = "RF Release" ;
- const string ANTIRECOIL_VERTICAL = "AR Vertical" ;
- const string ANTIRECOIL_HORIZONTAL = "AR Horizont" ;
- const string POLAR_AA_RADIUS = "AA Radius" ;
- const string POLAR_AA_STEPS = "AA Steps" ;
- const string AIMASSIST_TIME = "AA Time";
- const string AIMASSISTSIZE = "AA Size" ;
- // Constant bytes - Convert numbers array - ASCII_NUM[column number]
- const int8 ASCII_NUM[] =
- // 0 1 2 3 4 5 6 7 8 9 (column numbers)
- {48,49,50,51,52,53,54,55,56,57};
- const string NO_EDIT_VAR1 = "No Edit Variables";// 17
- const string NO_EDIT_VAR2 = "for this MOD";// 12
- const uint8 Options [] = {
- 31 , // JUMPSHOT # 1
- 31 , // DROPSHOT # 2
- 9 , // RAPIDFIRE # 3
- 7 , // HOLDBREATH # 4
- 1 , // ANTIRECOIL # 5
- 1 , // POLARAIMASSIST # 6
- 1 // BATTSSTICKYAIM # 7
- };
- const uint8 EditVal [] = {
- 0 , // JUMPSHOT # 1
- 1 , // DROPSHOT # 2
- 1 , // RAPIDFIRE # 3
- 0 , // HOLDBREATH # 4
- 1 , // ANTIRECOIL # 5
- 1 , // POLARAIMASSIST # 6
- 1 // BATTSSTICKYAIM # 7
- };
- const uint8 OptRange [][] = {
- { 0 , 3 }, // JUMPSHOT # 1
- { 0 , 1 }, // DROPSHOT # 2
- { 2 , 3 }, // RAPIDFIRE # 3
- { 0 , 0 }, // HOLDBREATH # 4
- { 4 , 5 }, // ANTIRECOIL # 5
- { 6 , 7 }, // POLARAIMASSIST # 6
- { 8 , 9 } // BATTSSTICKYAIM # 7
- };
- const uint8 Min_Max_Options [][]={
- { 0 , 3 }, // JUMPSHOT # 1
- { 0 , 3 }, // DROPSHOT # 2
- { 0 , 3 }, // RAPIDFIRE # 3
- { 0 , 2 }, // HOLDBREATH # 4
- { 0 , 1 }, // ANTIRECOIL # 5
- { 0 , 1 }, // POLARAIMASSIST # 6
- { 0 , 1 } // BATTSSTICKYAIM # 7
- };
- /////////////////////////////////////////////////////////////////////////////
- /// INITIALIZATION BLOCK
- /////////////////////////////////////////////////////////////////////////////
- init {
- jumpshot_onoff = get_pvar(SPVAR_1,1,3,0);
- dropshot_onoff = get_pvar(SPVAR_2,1,3,0);
- rapidfire_onoff = get_pvar(SPVAR_3,1,3,0);
- holdbreath_onoff = get_pvar(SPVAR_4,1,2,0);
- antirecoil_onoff = get_pvar(SPVAR_5,1,1,1);
- polar_aim_assist_onoff = get_pvar(SPVAR_6,1,1,1);
- ToggleBattsStickyAim = get_pvar(SPVAR_7,1,1,1);
- drop_shot_hold = get_pvar(SPVAR_8, 100,6000, 40);
- drop_shot_rest = get_pvar(SPVAR_9, 100,6000, 80);
- RF_hold = get_pvar(SPVAR_10, 1,1000, 20);
- RF_release = get_pvar(SPVAR_11, 1,1000, 30);
- AR_vertical = get_pvar(SPVAR_12, 1,99, 18);
- AR_horizontal = get_pvar(SPVAR_13, 1,99, 0);
- polar_aasist_radius = get_pvar(SPVAR_14, 1,99, 13);
- polar_aasist_steps = get_pvar(SPVAR_15, 1,99, 15);
- AimAssistTime = get_pvar(SPVAR_16, 1,100, 12);
- AimAssistSize = get_pvar(SPVAR_17, 1,100, 10);
- }// end of init block
- /////////////////////////////////////////////////////////////////////////////
- /// MAIN BLOCK
- /////////////////////////////////////////////////////////////////////////////
- main {//---------------------------------
- swap(PS4_R1, PS4_R2);
- swap(PS4_L1, PS4_L2);
- /////////////////////////////////////////
- if(get_ival(ADS_BTN)){
- if(event_press(PS4_SHARE)){
- EntireScript_OnOff = !EntireScript_OnOff;
- blinck(EntireScript_OnOff);
- cls_oled(0);
- draw_rectangle();
- //display_mod(f_idx, f_string, mod_name, f_toggle, f_option)
- display_mod( center_x(sizeof(SCRIPT_ONOFF)- 1, OLED_FONT_MEDIUM_WIDTH) ,SCRIPT_ONOFF [0],EntireScript_OnOff ,1);
- show_mesage_time = 2000;
- //--- Set Virtual Machine Speed to Default if script is OFF
- if(!EntireScript_OnOff) set_Virtual_Machine_Speed(VM_Default);
- }
- }
- if(show_mesage_time){
- show_mesage_time -= get_rtime();
- if(show_mesage_time <= 0) {
- cls_oled(0);
- }
- }
- //============================================================
- // KILL SWITCH FOR ENTIRE SCRIPT
- //============================================================
- if(EntireScript_OnOff){
- //--- Set Virtual Machine Speed to Default for MENU
- if(ModEdit || ModMenu) set_Virtual_Machine_Speed(VM_Default);
- if(display_EDIT){
- // Clear OLED screen
- cls_oled(0);
- // display_edit(f_idx, f_string, f_print, f_val)
- if(EditVal[ modName_idx ] == 0 ){
- //--- print label
- line_oled(1,45,127,45,1,0);
- printf( center_x( 17, OLED_FONT_SMALL_WIDTH ), 20, OLED_FONT_SMALL, 1, NO_EDIT_VAR1[0] );
- printf( center_x( 12, OLED_FONT_SMALL_WIDTH ), 33, OLED_FONT_SMALL, 1, NO_EDIT_VAR2[0] );
- }
- else {//---- ELSE BEGIN --------------
- /////////////////////////////////////////////
- if(valName_idx == 0){
- display_edit(center_x(sizeof(DROPSHOT_HOLD )- 1,OLED_FONT_MEDIUM_WIDTH),DROPSHOT_HOLD [0],drop_shot_hold);
- drop_shot_hold = edit_val(drop_shot_hold, 100,6000);
- }
- /////////////////////////////////////////////
- if(valName_idx == 1){
- display_edit(center_x(sizeof(DROPSHOT_REST )- 1,OLED_FONT_MEDIUM_WIDTH),DROPSHOT_REST [0],drop_shot_rest);
- drop_shot_rest = edit_val(drop_shot_rest, 100,6000);
- }
- /////////////////////////////////////////////
- if(valName_idx == 2){
- display_edit(center_x(sizeof(RAPIDFIRE_HOLD)- 1,OLED_FONT_MEDIUM_WIDTH),RAPIDFIRE_HOLD[0],RF_hold);
- RF_hold = edit_val(RF_hold,1,1000 );
- }
- /////////////////////////////////////////////
- if(valName_idx == 3){
- display_edit(center_x(sizeof(RAPIDFIRE_RELEASE)- 1,OLED_FONT_MEDIUM_WIDTH),RAPIDFIRE_RELEASE[0],RF_release);
- RF_release = edit_val(RF_release,1,1000 );
- }
- /////////////////////////////////////////////
- if(valName_idx == 4){
- display_edit(center_x(sizeof(ANTIRECOIL_VERTICAL )- 1,OLED_FONT_MEDIUM_WIDTH),ANTIRECOIL_VERTICAL [0],AR_vertical);
- AR_vertical = edit_val(AR_vertical, 0,99 );
- }
- /////////////////////////////////////////////
- if(valName_idx == 5){
- display_edit(center_x(sizeof(ANTIRECOIL_HORIZONTAL )- 1,OLED_FONT_MEDIUM_WIDTH),ANTIRECOIL_HORIZONTAL [0],AR_horizontal);
- AR_horizontal = edit_val(AR_horizontal,-99,99 );
- }
- /////////////////////////////////////////////
- if(valName_idx == 6){
- display_edit(center_x(sizeof(POLAR_AA_RADIUS )- 1,OLED_FONT_MEDIUM_WIDTH),POLAR_AA_RADIUS [0],polar_aasist_radius);
- polar_aasist_radius = edit_val(polar_aasist_radius, 0,99);
- }
- /////////////////////////////////////////////
- if(valName_idx == 7){
- display_edit(center_x(sizeof(POLAR_AA_STEPS )- 1,OLED_FONT_MEDIUM_WIDTH),POLAR_AA_STEPS [0],polar_aasist_steps);
- polar_aasist_steps = edit_val(polar_aasist_steps, 0,99);
- }
- /////////////////////////////////////////////
- if(valName_idx == 8){
- display_edit(center_x(sizeof(AIMASSIST_TIME)- 1,OLED_FONT_MEDIUM_WIDTH),AIMASSIST_TIME[0],AimAssistTime);
- AimAssistTime = edit_val(AimAssistTime,1,100 );
- }
- /////////////////////////////////////////////
- if(valName_idx == 9){
- display_edit(center_x(sizeof(AIMASSISTSIZE)- 1,OLED_FONT_MEDIUM_WIDTH),AIMASSISTSIZE[0],AimAssistSize);
- AimAssistSize = edit_val(AimAssistSize,1,100 );
- }
- }//--- ELSE END -----------
- }// end of display edit
- if(refresh_OLED)
- {
- // Clear OLED screen
- cls_oled(0);
- // Draw Rectangle
- draw_rectangle();
- // Display Mod Name and togle status : ON/OFF
- if(modName_idx == 0)display_mod( center_x(sizeof(JUMPSHOT)- 1, OLED_FONT_MEDIUM_WIDTH) ,JUMPSHOT[0],jumpshot_onoff,Options[ modName_idx ]);
- if(modName_idx == 1)display_mod( center_x(sizeof(DROPSHOT)- 1, OLED_FONT_MEDIUM_WIDTH) ,DROPSHOT[0],dropshot_onoff,Options[ modName_idx ]);
- if(modName_idx == 2)display_mod( center_x(sizeof(RAPIDFIRE)- 1, OLED_FONT_MEDIUM_WIDTH) ,RAPIDFIRE[0],rapidfire_onoff,Options[ modName_idx ]);
- if(modName_idx == 3)display_mod( center_x(sizeof(HOLDBREATH)- 1, OLED_FONT_MEDIUM_WIDTH) ,HOLDBREATH[0],holdbreath_onoff,Options[ modName_idx ]);
- if(modName_idx == 4)display_mod( center_x(sizeof(ANTIRECOIL)- 1, OLED_FONT_MEDIUM_WIDTH) ,ANTIRECOIL[0],antirecoil_onoff,Options[ modName_idx ]);
- if(modName_idx == 5)display_mod( center_x(sizeof(POLARAIMASSIST)- 1, OLED_FONT_MEDIUM_WIDTH) ,POLARAIMASSIST[0],polar_aim_assist_onoff,Options[ modName_idx ]);
- if(modName_idx == 6)display_mod( center_x(sizeof(BATTSSTICKYAIM)- 1, OLED_FONT_MEDIUM_WIDTH) ,BATTSSTICKYAIM[0],ToggleBattsStickyAim,Options[ modName_idx ]);
- refresh_OLED = FALSE;
- }
- if(display_title){
- // clear OLED screen
- cls_oled(0);
- // Display Script Title
- DrawLogo(0, 0, 0);
- // screen saver
- ModMenu = FALSE;
- display_title = FALSE;
- display_black = TRUE;
- }
- //-----------------------------
- // Screen saver (OLED off)
- if(display_black )
- {
- count_black += get_rtime();
- if(count_black >= 5000)
- {
- cls_oled(0);
- count_black = 0;
- display_black = FALSE;
- }
- }
- /////////////////////////////////////////////////////////
- // MENU EDIT VALUES
- if(ModEdit){
- block_all_inputs();
- if(MenuTimeOut){
- CheckIfBtnIsPressed();
- }
- //--- Exit from EDIT MENU
- if(event_release(PS4_CIRCLE)){
- ModEdit = FALSE;
- display_EDIT = FALSE;
- ModMenu = TRUE;
- refresh_OLED = TRUE; // display MODS
- }
- ////////////////////////////////////////////////////////////////////////////////
- // GO FORWARD
- if(!get_ival(ADS_BTN) && event_press(PS4_DOWN)){
- valName_idx ++;
- if(valName_idx > OptRange[ modName_idx ][ 1 ]) valName_idx = OptRange[ modName_idx ][ 1 ];
- refresh_OLED = FALSE;
- display_EDIT = TRUE;
- }
- ///////////////////////////////////////////////////////////////////////////////
- // GO BACK
- if(!get_ival(ADS_BTN) && event_press(PS4_UP)){
- valName_idx --;
- if(valName_idx < OptRange[ modName_idx ][ 0 ]) valName_idx = OptRange[ modName_idx ][ 0 ];
- refresh_OLED = FALSE;
- display_EDIT = TRUE;
- }
- ///////////////////////////////////////////////////////
- if(MenuTimeOut){
- CheckIfBtnIsPressed();
- }
- }// end of EDIT MENU
- /////////////////////////////////////////////////////////
- // EDIT MENU ON/OFF
- if(get_val(ADS_BTN) && event_press(PS4_OPTIONS)){
- ModMenu = TRUE;
- // toggle EditMenu ON/OFF
- modName_idx = 0;
- refresh_OLED = TRUE; // display Title
- display_EDIT = FALSE;
- MenuTimeOut = menu_time_active;
- }
- /////////////////////////////////////////////////////////
- // MENU SYSTEM
- if(ModMenu){
- block_all_inputs();
- //--- Exit from MENU
- if(event_press(PS4_CIRCLE)){
- ModMenu = FALSE;
- ModEdit = FALSE;
- combo_run(MESSAGE);
- }
- //--- Enter in EDIT MENU
- if(event_press(PS4_CROSS)){
- ModMenu = FALSE;
- valName_idx = OptRange[ modName_idx ][ 0 ];
- ModEdit = TRUE;
- display_EDIT= TRUE;
- }
- //Display MOD NAME and togle status
- // Switch MODs
- if( !get_ival(ADS_BTN) && event_press(PS4_DOWN)){
- modName_idx ++;
- if(modName_idx > 6) modName_idx = 0;
- //////////////////////////////////////
- if(modName_idx == 0 ) {
- blinck( jumpshot_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 1 ) {
- blinck( dropshot_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 2 ) {
- blinck( rapidfire_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 3 ) {
- blinck( holdbreath_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 4 ) {
- blinck( antirecoil_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 5 ) {
- blinck( polar_aim_assist_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 6 ) {
- blinck( ToggleBattsStickyAim);
- }
- /////////////////////////////////////
- }
- if(!get_ival(ADS_BTN) && event_press(PS4_UP)){
- modName_idx --;
- if(modName_idx < 0) modName_idx = 6;
- //////////////////////////////////////
- if(modName_idx == 0 ) {
- blinck( jumpshot_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 1 ) {
- blinck( dropshot_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 2 ) {
- blinck( rapidfire_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 3 ) {
- blinck( holdbreath_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 4 ) {
- blinck( antirecoil_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 5 ) {
- blinck( polar_aim_assist_onoff);
- }
- /////////////////////////////////////
- //////////////////////////////////////
- if(modName_idx == 6 ) {
- blinck( ToggleBattsStickyAim);
- }
- /////////////////////////////////////
- }
- //////////////////////////
- // screen saver
- display_black = FALSE;
- display_title = FALSE;
- //////////////////////////////
- // display mod name and Toggle ON/OFF | Scroll Options
- if(!get_ival(ADS_BTN) ){
- if(event_press(PS4_TRIANGLE)){ // go back
- if(modName_idx == 0 ) {
- jumpshot_onoff = f_go_back( jumpshot_onoff );
- }
- if(modName_idx == 1 ) {
- dropshot_onoff = f_go_back( dropshot_onoff );
- }
- if(modName_idx == 2 ) {
- rapidfire_onoff = f_go_back( rapidfire_onoff );
- }
- if(modName_idx == 3 ) {
- holdbreath_onoff = f_go_back( holdbreath_onoff );
- }
- if(modName_idx == 4 ) {
- antirecoil_onoff = f_go_back( antirecoil_onoff );
- }
- if(modName_idx == 5 ) {
- polar_aim_assist_onoff = f_go_back( polar_aim_assist_onoff );
- }
- if(modName_idx == 6 ) {
- ToggleBattsStickyAim = f_go_back( ToggleBattsStickyAim );
- }
- }// go back
- if(event_press(PS4_SQUARE)){// go forward
- if(modName_idx == 0 ) {
- jumpshot_onoff = f_go_forward( jumpshot_onoff);
- }
- if(modName_idx == 1 ) {
- dropshot_onoff = f_go_forward( dropshot_onoff);
- }
- if(modName_idx == 2 ) {
- rapidfire_onoff = f_go_forward( rapidfire_onoff);
- }
- if(modName_idx == 3 ) {
- holdbreath_onoff = f_go_forward( holdbreath_onoff);
- }
- if(modName_idx == 4 ) {
- antirecoil_onoff = f_go_forward( antirecoil_onoff);
- }
- if(modName_idx == 5 ) {
- polar_aim_assist_onoff = f_go_forward( polar_aim_assist_onoff);
- }
- if(modName_idx == 6 ) {
- ToggleBattsStickyAim = f_go_forward( ToggleBattsStickyAim);
- }
- }// go forward
- }
- refresh_OLED = TRUE;
- set_val(PS4_TRIANGLE,0);
- set_val(PS4_SQUARE,0);
- set_val(PS4_UP,0);
- set_val(PS4_DOWN,0);
- if(MenuTimeOut){
- CheckIfBtnIsPressed();
- }
- }
- /////////////////////////////////////////////////////////////
- /// END OF MENU /////////////////////////////////////////
- /////////////////////////////////////////////////////////////
- //==========================================================================================================
- if(!ModEdit && !ModMenu){// code for MODS
- //--- LED COLOR INDICATION
- combo_run(Blink_MOD_ON);
- //===========================================
- // RAPID FIRE ON/OFF
- //===========================================
- if(rapidfire_onoff && KS_RapidFire ) {
- /////////////////////////////////////////
- if ((rapidfire_onoff == 2 && get_ival(TACTICAL_BTN) && get_ival(GRANADE_BTN)) || (rapidfire_onoff == 1 && get_ival(GRANADE_BTN) && !get_ival(TACTICAL_BTN)) || (rapidfire_onoff == 3 && get_ival(GRANADE_BTN))) {
- combo_run(RAPID_FIRE_cmb);
- }
- /////////////////////////////////////////
- }
- //===========================================
- // DROP SHOT
- //===========================================
- if(dropshot_onoff && KS_drop_shot) {
- if(dropshot_onoff == 1){
- //--- FIRE ONLY
- if(get_val(FIRE_BTN) && !get_val(ADS_BTN) ) combo_run(DROP_SHOT_cmb);
- /////////////////////////////////////////
- }
- if(dropshot_onoff == 2){
- //--- ADS & FIRE
- if(get_val(FIRE_BTN) || get_val(ADS_BTN) ) combo_run(DROP_SHOT_cmb);
- /////////////////////////////////////////
- }
- if(dropshot_onoff == 3){
- //--- ADS ONLY
- if(get_val(!FIRE_BTN) && get_val(ADS_BTN) ) combo_run(DROP_SHOT_cmb);
- /////////////////////////////////////////
- }
- }
- //===========================================
- // JUMP SHOT
- //===========================================
- if(jumpshot_onoff) {
- if(jumpshot_onoff == 1){
- //--- FIRE ONLY
- if(get_val(FIRE_BTN) && !get_val(ADS_BTN) ) combo_run(JUMP_SHOT_cmb);
- /////////////////////////////////////////
- }
- if(jumpshot_onoff == 2){
- //--- ADS & FIRE
- if(get_val(FIRE_BTN) || get_val(ADS_BTN) ) combo_run(JUMP_SHOT_cmb);
- /////////////////////////////////////////
- }
- if(jumpshot_onoff == 3){
- //--- ADS ONLY
- if(!get_val(FIRE_BTN) && get_val(ADS_BTN) ) combo_run(JUMP_SHOT_cmb);
- /////////////////////////////////////////
- }
- }// jump shot
- //===========================================
- // HOLD BREATH
- //===========================================
- if(holdbreath_onoff == 1 ) { // Like CoD
- //----------------------------------------------
- if( get_val(ADS_BTN) ) set_val(SPRINT_BTN, 100);// SPRINT BTN
- //----------------------------------------------
- }
- if(holdbreath_onoff == 2 ) {// Like PUBG
- //-----------------------------
- if( get_val(ADS_BTN) ){
- hbreath_time += get_rtime();
- if(hbreath_time > 100){
- set_val(SPRINT_BTN, 100);// SPRINT BTN
- }
- }
- if(event_release(ADS_BTN)){
- hbreath_time = 0;
- }
- //-----------------------------
- }
- //===========================================
- // ANTI RECOIL
- //===========================================
- if(antirecoil_onoff && KS_anti_recoil){
- if( get_val(ADS_BTN) && get_val(FIRE_BTN )) {
- combo_run(AntiRecoil);
- }
- if( abs(get_val(RY)) > AR_Release || abs(get_val(RX)) > AR_Release) {
- combo_stop (AntiRecoil);
- }
- if(get_val(PS4_R3)){
- if(event_press(PS4_UP)){
- AR_vertical += 1;
- }
- if(event_press(PS4_DOWN)) {
- AR_vertical -= 1;
- }
- set_val(PS4_UP,0); set_val(PS4_DOWN,0);
- if(event_press(PS4_LEFT)){
- AR_horizontal -= 1;
- }
- if(event_press(PS4_RIGHT)) {
- AR_horizontal += 1;
- }
- set_val(PS4_LEFT,0); set_val(PS4_RIGHT,0);
- //===============================================
- // SAVE ANTI RECOIL
- //===============================================
- if(event_press(PS4_PS)){
- combo_run(MESSAGE);
- }
- set_val(PS4_PS,0);
- }
- }// end of Anti Recoil
- //===========================================
- // POLAR AIM ASSIST
- //===========================================
- if(polar_aim_assist_onoff){
- 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 += polar_aasist_steps;
- }
- angle = angle % 360;
- sin_angle_dnatme = Polar_Array[angle % 360];
- cos_angle_dnatme = Polar_Array[(angle + 270) % 360];
- cos_angle_dnatme = (cos_angle_dnatme * polar_aasist_radius) / 100;
- sin_angle_dnatme = (sin_angle_dnatme * polar_aasist_radius) / 100;
- if((ACTIVE_WHEN_ADS && get_val(ADS_BTN)) || (ACTIVE_WHEN_FIRING && get_val(FIRE_BTN))){
- if(actual_Magnitude <= polar_aasist_radius){
- sin_angle_dnatme -= actual_Y;
- cos_angle_dnatme -= actual_X;
- }else {
- sin_angle_dnatme = (sin_angle_dnatme * (200 - ((abs(actual_Y) + actual_Magnitude) / 10) * 10) / 200) * max_Magnitude;
- cos_angle_dnatme = (cos_angle_dnatme * (200 - ((abs(actual_X) + actual_Magnitude) / 10) * 10) / 200) * max_Magnitude;
- }
- set_val(X, calculate(actual_X + cos_angle_dnatme, -100, 100));
- set_val(Y, calculate(actual_Y + sin_angle_dnatme, -100, 100));
- }
- }
- //--- CLEAR OLED SCREEN after message
- if(time_to_clear_screen){
- time_to_clear_screen -= get_rtime();
- if(time_to_clear_screen <= 0 ){
- QT_MESSAGE_TIMEOUT();
- }
- }
- //===========================================
- // Batts Sticky Aim
- //===========================================
- if(ToggleBattsStickyAim){
- if(get_ival(GRANADE_BTN))
- combo_run(StickyAim);
- }
- } // end of MODS CODE
- } // ENTIRE SCRIPT KILL SWITCH
- } // end of main block
- /////////////////////////////////////////////////////////////////////////////
- /// COMBO BLOCK
- /////////////////////////////////////////////////////////////////////////////
- //-- VM Speed
- define VM_Default = 0;
- function set_Virtual_Machine_Speed (f_speed){
- if (f_speed == 0) vm_tctrl(-0);//10 ms Default
- else if(f_speed == 1) vm_tctrl(-2);// 8 ms
- else if(f_speed == 2) vm_tctrl(-4);// 6 ms
- else if(f_speed == 3) vm_tctrl(-6);// 4 ms
- else if(f_speed == 4) vm_tctrl(-8);// 2 ms
- else if(f_speed == 5) vm_tctrl(-9);// 1 ms
- }
- int hbreath_time;
- int primary_weapon = TRUE;
- int message_timeout;
- int time_to_clear_screen;
- function QT_MESSAGE_TIMEOUT (){
- // Clear OLED Screen
- cls_oled(0); // will clear oled
- display_title = FALSE;
- }
- int exit_wait = 1500;
- combo EXIT {
- wait(exit_wait);
- cls_oled(0);
- ModMenu = FALSE;
- ModEdit = FALSE;
- display_EDIT = FALSE;
- display_title = FALSE;
- }
- int LED_OnOff;
- int rumble_tipe = RUMBLE_A;
- //===============================================
- // LED BLINK
- //===============================================
- combo LED_BLINK {
- colourled(LED_OnOff);
- wait(200);
- colourled(ColorOFF);
- wait(100);
- colourled(LED_OnOff);
- wait(200);
- colourled(ColorOFF);
- wait(100);
- }
- //===============================================
- // PROFILE VIBRATE 1 , 2 ,3
- //===============================================
- int profile_numbr;
- combo PROFILES_VIBRATE_NOTIFY {
- if(profile_numbr >= 1) set_rumble(rumble_tipe, 100);
- wait(300);
- reset_rumble();
- wait(100);
- if(profile_numbr > 1)set_rumble(rumble_tipe, 100);
- wait(300);
- reset_rumble();
- wait(100);
- if(profile_numbr > 2)set_rumble(rumble_tipe, 100);
- wait(300);
- reset_rumble();
- }
- define PRIMARY_Profile = 1;
- define SECONDARY_Profile = 2;
- function set_profile_notify(f_profile,rumbl_type){
- profile_numbr = f_profile;
- rumble_tipe = rumbl_type;
- combo_run(PROFILES_VIBRATE_NOTIFY);
- }
- //===============================================
- // VIBRATE SETUP
- //===============================================
- combo vibrate {
- set_rumble(rumble_tipe, 100);
- wait(300);
- reset_rumble();
- wait(100);
- set_rumble(rumble_tipe, 100);
- wait(300);
- reset_rumble();
- }
- //===============================================
- // RUMBLE_TIPE
- //===============================================
- function set_rumble_tipe ( val) {
- if( val){ rumble_tipe = RUMBLE_A ; LED_OnOff = Green;}
- else { rumble_tipe = RUMBLE_B ; LED_OnOff = Red ;}
- combo_run(vibrate);
- combo_run(LED_BLINK);
- }
- //===============================================
- // DOUBLE CLICK
- //===============================================
- int b_dblclick;
- function double_click (button) {
- if (b_dblclick) {
- b_dblclick -=get_rtime();
- }
- if (event_press(button) ) {
- if(b_dblclick){
- b_dblclick = 0;
- return TRUE;
- }else{
- b_dblclick = 300;
- return FALSE;
- }
- }
- return FALSE;
- }
- 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};
- define X = RX;
- define Y = RY;
- define ACTIVE_WHEN_ADS = TRUE;
- define ACTIVE_WHEN_FIRING = TRUE;
- define RADIUS = 13 ;
- define STEPS = 15;
- define STEP_INTERVAL = 1;
- int time;
- int angle, cos_angle_dnatme, sin_angle_dnatme;
- int actual_X, actual_Y, actual_Magnitude, max_Magnitude;
- define ColorOFF = 0;
- define Blue = 1;
- define Red = 2;
- define Green = 3;
- define Pink = 4;
- define SkyBlue = 5;
- define Yellow = 6;
- define White = 7;
- data(
- 0,0,0, //0. ColorOFF
- 2,0,0, //1. Blue
- 0,2,0, //2. Red
- 0,0,2, //3. Green
- 2,2,0, //4. Pink
- 2,0,2, //5. SkyBlue
- 0,2,2, //6. Yellow
- 2,2,2 //7. White
- ); // end of data segment--------------
- // COLOR LED function
- //--------------------------------------------------------------
- int data_indx;
- function colourled(color) {
- for( data_indx = 0; data_indx < 3; data_indx++ ) {
- set_led(data_indx,duint8 ((color * 3) + data_indx));
- }
- }
- // Refresh OLED
- int display_title = TRUE;
- int display_black;
- int refresh_OLED;
- int ModMenu;
- int ModEdit;
- int display_EDIT;
- int EntireScript_OnOff = TRUE;// Kill Swith For Entire Script
- int show_mesage_time;
- //////////////////////////////////////
- ///////////////////////////////////////
- int count_black;
- int need_to_be_save;
- int BlinckColor = 3;
- int Col_ind;
- combo StickyAim {
- offset(PS4_RY,AimAssistSize);
- wait(AimAssistTime);
- offset(PS4_RX,AimAssistSize);
- offset(PS4_LX,AimAssistSize);
- wait(AimAssistTime);
- offset(PS4_RY,inv(AimAssistSize));
- wait(AimAssistTime);
- offset(PS4_RX,inv(AimAssistSize));
- offset(PS4_LX,inv(AimAssistSize));
- wait(AimAssistTime);
- }
- function offset(Stick,Value) {
- set_val(Stick, clamp(Value * (100 - abs(get_val(Stick))) / 100 + get_val(Stick), -100, 100));
- return;
- }
- //===============================================================
- // MODS COMBO SECTION
- //===============================================================
- int KS_RapidFire = TRUE;
- combo RAPID_FIRE_cmb {
- set_val(FIRE_BTN, 100);
- wait(RF_hold);
- set_val(FIRE_BTN, 0);
- wait(RF_release);
- }
- //-------------------------------------------------------------------------------------------
- define AR_Release = 28; // change this value to set when antirecoil stops working (min: antirecoil value + 10)
- int KS_anti_recoil = TRUE;
- //-------------------------------------------------------------------------------------------
- int KS_drop_shot = TRUE;
- combo DROP_SHOT_cmb {
- set_val(PRONE_BTN, 100);
- wait(drop_shot_hold);
- wait(drop_shot_rest);
- }
- combo JUMP_SHOT_cmb {
- set_val(MELEE_BTN, 100);
- wait(60);
- wait(1000);
- }
- int ANTI_RECOIL = 18;
- int ANTI_RECOIL_H = 0;
- int anti_recoil;
- int anti_recoil_H;
- //---------------------------------//
- combo AntiRecoil {
- anti_recoil = get_val(RY) + AR_vertical;
- if(anti_recoil > 100) anti_recoil = 100;
- set_val(RY, anti_recoil);
- anti_recoil_H = get_val(RX) + AR_horizontal;
- if(anti_recoil_H > 100) anti_recoil_H = 100;
- set_val(RX, anti_recoil_H);
- }
- function calculate(int v, int lo, int hi) {
- if(v < lo) return lo;
- if(v > hi) return hi;
- return v;
- }
- //=======================================
- // DISPLAY EDIT VALUE ON THE FLY
- //=======================================
- function on_the_fly_display (f_string, f_print, f_val){
- cls_oled(0);
- line_oled(1,18,127,18,1,1);
- printf(f_string, 0, OLED_FONT_MEDIUM, OLED_WHITE, f_print);
- number_to_string(f_val, find_digits(f_val));
- time_to_clear_screen = 2000;
- }
- define FONT_STATS_INDEX_WIDTH = 0;
- define FONT_STATS_INDEX_HEIGHT = 1;
- define FONT_STATS_INDEX_MAXCHARS = 2;
- ////////////////////////////////////////////////////////////////
- function horizontal_center_offset(number_characters, font_size) {
- return (128 - number_characters * FONT_STATS[font_size][FONT_STATS_INDEX_WIDTH]) / 2;
- }
- const string EXIT_TXT1 = "SETTINGS";
- const string EXIT_TXT2 = "WAS SAVED";
- //////////////////////////////////////////////////////////////////////////////
- /// SAVE
- function save_toggles () {
- set_pvar(SPVAR_1,jumpshot_onoff);
- set_pvar(SPVAR_2,dropshot_onoff);
- set_pvar(SPVAR_3,rapidfire_onoff);
- set_pvar(SPVAR_4,holdbreath_onoff);
- set_pvar(SPVAR_5,antirecoil_onoff);
- set_pvar(SPVAR_6,polar_aim_assist_onoff);
- set_pvar(SPVAR_7,ToggleBattsStickyAim);
- set_pvar(SPVAR_8,drop_shot_hold);
- set_pvar(SPVAR_9,drop_shot_rest);
- set_pvar(SPVAR_10,RF_hold);
- set_pvar(SPVAR_11,RF_release);
- set_pvar(SPVAR_12,AR_vertical);
- set_pvar(SPVAR_13,AR_horizontal);
- set_pvar(SPVAR_14,polar_aasist_radius);
- set_pvar(SPVAR_15,polar_aasist_steps);
- set_pvar(SPVAR_16,AimAssistTime);
- set_pvar(SPVAR_17,AimAssistSize);
- combo_run(EXIT);
- }// end of save
- combo MESSAGE {
- wait(20);
- save_toggles ();
- cls_oled(0);
- printf(horizontal_center_offset(sizeof(EXIT_TXT1), OLED_FONT_MEDIUM ), 2, OLED_FONT_MEDIUM, 1, EXIT_TXT1[0]);
- printf(horizontal_center_offset(sizeof(EXIT_TXT2), OLED_FONT_MEDIUM ), 23, OLED_FONT_MEDIUM, 1, EXIT_TXT2[0]);
- exit_wait = 2000;
- }
- function blinck ( var){
- if(var){
- BlinckColor = Green;
- }else{
- BlinckColor = Red;
- }
- combo_run(BLINK_NOTIFY);
- }
- combo BLINK_NOTIFY {
- colourled(BlinckColor);
- wait(300);
- colourled(ColorOFF);
- wait(100);
- colourled(BlinckColor);
- wait(300);
- colourled(ColorOFF);
- }
- int MOD_Color;
- int blink_n ;
- combo Blink_MOD_ON {
- colourled(ColorOFF);
- if( blink_n == 1 ) {
- if(rapidfire_onoff && KS_RapidFire ){colourled(Green);}
- }
- wait(500);
- colourled(ColorOFF);
- wait(1000);
- blink_n +=1;
- if( blink_n > 1)blink_n = 1;
- }
- const uint8 FONT_STATS[][] = {
- { 7, 10, 18 }, // Small
- { 11, 18, 11 }, // Medium
- { 16, 26, 7 } // Large
- };
- function display_edit( f_string, f_print, f_val) {
- printf(f_string, 0, OLED_FONT_MEDIUM, OLED_WHITE, f_print);
- number_to_string(f_val, find_digits(f_val));
- }
- function f_go_forward (f_variable) {
- f_variable +=1;
- if(f_variable > Min_Max_Options[modName_idx][1] )f_variable = Min_Max_Options[modName_idx][1]; // max option
- need_to_be_save = TRUE;
- blinck( f_variable );
- return f_variable;
- }
- function f_go_back (f_variable) {
- f_variable -=1;
- if(f_variable < Min_Max_Options[modName_idx][0] )f_variable = Min_Max_Options[modName_idx][0];
- need_to_be_save = TRUE;
- blinck( f_variable );
- return f_variable;
- }
- // Variables for function number_to_string()
- int ssss;
- int c_c_c,c_val;
- function number_to_string(f_val,f_digits) {
- //=======================================================
- // number_to_string(value to convert, # of digits in value)
- //
- // Display Up to Max 16-bit Signed Integer (-32,768 to 32,767)
- //
- // Convert digits to ASCII
- // Add ASCII character to print buffer
- // Print string centered X & Y on OLED
- //
- //======================================================
- ssss = 1; c_val = 10000;
- if(f_val < 0) //--neg numbers
- {
- putc_oled(ssss,45); //--add leading "-"
- ssss += 1;
- f_val = abs(f_val);
- }
- for(c_c_c = 5; c_c_c >= 1; c_c_c--)
- {
- if(f_digits >= c_c_c)
- {
- putc_oled(ssss,ASCII_NUM[f_val / c_val]);
- f_val = f_val % c_val;
- ssss += 1;
- if(c_c_c == 4)
- {
- putc_oled(ssss,44); //--add ","
- ssss += 1;
- }
- }
- c_val /= 10;
- }
- puts_oled(center_x(ssss - 1,OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,ssss - 1,OLED_WHITE); // adjustable value centered in X
- }
- int n_str_;
- int horiz_X_center_sufix;
- function print_number(f_val,f_digits ,print_s_x , print_s_y , f_font) {
- n_str_ = 1; c_val = 10000;
- if(f_val < 0) //--neg numbers
- {
- putc_oled(n_str_,45); //--add leading "-"
- n_str_ += 1;
- f_val = abs(f_val);
- }
- for(c_c_c = 5; c_c_c >= 1; c_c_c--)
- {
- if(f_digits >= c_c_c)
- {
- putc_oled(n_str_,ASCII_NUM[f_val / c_val]);
- f_val = f_val % c_val;
- n_str_ += 1;
- }
- c_val /= 10;
- }
- puts_oled(print_s_x,print_s_y,f_font,n_str_ - 1,OLED_WHITE); // adjustable value centered in X
- }
- function edit_val( f_val, f_min, f_max ) { // antirecoil = edit_val( 0 , antirecoil, 99 , 99 )
- line_oled(1,18,127,18,1,1);
- // print the range values
- // on the left: min value
- print_number(f_min ,find_digits(f_min) ,4 , 22 , OLED_FONT_SMALL);
- // on the right: max value
- print_number(f_max ,find_digits(f_max) ,97 , 22 , OLED_FONT_SMALL);
- if(get_val(ADS_BTN)){
- if(press_hold(PS4_RIGHT)){
- f_val ++;
- if(f_val > f_max ) f_val = f_max;
- display_EDIT = TRUE;
- need_to_be_save = TRUE;
- }
- if(press_hold(PS4_LEFT)){
- f_val --;
- if(f_val < f_min ) f_val = f_min;
- display_EDIT = TRUE;
- need_to_be_save = TRUE;
- }
- if(press_hold(PS4_UP)){
- f_val +=10;
- if(f_val > f_max ) f_val = f_max;
- display_EDIT = TRUE;
- need_to_be_save = TRUE;
- }
- if(press_hold(PS4_DOWN)){
- f_val -=10;
- if(f_val < f_min ) f_val = f_min;
- display_EDIT = TRUE;
- need_to_be_save = TRUE;
- }
- }
- return f_val;
- }
- function press_hold(f_btn) {
- // return TRUE - event_press()
- //- every 250ms when button is held
- return event_press(f_btn) || get_val(f_btn) && get_ptime(f_btn) > 250
- && get_ptime(f_btn) % (get_rtime() * 8) == 0;
- }
- function find_digits(f_num) {
- // find_digits(value)
- // return Number of Digits in Value Passed
- 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;
- }
- ///////////////////////////////////////////////
- // FUNCTIONS
- function center_x(f_chars,f_font) {
- // center_x(number of chars,font size);
- // return X for Centering String Horizontally
- return (OLED_WIDTH / 2) - ((f_chars * f_font) / 2);
- }
- function draw_rectangle()
- {
- line_oled(1,25,127,25,1,1);
- rect_oled(0, 0,OLED_WIDTH,64,FALSE,1);
- }
- const string ModOption_7_0 = "Disable";
- const string ModOption_7_1 = "Like CoD";
- const string ModOption_7_2 = "Like PUBG";
- define ShotModOptions = 31;
- define FireModOptions = 9;
- const string ModOption_31_0 = "Disable";
- const string ModOption_31_1 = "Fire Only";
- const string ModOption_31_2 = "ADS & Fire";
- const string ModOption_31_3 = "ADS Only";
- const string ModOption_31_4 = "On Fire";
- function display_mod( f_string, mod_name, f_toggle, f_option) {
- // Display MOD_NAME
- printf(f_string, 3, OLED_FONT_MEDIUM, OLED_WHITE, mod_name);
- if(f_option == 1)
- {
- // Display Disable / Enable
- if(f_toggle == 1)
- printf(center_x(sizeof(ON) - 1, OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,OLED_WHITE, ON[0]);// Enable
- else
- printf(center_x(sizeof(OFF) - 1, OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,OLED_WHITE,OFF[0]);// Disable
- }
- if(f_option == ShotModOptions)// 31
- {
- if(f_toggle == 0)
- printf(center_x(sizeof(ModOption_31_0) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_0[0]);// Disable
- if(f_toggle == 1)
- printf(center_x(sizeof(ModOption_31_1) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_1[0]);// Fire Only
- if(f_toggle == 2)
- printf(center_x(sizeof(ModOption_31_2) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_2[0]);// ADS & Fire
- if(f_toggle == 3)
- printf(center_x(sizeof(ModOption_31_3) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_3[0]);// ADS Only
- }
- if(f_option == FireModOptions)// 9 FireModOptions
- {
- if(f_toggle == 0)
- printf(center_x(sizeof(ModOption_31_0) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_0[0]);// Disable
- if(f_toggle == 1)
- printf(center_x(sizeof(ModOption_31_1) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_1[0]);// Fire Only
- if(f_toggle == 2)
- printf(center_x(sizeof(ModOption_31_2) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_2[0]);// ADS & Fire
- if(f_toggle == 3)
- printf(center_x(sizeof(ModOption_31_4) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_31_4[0]);// On Fire
- }
- if(f_option == 7)
- {
- if(f_toggle == 0)
- printf(center_x(sizeof(ModOption_7_0) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_7_0[0]);// Disable
- if(f_toggle == 1)
- printf(center_x(sizeof(ModOption_7_1) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_7_1[0]);// Like CoD
- if(f_toggle == 2)
- printf(center_x(sizeof(ModOption_7_2) - 1, OLED_FONT_MEDIUM_WIDTH),37,OLED_FONT_MEDIUM,OLED_WHITE, ModOption_7_2[0]);// Like PUBG
- }
- }//display mod end
- /*
- ======================================================
- Logo Picture : أŒأ£أŒأ£أ¥.gpc
- ======================================================
- */
- const int16 BOOT_LOGO[] = {
- 128, 64,
- 0x0000,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x007F,0xFE00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x03FF,0xFF80,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x07FF,0xFFC0,0x0000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x1FFF,0xFFE0,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x1FFF,0xFFF0,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x3BFF,0xFFF0,0x0000,0x0000,0x0003,0xC000,0x0000,0x0000,0x3FFF,0xFFF8,0x0000,0x0000,0x0007,
- 0xE000,0x0000,0x0000,0x77FF,0xFFFC,0x0000,0x0000,0x000F,0xE000,0x0000,0x0000,0x77FF,0xFFFC,0x0000,0x0000,0x001F,0xF000,0x4000,0x0000,0xF7FF,0xFFFC,0x0000,0x0002,0x003F,0xF800,0x6000,0x0000,0xF7FF,0xFFFE,0x0000,0x0002,0x007F,
- 0xFC00,0x7000,0x0000,0xEFFF,0xFFFE,0x0000,0x0006,0x00FE,0xFE00,0x3800,0x0000,0xEFFF,0xFFFE,0x0000,0x000E,0x00FC,0xFF00,0x3800,0x0000,0xFFFF,0xFFFE,0x0000,0x001E,0x00F8,0x3F00,0x3C00,0x0000,0xDC1F,0xE0EE,0x0000,0x003C,0x00F8,
- 0x3F80,0x1E00,0x0000,0xD807,0xC07E,0x0000,0x007C,0x00F0,0x1FC0,0x1F00,0x0000,0xD807,0xC03E,0x0000,0x00F8,0x00E0,0x1FC0,0x0F80,0x0000,0xD807,0xC03E,0x0000,0x01E8,0x00C0,0x0FE0,0x0FC0,0x0000,0xDC06,0xE07C,0x0000,0x01D0,0x0080,
- 0x03C0,0x07E0,0x0000,0x5C1C,0xF070,0x0000,0x03B0,0x0000,0x0180,0x03F0,0x0000,0x1E3C,0x7CF8,0x0000,0x07E0,0x0000,0x0080,0x01F8,0x0000,0x7FFC,0x3FFC,0x0000,0x0F40,0x0000,0x0000,0x01FC,0x0000,0x7FFC,0x3FFC,0x0000,0x1E80,0x0000,
- 0x0000,0x00FE,0x0000,0x7FF8,0x3FFC,0x0000,0x3D80,0x0000,0x0000,0x007F,0x0000,0x1CFB,0x3FB8,0x0000,0xFB00,0x0000,0x0000,0x003F,0xC000,0x00FF,0x3F00,0x0001,0xF600,0x0003,0x0000,0x001F,0xE000,0x0C7F,0xFE60,0x0003,0xFC00,0x0003,
- 0x0000,0x000F,0xF000,0x0E7F,0xFEE0,0x000F,0xD800,0x0007,0x8000,0x0007,0xF800,0x063F,0xFCE0,0x001F,0xB000,0x000F,0xC000,0x0003,0xFE00,0x070F,0xE8C0,0x003F,0x6000,0x001F,0xE000,0x0001,0xFF00,0x077F,0x4CC0,0x00FF,0xC000,0x003F,
- 0xF000,0x0001,0xFF80,0x077F,0x6DC0,0x01FF,0x8000,0x00FF,0xF800,0x0000,0x7EE0,0x0700,0x01C0,0x03FF,0x0000,0x01FE,0xFE00,0x0000,0x3F78,0x073E,0xD980,0x0EFC,0x0000,0x01FC,0xFF00,0x0000,0x0F9C,0x03F6,0xDF80,0x3DF8,0x0000,0x03F8,
- 0xFF80,0x0000,0x07EF,0x01FF,0xFF00,0x7BF0,0x0000,0x03F0,0x7F80,0x0000,0x03F3,0xC0FF,0xFE03,0xEFC0,0x0000,0x03E0,0x3FC0,0x0000,0x00FD,0xF07F,0xFC07,0x9F80,0x0000,0x03C0,0x1FE0,0x0000,0x007E,0x7C3F,0xF81F,0x7E00,0x0000,0x0380,
- 0x0FC0,0x0000,0x001F,0x9F00,0x00FC,0xFC00,0x0000,0x0300,0x0380,0x0000,0x0007,0xE7C0,0x03F7,0xF000,0x0000,0x0200,0x0180,0x0000,0x0003,0xF3F0,0x0FEF,0xE000,0x0000,0x0000,0x0000,0x0000,0x0001,0xFCFC,0x3FBF,0x8000,0x0000,0x0000,
- 0x0000,0x0000,0x0000,0x7F3F,0x9EFE,0x0000,0x0000,0x0000,0x0000,0x0000,0x1C00,0x0FEF,0xF3F8,0x0038,0x0000,0x0000,0x0000,0x0000,0x3F00,0x03F9,0xFEE0,0x00FC,0x0000,0x0000,0x0000,0x0000,0x3FC0,0x00FF,0x3FC0,0x03FE,0x0000,0x0000,
- 0x8000,0x0000,0x3FE0,0x1FBF,0xC7F8,0x03FE,0x0000,0x0000,0x8000,0x0000,0x3DE1,0xFF07,0xF8FF,0x87FC,0x0000,0x0000,0xC000,0x0000,0x19F7,0xF9FD,0xFF8F,0xEF98,0x0000,0x0001,0xE000,0x0000,0x00F3,0xC7FE,0x7FE3,0xCF00,0x0000,0x0003,
- 0xF800,0x0001,0x32FC,0x3FF0,0x0FFC,0x3E4C,0x8400,0x0007,0xFC00,0x00FB,0xBB7C,0xFF80,0x01FF,0xBEDD,0xDF00,0x001F,0xFE00,0x00FF,0xDFBD,0xF800,0x001F,0xBDFF,0xFF00,0x003F,0xFFC0,0x00FD,0xFFBD,0xC000,0x0003,0xBDFF,0xBF00,0x007F,
- 0x7FE0,0x00F9,0xFFFC,0x0090,0x2F80,0x3DFF,0x9F00,0x00FF,0x3FE0,0x00F0,0x7F9C,0x00D3,0x2C00,0x39FE,0x0F00,0x01FF,0x1FF0,0x007C,0x001C,0x00D4,0xAF00,0x3800,0x7F00,0x03FE,0x0FF8,0x0038,0x001E,0x60B3,0xAC03,0x3800,0x1C00,0x03F8,
- 0x07F0,0x0000,0x000E,0xE0B4,0xAC07,0x7800,0x0000,0x03F0,0x01E0,0x0000,0x000F,0xF097,0xAC07,0xF000,0x0000,0x03E0,0x0060,0x0000,0x000F,0xF000,0x0007,0xF000,0x0000,0x03C0,0x0000,0x0000,0x0007,0xE000,0x0007,0xE000,0x0000,0x0380
- } // picture
- /*
- ======================================================
- DrawLogo(x, y, invert)
- ======================================================
- */
- int logoX,logoX2,logoY, logoY2;
- int logoBit,logoOffset,logoData;
- function DrawLogo(x, y, invert) {
- logoOffset = 2;
- logoBit = 16;
- for (logoY = 0; logoY < BOOT_LOGO[1]; logoY++) { // Loop the Y axis
- for (logoX = 0; logoX < BOOT_LOGO[0]; logoX++) { // Loop the X axis
- logoData = BOOT_LOGO[logoOffset]
- logoX2 = x + logoX;
- logoY2 = y + logoY;
- if (logoX2 < 0 || logoX2 >= 128) {
- logoX2 -= 128;
- }
- if (logoY2 < 0 || logoY2 >= 64) {
- logoY2 -= 64;
- }
- if (test_bit(logoData, logoBit - 1)) {
- pixel_oled(logoX2, logoY2, !invert);
- }else{
- pixel_oled(logoX2, logoY2, invert);
- }
- logoBit--; // Decrement the bit flag, we are moving to the next bit
- if (!logoBit) { // Check if we have just handled the last bit
- logoBit = 16; // Reset the bit flag
- logoOffset++; // Move to the next value
- }
- }
- }
- }
- const uint8 MenuButtons [] = {
- PS4_TRIANGLE , //0. Up
- PS4_SQUARE , //1. Down
- PS4_UP , //2. go back
- PS4_DOWN , //3. go forward
- PS4_CROSS , //4. enter in Edit Menu
- PS4_CIRCLE , //5. exit Menu
- PS4_OPTIONS , //5. enter in Menu
- PS4_L2 //6. hold ADS
- };//--- End Menu Buttons
- int menu_btn_indx;
- int MenuTimeOut;
- define menu_time_active = 30000;
- function CheckIfBtnIsPressed (){
- for(menu_btn_indx = 0; menu_btn_indx < 7; menu_btn_indx++){
- if(event_press(MenuButtons[menu_btn_indx]) ){
- MenuTimeOut = menu_time_active;
- }
- if(MenuTimeOut){
- MenuTimeOut -=1;
- if(MenuTimeOut <= 0 ){
- ModMenu = FALSE;
- ModEdit = FALSE;
- display_EDIT = FALSE;
- display_black = TRUE;
- }
- }
- }
- }
- function display_MOD_status(f_val,f_size,f_label){
- if(!ModMenu && !ModEdit){
- // Clear OLED Screen
- cls_oled(0); // will clear oled
- printf(f_size, 3, OLED_FONT_MEDIUM ,OLED_WHITE, f_label);
- if( f_val ){
- printf(center_x(sizeof(ON) - 1, OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,OLED_WHITE, ON[0]);//MOD is ON
- }
- else{
- printf(center_x(sizeof(OFF) - 1, OLED_FONT_LARGE_WIDTH),37,OLED_FONT_LARGE,OLED_WHITE, OFF[0]);// MOD is OFF
- }
- time_to_clear_screen = 1500;
- }
- }
- ْ¸Œ½چ½„½ٹ½ژبئ÷د
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement