Help make this script loop for (x) amount of time, ASAP!
41 posts
• Page 1 of 5 • 1, 2, 3, 4, 5
Help make this script loop for (x) amount of time, ASAP!
Hi guys, just need these alterations made to this script.
IN SHORT: Stop combo overlap. Pause Combo 1 whilst combo 2 is running.
After the part where it waits 25 seconds to tap X, how can I make it do that whilst stopping combo 1, then resuming combo 1 after it's tapped X?
Thanks guys!!
IN SHORT: Stop combo overlap. Pause Combo 1 whilst combo 2 is running.
After the part where it waits 25 seconds to tap X, how can I make it do that whilst stopping combo 1, then resuming combo 1 after it's tapped X?
- Code: Select all
int SMASH = FALSE;
int SMASH1 = FALSE;
int wt=25000;
main {
if(event_press(XB1_DOWN)) {
SMASH = !SMASH;
}
if (SMASH) {
combo_run(SMASH_X);
}
if(event_press(XB1_DOWN)) {
SMASH1 = !SMASH1;
}
if (SMASH1) {
combo_run(SMASH_Y);
}
}
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
combo SMASH_Y {
wait (wt);
set_val(XB1_X,100)
wait(110);
}
Thanks guys!!
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
Re: Help make this script loop for (x) amount of time, ASAP!
according to this documentation the maximum time for wait is 4000.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Help make this script loop for (x) amount of time, ASAP!
Scachi wrote:according to this documentation the maximum time for wait is 4000.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
Yeah it does work. It's max is up to 32767. Found it on another script and it works fine! How come I've seen on here where the moderators are saying that you can only use 4000ms chunks?
Actually, I want to change it differently, I think I wrote what I needed incorrectly.
Can you adjust it so it repeats the first combo for 7 minutes, stops combo 1, then does combo 2 once (where it taps X), then goes back to combo 1? Then repeat. I just don't want them overlapping.
- Code: Select all
int SMASH = FALSE;
int SMASH1 = FALSE;
main {
if(event_press(XB1_DOWN)) {
SMASH = !SMASH;
}
if (SMASH) {
combo_run(SMASH_X);
}
if(event_press(XB1_DOWN)) {
SMASH1 = !SMASH1;
}
if (SMASH1) {
combo_run(SMASH_Y);
}
}
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
combo SMASH_Y {
set_val(XB1_X,100)
wait(110);
}
Thanks!
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
Re: Help make this script loop for (x) amount of time, ASAP!
Ctuna2000 wrote:Scachi wrote:according to this documentation the maximum time for wait is 4000.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
Yeah it does work. It's max is up to 32767. Found it on another script and it works fine! How come I've seen on here where the moderators are saying that you can only use 4000ms chunks?
I don'T have a T1 anymore. Using a T2 only. So I have to rely on the documentation.
The official documentation mentions 4000ms as the maximum working value.
Have you tested that 25000 really is working, really is waiting and not only 4000 ?
The compiler gives a warning message too:
WARNING line 21: value '8000' is out of range [10 ~ 4000]
Ctuna2000 wrote:Actually, I want to change it differently, I think I wrote what I needed incorrectly.
Can you adjust it so it repeats the first combo for 7 minutes, stops combo 1, then does combo 2 once (where it taps X), then goes back to combo 1? Then repeat. I just don't want them overlapping.
Thanks!
try this:
- Code: Select all
int SMASH = FALSE;
int msecs, secs, mins, hours, days;
main {
msecs = msecs + get_rtime();
if(msecs >= 1000) {
msecs = msecs - 1000;
secs = secs + 1;
if(secs >= 60) {
secs = secs - 60;
mins = mins + 1;
if(mins >= 60) {
mins = mins - 60;
hours = hours + 1;
if(hours >= 24) {
hours = hours - 24;
days = days + 1;
}
}
}
}
if(event_press(XB1_DOWN)) {
SMASH = !SMASH;
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
}
if (SMASH) {
if (mins < 7) combo_run(SMASH_X);
else {
combo_stop(SMASH_X);
combo_run(SMASH_Y);
}
}
}
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
combo SMASH_Y {
set_val(XB1_X,100)
wait(110);
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
wait(0);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Help make this script loop for (x) amount of time, ASAP!
Scachi wrote:Ctuna2000 wrote:Scachi wrote:according to this documentation the maximum time for wait is 4000.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
Yeah it does work. It's max is up to 32767. Found it on another script and it works fine! How come I've seen on here where the moderators are saying that you can only use 4000ms chunks?
I don'T have a T1 anymore. Using a T2 only. So I have to rely on the documentation.
The official documentation mentions 4000ms as the maximum working value.
Have you tested that 25000 really is working, really is waiting and not only 4000 ?
The compiler gives a warning message too:
WARNING line 21: value '8000' is out of range [10 ~ 4000]Ctuna2000 wrote:Actually, I want to change it differently, I think I wrote what I needed incorrectly.
Can you adjust it so it repeats the first combo for 7 minutes, stops combo 1, then does combo 2 once (where it taps X), then goes back to combo 1? Then repeat. I just don't want them overlapping.
Thanks!
try this:
- Code: Select all
int SMASH = FALSE;
int msecs, secs, mins, hours, days;
main {
msecs = msecs + get_rtime();
if(msecs >= 1000) {
msecs = msecs - 1000;
secs = secs + 1;
if(secs >= 60) {
secs = secs - 60;
mins = mins + 1;
if(mins >= 60) {
mins = mins - 60;
hours = hours + 1;
if(hours >= 24) {
hours = hours - 24;
days = days + 1;
}
}
}
}
if(event_press(XB1_DOWN)) {
SMASH = !SMASH;
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
}
if (SMASH) {
if (mins < 7) combo_run(SMASH_X);
else {
combo_stop(SMASH_X);
combo_run(SMASH_Y);
}
}
}
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
combo SMASH_Y {
set_val(XB1_X,100)
wait(110);
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
wait(0);
}
Thank you!! I'll test it out and let you know how it goes!
Well, when I set the time as (wt) for 25000, and it works I guess. I can stack it several times aswell.
If I set it for higher than 32767 and it says "value out of range [-32768 ~ 32767]." So the max for that is around 32 seconds.
Whereas I set a conventional wait time for higher than 4000 and it said
"value '11000' is out of range [10 ~ 4000].
I'm not sure, what do you think? Since setting the time as "wt" (like in the script) works, I don't know what else to say haha.
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
Re: Help make this script loop for (x) amount of time, ASAP!
It was changed from 4000 to 32768.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4533
- Joined: Wed May 22, 2019 5:39 am
Re: Help make this script loop for (x) amount of time, ASAP!
Mad wrote:It was changed from 4000 to 32768.
The docs need an update then.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Help make this script loop for (x) amount of time, ASAP!
Scachi wrote:Mad wrote:It was changed from 4000 to 32768.
The docs need an update then.
In the last few lines for SMASH_Y. Why does it say "msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;"? The line underneath the msecs bit, "wait(0)" doesn't work anyways. It says it's meant to be between 10-4000. Was that a typo or were u trying to do something else?
Thanks!
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
Re: Help make this script loop for (x) amount of time, ASAP!
Scachi wrote:Ctuna2000 wrote:Scachi wrote:according to this documentation the maximum time for wait is 4000.
no idea if using wait 25000 will work correctly.
https://www.consoletuner.com/kbase/comb ... s=AgAAAAE=
you can use multiple wait calls to get to 25000 in total.
Yeah it does work. It's max is up to 32767. Found it on another script and it works fine! How come I've seen on here where the moderators are saying that you can only use 4000ms chunks?
I don'T have a T1 anymore. Using a T2 only. So I have to rely on the documentation.
The official documentation mentions 4000ms as the maximum working value.
Have you tested that 25000 really is working, really is waiting and not only 4000 ?
The compiler gives a warning message too:
WARNING line 21: value '8000' is out of range [10 ~ 4000]Ctuna2000 wrote:Actually, I want to change it differently, I think I wrote what I needed incorrectly.
Can you adjust it so it repeats the first combo for 7 minutes, stops combo 1, then does combo 2 once (where it taps X), then goes back to combo 1? Then repeat. I just don't want them overlapping.
Thanks!
try this:
- Code: Select all
int SMASH = FALSE;
int msecs, secs, mins, hours, days;
main {
msecs = msecs + get_rtime();
if(msecs >= 1000) {
msecs = msecs - 1000;
secs = secs + 1;
if(secs >= 60) {
secs = secs - 60;
mins = mins + 1;
if(mins >= 60) {
mins = mins - 60;
hours = hours + 1;
if(hours >= 24) {
hours = hours - 24;
days = days + 1;
}
}
}
}
if(event_press(XB1_DOWN)) {
SMASH = !SMASH;
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
}
if (SMASH) {
if (mins < 7) combo_run(SMASH_X);
else {
combo_stop(SMASH_X);
combo_run(SMASH_Y);
}
}
}
combo SMASH_X {
set_val(XB1_RT,100);
set_val(XB1_A, 100);
wait(110);
set_val(XB1_RT,100);
set_val(XB1_A, 0);
wait(110);
set_val(XB1_RT,100);
}
combo SMASH_Y {
set_val(XB1_X,100)
wait(110);
msecs = 0; secs = 0; mins = 0; hours = 0; days = 0;
wait(0);
}
Alright, so I tried the script, after the time passes, it starts combo 2, but it just stays on combo 2? Can you change it so it goes back to combo 1 and repeats?
Thanks.
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
Re: Help make this script loop for (x) amount of time, ASAP!
@mad @Scachi
Can someone help ASAP, thanks.
Can someone help ASAP, thanks.
-
Ctuna2000 - Sergeant Major
- Posts: 84
- Joined: Tue Mar 09, 2021 10:09 pm
41 posts
• Page 1 of 5 • 1, 2, 3, 4, 5
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 102 guests