T1/CM to Titan Two Script Converter [v0.26r6 - 11/09/2019]

GPC script programming for Titan Two device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher

Re: T1/CM to Titan Two Script Converter [v0.26r1 - 08/27/201

Postby antithesis » Wed Aug 28, 2019 3:49 am

Thanks for the update Buffy, I'll check it out :)
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1709
Joined: Sat May 28, 2016 10:45 pm

device MAX Conversion Errors.

Postby herblore » Mon Sep 30, 2019 7:43 am

Cannot figure this out. Long time device Max Plus User and trying to compile my gpc codes on this program and keep getting errors. Here is the error:


GPC error: the_apex_legends_script_-_master_edition_-_the_#1_script_for_apex_legends_.gpc(123): syntax error, unexpected IDENTIFIER 'define'.

Here is the code.

Code: Select all
// GPC Online Library
// the_apex_legends_script_-_master_edition_-_the_#1_script_for_apex_legends_.gpc
 
 
/*V5.1
---PLEASE SHARE RECOIL VALUES IN THE SUPPORT TOPIC---
---VISIT SUPPORT TOPIC: tinyurl.com/support-top1c---
 
 
ABOUT AIM ASSIST IN APEX
In-game sensitivities higher than 8 and scopes other than 1-2x scopes will shut off the aim assist game mechanics, meaning that
Aim Assist mod will have no effect. “Aim Assist Values” (see further below) affects how much the mod shakes your screen to apply the aim assist.
For best performance, it should be only shaking slightly (so that it is barely noticeable). If you are not sure what values to use: you
can adjust these values on the fly!! See manual for more info. It is worth mentioning that the Apex Legends' in-game aim assist mechanic
is not very strong. The same as with COD WW2, you may have the impression that aim assist is NOT working. To check if it is working, team up
and ask your buddy to move around whilst you aim at him, like so: youtu.be/xJRDH5xs2wM
Now, given the fact that there is so little Aim Assist (and other aim abuse options) available for APEX, consider not to focus Aim Assist,
but rather focus on Aim Corrections because Aim Corrections WILL have a great impact on your accuracy, more than anyting else for that matter.
Just remember: Apex is nothing like Fortnite: just like the game, this script it is not targeting kiddies who get a hard-on because of some aim bot
ruining the game. Apex requires real skills. So, if you suck at Apex, dont blame in on the script or on the game! ;)
PS: this is the best script for Apex, for sure. Help me keep it up-to-date: are mods PATCHED? No longer working? LET ME KNOW!! THANKS!!
 
 
  ___  ____  ____  ____   ___  ____  __ _  ____
 / __)(  _ \(  __)/ ___) / __)(  __)(  ( \/ ___)
( (__  )   / ) _) \___ \( (__  ) _) /    /\___ \
 \___)(__\_)(____)(____/ \___)(____)\_)__)(____/
                 PROUDLY PRESENTS       
                   _____  ________   __         
             /\   |  __ \|  ____\ \ / /         
            /  \  | |__) | |__   \ V /           
           / /\ \ |  ___/|  __|   > <           
          / ____ \| |    | |____ / . \           
  _      /_/___ \_\_| ___|______/_/_\_\_   _____
 | |    |  ____/ ____|  ____| \ | |  __ \ / ____|
 | |    | |__ | |  __| |__  |  \| | |  | | (___ 
 | |    |  __|| | |_ |  __| | . ` | |  | |\___ \
 | |____| |___| |__| | |____| |\  | |__| |____) |
 |______|______\_____|______|_| \_|_____/|_____/
 
      _  _____ __ _     __ _ _________ _   
  |V||_|(_  | |_ |_)   |_ | \ |  |  | / \|\|
  | || |__) | |__| \   |__|_/_|_ | _|_\_/| |
 
---------------------------------------------------------------------------
                  _    ,----------------------------------------------.
                __))   | INSTRUCTIONS: tinyurl.com/scriptinstructions |
              ( oo)   _)---------------------------------------------'
----------ooO--(_)--Ooo----------------------------------------------------
---PLEASE READ THE INSTRUCTIONS!!! OPEN THE URL ABOVE IN YOUR BROWSER!
 
The new aim corrections work the same as before, but now with a user dynamic touch of the aim stick. The amount of pressure
will determine your sensitivity. Higher multipliers (15 and well above) will make aim corrections more static. If MP is making
you over-aim, try MP 18 or 20 for example.
 
      ████████████████████████████████████
     █╔════════════════════════════════╗█
     █║USER CUSTOMIZING & CONFIGURATIONâ•‘â–ˆ
     █╠════════════════════════════════╣█
     █║*/
define    STCK/*Sticks*/    = 0; /*â•‘â–ˆ
     █║*/
define    BTTN/*Buttons*/    = 0; /*â•‘â–ˆ
     █║*/
define    Swap            = 0; /*â•‘â–ˆ Swap= 1; will swap bumpers<->triggers
     █║*/
define    Easy_Thumbs        = 1; /*â•‘â–ˆ
     █╠════════════════════════════════╣█
     █║*/
define Hair_triggers    = 1; /*â•‘â–ˆ
     █║*/
define    Aim__Abuse        = 0; /*â•‘â–ˆ Will activate when ADS is FULLY pressed
     █║*/
define Fast_Heal_Swap    = 0; /*â•‘â–ˆ HOLD D-PAD DOWN + TAP PS4_OPTIONS/XB1_MENU
     █║*/
define AIM__CORRECT    = 2; /*â•‘â–ˆ [0 = OFF] [1 = ADS SENS][2 = ADS SENS & ADS & ADS+FIRE SENS]
     █║*/
int    Multiplier        = 15 /*â•‘â–ˆ IN THE GAME MENU HIGHER YOUR STICK SENSITIVITY WITH 2 - 3 CLICKS
     █╚════════════════════════════════╝█
     ████████████████████████████████████
 
In the box above fill out your btn & stick layout and
the mods you want to use. From here on your script will
load exactly as you congfigured it above.
oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
  __               
 (_ _|_ o  _ |   _
 __) |_ | (_ |< _>             
 
0 = Default
1 = Southpaw
2 = Legacy
3 = Legacy-Southpaw
 
oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
 
 |_)    _|_ _|_  _  ._   _
 |_) |_| |_  |_ (_) | | _>
 
0 = Default
1 = Bumper Jumper
2 = Button Puncher
3 = Evolved
4 = Grenadier
5 = Ninja
 
oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo 
 ___                     
  | |_      ._ _  |_   _
  | | | |_| | | | |_) _>
 
0 = not activated
1 = Auto Sprint activated = on your Left Thumb (just push forward to run)                                                       
2 = Auto Sprint activated + Easy Jump under Left Stick Click        
3 = Auto Sprint activated + Easy Crouch/Slide under Left Stick Click
4 = Auto Sprint activated + Easy Melee under Left Stick Click
5 = Auto Sprint activated + Easy Ping under Left Stick Click
6 = Auto Sprint activated + Easy Ability under Left Stick Click
7 = Auto Sprint activated + Easy Ultimate Ability under Left Stick Click
8 = Auto Sprint activated + Auto Ping Enemy under Left Stick Click
9 = Auto Sprint activated + Fast_Heal_Swap under Left Stick Click
 
oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo 
 
  /\  | |    _ _|_ |_   _  ._
 /--\ | |   (_) |_ | | (/_ | 
 
0 = NOT USE / NOT load by default
1 = USE / LOAD BY DEFAULT.
For example: if you want Swap to be True (R1<->R2 & L1<->L2) you fill
out 1. If you do not want this to be True, you leave it 0.
*/

 
const byte BL[][] = {{3,19,18,5,6},{3,6,18,5,19},{3,19,5,18,6},{3,6,5,18,19},
{13,19,18,5,6},{19,6,3,5,18}}; const byte SL[][] ={{12,11,9,10},{10,9,11,12},
{12,9,11,10},{10,11,9,12}}; const byte AR[][] = {{0,0,0},{0,0,0},{30,18,42},
{35,25,55},{28,14,42}}; data(0,0,3,0,3,0,0,0,0,0,0,3,0,3,0,0,3,0,3,0);
 
int ayout;
define SL_D= 0, SL_S= 1, SL_L= 2, SL_L_S= 3;
int _ayout;                                   
define BL_D= 0, BL_B= 1, BL_B_P= 2, BL_E= 3, BL_G= 4, BL_N= 5;
//oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo */
int PING, JUMP, CROUCH, MELEE, ABILITY;
int L__Y, L__X, R__X, R__Y;
//oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo */
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |V|A|R|I|A|B|L|E|S| | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 
 
int ar_t[5];
int ar_s[5];
int ar_e[5]
 
int idx;         
int key = 145;   
int record;
int Pr_mode=FALSE;
 
int i;             
int i_val;
int i_pnt;
int i_num;
int i_cnt;
int v,ar_y;
int Auto_Sprint;
int T_Button;                           
define Press_btn= 8;
 
int AA_1=TRUE;
int AA_2=TRUE;
 
int RF_1 = FALSE;
int RF_2 = FALSE;
int c = TRUE;
int r_o_f = 153;
int r = 0;
int b;
int res;
int H__T;
int R__T;
 
int Switch;
int Weapon1 = 0;
int Weapon2 = 1;
int btn;
 
 
// Fast Heal Swap
//--starting position is up & left should be med-kit
int w_x = -100; //--wheel position left
int w_y =  100; //--wheel position up
 
int window_time = 250; //--time in ms to hold UP before moving
int xy_time = 20; //--time to hold LX & LY 
int rs_x;
int rs_y;
int combo_count;
 
 
//The new aim corrections work the same as before, but now with a user dynamic touch of the aim stick. The amount of pressure will determine your sensitivity.
//Higher multipliers (15 and well above) will make aim corrections more static again, if you prefer the old method, simply higher the MP. Try MP 18 or 20 for example.
//---Zoom sens variables
int ADS_SENS, GEN_SENS=100, ADS_FIRE_SENS, Sens, coRR;
int c___x,c___y;
 
 
//______________________AIM ASSIST - IF YOU EXPERIENCE SHAKING ___________________
//Aim Assist values: a higher value = stronger aim assist but also ads more shake
//So if you experience shake lower these values by 1 until the shaking stops
int a__p = 21; // Aim Assist Pos Value
int a__n = 21; // Aim Assist Neg Value
int aa_delay =15;//If aim assist does not stick long enough, increase wait time
//_________________________________________________________________________________
//Aim Abuse Values
int HOLD = 284;
int RELEASE = 19;
 
init {
 
    record = get_pvar(SPVAR_16,140,150,140);
    if(record == key) {
        ar_t[0] = get_pvar(SPVAR_1 ,-100,100,0);  ar_t[1] = get_pvar(SPVAR_2, -100,100,0);  ar_t[2] = get_pvar(SPVAR_3, -100,100,0);
        ar_t[3] = get_pvar(SPVAR_4, -100,100,0);  ar_t[4] = get_pvar(SPVAR_5, -100,100,0);  ar_s[0] = get_pvar(SPVAR_6, -100,100,0);
        ar_s[1] = get_pvar(SPVAR_7, -100,100,0);  ar_s[2] = get_pvar(SPVAR_8, -100,100,0);  ar_s[3] = get_pvar(SPVAR_9, -100,100,0);
        ar_s[4] = get_pvar(SPVAR_10,-100,100,0);  ar_e[0] = get_pvar(SPVAR_11,-100,100,0);  ar_e[1] = get_pvar(SPVAR_12,-100,100,0);
        ar_e[2] = get_pvar(SPVAR_13,-100,100,0);  ar_e[3] = get_pvar(SPVAR_14,-100,100,0);  ar_e[4] = get_pvar(SPVAR_15,-100,100,0);
        a__p = get_pvar(PVAR_7,-60,60,21); a__n = get_pvar(PVAR_8,-60,60,21); aa_delay = get_pvar(PVAR_9,-60,60,20);
    }
}
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |M|A|I|N| |B|L|O|C|K| |S|T|A|R|T|S| |H|E|R|E| | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

main{
 
    c___x = d___z(R__X,0);
    c___y = d___z(R__Y,0);
    set_val (30, L__X);
 
L__Y            = SL[ayout][0];
L__X            = SL[ayout][1];
R__X            = SL[ayout][2];
R__Y            = SL[ayout][3];
 
PING            = BL[_ayout][0];
JUMP            = BL[_ayout][1];
CROUCH            = BL[_ayout][2];
MELEE            = BL[_ayout][3];
ABILITY            = BL[_ayout][4];
 
_ayout     = BTTN;
ayout     = STCK;
 
if (Swap == 1){
 swap(3,4 ); swap(6,7);}
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |E|A|S|Y| |T|H|U|M|B| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 if (Easy_Thumbs >  0)     Auto_Sprint=TRUE;
 if (Easy_Thumbs == 2)     T_Button = JUMP;
 if (Easy_Thumbs == 3)     T_Button = CROUCH;
 if (Easy_Thumbs == 4)     T_Button = MELEE;
 if (Easy_Thumbs == 5)     T_Button = PING;
 if (Easy_Thumbs == 6)     T_Button = ABILITY;
 
 if (Easy_Thumbs > 1 && Easy_Thumbs <7 && get_val(Press_btn)){set_val(T_Button, 100);}
 else if (Easy_Thumbs == 7 && get_val(Press_btn)){set_val(3, 100);set_val(6, 100);}
 else if (Easy_Thumbs == 8 && get_val(Press_btn)){combo_run (Auto_Ping);}
 else if (Easy_Thumbs == 9 && get_val(Press_btn)){rs_x = w_x; rs_y = w_y;}
    if(rs_x || rs_y)
    combo_run(HEAL);
 
if (get_val (7) && get_val (14) && get_ptime(14)> 1000){Pr_mode=TRUE; combo_run (Vibrate);}
  //--switch Weapon1 / Weapon2
    if(event_press(17) && !get_val(14))
 
        Switch=!Switch;
/*__________________________________________________________________
                            ** - FIX FOR RAPID FIRE - */

 
if (!Switch && RF_1 || Switch && RF_2)
     {                                    //______start RF
     set_bits(b, 0, 15, 255*257);
         res = (b - ((1500*10)+ 536))*-1;
             H__T = res / r_o_f;
                 R__T = H__T - 20;
                     if(R__T < 0) R__T = 0;
                         r = r - get_rtime()*2;
                 if(event_press(4))
                 {
             set_val(4, 100); c = TRUE; r = H__T;
             }
         else if(get_val(4) && c)
             {
             set_val(4, 100);
             }
         else if(!c)
             {
             set_val(4, 0);
             }
         if(!get_val(4) && r<=0 && c == FALSE)
             {
             r = H__T; c =TRUE;
             }
         if(r<=0 && c == TRUE)
             {
             r = R__T; c =FALSE;
             }
         }                                /*_____end RF
/*___________________________________________________________________
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| | |C|O|R|R|E|C|T|I|O|N|S| | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
 
 
    if(AIM__CORRECT==1||AIM__CORRECT==2)
    {//----------------------------start AIM CORRECTIONS
    //---multilplied variables
    ADS_SENS=110-(Multiplier*2) +coRR /10; ADS_FIRE_SENS=105-(Multiplier*2) +coRR/10;
    coRR = isqrt(abs(c___x) * abs(c___x) + abs(c___y) * abs(c___y));
       if (get_val (7))
                                {   
                                      if(get_val(4) && get_val(7))                             
                                              {
                                              if (AIM__CORRECT==2){Sens = ADS_FIRE_SENS;}
                                              else Sens =ADS_SENS;
                                              }
                                    if(!get_val(4) && !get_val(7))
                                              {
                                            Sens = GEN_SENS;
                                              }   
              if(!get_val(4) && get_val(7))
                                              {
                                            Sens = ADS_SENS;
                                              }
 
 
            else
            {
            Sens = GEN_SENS;
 
 
            }
    }
        if(Sens>100) Sens = 100
        sensitivity(R__X, NOT_USE, Sens);
        sensitivity(R__Y, NOT_USE, Sens);
    }//----------------------------end AIM_CORRECTIONS
 
 
//--colors for XBOX controller*/
    if(get_controller () == PIO_XB1)
    {
        if(idx == 0) led_color(6); // White
        if(idx == 1) led_color(0); // Green
        if(idx == 2) led_color(1); // Blue
        if(idx == 3) led_color(idx); //Red
        if(idx == 4) led_color(4); // SkyBlue
    }
    //--colors for PS4 controller
    else
        led_color(idx);
 
//--calculate values for progression
 
    //--adding or subtracting
    if((AR[idx][1] + ar_s[idx]) < (AR[idx][2] + ar_e[idx]))
        i_val = 1;
    else
        i_val = -1;
    //--iteration point for progression
    i_pnt = (AR[idx][0] * 10) / (abs((AR[idx][1] + ar_s[idx]) - (AR[idx][2] + ar_e[idx])));
 
 
//--reset counters/pointers
    if(!get_lval(4))
    {
       ar_y = AR[idx][1] + ar_s[idx];
       i_cnt = 0;
       i_num = 0;
    }
 
    if(get_val(4))
    {
 
        if(!p_complete()) 
            ar_y = p_val();
        else
            ar_y = AR[idx][2] + ar_e[idx];
        //--set RY to anti recoil value
            if(y_val() > 100)
                set_val(R__Y, 100);
         else
            set_val(R__Y,y_val());
    }
if (Aim__Abuse==1)
    if(get_lval(7)> 99){combo_run(AimAbuse);}
    if(event_release(7)){ combo_stop(AimAbuse);}
 
    //Heal Swap Activation   
    //Down arrow is pressed
if (Fast_Heal_Swap==1){
if(get_val (14) && event_press(2)) {
    rs_x = w_x;
    rs_y = w_y;}
    if(rs_x || rs_y)
    combo_run(HEAL);
    set_val(2,0);
}   
 
if(!Switch)
{
    idx = Weapon1;
 
    //--select your "primary"
    if(get_val(14) && !get_val(7))
    { // DOWN start   
 
        if(event_press(20))
            {Weapon1 = 2; btn=20;} // Pink
        if(event_press(19))
            {Weapon1 = 1; btn=19;} // Blue
        if(event_press(18))
            {Weapon1 = 3; btn=18;} // Red
        if(event_press(17))
            {Weapon1 = 0; btn=17;} // Green
        if(event_press(5))
            {Weapon1 = 4; btn=5;} // SkyBlue
        //--block buttons
      if (get_val (btn)) set_val (btn,0);
    } // DOWN end
 
 
    //--rapidfire for "Weapon 1" only
    if(get_val(7)){
            if (event_press(2))
    {
        RF_1 = !RF_1;
    }
    set_val (2,0);
    }//--aim assist on/off
    if(get_val(7)){
        if (event_press(0))
    {
        AA_1 = !AA_1;
    }
    set_val(0,0);
    }
 
 }
 
//--secondary weapon
if(Switch)
{
    idx = Weapon2;
 
    //--select your "secondary"
    if(get_val(14) && !get_val(7))
    { // DOWN start
 
        if(event_press(20))
            {Weapon2 = 2; btn=20;} // Pink
        if(event_press(19))
            {Weapon2 = 1; btn=19;} // Blue
        if(event_press(18))
            {Weapon2 = 3; btn=18;} // Red
        if(event_press(17))
            {Weapon2 = 0; btn=17;} // Green
        if(event_press(5))
            {Weapon2 = 4; btn=5;} // SkyBlue
      if (get_val (btn)) set_val (btn,0);
 
 
 
 
    } // DOWN end
 
 
 
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
    //--rapidfire for "Weapon 2" only
    if(get_val(7)){
            if (event_press(2))
    {
        RF_2 = !RF_2;
    }
    set_val (2,0);
    }//--aim assist on/off
    if(get_val(7)){
        if (event_press(0))
    {
        AA_2 = !AA_2; 
    }
    set_val(0,0);
    }
    }
if (Pr_mode){   
    if(get_val(7))
    {
        if(get_val(20))
        {
            if(event_press(13))
                ar_s[idx] += 1;         
            if(event_press(14))
                ar_s[idx] -= 1;   
            if(event_press(16))
                ar_s[idx] += 10;
            if(event_press(15))
                ar_s[idx] -= 10;
        }
 
        if(get_val(18))
        {
            if(event_press(13))
                ar_e[idx] += 1;         
            if(event_press(14))
                ar_e[idx] -= 1;   
            if(event_press(16))
                ar_e[idx] += 10;
            if(event_press(15))
                ar_e[idx] -= 10;
        }
 
        if(get_val(19))
        {
            if(event_press(13))
                ar_t[idx] += 1;         
            if(event_press(14))
                ar_t[idx] -= 1;
        }
        if (get_val(17))
           {
            if (event_press(13)) a__p = a__p + 1; a__n = a__n + 1;//--DPAD UP a__p + 1       
            if (event_press(14)) a__p = a__p - 1; a__n = a__n - 1;//--DAPD DOWN a__p -1       
            if (event_press(15)) aa_delay = aa_delay - 1; aa_delay = aa_delay - 1;   
            if (event_press(16)) aa_delay = aa_delay + 1; aa_delay = aa_delay + 1;
        }
 
        if(event_press(1))
        {
            set_pvar(SPVAR_1 ,ar_t[0]);  set_pvar(SPVAR_2 ,ar_t[1]); set_pvar(SPVAR_3 ,ar_t[2]);
            set_pvar(SPVAR_4 ,ar_t[3]);  set_pvar(SPVAR_5 ,ar_t[4]); set_pvar(SPVAR_6 ,ar_s[0]);
            set_pvar(SPVAR_7 ,ar_s[1]);  set_pvar(SPVAR_8 ,ar_s[2]); set_pvar(SPVAR_9 ,ar_s[3]);
            set_pvar(SPVAR_10,ar_s[4]);  set_pvar(SPVAR_11,ar_e[0]); set_pvar(SPVAR_12,ar_e[1]);
            set_pvar(SPVAR_13,ar_e[2]);  set_pvar(SPVAR_14,ar_e[3]); set_pvar(SPVAR_15,ar_e[4]);
            set_pvar(PVAR_7, a__p); set_pvar(PVAR_8, a__n); set_pvar(PVAR_7, aa_delay);
            combo_run (Vibrate); set_pvar(SPVAR_16,key); Pr_mode=FALSE;
        }
 
 
 
    } // ADS end
 } //Pr_mode end
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |A|I|M| |A|S|S|I|S|T| | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

if (AA_1 &&!Switch || AA_2 &&Switch)
        {
            if(get_val(7))
            {
            combo_run(AA_XY);
            }   
 
            if(get_val(R__X) < -28 || get_val(R__X) > 28 || get_val(R__Y) < -28 || get_val(R__Y) > 28)
            {
            combo_stop(AA_XY);
            }
        }
 /*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |E|A|S|Y| |R|U|N| | | | | | | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

if (Auto_Sprint){
if (!get_val(7)&& get_val(L__Y) < -25)combo_run (EASY_RUN);}
 
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |T|U|R|B|O| |B|T|N| |A|.|K|.| |H|A|I|R| |T|R|I|G|G|E|R|S| | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
 
if (Hair_triggers==1){
deadzone(4,7,90,90);}
}
/*
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/

 combo AA_XY {
    set_val(R__X,0);
    wait(aa_delay);
    set_val(R__X,a__p);
    wait(aa_delay);
    set_val(R__X, 0);
    wait(aa_delay);
    set_val(R__X,a__n * -1);
    wait(aa_delay);
}
   // Heal Swap Combo part
 
combo HEAL {
    set_val(13, 100); //--hold up
    wait(window_time);
    set_val(13, 100); //--hold up
    set_val(R__X,rs_x);
    set_val(R__Y,rs_y); //--set RX & RY
    wait(xy_time)
    set_val(R__X,rs_x); //--hold briefly, release UP
    set_val(R__Y,rs_y);
    wait(30);
    wait(30); //--second wait() will return input to controller
    combo_count += 1; //add one
    w_x = inv(w_x); //reverse for next call
    if(combo_count == 2){
    //flip the sign
    w_y = inv(w_y);
    combo_count = 0;} //--reset
    rs_x = 0; //--clear vals so combo only runs once
    rs_y = 0;
 }
combo Auto_Ping{
    set_val(PING, 100);
    wait(25);
    set_val(PING, 0);
    wait(55);
    set_val(PING, 100);
    wait(25);
}
combo Vibrate {
    set_rumble(RUMBLE_A, 100);
    wait(300);
    reset_rumble();
    wait(1000);
}
combo EASY_RUN {                 
    set_val(8,100);       
    wait(30);                     
    wait(100);     
} 
combo AimAbuse {
    set_val(7, 100);
    wait(HOLD);
    set_val(7, 0);
    wait(RELEASE);
    }
 
function p_complete() {
    i_cnt++;
    if (i_cnt > AR[idx][0] * 10) {
        //--avoid stack overflow
        i_cnt = AR[idx][0] * 10;
        //--progression complete
        return 1;
    }
    //--progression not complete
    return 0;
}
function p_val() {
    i_num++;
    if(i_num == i_pnt) {
        //--reset counter
        i_num = 0;
        //--adjust ar_y
        ar_y += i_val;
    }
    return ar_y;
}
function d___z(f_axis,f_val) {
    f_val = get_val(f_axis);
    if(abs(f_val) < 10) {
        set_val(f_axis,0);
        return 0;
    }
    return f_val;
}
function y_val() {
    v = get_val(R__Y);
    if(abs(v) < 10)
        v = 0;
    if(abs(v) > ar_y + 5)
        return v;
    return v + ar_y;           
}
function led_color(f_color) {
   for(i = 0; i <= 3; i++) {
     set_led(i,dbyte((f_color * 4) + i));
   }
}
User avatar
herblore
Private
Private
 
Posts: 1
Joined: Mon Sep 30, 2019 7:40 am

Re: device MAX Conversion Errors.

Postby Scachi » Mon Sep 30, 2019 9:17 am

Try buffys converted viewtopic.php?f=26&t=12027
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 2242
Joined: Wed May 11, 2016 6:25 am
Location: Germany

error convert script

Postby guko3867 » Tue Oct 08, 2019 1:02 am

I tried to convert this script to TT2 using java program after that when I test the script in GtunerIV it gives me error message
(438): Identifier is not a combo 'c_Vibrate'.

Code: Select all
//Posted by noozbar, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Sunday 6th of October, 2019 17:55 UTC 
 
/*
          ________   __________ ________         ________  __________        _     ________                    _______________________
          `MMMMMMMb. `MMMMMMMMM `MMMMMMMb.       `MMMMMMMb.`MMMMMMMMM       dM.    `MMMMMMMb.                    `MMMMMM'   `MMMMMM'
           MM    `Mb  MM      \   MM   `Mb         MM   `Mb MM      \      ,MMb      MM   `Mb                     MMMMMM     MMMMMM
           MM    .M9  MM          MM    MM         MM    MM MM             d'YM.     MM    MM                     MMMMMM     MMMMMM
           MMMMMMM9'  MM    ,     MM    MM         MM    MM MM    ,       ,P `Mb     MM    MM                     MMMMMM     MMMMMM
           MM\M\      MMMMMMM     MM    MM         MM    MM MMMMMMM       d'  YM.    MM    MM                     MMMMMM     MMMMMM
           MM \M\     MM    `     MM    MM         MM    MM MM    `      ,P   `Mb    MM    MM                     MMMMMM     MMMMMM 
           MM  \M\    MM          MM    MM         MM    MM MM           d'    YM.   MM    MM                     MMMMMM     MMMMMM 
           MM   \M\   MM          MM    MM         MM    MM MM          ,MMMMMMMMb   MM    MM                     MMMMMM     MMMMMM 
           MM    \M\  MM      /   MM   .M9         MM   .M9 MM      /   d'      YM.  MM   .M9                     MMMMMM     MMMMMM 
          _MM_    \M\_MMMMMMMMM _MMMMMMM9'       _MMMMMMM9'_MMMMMMMMM _dM_     _dMM_MMMMMMM9'                     MMMMMM     MMMMMM 
                                                                                                                  MMMMMM     MMMMMM                               
________   __________ ________  __________ ___       __________   __________ ____   ____   ___      ___           MMMMMM     MMMMMM           
`MMMMMMMb. `MMMMMMMMM `MMMMMMMb.`MMMMMMMMM `MMb     dMM`MMMMMMMb. MMMMMMMMMM `MM'  6MMMMb  `MM\     `M'           MMMMMM     MMMMMM     
 MM    `Mb  MM      \   MM   `Mb MM      \  MMM.   ,PMM MM    `Mb /   MM   \  MM  8P    Y8  MMM\     M            MMMMMM     MMMMMM   
 MM    .M9  MM          MM    MM MM         M`Mb   d'MM MM    .M9     MM      MM 6M      Mb M\MM\    M            MMMMMM     MMMMMM 
 MMMMMMM9'  MM    ,     MM    MM MM    ,    M YM. ,P MM MMMMMMM9'     MM      MM MM      MM M \MM\   M            MMMMMM     MMMMMM   
 MM\M\      MMMMMMM     MM    MM MMMMMMM    M `Mb d' MM MM            MM      MM MM      MM M  \MM\  M            MMMMMM     MMMMMM
 MM \M\     MM    `     MM    MM MM    `    M  YM.P  MM MM            MM      MM MM      MM M   \MM\ M            MMMMMM     MMMMMM               
 MM  \M\    MM          MM    MM MM         M  `Mb'  MM MM            MM      MM MM      MM M    \MM\M            MMMMMM     MMMMMM               
 MM   \M\   MM          MM    MM MM         M   YP   MM MM            MM      MM YM      M9 M     \MMM            MMMMMM     MMMMMM               
 MM    \M\  MM      /   MM   .M9 MM      /  M   `'   MM MM            MM      MM  8b    d8  M      \MM            MMMMMM     MMMMMM               
_MM_    \M\_MMMMMMMMM _MMMMMMM9'_MMMMMMMMM _M_      _MM_MM_          _MM_    _MM_  YMMMM9  _M_      \M         ___MMMMMM_____MMMMMM___           
 
 
Version: 1.2.1 - "Better AIM Assist" work with "HeadShot"
Author: noozbar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
    ______           __                           
   / ____/__  ____ _/ /___  __________  _____   _
  / /_  / _ \/ __ `/ __/ / / / ___/ _ \/ ___/  (_)
 / __/ /  __/ /_/ / /_/ /_/ / /  /  __(__  )  _   
/_/    \___/\__,_/\__/\__,_/_/   \___/____/  (_) 
 
 
        Crossover PS4/XBOX + PS4 Controller/XBOX Controller
        Battery warning: 3 small fast vibrations every 5 seconds if you have less than 10% battery left
        Script ON/OFF
        Hair Trigger
        Cinematic Camera (calm your horse at the same time)
        Horse Sprint mod activation
        Easy Eagle Vision
        AutoRun for Standard FPS button layout
        AutoRun for standard button layout
        Melee spam
        Cut the Rope (if you are tied up)
        Rapid Fire with toggle ON/OFF
        Rapid Reload
        HeadShot mod
            - Range selection
            - Better AIM Assist (100% accuracy) with toggle ON/OFF
        Quick swap Weapons and Tonics
        DeadEye stop (usefull for online)
        Auto DeadEye with toggle ON/OFF
        Crouch with toggle ON/OFF
        Strafe shot with toggle ON/OFF
        Auto Scope out
        Skid stop (for horse level 3)
 
 
                                                                INSTRUCTIONS PS4/XBOX:
 
 
    Color indications:
        Color OFF = Script is disable
        Color Blue by defaut (if RapidFire is enable, LED should flash Red)
        Color White = Cinematic Camera enable (calm your horse at the same time)
 
         If HeadShot is enable:
             Color Pink = Close Range
             Color SkyBlue = Mid Range
             Color Yellow = Long Range
 
        Color flash RED:
            RapidFire is enable
            Horse Sprint mod is running
            Melee spam mod is running
            Cut the Rope mod is running
 
 
    Rumble indications:
        2 small fast vibrations = mod is OFF
        1 big vibration = mod is ON
        3 small fast vibrations every 5 seconds = your controller have less than 10% battery left
 
 
    Script ON/OFF toggle
        Press PS/XBOX or OPTION/MENU or double tap DOWN to enable or disable ALL FEATURES
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
 
 
    Hair Trigger
        Your triggers are VERY reactive
 
 
    Cinematic Camera (calm your horse at the same time)
        When you are in Cinematic Camera in game, your character automatically calms your horse at the same time
        You can also use the Horse Sprint mod at the same time
 
 
    Horse Sprint mod
        Double Tap and HOLD CROSS/A (LED Flash Red)
 
 
    Easy Eagle Vision
        Tap R3/RS to activate eagle vision
        Does not work in Cinema mod because this button changes the camera view
 
 
    AutoRun for Standard FPS button layout
        Push the Left stick forward and make a long press on L3/LS to sprint (quick press to run)
 
 
    AutoRun for standard button layout
        Push the Left stick forward to sprint
 
 
    Melee spam
        Double Tap and HOLD CIRCLE/B (LED Flash Red) to spam melee button
 
 
    Cut the Rope
        Double Tap and HOLD SQUARE/X (LED Flash Red) to cut the rope if you're tied up
 
 
    Rapid Fire (with toggle ON/OFF)
        Hold L2/LT + CIRCLE/B and
            Tap R2/RT to enable or disable
            1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        Hold L2/LT + R2/RT to run RapidFire
 
 
    Auto Reload
        Release R2/RT to rechamber a cartridge in the rifle
 
 
    HeadShot mod
        Hold L2/LT and tap R1/RB to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
 
        When enable: /!\ Press sensitive trigger /!\
            If you hold L2/LT more than 85%, your viewfinder go to your ennemy's head, if you hold less than 85%, your viewfinder don't go to the head (normal aiming)
 
            Range selection:   
                Tap Right to switch between Range selection
                     Color Pink = Close Range
                     Color SkyBlue = Mid Range
                     Color Yellow = Long Range
 
            Better AIM Assist (100% accuracy) (Thanks Fadexz) /!\ Press sensitive trigger /!\
                If you hold L2/LT between 1% and 99%, Better AIM assist run when you press R2/RT, if you press 100%, Better AIM assist don't run when you press R2/RT
 
 
     Quick swap Weapons and Tonics
         Hold L1/LB and
             Tap TRIANGLE/Y for pistols
                 Double tap TRIANGLE/Y for Stamina
            Tap SQUARE/X for for 9 o'clock weapon
                Double tap SQUARE/X for Health
            Tap CIRCLE/B for knife
                Double tap CIRCLE/B for DeadEye
            Tap CROSS/A for 6 o'clock weapon
            Tap DOWN for lasso
            Hold TRIANGLE/Y to change skill card (Red Dead Online)
 
 
    DeadEye stop (usefull for online)
        Online, DeadEye does not stop automatically when you release the aiming button
        This feature stops DeadEye when you release L2/LT
 
 
    Auto DeadEye with toggle ON/OFF
        Hold DOWN and press R3/RS to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT to activate DeadEye
 
 
    Crouch with toggle ON/OFF
        Hold DOWN and press CROSS/A to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT to crouch
 
 
    Strafe shot with toggle ON/OFF
        Hold DOWN and press R1/RB to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT + R2/RT to strafe
 
 
    Auto Scope out
        When you aim and press DOWN you enter Scope mod but when you release aim and aim again, you are automatically in Scope mod
        This feature allows you to exit Scope mod when you release L2/LT
 
 
    Skid stop (for horse level 3)
        Double tap R1/RB to skid stop
 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

 
// Button Layout:
int Standard_FPS_Layout = FALSE; //If you play with Standard FPS button layout, set TRUE, else set FALSE
 
//----------------------------------------------------------------------------------------------------------------------//
 
// HeadShot:
//Choose your range by defaut
 
int idx = 6; //5 = Close Range, 6 = Medium Range, 7 = Long Range - (Defaut: 6)
 
define WAIT_CLOSE   = 160; // Change this value for close range (color = Pink)
define WAIT_MEDIUM  = 140; // Change this value for medium range (color = SkyBlue) Defaut range
define WAIT_LONG    = 120; // Change this value for long range (color = Yellow)
 
//----------------------------------------------------------------------------------------------------------------------//
 
// Strafe Shot (Hold L2/LT and press SQUARE/X to toggle ON or OFF)
 
int RIGHT = 1000; //How long to go RIGHT
int LEFT = 1000; //How long to go LEFT
 
//----------------------------------------------------------------------------------------------------------------------//
 
//////////// DO NOT MODIFY ///////////////////
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
define CLOSE   = 5; //(color = Pink)        //
define MEDIUM  = 6; //(color = SkyBlue)        //
define LONG    = 7; //(color = Yellow)        //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
define Off            = 1;                    //
define Blue           = 2;                    //
define Red            = 3;                    //
define Green          = 4;                    //
define Pink           = 5;                    //
define SkyBlue        = 6;                    //
define Yellow         = 7;                    //
define White          = 8;                    //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
data (1,                                    //
0,0,0,0, // 1.  Off                            //
2,0,0,0, // 2.  Blue                        //
0,2,0,0, // 3.  Red                            //
0,0,2,0, // 4. Green                        //
0,0,0,2, // 5. Pink                            //
2,0,2,0, // 6. SkyBlue                        //
0,2,2,0, // 7. Yellow                        //
2,2,2,2  // 8. White                        //
);                                            //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
// Toggles                                    //
int Script_ON = 1;                             //
int HeadShot_ON ;                             //
int Rapidfire_ON;                            //
int Crouch_ON;                                //
int Strafe_ON;                                //
int cinema_ON;                                //
int Horse_Sprint_ON;                         //
int DeadEye_ON;                               //
int Auto_DeadEye_ON;                          //
int Scope_ON;                                 //
int Melee_ON;                                 //
int Lasso_ON;                                 //
int HS_ON;                                  //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
int Col_ind;                                 //
int BTN;                                     //
int Button;                                   //
int Time_value;                             //
int wx_v,wy_v;                                 //
int BTN_Tap;                                //
int Timer;                                  //
int Range;                                    //
int Crouch_BTN;                             //
int Run_BTN;                                 //
int ms;                                        //
int item;                                    //
int run_rumble;                                //
int rumble_side;                            //
int rumble_time;                            //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
//////////////////////////////////////////////
 
init {
    if(Standard_FPS_Layout)
    {
        Crouch_BTN = PS4_CROSS;
        Run_BTN = PS4_L3;
    }
        else
        {
            Crouch_BTN = PS4_L3;
            Run_BTN = PS4_CROSS;
        }
}
main {
 
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Crossover
    if(get_controller() != PIO_PS4)
    {
        if(get_console() == PIO_PS4)
        {
            swap(PS4_SHARE,PS4_TOUCH);
            BTN = PS4_TOUCH;
 
                if(get_val(PS4_TOUCH) && get_val(PS4_R3))
                {
                    set_val(PS4_SHARE,100);
                    set_val(PS4_TOUCH,0);
                    set_val(PS4_R3,0);
                }
        }
 
        if(get_console() != PIO_PS4)
            BTN = PS4_SHARE;
    }
        else
            BTN = PS4_TOUCH;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rumble start and restart
    if(run_rumble && !combo_running(Vibrate))
    {
        run_rumble -= 1;
        combo_restart(Vibrate);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Battery warning
    if(get_battery() <= 1)
    {
        ms += get_rtime();
            if(ms == 5000)
            {
                Rumble(FALSE, 3);
                ms = 0;
            }
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Double Tap function
    if(Timer > 0)
    {
        Timer = Timer - get_rtime();
            if(Timer <= 0) BTN_Tap = FALSE;
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Script on/off
    if(event_press(PS4_DOWN))
    {
        if(double_tap (175) )
        {
            Script_ON = !Script_ON;
            Rumble(Script_ON, 0);
        }
    }
    if(event_press(PS4_OPTIONS) || event_press(PS4_PS))
    {
        Script_ON = !Script_ON;
        Rumble(Script_ON, 0);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//If script is ON:
if(Script_ON)
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Hair Trigger
    deadzone(PS4_L2,PS4_R2,99,99);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Cinematic Camera activation
    if((get_val(BTN) && get_ptime(BTN) >= 1500))
        cinema_ON = TRUE ;
 
    if(cinema_ON)
    {
        combo_run(calm);
        if(event_press(BTN) || event_press(PS4_L2))
            cinema_ON = FALSE;
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // Eagle Vision
        else
           {
            if(!get_val(PS4_L2) && event_press(PS4_R3))
            {
                  set_val(PS4_L3, 0);
                combo_run(Eagle_vision);   
            }
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// AutoRun for Standard FPS button layout
    if(Standard_FPS_Layout)
    {
        if((get_val(PS4_LY) <= -20) && (event_release(PS4_L3) && get_ptime(PS4_L3) > 250))
            combo_run(Run);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// AutoRun for standard button layout
    if(!Standard_FPS_Layout && !get_val(PS4_CROSS) && !get_val(PS4_L2) && get_val(PS4_LY) < -70)
    {
        Button = PS4_CROSS;
        Time_value = 100;
        combo_run(Spam);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Horse Sprint mod activation  (Double tap and hold CROSS/A)
    if(event_press(PS4_CROSS))
    {
        if(double_tap (200))
            Horse_Sprint_ON = TRUE;
    }
        if(event_release(PS4_CROSS))
            Horse_Sprint_ON = FALSE ;
 
    Spammer (Horse_Sprint_ON, PS4_CROSS, 100);   
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Melee spam
    if(event_press(PS4_CIRCLE))
    {
        if(double_tap (200))
            Melee_ON = TRUE;
    }
    if(event_release(PS4_CIRCLE))
        Melee_ON = FALSE;
 
    Spammer (Melee_ON, PS4_CIRCLE, 50);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Cut the Rope
    if(event_press(PS4_SQUARE))
    {
        if(double_tap (200))
            Lasso_ON = TRUE;
    }
    if(event_release(PS4_SQUARE))
        Lasso_ON = FALSE;
 
    Spammer (Lasso_ON, PS4_SQUARE, 50);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rapid Fire toggle
    if(get_val(PS4_L2) && get_val(PS4_CIRCLE) && event_press(PS4_R2))
    {
        Rapidfire_ON = !Rapidfire_ON;
        Rumble(Rapidfire_ON, 0);
    }
// Rapid Fire   
    if(Rapidfire_ON && !get_val(PS4_L1) && (get_val(PS4_L2) && get_val(PS4_R2)))
    {
        Button = PS4_R2;
           Time_value = 50;
        combo_run(Spam);
    }   
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rapid Reload
    if(!Rapidfire_ON)
       {
           if(event_release(PS4_R2))
             combo_run(Reload);
     }
         else
            combo_run(Flash);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// HeadShot
    if(get_val(PS4_L2) && event_press(PS4_R1))
    {
        HS_ON = !HS_ON;
        Rumble(HS_ON, 0);
    }
 
if(HS_ON)
{
    if(get_val(PS4_L2) && event_press(PS4_RIGHT))
        idx++;
    if(idx == 8)
        idx = 5;
    if(!get_val(PS4_L1) && (get_lval(PS4_L2) >= 86 && get_ptime(PS4_L2) > 300 && !HeadShot_ON))
    {
        if(idx == CLOSE)
            Range = WAIT_CLOSE;
        if(idx == MEDIUM)
            Range = WAIT_MEDIUM;
        if(idx == LONG)
            Range = WAIT_LONG;
      combo_run(HeadShot);     
    }
 
    if(event_release(PS4_L2))
        HeadShot_ON = FALSE;
 
    //Better AIM Assist       
    if((get_lval(PS4_L2) >= 1 && get_lval(PS4_L2) < 99) && !DeadEye_ON && get_val(PS4_R2))
        combo_run(Better_Aim_Assist);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
// Switch Weapons / Tonics - Hold L1/LB and press:
    if(get_val(PS4_L1))
    {
            // TRIANGLE/Y for pistol / Double tap for Stamina
            if(event_press(PS4_TRIANGLE))
            {
                if(double_tap(300))
                {
                    item = TRUE;
                    wx_v = 0;
                       wy_v = -100;
                }
                    else
                    {
                        wx_v = 0;
                           wy_v = -100;
                       }
            }
            // SQUARE/X for 9 o'clock weapon / Double tap for Health
            if(event_press(PS4_SQUARE))
            {
                if(double_tap(300))
                {
                    wx_v = -100;
                       wy_v = -0;
                }
                    else
                    {
                        item = TRUE;
                        wx_v = -75;
                        wy_v =  -75;
                    }
            }
            // CROSS/A for 6 o'clock weapon
            if(event_press(PS4_CROSS))
            {
                wx_v =  0;
                wy_v = 100;
            }
            // CIRCLE/B for knife / Double tap for DeadEye
            if(event_press(PS4_CIRCLE))
            {
                if(double_tap(300))
                {
                    wx_v = 75;
                       wy_v = 75;
                }
                    else
                    {
                        item = TRUE;
                        wx_v = 75;
                        wy_v = -75;
                    }
            }
            // DOWN for lasso
            if(event_press(PS4_DOWN))
            {
                wx_v = -75;
                wy_v = 75;
            }
 
                    if(wx_v || wy_v)
                        combo_run(Quick_Swap);
 
    // BLOCK
    if(get_val(PS4_TRIANGLE) && (get_ptime(PS4_TRIANGLE) >= 500))
        set_val(PS4_TRIANGLE, 100);
        else
            set_val(PS4_TRIANGLE, 0);
 
    set_val(PS4_SQUARE, 0);
    set_val(PS4_CROSS, 0);
    set_val(PS4_CIRCLE, 0);
    set_val(PS4_DOWN, 0);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// DeadEye stop for online
    if(get_val(PS4_L2) && event_press(PS4_R3)) // && !Auto_DeadEye_ON
        DeadEye_ON = !DeadEye_ON;
 
        if(DeadEye_ON && event_release(PS4_L2))
        {
            combo_run(DeadStop);
            //DeadEye_ON = FALSE;
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Auto DeadEye toggle
    if(get_val(PS4_DOWN) && event_press(PS4_R3))
    {
        Auto_DeadEye_ON = !Auto_DeadEye_ON;
        Rumble(Auto_DeadEye_ON, 0);
    }
    if(Auto_DeadEye_ON && (event_press(PS4_L2) || event_release(PS4_L2)))
        combo_run(DeadStop);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Crouch
    if(get_val(PS4_DOWN) && event_press(PS4_CROSS))
    {
        Crouch_ON = !Crouch_ON;
        Rumble(Crouch_ON, 0);
    }
    if(Crouch_ON && (event_press(PS4_L2) || event_release(PS4_L2)))
        combo_run(Crouch);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Strafe shot
    if(get_val(PS4_DOWN) && event_press(PS4_R1))
    {
        Strafe_ON = !Strafe_ON;       
        Rumble(Strafe_ON, 0)
        set_val(PS4_SQUARE, 0);
    }
    if(Strafe_ON && (get_val(PS4_L2) && get_val(PS4_R2)))
    {         
        set_val(Run_BTN, 100);
        combo_run(Strafe);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Scope out
    if(get_val(PS4_L2) && event_press(PS4_DOWN))
        Scope_ON = !Scope_ON;
    if(Scope_ON && event_release(PS4_L2))
        combo_run(ScopeOut);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Stop Horse (level 3)
    if(event_press(PS4_R1))
    {
        if(double_tap (200))
            combo_run(Stop_Horse);
            else
                combo_stop(Stop_Horse)
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Script is ON - END
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Color Led
    if(!Script_ON) colourled(Off);
        else
        {
            if(!HS_ON)
            {
                if(cinema_ON) colourled(White);
                    else colourled(Blue);
            }
                else
                {
                    if(cinema_ON) colourled(White);
                        else colourled(idx);
                }
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Main END
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
combo Spam {
    set_val(Button, 100);
    wait(Time_value);
    set_val(Button, 0);
    wait(Time_value);
    }
 
combo Reload {
    wait(200);
    set_val(PS4_L2, 0);
    wait(50);
    set_val(PS4_L2, 100)
    wait(50);
    }
 
combo calm { //horse
    wait(250);
    set_val(PS4_L3, 100);
    wait(30);
    wait(5000);
    }
 
combo Crouch {
    set_val(Crouch_BTN,100);
    wait(40);
    }
 
combo Eagle_vision {
    wait(30);
    set_val(PS4_L3, 100);
    set_val(PS4_R3, 100);
    wait(50);
    }
 
combo Flash {
    wait(500);
    colourled(Red);
    wait(500);
    }
 
combo HeadShot {
    set_val(PS4_RY, -100);
    wait(Range);
    HeadShot_ON = TRUE;
    }
 
combo Better_Aim_Assist {
    set_val(PS4_L2,100);
    set_val(PS4_R2,100);
    set_val(PS4_R3,100);
    wait(40);
    set_val(PS4_L2,100);
    set_val(PS4_R2,0);
    set_val(PS4_R3,0);
    wait(40);
    set_val(PS4_L2,100);
    set_val(PS4_R2,0);
    set_val(PS4_R3,100);
    wait(40);
    set_val(PS4_L2,0);
    set_val(PS4_R2,0);
    wait(370);
    }   
 
combo Quick_Swap {
    set_val(PS4_RX,wx_v);
    set_val(PS4_RY,wy_v);
    wait(200);
    if(item)
        set_val(PS4_R1, 100);
    wait(200);
    set_val(PS4_RX,wx_v);
    set_val(PS4_RY,wy_v);
    wait(40);
    set_val(PS4_L1, 0);
    wait(200)
    wx_v = 0;
    wy_v = 0;
    item = FALSE
    }
 
combo Run {
    wait(300);
    set_val(PS4_L3, 100);
    wait(90);
    }
 
combo DeadStop {
    wait(200);
    set_val(PS4_R3, 100);
    wait(90);
    DeadEye_ON = FALSE;
    }
 
 combo Strafe {
    set_val(PS4_LX, 100);
    wait(RIGHT);
    set_val(PS4_LX, -100);
    wait(LEFT);
    }
 
combo ScopeOut {
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_L2, 100);
    set_val(PS4_DOWN, 100);
    wait(50);
    Scope_ON = FALSE;
    }
 
combo Stop_Horse {
    set_val(PS4_R1, 100);
    set_val(PS4_CROSS, 100);
    wait(1000);
    }
 
combo Vibrate {
    set_rumble(rumble_side, 100);
    wait(rumble_time);
    reset_rumble();
    wait(100);
    }
 
function double_tap (Time) {
    if(BTN_Tap){
        return TRUE;
    }
        BTN_Tap = TRUE;
        Timer = Time;
        return FALSE;
}
 
function Rumble (f_var, f_num) {
    if(f_var)                       
     {
         if(!f_num)
            run_rumble = 1;
            else
                run_rumble = f_num;
 
        rumble_side = RUMBLE_A;
        rumble_time = 300;
    }
        else
        {
             if(!f_num)
                run_rumble = 2;
                else
                    run_rumble = f_num;
 
            rumble_side= RUMBLE_B;
            rumble_time = 150;
        }
}
 
function Spammer (f_var, f_btn, f_time){           
 
    if(f_var)
    {
        Button = f_btn;
        Time_value = f_time;
 
        if(get_val(f_btn))
        {
            combo_run(Flash);
            combo_run(Spam);
            if(Horse_Sprint_ON)
                combo_run(calm);
        }
            else
            {
                combo_stop(Flash);
                combo_stop(Spam);
                combo_stop(calm);
            }
    }
 
}
 
function colourled(Colour) {  // COLOR LED function
    Col_ind=(Colour*4) - 3;
    set_led(LED_1,dbyte(Col_ind));
    set_led(LED_2,dbyte(Col_ind + 1));
    set_led(LED_3,dbyte(Col_ind + 2));
    set_led(LED_4,dbyte(Col_ind + 3));
}
//end
User avatar
guko3867
Sergeant
Sergeant
 
Posts: 6
Joined: Thu Feb 07, 2019 5:46 am

Re: error convert script

Postby Mad » Tue Oct 08, 2019 1:05 am

Code: Select all
#include <titanone.gph>
 
/*
          ________   __________ ________         ________  __________        _     ________                    _______________________
          `MMMMMMMb. `MMMMMMMMM `MMMMMMMb.       `MMMMMMMb.`MMMMMMMMM       dM.    `MMMMMMMb.                    `MMMMMM'   `MMMMMM'
           MM    `Mb  MM      \   MM   `Mb         MM   `Mb MM      \      ,MMb      MM   `Mb                     MMMMMM     MMMMMM
           MM    .M9  MM          MM    MM         MM    MM MM             d'YM.     MM    MM                     MMMMMM     MMMMMM
           MMMMMMM9'  MM    ,     MM    MM         MM    MM MM    ,       ,P `Mb     MM    MM                     MMMMMM     MMMMMM
           MM\M\      MMMMMMM     MM    MM         MM    MM MMMMMMM       d'  YM.    MM    MM                     MMMMMM     MMMMMM
           MM \M\     MM    `     MM    MM         MM    MM MM    `      ,P   `Mb    MM    MM                     MMMMMM     MMMMMM 
           MM  \M\    MM          MM    MM         MM    MM MM           d'    YM.   MM    MM                     MMMMMM     MMMMMM 
           MM   \M\   MM          MM    MM         MM    MM MM          ,MMMMMMMMb   MM    MM                     MMMMMM     MMMMMM 
           MM    \M\  MM      /   MM   .M9         MM   .M9 MM      /   d'      YM.  MM   .M9                     MMMMMM     MMMMMM 
          _MM_    \M\_MMMMMMMMM _MMMMMMM9'       _MMMMMMM9'_MMMMMMMMM _dM_     _dMM_MMMMMMM9'                     MMMMMM     MMMMMM 
                                                                                                                  MMMMMM     MMMMMM                               
________   __________ ________  __________ ___       __________   __________ ____   ____   ___      ___           MMMMMM     MMMMMM           
`MMMMMMMb. `MMMMMMMMM `MMMMMMMb.`MMMMMMMMM `MMb     dMM`MMMMMMMb. MMMMMMMMMM `MM'  6MMMMb  `MM\     `M'           MMMMMM     MMMMMM     
 MM    `Mb  MM      \   MM   `Mb MM      \  MMM.   ,PMM MM    `Mb /   MM   \  MM  8P    Y8  MMM\     M            MMMMMM     MMMMMM   
 MM    .M9  MM          MM    MM MM         M`Mb   d'MM MM    .M9     MM      MM 6M      Mb M\MM\    M            MMMMMM     MMMMMM 
 MMMMMMM9'  MM    ,     MM    MM MM    ,    M YM. ,P MM MMMMMMM9'     MM      MM MM      MM M \MM\   M            MMMMMM     MMMMMM   
 MM\M\      MMMMMMM     MM    MM MMMMMMM    M `Mb d' MM MM            MM      MM MM      MM M  \MM\  M            MMMMMM     MMMMMM
 MM \M\     MM    `     MM    MM MM    `    M  YM.P  MM MM            MM      MM MM      MM M   \MM\ M            MMMMMM     MMMMMM               
 MM  \M\    MM          MM    MM MM         M  `Mb'  MM MM            MM      MM MM      MM M    \MM\M            MMMMMM     MMMMMM               
 MM   \M\   MM          MM    MM MM         M   YP   MM MM            MM      MM YM      M9 M     \MMM            MMMMMM     MMMMMM               
 MM    \M\  MM      /   MM   .M9 MM      /  M   `'   MM MM            MM      MM  8b    d8  M      \MM            MMMMMM     MMMMMM               
_MM_    \M\_MMMMMMMMM _MMMMMMM9'_MMMMMMMMM _M_      _MM_MM_          _MM_    _MM_  YMMMM9  _M_      \M         ___MMMMMM_____MMMMMM___           
 
 
Version: 1.2.1 - "Better AIM Assist" work with "HeadShot"
Author: noozbar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
    ______           __                           
   / ____/__  ____ _/ /___  __________  _____   _
  / /_  / _ \/ __ `/ __/ / / / ___/ _ \/ ___/  (_)
 / __/ /  __/ /_/ / /_/ /_/ / /  /  __(__  )  _   
/_/    \___/\__,_/\__/\__,_/_/   \___/____/  (_) 
 
 
        Crossover PS4/XBOX + PS4 Controller/XBOX Controller
        Battery warning: 3 small fast vibrations every 5 seconds if you have less than 10% battery left
        Script ON/OFF
        Hair Trigger
        Cinematic Camera (calm your horse at the same time)
        Horse Sprint mod activation
        Easy Eagle Vision
        AutoRun for Standard FPS button layout
        AutoRun for standard button layout
        Melee spam
        Cut the Rope (if you are tied up)
        Rapid Fire with toggle ON/OFF
        Rapid Reload
        HeadShot mod
            - Range selection
            - Better AIM Assist (100% accuracy) with toggle ON/OFF
        Quick swap Weapons and Tonics
        DeadEye stop (usefull for online)
        Auto DeadEye with toggle ON/OFF
        Crouch with toggle ON/OFF
        Strafe shot with toggle ON/OFF
        Auto Scope out
        Skid stop (for horse level 3)
 
 
                                                                INSTRUCTIONS PS4/XBOX:
 
 
    Color indications:
        Color OFF = Script is disable
        Color Blue by defaut (if RapidFire is enable, LED should flash Red)
        Color White = Cinematic Camera enable (calm your horse at the same time)
 
         If HeadShot is enable:
             Color Pink = Close Range
             Color SkyBlue = Mid Range
             Color Yellow = Long Range
 
        Color flash RED:
            RapidFire is enable
            Horse Sprint mod is running
            Melee spam mod is running
            Cut the Rope mod is running
 
 
    Rumble indications:
        2 small fast vibrations = mod is OFF
        1 big vibration = mod is ON
        3 small fast vibrations every 5 seconds = your controller have less than 10% battery left
 
 
    Script ON/OFF toggle
        Press PS/XBOX or OPTION/MENU or double tap DOWN to enable or disable ALL FEATURES
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
 
 
    Hair Trigger
        Your triggers are VERY reactive
 
 
    Cinematic Camera (calm your horse at the same time)
        When you are in Cinematic Camera in game, your character automatically calms your horse at the same time
        You can also use the Horse Sprint mod at the same time
 
 
    Horse Sprint mod
        Double Tap and HOLD CROSS/A (LED Flash Red)
 
 
    Easy Eagle Vision
        Tap R3/RS to activate eagle vision
        Does not work in Cinema mod because this button changes the camera view
 
 
    AutoRun for Standard FPS button layout
        Push the Left stick forward and make a long press on L3/LS to sprint (quick press to run)
 
 
    AutoRun for standard button layout
        Push the Left stick forward to sprint
 
 
    Melee spam
        Double Tap and HOLD CIRCLE/B (LED Flash Red) to spam melee button
 
 
    Cut the Rope
        Double Tap and HOLD SQUARE/X (LED Flash Red) to cut the rope if you're tied up
 
 
    Rapid Fire (with toggle ON/OFF)
        Hold L2/LT + CIRCLE/B and
            Tap R2/RT to enable or disable
            1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        Hold L2/LT + R2/RT to run RapidFire
 
 
    Auto Reload
        Release R2/RT to rechamber a cartridge in the rifle
 
 
    HeadShot mod
        Hold L2/LT and tap R1/RB to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
 
        When enable: /!\ Press sensitive trigger /!\
            If you hold L2/LT more than 85%, your viewfinder go to your ennemy's head, if you hold less than 85%, your viewfinder don't go to the head (normal aiming)
 
            Range selection:   
                Tap Right to switch between Range selection
                     Color Pink = Close Range
                     Color SkyBlue = Mid Range
                     Color Yellow = Long Range
 
            Better AIM Assist (100% accuracy) (Thanks Fadexz) /!\ Press sensitive trigger /!\
                If you hold L2/LT between 1% and 99%, Better AIM assist run when you press R2/RT, if you press 100%, Better AIM assist don't run when you press R2/RT
 
 
     Quick swap Weapons and Tonics
         Hold L1/LB and
             Tap TRIANGLE/Y for pistols
                 Double tap TRIANGLE/Y for Stamina
            Tap SQUARE/X for for 9 o'clock weapon
                Double tap SQUARE/X for Health
            Tap CIRCLE/B for knife
                Double tap CIRCLE/B for DeadEye
            Tap CROSS/A for 6 o'clock weapon
            Tap DOWN for lasso
            Hold TRIANGLE/Y to change skill card (Red Dead Online)
 
 
    DeadEye stop (usefull for online)
        Online, DeadEye does not stop automatically when you release the aiming button
        This feature stops DeadEye when you release L2/LT
 
 
    Auto DeadEye with toggle ON/OFF
        Hold DOWN and press R3/RS to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT to activate DeadEye
 
 
    Crouch with toggle ON/OFF
        Hold DOWN and press CROSS/A to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT to crouch
 
 
    Strafe shot with toggle ON/OFF
        Hold DOWN and press R1/RB to enable or disable
        1 big vibration = mod is ON, 2 small fast vibrations = mod is OFF
        If enable, hold L2/LT + R2/RT to strafe
 
 
    Auto Scope out
        When you aim and press DOWN you enter Scope mod but when you release aim and aim again, you are automatically in Scope mod
        This feature allows you to exit Scope mod when you release L2/LT
 
 
    Skid stop (for horse level 3)
        Double tap R1/RB to skid stop
 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

 
// Button Layout:
int Standard_FPS_Layout = FALSE; //If you play with Standard FPS button layout, set TRUE, else set FALSE
 
//----------------------------------------------------------------------------------------------------------------------//
 
// HeadShot:
//Choose your range by defaut
 
int idx = 6; //5 = Close Range, 6 = Medium Range, 7 = Long Range - (Defaut: 6)
 
define WAIT_CLOSE   = 160; // Change this value for close range (color = Pink)
define WAIT_MEDIUM  = 140; // Change this value for medium range (color = SkyBlue) Defaut range
define WAIT_LONG    = 120; // Change this value for long range (color = Yellow)
 
//----------------------------------------------------------------------------------------------------------------------//
 
// Strafe Shot (Hold L2/LT and press SQUARE/X to toggle ON or OFF)
 
int RIGHT = 1000; //How long to go RIGHT
int LEFT = 1000; //How long to go LEFT
 
//----------------------------------------------------------------------------------------------------------------------//
 
//////////// DO NOT MODIFY ///////////////////
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
define CLOSE   = 5; //(color = Pink)        //
define MEDIUM  = 6; //(color = SkyBlue)        //
define LONG    = 7; //(color = Yellow)        //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
define Off            = 1;                    //
define Blue           = 2;                    //
define Red            = 3;                    //
define Green          = 4;                    //
define Pink           = 5;                    //
define SkyBlue        = 6;                    //
define Yellow         = 7;                    //
define White          = 8;                    //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
data (1,                                    //
0,0,0,0, // 1.  Off                            //
2,0,0,0, // 2.  Blue                        //
0,2,0,0, // 3.  Red                            //
0,0,2,0, // 4. Green                        //
0,0,0,2, // 5. Pink                            //
2,0,2,0, // 6. SkyBlue                        //
0,2,2,0, // 7. Yellow                        //
2,2,2,2  // 8. White                        //
);                                            //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
// Toggles                                    //
int Script_ON = 1;                             //
int HeadShot_ON ;                             //
int Rapidfire_ON;                            //
int Crouch_ON;                                //
int Strafe_ON;                                //
int cinema_ON;                                //
int Horse_Sprint_ON;                         //
int DeadEye_ON;                               //
int Auto_DeadEye_ON;                          //
int Scope_ON;                                 //
int Melee_ON;                                 //
int Lasso_ON;                                 //
int HS_ON;                                  //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
int Col_ind;                                 //
int BTN;                                     //
int Button;                                   //
int Time_value;                             //
int wx_v,wy_v;                                 //
int BTN_Tap;                                //
int Timer;                                  //
int Range;                                    //
int Crouch_BTN;                             //
int Run_BTN;                                 //
int ms;                                        //
int item;                                    //
int run_rumble;                                //
int rumble_side;                            //
int rumble_time;                            //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    //
//////////////////////////////////////////////
 
init {
    if(Standard_FPS_Layout)
    {
        Crouch_BTN = PS4_CROSS;
        Run_BTN = PS4_L3;
    }
        else
        {
            Crouch_BTN = PS4_L3;
            Run_BTN = PS4_CROSS;
        }
}
main {
 
 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Crossover
    if(get_controller() != PIO_PS4)
    {
        if(get_console() == PIO_PS4)
        {
            swap(PS4_SHARE,PS4_TOUCH);
            BTN = PS4_TOUCH;
 
                if(get_val(PS4_TOUCH) && get_val(PS4_R3))
                {
                    set_val(PS4_SHARE,100);
                    set_val(PS4_TOUCH,0);
                    set_val(PS4_R3,0);
                }
        }
 
        if(get_console() != PIO_PS4)
            BTN = PS4_SHARE;
    }
        else
            BTN = PS4_TOUCH;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rumble start and restart
    if(run_rumble && !combo_running(Vibrate))
    {
        run_rumble -= 1;
        combo_restart(Vibrate);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Battery warning
    if(get_battery() <= 1)
    {
        ms += get_rtime();
            if(ms == 5000)
            {
                Rumble(FALSE, 3);
                ms = 0;
            }
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Double Tap function
    if(Timer > 0)
    {
        Timer = Timer - get_rtime();
            if(Timer <= 0) BTN_Tap = FALSE;
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Script on/off
    if(event_press(PS4_DOWN))
    {
        if(double_tap (175) )
        {
            Script_ON = !Script_ON;
            Rumble(Script_ON, 0);
        }
    }
    if(event_press(PS4_OPTIONS) || event_press(PS4_PS))
    {
        Script_ON = !Script_ON;
        Rumble(Script_ON, 0);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//If script is ON:
if(Script_ON)
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Hair Trigger
    deadzone(PS4_L2,PS4_R2,99,99);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Cinematic Camera activation
    if((get_val(BTN) && get_ptime(BTN) >= 1500))
        cinema_ON = TRUE ;
 
    if(cinema_ON)
    {
        combo_run(calm);
        if(event_press(BTN) || event_press(PS4_L2))
            cinema_ON = FALSE;
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // Eagle Vision
        else
           {
            if(!get_val(PS4_L2) && event_press(PS4_R3))
            {
                  set_val(PS4_L3, 0);
                combo_run(Eagle_vision);   
            }
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// AutoRun for Standard FPS button layout
    if(Standard_FPS_Layout)
    {
        if((get_val(PS4_LY) <= -20) && (event_release(PS4_L3) && get_ptime(PS4_L3) > 250))
            combo_run(Run);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// AutoRun for standard button layout
    if(!Standard_FPS_Layout && !get_val(PS4_CROSS) && !get_val(PS4_L2) && get_val(PS4_LY) < -70)
    {
        Button = PS4_CROSS;
        Time_value = 100;
        combo_run(Spam);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Horse Sprint mod activation  (Double tap and hold CROSS/A)
    if(event_press(PS4_CROSS))
    {
        if(double_tap (200))
            Horse_Sprint_ON = TRUE;
    }
        if(event_release(PS4_CROSS))
            Horse_Sprint_ON = FALSE ;
 
    Spammer (Horse_Sprint_ON, PS4_CROSS, 100);   
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Melee spam
    if(event_press(PS4_CIRCLE))
    {
        if(double_tap (200))
            Melee_ON = TRUE;
    }
    if(event_release(PS4_CIRCLE))
        Melee_ON = FALSE;
 
    Spammer (Melee_ON, PS4_CIRCLE, 50);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Cut the Rope
    if(event_press(PS4_SQUARE))
    {
        if(double_tap (200))
            Lasso_ON = TRUE;
    }
    if(event_release(PS4_SQUARE))
        Lasso_ON = FALSE;
 
    Spammer (Lasso_ON, PS4_SQUARE, 50);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rapid Fire toggle
    if(get_val(PS4_L2) && get_val(PS4_CIRCLE) && event_press(PS4_R2))
    {
        Rapidfire_ON = !Rapidfire_ON;
        Rumble(Rapidfire_ON, 0);
    }
// Rapid Fire   
    if(Rapidfire_ON && !get_val(PS4_L1) && (get_val(PS4_L2) && get_val(PS4_R2)))
    {
        Button = PS4_R2;
           Time_value = 50;
        combo_run(Spam);
    }   
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Rapid Reload
    if(!Rapidfire_ON)
       {
           if(event_release(PS4_R2))
             combo_run(Reload);
     }
         else
            combo_run(Flash);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// HeadShot
    if(get_val(PS4_L2) && event_press(PS4_R1))
    {
        HS_ON = !HS_ON;
        Rumble(HS_ON, 0);
    }
 
if(HS_ON)
{
    if(get_val(PS4_L2) && event_press(PS4_RIGHT))
        idx++;
    if(idx == 8)
        idx = 5;
    if(!get_val(PS4_L1) && (get_lval(PS4_L2) >= 86 && get_ptime(PS4_L2) > 300 && !HeadShot_ON))
    {
        if(idx == CLOSE)
            Range = WAIT_CLOSE;
        if(idx == MEDIUM)
            Range = WAIT_MEDIUM;
        if(idx == LONG)
            Range = WAIT_LONG;
      combo_run(HeadShot);     
    }
 
    if(event_release(PS4_L2))
        HeadShot_ON = FALSE;
 
    //Better AIM Assist       
    if((get_lval(PS4_L2) >= 1 && get_lval(PS4_L2) < 99) && !DeadEye_ON && get_val(PS4_R2))
        combo_run(Better_Aim_Assist);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
// Switch Weapons / Tonics - Hold L1/LB and press:
    if(get_val(PS4_L1))
    {
            // TRIANGLE/Y for pistol / Double tap for Stamina
            if(event_press(PS4_TRIANGLE))
            {
                if(double_tap(300))
                {
                    item = TRUE;
                    wx_v = 0;
                       wy_v = -100;
                }
                    else
                    {
                        wx_v = 0;
                           wy_v = -100;
                       }
            }
            // SQUARE/X for 9 o'clock weapon / Double tap for Health
            if(event_press(PS4_SQUARE))
            {
                if(double_tap(300))
                {
                    wx_v = -100;
                       wy_v = -0;
                }
                    else
                    {
                        item = TRUE;
                        wx_v = -75;
                        wy_v =  -75;
                    }
            }
            // CROSS/A for 6 o'clock weapon
            if(event_press(PS4_CROSS))
            {
                wx_v =  0;
                wy_v = 100;
            }
            // CIRCLE/B for knife / Double tap for DeadEye
            if(event_press(PS4_CIRCLE))
            {
                if(double_tap(300))
                {
                    wx_v = 75;
                       wy_v = 75;
                }
                    else
                    {
                        item = TRUE;
                        wx_v = 75;
                        wy_v = -75;
                    }
            }
            // DOWN for lasso
            if(event_press(PS4_DOWN))
            {
                wx_v = -75;
                wy_v = 75;
            }
 
                    if(wx_v || wy_v)
                        combo_run(Quick_Swap);
 
    // BLOCK
    if(get_val(PS4_TRIANGLE) && (get_ptime(PS4_TRIANGLE) >= 500))
        set_val(PS4_TRIANGLE, 100);
        else
            set_val(PS4_TRIANGLE, 0);
 
    set_val(PS4_SQUARE, 0);
    set_val(PS4_CROSS, 0);
    set_val(PS4_CIRCLE, 0);
    set_val(PS4_DOWN, 0);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// DeadEye stop for online
    if(get_val(PS4_L2) && event_press(PS4_R3)) // && !Auto_DeadEye_ON
        DeadEye_ON = !DeadEye_ON;
 
        if(DeadEye_ON && event_release(PS4_L2))
        {
            combo_run(DeadStop);
            //DeadEye_ON = FALSE;
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Auto DeadEye toggle
    if(get_val(PS4_DOWN) && event_press(PS4_R3))
    {
        Auto_DeadEye_ON = !Auto_DeadEye_ON;
        Rumble(Auto_DeadEye_ON, 0);
    }
    if(Auto_DeadEye_ON && (event_press(PS4_L2) || event_release(PS4_L2)))
        combo_run(DeadStop);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Crouch
    if(get_val(PS4_DOWN) && event_press(PS4_CROSS))
    {
        Crouch_ON = !Crouch_ON;
        Rumble(Crouch_ON, 0);
    }
    if(Crouch_ON && (event_press(PS4_L2) || event_release(PS4_L2)))
        combo_run(Crouch);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Strafe shot
    if(get_val(PS4_DOWN) && event_press(PS4_R1))
    {
        Strafe_ON = !Strafe_ON;       
        Rumble(Strafe_ON, 0);
        set_val(PS4_SQUARE, 0);
    }
    if(Strafe_ON && (get_val(PS4_L2) && get_val(PS4_R2)))
    {         
        set_val(Run_BTN, 100);
        combo_run(Strafe);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Scope out
    if(get_val(PS4_L2) && event_press(PS4_DOWN))
        Scope_ON = !Scope_ON;
    if(Scope_ON && event_release(PS4_L2))
        combo_run(ScopeOut);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Stop Horse (level 3)
    if(event_press(PS4_R1))
    {
        if(double_tap (200)) combo_run(Stop_Horse);
        else combo_stop(Stop_Horse);
    }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Script is ON - END
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Color Led
    if(!Script_ON) colourled(Off);
        else
        {
            if(!HS_ON)
            {
                if(cinema_ON) colourled(White);
                    else colourled(Blue);
            }
                else
                {
                    if(cinema_ON) colourled(White);
                        else colourled(idx);
                }
        }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Main END
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
combo Spam {
    set_val(Button, 100);
    wait(Time_value);
    set_val(Button, 0);
    wait(Time_value);
    }
 
combo Reload {
    wait(200);
    set_val(PS4_L2, 0);
    wait(50);
    set_val(PS4_L2, 100);
    wait(50);
    }
 
combo calm { //horse
    wait(250);
    set_val(PS4_L3, 100);
    wait(30);
    wait(5000);
    }
 
combo Crouch {
    set_val(Crouch_BTN,100);
    wait(40);
    }
 
combo Eagle_vision {
    wait(30);
    set_val(PS4_L3, 100);
    set_val(PS4_R3, 100);
    wait(50);
    }
 
combo Flash {
    wait(500);
    colourled(Red);
    wait(500);
    }
 
combo HeadShot {
    set_val(PS4_RY, -100);
    wait(Range);
    HeadShot_ON = TRUE;
    }
 
combo Better_Aim_Assist {
    set_val(PS4_L2,100);
    set_val(PS4_R2,100);
    set_val(PS4_R3,100);
    wait(40);
    set_val(PS4_L2,100);
    set_val(PS4_R2,0);
    set_val(PS4_R3,0);
    wait(40);
    set_val(PS4_L2,100);
    set_val(PS4_R2,0);
    set_val(PS4_R3,100);
    wait(40);
    set_val(PS4_L2,0);
    set_val(PS4_R2,0);
    wait(370);
    }   
 
combo Quick_Swap {
    set_val(PS4_RX,wx_v);
    set_val(PS4_RY,wy_v);
    wait(200);
    if(item)
        set_val(PS4_R1, 100);
    wait(200);
    set_val(PS4_RX,wx_v);
    set_val(PS4_RY,wy_v);
    wait(40);
    set_val(PS4_L1, 0);
    wait(200);
    wx_v = 0;
    wy_v = 0;
    item = FALSE;
    }
 
combo Run {
    wait(300);
    set_val(PS4_L3, 100);
    wait(90);
    }
 
combo DeadStop {
    wait(200);
    set_val(PS4_R3, 100);
    wait(90);
    DeadEye_ON = FALSE;
    }
 
 combo Strafe {
    set_val(PS4_LX, 100);
    wait(RIGHT);
    set_val(PS4_LX, -100);
    wait(LEFT);
    }
 
combo ScopeOut {
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_L2, 100);
    set_val(PS4_DOWN, 100);
    wait(50);
    Scope_ON = FALSE;
    }
 
combo Stop_Horse {
    set_val(PS4_R1, 100);
    set_val(PS4_CROSS, 100);
    wait(1000);
    }
 
combo Vibrate {
    set_rumble(rumble_side, 100);
    wait(rumble_time);
    reset_rumble();
    wait(100);
    }
 
function double_tap (Time) {
    if(BTN_Tap){
        return TRUE;
    }
        BTN_Tap = TRUE;
        Timer = Time;
        return FALSE;
}
 
function Rumble (f_var, f_num) {
    if(f_var)                       
     {
         if(!f_num)
            run_rumble = 1;
            else
                run_rumble = f_num;
 
        rumble_side = RUMBLE_A;
        rumble_time = 300;
    }
        else
        {
             if(!f_num)
                run_rumble = 2;
                else
                    run_rumble = f_num;
 
            rumble_side= RUMBLE_B;
            rumble_time = 150;
        }
}
 
function Spammer (f_var, f_btn, f_time){           
 
    if(f_var)
    {
        Button = f_btn;
        Time_value = f_time;
 
        if(get_val(f_btn))
        {
            combo_run(Flash);
            combo_run(Spam);
            if(Horse_Sprint_ON)
                combo_run(calm);
        }
            else
            {
                combo_stop(Flash);
                combo_stop(Spam);
                combo_stop(calm);
            }
    }
 
}
 
function colourled(Colour) {  // COLOR LED function
    Col_ind=(Colour*4) - 3;
    set_led(LED_1,dbyte(Col_ind));
    set_led(LED_2,dbyte(Col_ind + 1));
    set_led(LED_3,dbyte(Col_ind + 2));
    set_led(LED_4,dbyte(Col_ind + 3));
}
//end
ConsoleTuner Support Team || Discord
Mad
Captain
Captain
 
Posts: 682
Joined: Wed May 22, 2019 5:39 am

Re: T1/CM to Titan Two Script Converter [v0.26r1 - 08/27/201

Postby Buffy » Tue Oct 08, 2019 2:39 am

Fixed that bug in v0.26r2.
User avatar
Buffy
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 281
Joined: Wed Jul 20, 2016 5:23 am

Re: Convert this PES 2020 farming script please

Postby Muzak10 » Tue Oct 08, 2019 6:36 pm

Code: Select all
// Originally posted by Chrizzlkrazzl and credits to fakkkker, Lockers07, and unearth.
 
// Instructions:
// Create Team 1, Team 2, Team 3, and Team 4 ... Teams have to be the first 4 in your Squad list.
// Make sure each team has different players with 10 contracts and a manager with 11 matches left or guaranteed contract renewal.
// A minimum of 40 scouts slots have to be available in your scouts bank.
// Select Team 1 from your squad list and make sure to leave the mouse cursor on a player when leaving the squad management.
// Go to SIM MATCH window just stand on there and press PS4 Touchpad then D-Pad Up at the same time to start the script.
// After a match it will go to squad management and spam X on a player, leave it this is to make sure all windows, managers, daily logins are skipped.
// this script runs for approx. 10 hours and 40 minutes
// No shutdown possible for this version because script too long and size is more than device slot.
// This script is tested on PES 2020 on 10 September 2019
 
//--------------------------------------
// use the name of the color
define LED_OFF = -2;
define Light_Blue = 1;
define Light_Red = 2;
define Light_Green = 3;
define Light_Pink = 4;
define Light_SkyBlue = 5;
define Light_Yellow = 6;
define Light_White = 7;
define Blue = 8;
define Red = 9;
define Green = 10;
define Pink = 11;
define SkyBlue = 12;
define Yellow = 13;
define White = 14;
define Dim_Blue = 15;
define Dim_Red = 16;
define Dim_Green = 17;
define Dim_Pink = 18;
define Dim_SkyBlue = 19;
define Dim_Yellow = 20;
define Dim_White = 21;
 
data(1,// begin of data segment--------
1,0,0,0, //1. Light_Blue
0,1,0,0, //2. Light_Red
0,0,1,0, //3. Light_Green
0,0,0,1, //4. Light_Pink
1,0,1,0, //5. Light_SkyBlue
0,1,1,0, //6. Light_Yellow
1,1,1,1, //7. Light_White
2,0,0,0, //1. Blue
0,2,0,0, //2. Red
0,0,2,0, //3. Green
0,0,0,2, //4. Pink
2,0,2,0, //5. SkyBlue
0,2,2,0, //6. Yellow
2,2,2,2, //7. White
3,0,0,0, //1. Dim_Blue
0,3,0,0, //2. Dim_Red
0,0,3,0, //3. Dim_Green
0,0,0,3, //4. Dim_Pink
3,0,3,0, //5. Dim_SkyBlue
0,3,3,0, //6. Dim_Yellow
3,3,3,3 //7. Dim_White
); // end of data segment--------------
 
///////////////////////////////////////
// variables
int Col_ind;
int onoff;
int timer;
int secs;
int mins;
int options;
int Change_View;
int matches;
int off;
 
main {//---------------------------------
 
////////////////////////////////
// LED color indication
if(onoff) colourled(Green); // ON
else colourled(Red);// OFF
 
 
if(get_val(PS4_TOUCH) && event_press(PS4_UP)) {
onoff = !onoff;
matches = 1;
mins = 0;
secs = 0;
timer = 0;
Change_View = FALSE;
}
 
if(onoff && matches < 11){
timer = timer + get_rtime();
 
if(timer >= 1000){
timer = 0;
secs ++;
if(secs >= 60){
secs =0;
mins ++;
}
}
 
//------------------------------------- Spam X Through Starter menu to start game
if(mins == 0 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
 
//------------------------------------- Change view to skip cutscenes
if(mins == 0 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 6 && mins <= 8) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 13 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the spam X sequence for end game replays, menus, player, manager contract or normal ending
if(mins == 14 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 15 && secs >= 05 && secs <=35){// This is to change squad to Team 2
combo_run(SELECT_2);
}
//start match team 2--------------------------------------------------------------------------------
 
if(mins == 16 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 16 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 22 && mins <= 24) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 29 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 30 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 31 && secs >= 05 && secs <=35){// This is to change squad to Team 3
combo_run(SELECT_3);
}
//start match team 3--------------------------------------------------------------------------------
 
if(mins == 32 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 32 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 38 && mins <= 40) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 45 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 46 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 47 && secs >= 05 && secs <=35){//This is to change squad to Team 4
combo_run(SELECT_4);
}
 
//start match team 4--------------------------------------------------------------------------------
 
if(mins == 48 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 48 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 54 && mins <= 56) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 61 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 62 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 63 && secs >= 05 && secs <=35){//This is to change squad back to Team 1 and reset the loop again to start round 2 and repeat all above
combo_run(SELECT_1);
}
 
 
 
}
off = FALSE;
if(matches >= 11 && !off){
combo_run(POWEROFF);
}
set_val(TRACE_1,secs);
set_val(TRACE_2,mins);
}
//-----------------------------------------
 
// COMBO BLOCKS
 
 
 
//------------------------------ Press Triangle to change view to skip cutscenes
combo CHANGE_VIEW {
set_val(PS4_TRIANGLE, 100);
wait(130);
wait(500);
wait(4000);
}
 
//------------------------------ Press X on pad with minimal wait
combo PRESS_CROSS {
set_val(PS4_CROSS, 100);
wait(10);
}
 
 
//----------------------------- Press options to skip replays at end of game.
combo ENDGAME {
set_val(PS4_OPTIONS, 100);
wait(60);
wait(2000);
}
//--------------------------- Click from final menu and then wait to restart script for next game
combo SELECT_1{
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0); // To go back from squad management to main menu
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100); // to open Squad list (Team List)
wait(60);
set_val(PS4_SQUARE, 0)
wait(60);
wait(5000);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go down to Team 1 (1st on the squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 1
wait(60);
set_val(PS4_CROSS, 0)
wait(60);
wait(7000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100); // go left 3 times to stand on SIM Match screen again and repeat loop
wait(60);
wait(4000);
 
mins = 0;
secs = 0;
timer = 0;
Change_View = FALSE;
 
matches ++;
}
 
combo SELECT_2{//Selecting Team 2
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0)
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0)
wait(60);
wait(5000);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0);
wait(60);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go down 2 times to Team 2 (2nd team in squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 2
wait(60);
set_val(PS4_CROSS, 0)
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo SELECT_3{// Selecting Team 3
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0)
wait(60);
wait(5000);
set_val(PS4_RIGHT, 100);
wait(60);
set_val(PS4_RIGHT, 0); // Go right to stand on Team 3 (3rd Team in Squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 3
wait(60);
set_val(PS4_CROSS, 0)
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo SELECT_4{//Selecting Team 4
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0)
wait(60);
wait(5000);
set_val(PS4_RIGHT, 100);
wait(60);
set_val(PS4_RIGHT, 0);
wait(60);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go right then down to stand on Team 4 (4th team in Squad list)
wait(60);
set_val(PS4_CROSS, 100); // Selecting Team 4
wait(60);
set_val(PS4_CROSS, 0)
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo POWEROFF{
set_val(PS4_PS, 100);
wait(60);
set_val(PS4_PS, 0);
wait(4000);
off = TRUE;
}
 
// COLOR LED function
//--------------------------------------------------------------
function colourled(Colour) {
Col_ind=(Colour*4)- 3;
set_led(LED_1,dbyte(Col_ind ));
set_led(LED_2,dbyte(Col_ind+ 1));
set_led(LED_3,dbyte(Col_ind+ 2));
set_led(LED_4,dbyte(Col_ind+ 3));
}
User avatar
Muzak10
First Sergeant
First Sergeant
 
Posts: 61
Joined: Tue Oct 30, 2018 10:49 am

Re: Convert this PES 2020 farming script please

Postby Mad » Wed Oct 09, 2019 2:40 am

Code: Select all
#include <titanone.gph>
// Originally posted by Chrizzlkrazzl and credits to fakkkker, Lockers07, and unearth.
 
// Instructions:
// Create Team 1, Team 2, Team 3, and Team 4 ... Teams have to be the first 4 in your Squad list.
// Make sure each team has different players with 10 contracts and a manager with 11 matches left or guaranteed contract renewal.
// A minimum of 40 scouts slots have to be available in your scouts bank.
// Select Team 1 from your squad list and make sure to leave the mouse cursor on a player when leaving the squad management.
// Go to SIM MATCH window just stand on there and press PS4 Touchpad then D-Pad Up at the same time to start the script.
// After a match it will go to squad management and spam X on a player, leave it this is to make sure all windows, managers, daily logins are skipped.
// this script runs for approx. 10 hours and 40 minutes
// No shutdown possible for this version because script too long and size is more than device slot.
// This script is tested on PES 2020 on 10 September 2019
 
//--------------------------------------
// use the name of the color
define LED_OFF = -2;
define Light_Blue = 1;
define Light_Red = 2;
define Light_Green = 3;
define Light_Pink = 4;
define Light_SkyBlue = 5;
define Light_Yellow = 6;
define Light_White = 7;
define Blue = 8;
define Red = 9;
define Green = 10;
define Pink = 11;
define SkyBlue = 12;
define Yellow = 13;
define White = 14;
define Dim_Blue = 15;
define Dim_Red = 16;
define Dim_Green = 17;
define Dim_Pink = 18;
define Dim_SkyBlue = 19;
define Dim_Yellow = 20;
define Dim_White = 21;
 
data(1,// begin of data segment--------
1,0,0,0, //1. Light_Blue
0,1,0,0, //2. Light_Red
0,0,1,0, //3. Light_Green
0,0,0,1, //4. Light_Pink
1,0,1,0, //5. Light_SkyBlue
0,1,1,0, //6. Light_Yellow
1,1,1,1, //7. Light_White
2,0,0,0, //1. Blue
0,2,0,0, //2. Red
0,0,2,0, //3. Green
0,0,0,2, //4. Pink
2,0,2,0, //5. SkyBlue
0,2,2,0, //6. Yellow
2,2,2,2, //7. White
3,0,0,0, //1. Dim_Blue
0,3,0,0, //2. Dim_Red
0,0,3,0, //3. Dim_Green
0,0,0,3, //4. Dim_Pink
3,0,3,0, //5. Dim_SkyBlue
0,3,3,0, //6. Dim_Yellow
3,3,3,3 //7. Dim_White
); // end of data segment--------------
 
///////////////////////////////////////
// variables
int Col_ind;
int onoff;
int timer;
int secs;
int mins;
int options;
int Change_View;
int matches;
int off;
 
main {//---------------------------------
 
////////////////////////////////
// LED color indication
if(onoff) colourled(Green); // ON
else colourled(Red);// OFF
 
 
if(get_val(PS4_TOUCH) && event_press(PS4_UP)) {
onoff = !onoff;
matches = 1;
mins = 0;
secs = 0;
timer = 0;
Change_View = FALSE;
}
 
if(onoff && matches < 11){
timer = timer + get_rtime();
 
if(timer >= 1000){
timer = 0;
secs ++;
if(secs >= 60){
secs =0;
mins ++;
}
}
 
//------------------------------------- Spam X Through Starter menu to start game
if(mins == 0 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
 
//------------------------------------- Change view to skip cutscenes
if(mins == 0 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 6 && mins <= 8) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 13 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the spam X sequence for end game replays, menus, player, manager contract or normal ending
if(mins == 14 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 15 && secs >= 05 && secs <=35){// This is to change squad to Team 2
combo_run(SELECT_2);
}
//start match team 2--------------------------------------------------------------------------------
 
if(mins == 16 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 16 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 22 && mins <= 24) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 29 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 30 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 31 && secs >= 05 && secs <=35){// This is to change squad to Team 3
combo_run(SELECT_3);
}
//start match team 3--------------------------------------------------------------------------------
 
if(mins == 32 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 32 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 38 && mins <= 40) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 45 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 46 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 47 && secs >= 05 && secs <=35){//This is to change squad to Team 4
combo_run(SELECT_4);
}
 
//start match team 4--------------------------------------------------------------------------------
 
if(mins == 48 && secs <= 20 ) {
combo_run(PRESS_CROSS);
}
 
//------------------------------------- Change view to skip cutscenes
if(mins == 48 && secs == 46 && !Change_View) {
combo_run(CHANGE_VIEW);
}
 
//------------------------------------- Spam x to skip halftime screens
if(mins >= 54 && mins <= 56) {
combo_run(PRESS_CROSS);
}
//--------------------------------------- Start to press options to skip end game replays.
if(mins == 61 && secs >= 30) {
combo_run(ENDGAME);
}
//--------------------------------------- Run the start sequence for end game menus. land on manager screen
if(mins == 62 && secs <= 45){
combo_run(PRESS_CROSS);
}
 
 
if (mins == 63 && secs >= 05 && secs <=35){//This is to change squad back to Team 1 and reset the loop again to start round 2 and repeat all above
combo_run(SELECT_1);
}
 
 
 
}
off = FALSE;
if(matches >= 11 && !off){
combo_run(POWEROFF);
}
set_val(TRACE_1,secs);
set_val(TRACE_2,mins);
}
//-----------------------------------------
 
// COMBO BLOCKS
 
 
 
//------------------------------ Press Triangle to change view to skip cutscenes
combo CHANGE_VIEW {
set_val(PS4_TRIANGLE, 100);
wait(130);
wait(500);
wait(4000);
}
 
//------------------------------ Press X on pad with minimal wait
combo PRESS_CROSS {
set_val(PS4_CROSS, 100);
wait(10);
}
 
 
//----------------------------- Press options to skip replays at end of game.
combo ENDGAME {
set_val(PS4_OPTIONS, 100);
wait(60);
wait(2000);
}
//--------------------------- Click from final menu and then wait to restart script for next game
combo SELECT_1{
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0); // To go back from squad management to main menu
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100); // to open Squad list (Team List)
wait(60);
set_val(PS4_SQUARE, 0);
wait(60);
wait(5000);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go down to Team 1 (1st on the squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 1
wait(60);
set_val(PS4_CROSS, 0);
wait(60);
wait(7000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100); // go left 3 times to stand on SIM Match screen again and repeat loop
wait(60);
wait(4000);
 
mins = 0;
secs = 0;
timer = 0;
Change_View = FALSE;
 
matches ++;
}
 
combo SELECT_2{//Selecting Team 2
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0)
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0);
wait(60);
wait(5000);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0);
wait(60);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go down 2 times to Team 2 (2nd team in squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 2
wait(60);
set_val(PS4_CROSS, 0);
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo SELECT_3{// Selecting Team 3
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0);
wait(60);
wait(5000);
set_val(PS4_RIGHT, 100);
wait(60);
set_val(PS4_RIGHT, 0); // Go right to stand on Team 3 (3rd Team in Squad list)
wait(60);
set_val(PS4_CROSS, 100); // Select Team 3
wait(60);
set_val(PS4_CROSS, 0);
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo SELECT_4{//Selecting Team 4
wait(4000);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(60);
set_val(PS4_CIRCLE, 100);
wait(60);
set_val(PS4_CIRCLE, 0);
wait(10000);
wait(1000);
set_val(PS4_SQUARE, 100);
wait(60);
set_val(PS4_SQUARE, 0);
wait(60);
wait(5000);
set_val(PS4_RIGHT, 100);
wait(60);
set_val(PS4_RIGHT, 0);
wait(60);
set_val(PS4_DOWN, 100);
wait(60);
set_val(PS4_DOWN, 0); // Go right then down to stand on Team 4 (4th team in Squad list)
wait(60);
set_val(PS4_CROSS, 100); // Selecting Team 4
wait(60);
set_val(PS4_CROSS, 0);
wait(60);
wait(7000);
wait(60);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(1000);
set_val(PS4_LEFT, 100);
wait(60);
wait(4000);
Change_View = FALSE;
}
 
combo POWEROFF{
set_val(PS4_PS, 100);
wait(60);
set_val(PS4_PS, 0);
wait(4000);
off = TRUE;
}
 
// COLOR LED function
//--------------------------------------------------------------
function colourled(Colour) {
Col_ind=(Colour*4)- 3;
set_led(LED_1,dbyte(Col_ind ));
set_led(LED_2,dbyte(Col_ind+ 1));
set_led(LED_3,dbyte(Col_ind+ 2));
set_led(LED_4,dbyte(Col_ind+ 3));
}
ConsoleTuner Support Team || Discord
Mad
Captain
Captain
 
Posts: 682
Joined: Wed May 22, 2019 5:39 am

Re: Convert this PES 2020 farming script please

Postby Muzak10 » Wed Oct 09, 2019 9:45 am

Thanks Mad I will check that out. Thanks to Buffy for his hard work on that as well. Good lads
User avatar
Muzak10
First Sergeant
First Sergeant
 
Posts: 61
Joined: Tue Oct 30, 2018 10:49 am

TRANSLATING THIS SCRIPT device TO TITAN TWO? HELP

Postby NK0 » Wed Oct 09, 2019 4:03 pm

Hi , I buy TITAN TWO and need translate this script. Any APP for auto translate or create new combos? :ashamed: :ashamed: :ashamed:
Code: Select all
//////////////////////////////////////////////
 
 unmap PS4_LEFT
 remap PS4_TOUCH XB360_BACK
 remap PS4_SHARE XB360_LEFT
 
 
main {
 
 
if (get_val(PS4_L2) > 17) set_val(PS4_L2,100);
if (get_val(PS4_LY) < -65) set_val(PS4_LY,-100);
if (get_val(PS4_RX) < -75) set_val(PS4_RX,-82);
if (get_val(PS4_RX) > 75) set_val(PS4_RX,82);
if (get_val(PS4_RY) < -75) set_val(PS4_RY,-82);
if (get_val(PS4_RY) > 75) set_val(PS4_RY,82);
 
 
  if((get_val(PS4_LY)) < -95) {
        combo_run(Turbo_run);
    }
 
 if(get_val(PS4_LEFT)) {
        combo_run(combo1);
 
             }
 
              if((get_val(PS4_R2)) && (get_val(PS4_R3))) {
     combo_run(combo2);
         }
 
        if (get_val(PS4_L2) && get_val(PS4_R2)) {
        combo_run(combo4);
        }
 
          if (get_val(PS4_L2) && get_val(PS4_R1)) {
        combo_run(combo3);
        set_val(PS4_R1, 0);
        } else {
        combo_stop(combo3);
          }
 
          if(get_val(PS4_RIGHT)) {
        combo_run(Tap_1);
         } else {
        combo_stop(Tap_1);
                }
 
           if(event_release(PS4_RIGHT)  && get_ptime(PS4_RIGHT)<30000){                                     
              combo_run(combo5);
 
          }
 
            }
 
 
.combo Turbo_run {
    set_val(PS4_L3, 100);
 
}
 
            combo combo1 {
   set_val(PS4_RY, 100);
    set_val(PS4_R2, 0);
    set_val(PS4_L3, 100);
    wait(10);
    set_val(PS4_RY, 90);
    set_val(PS4_R2, 0);
    set_val(PS4_R1, 100);
    wait(50);
    set_val(PS4_R1, 100);
    set_val(PS4_L2, 100);
    set_val(PS4_CROSS, 100);
    wait(30);
    set_val(PS4_CROSS, 100);
    set_val(PS4_RX, 0);
    set_val(PS4_R1, 0);
    set_val(PS4_R2, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_L3, 100);
    set_val(PS4_RY, -100);
    set_val(PS4_R1, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 0);
    wait(25);
    wait(25);
    set_val(PS4_RY, -90);
    set_val(PS4_RX, 0);
    set_val(PS4_R1, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_RY, -90);
    set_val(PS4_R1, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 0);
    wait(25);
    set_val(PS4_R2, 0);
    set_val(PS4_R1, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 100);
    wait(50);
    set_val(PS4_L2, 100);
    wait(300);
    set_val(PS4_R2, 0);
    set_val(PS4_R1, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_L2, 0);
    wait(10);
    wait(50);
    }
 
 
combo Tap_1 {
    set_val(PS4_R2, 0);
    wait(10);
    set_val(PS4_R2, 100);
    wait(2500);
    }
 
   combo combo5 {   
    set_val(PS4_CIRCLE,0);
    set_val(PS4_SQUARE, 0);
    wait(5);
    set_val(PS4_CIRCLE, 100)
    set_val(PS4_R2, 0);
    set_val(PS4_L2, 0);
    set_val(PS4_L1, 0);
    set_val(PS4_R1, 0);
    wait(30)
    set_val(PS4_CIRCLE,0);
    set_val(PS4_SQUARE, 0);
 
 
}
 
 
combo combo2 {
    wait(45);
    set_val(PS4_R3, 0);
    wait(80);
    wait(5);
    }   
 
combo combo4 {
   set_val(PS4_R2,0);
   wait(5);
   wait(220);
   set_val(PS4_L2,0);
 
 
}
combo combo3 {
   set_val(PS4_R2,0);
   wait(10);
   set_val(PS4_R2,100);
   wait(30);
   wait(280);
   set_val(PS4_L2,0);
   wait(10);
 
 
}
User avatar
NK0
Private First Class
Private First Class
 
Posts: 2
Joined: Wed Oct 09, 2019 3:52 pm

PreviousNext

Return to GPC Script Programming (Titan Two)

Who is online

Users browsing this forum: No registered users and 11 guests