mIRC Home    About    Download    Register    News    Help

Print Thread
#253213 31/05/15 07:35 PM
Joined: May 2015
Posts: 1
D
Draknon Offline OP
Mostly harmless
OP Offline
Mostly harmless
D
Joined: May 2015
Posts: 1
I am extremely new to scripting and I am trying to figure out how to create a timer so that the same number isn't used for the following code line ...
on *@:text:!question:#: /play -r $chan C:\Users\Marty\Documents\question.txt 5

it does the random line, but I want it to keep track of what number has been used say for a 24hr period and not use it again till after the 24 hrs is up.

any info or help is apreciated

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
You could store the info in a variable or hash table, and whenever a question is asked you check if it's the variable/hash table. If it is, you go on to the next question, etc.

Then after 24 hours you would do /unset %variable or /hfree table_name to reset.

The first time a question is used you could start a timer that will reset everything after 24h

This page is the best for looking into these things http://en.wikichip.org/wiki/Main_Page

Last edited by Sakana; 01/06/15 04:52 AM.

Link Copied to Clipboard