mIRC Home    About    Download    Register    News    Help

Topic Options
#253213 - 31/05/15 08:35 PM random number timer help
Draknon Offline
Mostly harmless

Registered: 31/05/15
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

Top
#253216 - 01/06/15 05:50 AM Re: random number timer help [Re: Draknon]
Sakana Offline
Fjord artisan

Registered: 19/09/14
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


Edited by Sakana (01/06/15 05:52 AM)

Top