Need Button Combo Scripting Help
34 posts
• Page 1 of 4 • 1, 2, 3, 4
Need Button Combo Scripting Help
How would one script out the following button combo? (Xbox One)
RT+RB+Left Stick Down held down for 30 seconds and then Left Stick Double click, but as soon as that happens the RB is released while the RT+Left Stick Down is held down for an other 5 seconds
Thanks for any help!
RT+RB+Left Stick Down held down for 30 seconds and then Left Stick Double click, but as soon as that happens the RB is released while the RT+Left Stick Down is held down for an other 5 seconds
Thanks for any help!
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
Re: Need Button Combo Scripting Help
Is RT+Left Stick Down pressed the entire combo?
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
Re: Need Button Combo Scripting Help
Yes it is
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
Re: Need Button Combo Scripting Help
- Code: Select all
int rtly;
main {
if(event_press(XB1_A)) {
rtly = 1;
combo_run(x);
}
if(rtly) {
set_val(XB1_RT, 100);
set_val(XB1_RB, 100);
set_val(XB1_LY, 100);
}
}
combo x {
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
set_val(XB1_LS, 100);
wait(60);
set_val(XB1_LS, 100);
wait(60);
rtly = 0;
wait(10);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
set_val(XB1_RB, 0);
wait(60);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(4000);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(1000);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
Re: Need Button Combo Scripting Help
Sweet!! Mad strikes again!! Thanks so much, AGAIN! I'll let you know how this works. I'm trying to come up with a massive script to run a GTA AFK, 2 player, 16 Arena War job playlist to grind out that pesky AP. What you just made is the kill combo for the losing player. Pretty much, the faster you grind out these jobs, the faster you get AP. Lots of people say spinning the Arena War Wheel in the spectator booth is the fastest way, but it costs $5000 a spin and there's like a 1 in 5 chance of you getting AP.
I can do the playlist in about 30 minutes and walk away with 1163 AP. But I do have a question for you Mad. Why are the "wait" values in 1000 and 4000 intervals? Why not 5000 or 10000? Thanks again.
I can do the playlist in about 30 minutes and walk away with 1163 AP. But I do have a question for you Mad. Why are the "wait" values in 1000 and 4000 intervals? Why not 5000 or 10000? Thanks again.
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
Re: Need Button Combo Scripting Help
volta1492 wrote:Sweet!! Mad strikes again!! Thanks so much, AGAIN! I'll let you know how this works.
No problem, let me know if it needs to be changed. The first one wouldn't have worked as expected so I updated the code in the first post. I have been playing GTA and writing some scripts myself.
volta1492 wrote:I do have a question for you Mad. Why are the "wait" values in 1000 and 4000 intervals? Why not 5000 or 10000? Thanks again.
The wait() limit for the titan one is 10 to 4000ms
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
Re: Need Button Combo Scripting Help
- Code: Select all
int toggle;
main {
if(get_val(XB1_RT) && event_press(XB1_Y)) {
toggle = !toggle;
}
if(toggle) {
combo_run(AP Grind);
}
}
combo Ap Grind {
wait(1000);
set_val(XB1_DOWN, 100);
wait(100);
set_val(XB1_LEFT, 100);
wait(100);
set_val(XB1_UP, 100);
wait(100);
set_val(XB1_UP, 100);
wait(100);
set_val(XB1_A, 100);
wait (100);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
wait (1000);
wait (4000);
wait (1000);
set_val(XB1_A, 100);
wait (100);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
int rtly;
main {
if(event_press(XB1_A)) {
rtly = 1;
combo_run(x);
}
if(rtly) {
set_val(XB1_RT, 100);
set_val(XB1_RB, 100);
set_val(XB1_LY, 100);
}
}
combo x {
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
set_val(XB1_LS, 100);
wait(60);
set_val(XB1_LS, 100);
wait(60);
rtly = 0;
wait(10);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
set_val(XB1_RB, 0);
wait(60);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(4000);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(1000);
}
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
set_val(XB1_Y, 100);
wait (100);
wait(1000);
set_val(XB1_A, 100);
wait (100);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
}
This is what I got so far Mad. Not sure if I put that in there right, but this should run 1 of the 16 jobs. I know I have to figure out the timing better but I wanted to see if this would work on the 1st one before moving on. Thanks again!
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
Re: Need Button Combo Scripting Help
Also, if the "wait values are 10-4000 I could do a wait(2000); if I wanted too?
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
Re: Need Button Combo Scripting Help
volta1492 wrote:Also, if the "wait values are 10-4000 I could do a wait(2000); if I wanted too?
Yes anything from 10ms up to 4000ms so 2000 is fine
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
Re: Need Button Combo Scripting Help
- Code: Select all
int toggle;
main {
if(get_val(XB1_RT) && event_press(XB1_Y)) {
toggle = !toggle;
}
if(toggle) {
combo_run(AP Grind);
}
}
combo Ap Grind {
wait(1000);
set_val(XB1_DOWN, 100);
wait(100);
set_val(XB1_LEFT, 100);
wait(100);
set_val(XB1_UP, 100);
wait(100);
set_val(XB1_UP, 100);
wait(100);
set_val(XB1_A, 100);
wait (100);
wait (1000);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
wait (4000);
wait (1000);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
wait (1000);
wait (4000);
wait (1000);
set_val(XB1_A, 100);
wait (100);
set_val(XB1_UP, 100);
wait (100);
set_val(XB1_A, 100);
int rtly;
main {
if(event_press(XB1_A)) {
rtly = 1;
combo_run(x);
}
if(rtly) {
set_val(XB1_RT, 100);
set_val(XB1_RB, 100);
set_val(XB1_LY, 100);
}
}
combo x {
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(3000);
set_val(XB1_LS, 100);
wait(60);
set_val(XB1_LS, 100);
wait(60);
rtly = 0;
wait(10);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
set_val(XB1_RB, 0);
wait(60);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(4000);
set_val(XB1_RT, 100);
set_val(XB1_LY, 100);
wait(1000);
}
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
set_val(XB1_Y, 100);
wait (100);
wait(2000);
set_val(XB1_A, 100);
wait (100);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
wait(4000);
wait(1000);
}
Hey Mad, when I try to load this into the Compiler I get an error in the script and I don't know what I did wrong. I'm very novice when it comes to programing and scripting. The button actions, the order of the buttons, and wait times should be right, but I'm sure it's how I inserted the kill combo. Thank you so much for your time!
-
volta1492 - Master Sergeant
- Posts: 40
- Joined: Thu Mar 26, 2020 9:40 pm
34 posts
• Page 1 of 4 • 1, 2, 3, 4
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 92 guests