Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias text.file.play {
- ;Setup with Type /.timertext.file.play
- ;Reset with /text.file.play reset
- ;Stop with /text.file.play stop
- if ($1 == reset) { unset %text.file.play.* | timertext.file.play off }
- elseif ($1 == stop) { timertext.file.play off | halt }
- if (!$timer(text.file.play)) {
- if (!%text.file.play.file) set %text.file.play.file $sfile($scriptdir,Select a text file to "play")
- :again
- if (!%text.file.play.chan) {
- set %text.file.play.chan $input(What channel do you want to "play" the file to? $crlf $+ Format: #channel,qe,Enter channel name)
- if (%text.file.play.chan) && ($left(%text.file.play.chan,1) != $chr(35)) { unset %text.file.play.chan | goto again }
- }
- :again2
- if (!%text.file.play.timer) {
- set %text.file.play.timer $input(Enter how many minutes you want to wait between each line:,qe,Enter time)
- if (%text.file.play.timer isnum) noop
- elseif (%text.file.play.timer) { unset %text.file.play.timer | goto again2 }
- }
- if (%text.file.play.file) && (%text.file.play.chan) {
- .timertext.file.play -o 0 $calc(%text.file.play.timer * 60) text.file.play
- echo -tase [!] text.file.play activated. To stop, type /text.file.play stop
- }
- else .timertext.file.play off
- }
- else {
- :redo
- inc %text.file.play.line
- if (%text.file.play.line > $lines(%text.file.play.file)) set %text.file.play.file1
- var %msg $read(%text.file.play.file,n,%text.file.play.line)
- if (!%msg) && (%text.file.play.file) goto redo
- msg %text.file.play.chan %msg
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement