How can I get Mirc to post random messages from a timer?
This line:
/timer 0 3600 /msg #chat $read c:\mIRC\stuff.txt
will just display the same message once every hour.
2nd question:
It isn't that important but how can I set up random timer intervals to do the same thing basically?
Thank you
question 1
timer 0 3600 /msg #chat $read(c:\mIRC\stuff.txt,$rand(0,$lines(c:\mIRC\stuff.txt)))
random timers id make a alias that started a new timer and use this in the alias
timer 1 $rand(60,3600) /msg #chat $read(c:\mIRC\stuff.txt,$rand(0,$lines(c:\mIRC\stuff.txt)))
Hello,
in those examples, the timer would display the same message each time the timer is called upon, if the timer is triggered in an alias. That is cuz that $read identifier is evaluated the first time, and then it will put out that value each time the timer is called. So if this timer would be called from an alias, it would print the same thing each time. If the person types that timer code manually, then it will do what he wants it to do (assuming he only uses one /). If he triggers it from an alias, (or uses //) then he has to make the timer re-evaluate the $read each time the timer is called upon.
That can be done as following:
alias time.stuff { .timer 0 3600 msg #chat $!read(c:\mIRC\stuff.txt) }
Usage: /time.stuff
Note that you do not need to specify $rand, because as stated in the help file:
//echo $read(funny.txt)
--> Reads a random line from the file funny.txt.
Greetz
//timer 0 3600 /msg #chat $!read(c:\mIRC\stuff.txt)
Each time a $!identifier is parsed, one ! will go away.
Another solution is using $eval($read(c:\mIRC\stuff.txt),0)
In a script you can remove the // or / in front of commands, in an editbox use / if you do not want it's arguments parsed and // to parse them (like in a script)
2.
//timer[color:blue]MMIVVVI[/color] 1 3 echo -a $!read(versions.txt,n) $chr(124) .timer[color:blue]MMIVVVI[/color] 1 $!rand(3,9) $!timer([color:blue]MMIVVVI[/color]).com
MMIVVVI can be any
unique name for the timer, but must be the same in all three positions.
If you type /timer after starting the above you will see an entry as below.
* Timer mmivvvi 1 time(s) 3s delay echo -a $read(versions.txt,n) | .timerMMIVVVI 1 $rand(3,9) $timer(MMIVVVI).com