mIRC Homepage
Posted By: Gremel Can someone lend me help in how to do this: - 17/08/04 12:45 PM
What I was hoping to do was make a script that would say something every so often in a specific channel. As well I was wondering if there was to put a on off switch or something in it?

I have never tried anything along this line and I don't know where to start so any help would be of greatly help.
I'm reasonbly new to this 'forum' but i'm sure i've come across this in the search..
so try to use the search...
what would I search for. I sually include a easy to tell title for the post but did't know what to call what i was trying to do...so I wasn't able to perferm a search.
what do u mean like a timer that you can swith on and off?
if so you could use this


alias message {
if (!$1) || (!$2) || (!$3) || (!$4) { echo -a Invalid Parameters | halt }
else {
/timer340 $1 $2 //msg $3 $4-
}
}

}
;then use /message <times> <time period> <channel> <message>
;e.g. /message 0 100 #channel hello every one
;0 = unlimited
;1 = 1 time
;the 100 is for the message to display after 100 sec time period
then to switch it off
alias off {
timer340 off
}
}
prolly just as easy to use the regular timer
see
/help /timer
also search forums for timer
hope i got the right idea
also search forums for timer
Code:
menu menubar {
  Quote ( $+ $upper($group(#Quote)) $+ )
  .$iif($group(#Quote) == off,Start,Stop): {
    $iif($group(#Quote) == off,echo 2 -a Quotes enabled,echo 2 -a Quotes disabled!)
    $iif($group(#Quote) == off,.timerQuote 0 [color:red]N[/color] start $$input(Channel:,eoq),.timerQuote off)
    $iif($group(#Quote) == off,.enable #Quote,.disable #Quote)
  }
} 
#Quote off
alias Start { msg $$1 [color:green]&lt;text you want to say&gt;[/color] }
#Quote end
This should work as you want to. Change the red N to the delay between the text you want to say, in seconds! (Eg. every 30 minutes = 1800 secs).
Also replace the green part with the text you want to say. You can use $!read(filename.txt) to say a random line from the filename.txt file. You have to have that file in your mIRC folders created smile

I hope this is what you're looking for smile
Zyzzyx.

Edit: I had made a little mistake on the code so I edited the post. Make sure you copied the code that had this message under it!
Thanks Zyzzy, that helped though I needed to remove the $$1 bit and put in a # in order for it to work for me.
Yw! smile Just keep in mind that by replacing the $$1, it will *not* send the message to the channel you typed in the box that appears.
© mIRC Discussion Forums