Having problem with this Script (I'm trying to make it T1)

Titan One general support. Questions, firmware update, feature request.

Having problem with this Script (I'm trying to make it T1)

Postby drzjhon » Sat Oct 20, 2018 4:16 pm

Code: Select all
int     ShotMode_DROP           = TRUE;     //EASY DROP / EASY SLIDE
int     ads_sens                = TRUE;        //AIM CORRECTION
int     Black_Out               = FALSE;       //BLACK OUT MODE
int     Aim_Assist              = TRUE;        //AIM ASSIST
int     easy_run                = TRUE;     //AUTO SPRINT
int     EASYMELEE               = TRUE;     //EASY_MELEE -> TACTICAL BTN LAYOUTS ONLY!
int        Auto_Heal                = TRUE;        //AUTO HEAL
int        Elite_contr_PS4_Comp    = FALSE;    //ELITE CONTROLLER ON PS4? SET TO "TRUE;"
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | | |C|O|N|T|R|O|L|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 */

     define HOME_BTN            =  0;    //PS4_PS        XB1_XBOX
    define VIEW_reset          =  1;    //PS4_SHARE     XB1_VIEW
    define MENU_save          =  2;    //PS4_OPTIONS   XB1_MENU
    define LETHAL            =  3;    //PS4_R1        XB1_RB
    define FIRE_BTN            =  4;    //PS4_R2        XB1_RT
    define PRONE_BTN        =  5;    //PS4_R3        XB1_RS
    define TACTICAL            =  6;    //PS4_L1        XB1_LB
    define ADS_BTN           =  7;    //PS4_L2        XB1_LT
    define SPRINT_BTN       =  8;    //PS4_L3        XB1_LS
    define RX                =  9;    //PS4_RX        XB1_RX
    define RY                = 10;    //PS4_RY        XB1_RY
    define LX                = 11;    //PS4_LX        XB1_LX
    define LY                = 12;    //PS4_LY        XB1_LY
    define UP                = 13;    //PS4_UP        XB1_UP
    define DOWN              = 14;    //PS4_DOWN      XB1_DOWN
    define LEFT              = 15;    //PS4_LEFT      XB1_LEFT
    define RIGHT             = 16;    //PS4_RIGHT     XB1_RIGHT
    define SW_WEAPON_BTN    = 17;    //PS4_TRIANGLE    XB1_Y
    define MELEE_BTN        = 18;    //PS4_CIRCLE    XB1_B
    define JUMP_BTN         = 19;    //PS4_CROSS        XB1_A
    define RELOAD_BTN       = 20;    //PS4_SQUARE    XB1_X
    define GYROX_PR1           = 24;    //PS4_GYROX        XB1_PR1
    define GYROY_PR2           = 25;    //PS4_GYROY        XB1_PR2
    define GYROZ_PL1           = 26;    //PS4_GYROZ        XB1_PL1
    define TOUCH_PL2           = 27;    //PS4_TOUCH        XB1_PL2
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |L|E|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

    define Off      = 0;
    define Green    = 1;
    define Blue     = 2;                                                           
    define Pink     = 3;
    define Red      = 4;                                                           
    define SkyBlue  = 5;
    define Yellow   = 6;
    define White    = 7;
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |D|A|T|A| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

    data(
    0,0,0,0,     // Off
    0,0,2,0,     // Green                                                             
    2,0,0,0,     // Blue                                                               
    0,0,0,2,     // Pink                                                               
    0,2,0,0,     // Red                                                               
    2,0,2,0,     // SkyBlue                                                           
    0,2,2,0,     // Yellow
    2,2,2,2      // White 
);
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
int     ADS_SENS;     
int     GEN_SENS;
int        HIP_SENS;
int     midpoint        = NOT_USE;
int     akimbo_onoff    = FALSE;
int     hold_time        = 35;
int     rest_time        = 35;
int     PrimaryWeapon    = TRUE;
int     RF_KS            = FALSE;
int     R2F_K2S            = TRUE;
int     led_color;
int     rumble_num;
int     delay;
int     aa_p             = 24;
int     aa_n             = -24;
int     aa_delay          = 20;
int     release         = 25;
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|N|T|I| |R|E|C|O|I|L| | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
//--Anti-Recoil
    int RECOIL_VERTICAL[4]
    int RECOIL_HORIZON[4];
    int Recoil_Vertical;   
    int Recoil_Horizon;   
    int Recoil_Pr;
    int STOP_RECOIL;
    int LedTime;
    int AR_RELEASE = 70;
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |I|N|I|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
init {
 
 
//--ANTI RECOIL /--------------------------------------
    RECOIL_VERTICAL[1] = get_pvar(SPVAR_1,-100,100, 11);           
    RECOIL_HORIZON[1] = get_pvar(SPVAR_2,-100,100, 0);
    RECOIL_VERTICAL[2] = get_pvar(SPVAR_3,-100,100, 19);           
    RECOIL_HORIZON[2] = get_pvar(SPVAR_4,-100,100, 0);
//  RECOIL_VERTICAL[3] = get_pvar(SPVAR_5,-100,100, 28);           
//  RECOIL_HORIZON[3] = get_pvar(SPVAR_6,-100,100,-10);
 
//--AIM MODS--------------------------------------------
    GEN_SENS = get_pvar (SPVAR_7, 0, 327, 100);
    ADS_SENS = get_pvar (SPVAR_8, 0, 327, 100);
    HIP_SENS = get_pvar (SPVAR_10, 0, 327, 100);
 
 
 
}//--end of init
 
 
//--MAIN BLOCK
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |M|A|I|N| |B|L|O|C|K| |S|T|A|R|T|S| |H|E|R|E| | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

main {
 
    set_val (TRACE_1, HIP_SENS);
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |B|U|T|T|O|N| |S|W|A|P|S| | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
/*----------DEFAULT------------------------------------------*/
 
//swap( 18, 5);    /* REMOVE "//" before Swap is default is true!
 
/*----------FLIPPED------------------------------------------*/
 
//swap( 4, 3 );        /* REMOVE "//" before Swap is flipped is true!*/
//swap( 7, 6 );        /* REMOVE "//" before Swap is flipped is true!*/   
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |H|A|I|R| |T|R|I|G|G|E|R|S| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
if(get_val(ADS_BTN))  set_val(ADS_BTN, 100);                                     
if(get_val(FIRE_BTN)) set_val(FIRE_BTN,100)
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |P|S|4| |C|O|M|P|A|T|I|B|L|E| |E|L|I|T|E| |C|O|N|T|R|O|L|L|E|R| | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

if(Elite_contr_PS4_Comp){       
            // XBOX ELITE Paddle Left down PL2             
            if(get_val(PS4_TOUCH)) set_val(PS4_TOUCH,0)
 
          if(get_val(PS4_SHARE)) {                       
                if(!get_val(PS4_R3)) {                     
                          set_val(PS4_TOUCH, 100);             
                          set_val(PS4_SHARE, 0);         
                  }                           
                set_val(PS4_R3, 0);     
          } 
     }
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |M|E|N|U| |A|D|S| | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
if(get_val(ADS_BTN)){//  hold ADS button & switch weapon btn + D pad buttons
 
//--RESET EPROM TO DEFAULT VALUES/---------------------------
 
     if (get_val(VIEW_reset) && get_ptime(VIEW_reset)> 600){
      RESET_Defaults();
 
 
    }   
//--STANDARD SET UP/------------------------------------------
 
    if (event_press(UP)){// D pad UP
            RF_KS  = FALSE;
            R2F_K2S  = TRUE;
            akimbo_onoff = FALSE;
            //RAPIDoff = FALSE;           
        }
//--AKIMBO SET UP/-------------------------------------------
 
    if (event_press(DOWN)) {// D pad DOWN 
            RF_KS  = FALSE;
            R2F_K2S  = TRUE;
            akimbo_onoff = TRUE;
             //JITTER = FALSE;
        }     
 
//--RAPID FIRE SET UP/----------------------------------------
 
    if (event_press(RIGHT)) {// D pad RIGHT
            RF_KS  = TRUE;
            R2F_K2S  = TRUE;
            akimbo_onoff = FALSE;
              //JITTER = FALSE;
        }
//--JITTER SET UP/--------------------------------------------
 
   if (event_press(LEFT)) {// D pad LEFT
            RF_KS  = FALSE;
            R2F_K2S  = FALSE;
            akimbo_onoff = FALSE;
              //JITTER = TRUE;
        }
        set_val(2, 0); set_val(1, 0);
}
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |M|E|N|U| |D|-|P|A|D| |D|O|W|N| | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
//--HOLD D-PAD DOWN + TAP /-------------------------------------
if(get_val(DOWN)){// 
 
//--AIM CORRECTION /--------------------------------------------
    if(event_press(FIRE_BTN)){// FIRE BUTTON
        ads_sens = !ads_sens;
        }
        set_val(FIRE_BTN,0);
 
//--AIM ASSIST /------------------------------------------------   
    if(event_press(ADS_BTN)){//ADS BUTTON
        Aim_Assist = !Aim_Assist;       
        }
 
//--BLACK OUT /-------------------------------------------------
    if (event_press(SW_WEAPON_BTN)){// SW_WEAPON_BTN
        Black_Out = !Black_Out;
        }
        set_val(SW_WEAPON_BTN,0);
 
//--AUTO HEAL /-------------------------------------------------
    if (event_press(TACTICAL)){// TACTICAL
        Auto_Heal = !Auto_Heal;
        }
        set_val(TACTICAL,0);
}
 
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |P|R|O|G|R|A|M|M|I|N|G| |O|N| |T|H|E| |F|L|Y| |V|A|L|U|E|S| | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
//--HOLD B / CIRCLE + TAP /-------------------------------------------
    if (get_val(18)) {                             
        if (event_press(0)) { //-- PS4 BTN / XBOX BTN       
            Recoil_Pr = Recoil_Pr + 1;              
            if (Recoil_Pr > 2) {
                 combo_run(GAME_MODE_Combo);
                  Recoil_Pr = 0; }
            //--Blink
            if (Recoil_Pr) {
               combo_run (BLINK_Combo)
                //--rumble
                notify(Recoil_Pr); }
        }
 
        if (event_press(UP) && Recoil_Pr) { RECOIL_VERTICAL[Recoil_Pr] = RECOIL_VERTICAL[Recoil_Pr] + 1;}//--DPAD UP VERTICAL_RECOIL + 1       
        if (event_press(DOWN) && Recoil_Pr) {RECOIL_VERTICAL[Recoil_Pr] = RECOIL_VERTICAL[Recoil_Pr] - 1;}//--DAPD DOWN VERTICAL_RECOIL -1       
        if (event_press(LEFT) && Recoil_Pr){ RECOIL_HORIZON[Recoil_Pr] = RECOIL_HORIZON[Recoil_Pr] - 1;} //--DEPAD LEFT RECOIL_HORIZON - 1       
        if (event_press(RIGHT) && Recoil_Pr) { RECOIL_HORIZON[Recoil_Pr] = RECOIL_HORIZON[Recoil_Pr] + 1;}//--DPAD RIGHT RECOIL_HORIZON + 1
        if (event_press(LETHAL) && Recoil_Pr) { GEN_SENS = GEN_SENS + 2;} //--LETHAL GEN_SENS + 2                                                       
        if (event_press(FIRE_BTN) && Recoil_Pr) {GEN_SENS = GEN_SENS - 2;} //--FIRE_BTN GEN SENS - 2                             
           if (event_press(TACTICAL) && Recoil_Pr){ ADS_SENS = ADS_SENS + 2;} //--TACTICAL ADS_SENS + 2
           if (event_press(ADS_BTN) && Recoil_Pr){ ADS_SENS = ADS_SENS - 2;} //--ADS_BTN ADS_SENS - 2
           if (event_press(SW_WEAPON_BTN) && Recoil_Pr){ HIP_SENS = HIP_SENS + 2;} //--SW_WPN_BTN HIP_SENS + 2
           if (event_press(JUMP_BTN) && Recoil_Pr){ HIP_SENS = HIP_SENS - 2;} //--JUMP_BTN HIP SENS - 2                             
           set_val(0,0);
 
//--device monitor       
   if (get_ptime(18) > 300) { //PRESS AND HOLD CIRCLE/B TO READ VALUES IN DEVICE MONITOR
 
      display(RECOIL_VERTICAL[1],RECOIL_HORIZON[1],RECOIL_VERTICAL[2],RECOIL_HORIZON[2], GEN_SENS, ADS_SENS);   
        }
    }
    //--Clear Device Monitor
    if (event_release(18) && TRACE_1) display(0,0,0,0,0,0);
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|N|T|I| |R|E|C|O|I|L| |O|N| |T|H|E| |F|L|Y| |P|R|O|F|I|L|E|S| | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
//--//XB1_A   
    if(get_val(19))  { //XB1_A
    if(event_press(UP))  {RECOIL_VERTICAL[0] = RECOIL_VERTICAL[1]; RECOIL_HORIZON[0] = RECOIL_HORIZON[1]; STOP_RECOIL = TRUE; LedTime= 100;}//--PROFILE ONE           
    if(event_press(RIGHT)) {RECOIL_VERTICAL[0] = RECOIL_VERTICAL[2]; RECOIL_HORIZON[0] = RECOIL_HORIZON[2]; STOP_RECOIL = TRUE; LedTime= 300;}//--PROFILE TWO
//  if(event_press(DOWN))  {RECOIL_VERTICAL[0] = RECOIL_VERTICAL[3]; RECOIL_HORIZON[0] = RECOIL_HORIZON[3]; STOP_RECOIL = TRUE; LedTime= 500;}//--PROFILE THREE (UNUSED)
    if(event_press(DOWN))  {RECOIL_VERTICAL[0] = 0; RECOIL_HORIZON[0] = 0; STOP_RECOIL = FALSE;} //--ANTI RECOIL OFF
    if(event_press(LEFT))  {RECOIL_VERTICAL[0] = 0; RECOIL_HORIZON[0] = 0; STOP_RECOIL = FALSE;} //--ANTI RECOIL OFF         
 
  }
 
 if(STOP_RECOIL){   
    if (get_val (FIRE_BTN)) combo_run(ANTI_RECOIL_Combo);
 }
    //--anti-recoil release
    if(abs(get_val(RY)) > AR_RELEASE || abs(get_val(RX)) > AR_RELEASE)
        combo_stop(ANTI_RECOIL_Combo);
 
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |C|O|R|R|E|C|T|I|O|N| |O|N| |T|H|E| |F|L|Y| | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
 
    if(ads_sens){                               
         // ADS SENS
        if (get_val(ADS_BTN) ) {       
        sensitivity( 9, midpoint, ADS_SENS);       
        sensitivity(10, midpoint, ADS_SENS);
 
 
        } else {
        // GENERAL SENS
        sensitivity( 9, midpoint, GEN_SENS);
        sensitivity(10, midpoint, GEN_SENS);
 
        }
        if (get_val (FIRE_BTN) && !get_val (ADS_BTN)){
        sensitivity( 9, midpoint, HIP_SENS);       
        sensitivity(10, midpoint, HIP_SENS);
 
    }//end
}
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |E|A|S|Y| |S|L|I|D|E| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
    if(ShotMode_DROP){                                                     
        if(get_val(PRONE_BTN)) combo_run(DROP_SHOT_Combo);                   
    }   
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |S|T|O|P| |B|U|T|T|O|N|S| | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
    if (Recoil_Pr){
    set_val(MENU_save,0); set_val(VIEW_reset,0); set_val(LETHAL,0);
    set_val(FIRE_BTN,0); set_val (TACTICAL,0); set_val (JUMP_BTN,0);
    set_val (SW_WEAPON_BTN,0);
    }
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|K|I|M|B|O| | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
    if(akimbo_onoff && PrimaryWeapon) {
        if(get_val(FIRE_BTN) && !get_val(ADS_BTN)) set_val(ADS_BTN,100);
 
        if(get_val(ADS_BTN) && !get_val(FIRE_BTN)) set_val(FIRE_BTN,100);
        }
//        if(get_val(ADS_BTN) && !get_val(FIRE_BTN)){combo_run (RAPID_AKIMBO);
//        }
//    }
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |E|A|S|Y| |M|E|L|E|E| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
     
 
    if (EASYMELEE)    {
        if (get_val(SPRINT_BTN)) set_val(MELEE_BTN, 100);
        }           
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |E|A|S|Y| |R|U|N| | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
    if(easy_run){                               
        if(get_val(LY) < -5) combo_run(EASY_RUN_Combo);
        }
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|U|T|O| |H|E|A|L| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

    if (Auto_Heal){
    if(event_release(RELOAD_BTN) && get_ptime(RELOAD_BTN)< 200){combo_run(AUTO_HEAL_Combo)
        }
   }
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |B|L|A|C|K| |O|U|T| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

if (!Black_Out){
    if(event_release(SW_WEAPON_BTN)&& get_ptime(SW_WEAPON_BTN)< 200  && !get_val (18)){                         
        PrimaryWeapon = !PrimaryWeapon; notify(1);
        }
         }
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |R|A|P|I|D| |F|I|R|E| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
//-- RF PRIMARY /----------------------------------------------------------
 
if (PrimaryWeapon && RF_KS && get_val(FIRE_BTN))combo_run (RAPID_FIRE_Combo)
 
//- RF SECONDARY /----------------------------------------------------------       
 
 
 
    if(!PrimaryWeapon && R2F_K2S)                     
        if(get_val(FIRE_BTN)) {                                   
        combo_run (RAPID_FIRE_Combo);
        } 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |R|E|S|E|T| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
 
    if(get_val(RELOAD_BTN) && get_ptime(RELOAD_BTN)> 200){ PrimaryWeapon = TRUE; notify(1);}
 
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
 
if(Aim_Assist){
   if(get_val(ADS_BTN))combo_run(AA_XY_Combo);
        else combo_stop(AA_XY_Combo);
 
         }
 
    if(PrimaryWeapon) color_led (Blue);
    if (!PrimaryWeapon && R2F_K2S) color_led (Red);
    if(PrimaryWeapon && RF_KS) color_led (White);
    if(akimbo_onoff && PrimaryWeapon) color_led(SkyBlue);
    if(Aim_Assist && get_val (ADS_BTN)) color_led(Pink);
    if(ads_sens && get_val (FIRE_BTN)) color_led(Pink);
    if(STOP_RECOIL)combo_run(BLINK_AR_Combo)
    if(Recoil_Pr) combo_run (BLINK_Combo);
 
 
}//--end of main
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
combo AA_XY_Combo {
    set_val(10,xy_val(10,aa_p));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_p));
    set_val(11,xy_val(11,aa_p));
    wait(aa_delay)
    set_val(10,xy_val(10,aa_n));
    wait(aa_delay)
    set_val(9,xy_val(9,aa_n));
    set_val(11,xy_val(11,aa_n));
    wait(aa_delay)
}     
 
combo RAPID_FIRE_Combo { 
    set_val(FIRE_BTN,100);
    wait(hold_time);       
    set_val(FIRE_BTN,  0);
    wait(rest_time);     
} 
 
combo ANTI_RECOIL_Combo {
    Recoil_Vertical = get_val(RY) + RECOIL_VERTICAL[0];
    if(Recoil_Vertical > 100) Recoil_Vertical = 100;
    set_val(RY, Recoil_Vertical);
    Recoil_Horizon = get_val(RX) + RECOIL_HORIZON[0];
    if(Recoil_Horizon > 100) Recoil_Horizon = 100;
    set_val(RX, Recoil_Horizon);
}
combo BLINK_AR_Combo {
    wait(LedTime);
    color_led(Off);
    wait(LedTime);
//    color_led(led_color);
}
combo BLINK_Combo {
color_led (Yellow);
wait (100);
color_led(led_color);
wait (500);
}
 
 
 
combo GAME_MODE_Combo {
    set_rumble (RUMBLE_B, 100);
    wait (600);
    reset_rumble();
    save_pvars ();
 
    display(0,0,0,0,0,0);
}   
 
//combo RESET_Defaults {
//    RECOIL_VERTICAL[1] =  11;           
//    RECOIL_HORIZON[1] =  0;
//    RECOIL_VERTICAL[2] = 19;           
//    RECOIL_HORIZON[2] =  0;
//    RECOIL_VERTICAL[3] =  28;           
//    RECOIL_HORIZON[3] = -10;
//    GEN_SENS = 120;
//    ADS_SENS = 100;
//    Aim_Assist_Level = 4;
//    delayA = (3 * valueA ) / Aim_Assist_Level;
//    wait (50);
 //   notify(1);
 //   wait (500);
//    save_pvars();
//}
//--Loop to Rumble Controller
combo NOTIFY_Combo {
    delay = rumble_num * 400;
    rumble();
    wait(5);
    wait(delay);
}
combo RUMBLE_Combo {
    set_rumble(RUMBLE_A,100);
    wait(250);
    reset_rumble();
    wait(100);
    rumble_num = rumble_num - 1;
    rumble_2();
}
combo RUMBLE_2_Combo {
    set_rumble(RUMBLE_A,100);
    wait(250);
    reset_rumble();
    wait(100);
    rumble_num = rumble_num - 1;
    rumble();
}
 
combo DROP_SHOT_Combo {   
    set_val(PRONE_BTN,100);
    wait(500)
}
 
combo AUTO_HEAL_Combo {   
  wait(1500);
  set_val(TACTICAL,100);
//  combo_run (STANDARD_ON);
  wait(100);     
}
 
combo EASY_RUN_Combo {                 
    set_val(SPRINT_BTN,100);       
    wait(30);                     
    wait(100);                   
} 
function notify(rum_num) {
    if (Recoil_Pr) rumble_num = Recoil_Pr;
    else if (!rum_num) rumble_num = 2;
    else if (rum_num) rumble_num = rum_num;
    combo_run(NOTIFY_Combo);
}
function xy_val(f_axis,f_val) {
    if(abs(get_val(f_axis)) < release)
        return f_val;
    return get_val(f_axis);
}
function rumble() {
    if (rumble_num) combo_run(RUMBLE_Combo);
}
function rumble_2() {
    if (rumble_num) combo_run(RUMBLE_2_Combo);
}
function RESET_Defaults () {
 
    RECOIL_VERTICAL[1]11;           
    RECOIL_HORIZON[1]0;
    RECOIL_VERTICAL[2] = 19;           
    RECOIL_HORIZON[2]0;
//    RECOIL_VERTICAL[3] =  28;           
//    RECOIL_HORIZON[3] = -10;
    GEN_SENS = 100;
    ADS_SENS = 100;
    HIP_SENS = 100;
//    wait (50);
    notify(1);
//    wait (500);
    save_pvars();
    }
 
function save_pvars (){
    set_pvar(SPVAR_1 , RECOIL_VERTICAL[1]);   
    set_pvar(SPVAR_2 , RECOIL_HORIZON[1]);
    set_pvar(SPVAR_3 , RECOIL_VERTICAL[2]);   
    set_pvar(SPVAR_4 , RECOIL_HORIZON[2]);
//    set_pvar(SPVAR_5 , RECOIL_VERTICAL[3]);   
//    set_pvar(SPVAR_6 , RECOIL_HORIZON[3]);
    set_pvar(SPVAR_7 , GEN_SENS);
    set_pvar(SPVAR_8 , ADS_SENS);
    set_pvar(SPVAR_10, HIP_SENS);
 
    notify(1);
    }
//-----------------------------------------------   
function display(var1,var2,var3,var4,var7,var8) {
    set_val(TRACE_1, var1);
    set_val(TRACE_2, var2);
    set_val(TRACE_3, var3);
    set_val(TRACE_4, var4);
    set_val(TRACE_5, var7);
    set_val(TRACE_6, var8);
}
function color_led(colour) {
    set_led(LED_1, dbyte(colour * 4));
    set_led(LED_2, dbyte((colour * 4) + 1));
    set_led(LED_3, dbyte((colour * 4) + 2));
    set_led(LED_4, dbyte((colour * 4) + 3));
}
User avatar
drzjhon
Sergeant
Sergeant
 
Posts: 6
Joined: Wed Sep 26, 2018 4:38 pm

Re: Having problem with this Script (I'm trying to make it T

Postby Scachi » Sat Oct 20, 2018 4:33 pm

Move the data thing to the very top.
After that you get a warning on compile about a too short wait time but you should be able to run this script, ignoring the warning. Or set that wait time to 10 instead 5 then.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Having problem with this Script (I'm trying to make it T

Postby drzjhon » Sat Oct 20, 2018 4:41 pm

Worked, thanks.
User avatar
drzjhon
Sergeant
Sergeant
 
Posts: 6
Joined: Wed Sep 26, 2018 4:38 pm


Return to Titan One Device

Who is online

Users browsing this forum: No registered users and 90 guests