help me with a heal/battery script please

GPC1 script programming for Titan One. Code examples, questions, requests.

help me with a heal/battery script please

Postby Madddddox » Tue Mar 19, 2019 6:17 pm

I would like a script where you press 1 button on ps4 and it will select and use a shield cell for apex legends please.
One for each button pressed, I use maxaim di so could use extended buttons for each key pressed.

This is what I have so far, maybe I am going about it a hard way.
Code: Select all
main {
 
//bound to mouse wheel up
    if(event_press(PS4_TOUCHX)) {
        combo_run(shieldbattery);
    }
    if(combo_running(shieldbattery)) {
        set_val(PS4_UP, 100);
    }
 
//bound to scroll wheel down
    if(event_press(PS4_TOUCHY)) {
    combo_run(shieldcell);
    }
    if(combo_running(shieldcell)) {
        set_val(PS4_UP, 100);
    }
 
}
 
combo shieldbattery {
   // shield battery
    wait(500)
    set_val(PS4_RY, -63);
    set_val(PS4_RX, +90);
    wait(100);
 
}
 
combo shieldcell {
   // shield cell
    wait(500)
    set_val(PS4_RY, +75);
    set_val(PS4_RX, +75);
    wait(100);
 
}
User avatar
Madddddox
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Mar 19, 2019 6:02 pm

Re: help me with a heal/battery script please

Postby alanmcgregor » Tue Mar 19, 2019 8:18 pm

The Essential Script has it.
User avatar
alanmcgregor
Major
Major
 
Posts: 995
Joined: Tue Mar 27, 2018 8:38 am

Re: help me with a heal/battery script please

Postby Madddddox » Tue Mar 19, 2019 8:23 pm

That is titan two is it not.
User avatar
Madddddox
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Mar 19, 2019 6:02 pm

Re: help me with a heal/battery script please

Postby alanmcgregor » Tue Mar 19, 2019 11:34 pm

Oh right, yeah sorry my bad.

glitchbish share a script combos that work, is on GP1 (Titan One code)

Link: viewtopic.php?f=26&t=11846

I will fix it for you, one second. :wink:

UPDATE: There you go. I don't have Titan One code is OK, though.
Try it:

Code: Select all
 
 
int stick_X;
int stick_Y;
 
//CREDITS: glitchbish (items combos)
 
main {
 
//bound to mouse wheel up
    if(event_press(PS4_TOUCHX)) {
        combo_run(kit_UR);
    }
    if(combo_running(kit_UR)) {
        set_val(PS4_UP, 100);
    }
 
//bound to scroll wheel down
    if(event_press(PS4_TOUCHY)) {
    combo_run(kit_DR);
    }
    if(combo_running(kit_DR)) {
        set_val(PS4_UP, 100);
    }
 
}
 
// UR (Shield Battery)
combo kit_UR {
    stick_X = 100;
    stick_Y = -50;
    call(kit_Cb);
    wait(0);
    wait(500);
    printf("kit_UR");
}
 
// DR (Shield Cell)
combo kit_DR {
    stick_X = 100;
    stick_Y = 100;
    call(kit_Cb);
    wait(0);
    wait(500);
    printf("kit_DR");
}
 
combo kit_Cb {
    set_val(PS4_UP, 100);
    wait(500);
    set_val(PS4_UP, 100);
    set_val(PS4_RX, stick_X);
    set_val(PS4_RY, stick_Y);
    wait(300);
    // Remove the section below to disable activate-on-select
    set_val(PS4_CROSS, 100);
    set_val(PS4_UP, 100);
    set_val(PS4_RX, stick_X);
    set_val(PS4_RY, stick_Y);
    wait(20);
}
 
User avatar
alanmcgregor
Major
Major
 
Posts: 995
Joined: Tue Mar 27, 2018 8:38 am

Re: help me with a heal/battery script please

Postby Madddddox » Wed Mar 20, 2019 2:06 am

Thank you very much

Code: Select all
int stick_X;
int stick_Y;
 
//CREDITS: glitchbish (items combos)
// 1 Shield Cell
// 2 Shield Battery
// 3 Syringe
// 4 Medipack
// 5 Pheonix Kit
main {
 
//bound to 2
    if(event_press(PS4_TOUCHX)) {
        combo_run(kit_SB);
    }
    if(combo_running(kit_SB)) {
        set_val(PS4_UP, 100);
    }
 
//bound to 1
    if(event_press(PS4_TOUCHY)) {
    combo_run(kit_SC);
    }
    if(combo_running(kit_SC)) {
        set_val(PS4_UP, 100);
    }
 
//bound to 5
    if(event_press(PS4_GYROX)) {
    combo_run(kit_PK);
    }
    if(combo_running(kit_PK)) {
        set_val(PS4_UP, 100);
    }
 
//bound to 4
    if(event_press(PS4_GYROY)) {
    combo_run(kit_MP);
    }
    if(combo_running(kit_MP)) {
        set_val(PS4_UP, 100);
    }
 
//bound to 3
    if(event_press(PS4_GYROZ)) {
    combo_run(kit_S);
    }
    if(combo_running(kit_S)) {
        set_val(PS4_UP, 100);
    }
}
 
// SB (Shield Battery)
combo kit_SB {
    stick_X = 100;
    stick_Y = -50;
    call(kit_Cb);
    wait(10);
    wait(500);
 
}
 
// SC (Shield Cell)
combo kit_SC {
    stick_X = 100;
    stick_Y = 100;
    call(kit_Cb);
    wait(10);
    wait(500);
 
}
 
//PK (pheonix Kit)
combo kit_PK {
    stick_X = 0;
    stick_Y = -100;
    call(kit_Cb);
    wait(10);
    wait(500);
}
 
//MP (medipack)
combo kit_MP {
    stick_X = -100;
    stick_Y = -50;
    call(kit_Cb);
    wait(10);
    wait(500);   
}
 
//S (syringe)
combo kit_S {
    stick_X = -100;
    stick_Y = 100;
    call(kit_Cb);
    wait(10);
    wait(500);   
}
 
combo kit_Cb {
    set_val(PS4_UP, 100);
    wait(500);
    set_val(PS4_UP, 100);
    set_val(PS4_RX, stick_X);
    set_val(PS4_RY, stick_Y);
    wait(300);
    // Remove the section below to disable activate-on-select
    set_val(PS4_CROSS, 100);
    set_val(PS4_UP, 100);
    set_val(PS4_RX, stick_X);
    set_val(PS4_RY, stick_Y);
    wait(20);
}
User avatar
Madddddox
Private First Class
Private First Class
 
Posts: 3
Joined: Tue Mar 19, 2019 6:02 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 108 guests