Function :: Wait() /q?

xZanU

New member
Is there a quiet mode for wait()?

I've tried variations of /q /s etc... But it still echos the countdown and completed texts in the CLI. Also tried some redirection(s) but those do not work either.

As an alternative I have been using a while loop that counts to 1000, but the time elapsed on that varies by system and load.
 

Rahmuss

Member
On a somewhat related question, I'm using wait in a script and I want it to ask me how many seconds I want it to wait for. Any suggestions? Basically I run .txt script files that use my turns up; but there are times when I want it to pause for a period of time depending on what's going on in my clan. Any suggestions?
 

lostcalpolydude

Developer
Staff member
On a somewhat related question, I'm using wait in a script and I want it to ask me how many seconds I want it to wait for. Any suggestions? Basically I run .txt script files that use my turns up; but there are times when I want it to pause for a period of time depending on what's going on in my clan. Any suggestions?

call myWait (in your .txt file)

In myWait.ash:
Code:
void main( randomVar ) {
   cli_execute("wait " + randomVar);
}
This might not be the best way to do it, but it should work.
 

Bale

Minion
Well, I dislike using a CLI command in an ash script when there's a good ash command to use. I'd recommend using wait( int ) instead. Aside from that I have no criticism.

It is a shame that there is no way inside a script to prompt the user for a variable other than a boolean.
 

Catch-22

Active member
It is a shame that there is no way inside a script to prompt the user for a variable other than a boolean.

Yep and every time a discussion starts up about supporting more than this, the thread eventually dies.

Most of the work has already been done for implementing integer prompts.
 
Last edited:

Rahmuss

Member
So the script (.ash) would be:

void main( randomVar ) {
wait(int);
}


And in my .txt file I would do:

call myWait.ash

And that would then prompt me for the number of seconds to wait?
 

Catch-22

Active member
So the script (.ash) would be:

void main( randomVar ) {
wait(int);
}


And in my .txt file I would do:

call myWait.ash

And that would then prompt me for the number of seconds to wait?

I think that would be:

Code:
void main(waitTime) {
    wait(waitTime);
}
 

holatuwol

Developer
Yep and every time a discussion starts up about supporting more than this, the thread eventually dies.
Unless I'm missing something, the primary motivation for not including user prompting for anything other than booleans is just as problematic now as it was two years ago.

I think user_confirm was only added because I could sympathize with the idea of using it to abort a script. If it's frustrating to feel limited by it, I'd feel more comfortable removing it entirely than I would by adding more things that'd lead to "Ok, so KoLmafia suddenly locked up..." bug reports.
 

Rahmuss

Member
I think it works great as it is. It's fun to see what else can be done with it as well; but the main program needs to be stable like it is.

Edit: This comment was directed towards holatuwol. Oh, and the script works great guys, thanks. :)
 
Last edited:
Top