rendered paste body
on *:text:!trivia:%chans: {
if (%trivia == $null) {
msg $chan 1Trivia Has Started. You Have12 30 1seconds to Answer
set %thing $read(trivia.txt)
set %question $gettok(%thing,1,124)
set %trivia on
set %answer $gettok(%thing,4,124)
msg $chan Question:12 %question
set %chan #
.timer1 1 15 msg $chan 1HINT:12 $gettok(%thing,2,124)
.timer2 1 25 msg $chan 1HINT:12 $gettok(%thing,3,124)
.timer3 1 35 wrong
haltdef
}
else { msg $nick 1Trivia is Already On }
}
alias wrong {
if (%trivia == on) {
msg %chan 1You Failed To Answer The Question! next Question in12 5 1seconds! The Correct Answer Was 12 %answer
unset %answer
unset %question
unset %thing
.timer 1 5 new
haltdef
}
}
alias new {
if (%trivia == on) {
set %thing $read(trivia.txt)
set %question $gettok(%thing,1,124)
set %trivia on
set %answer $gettok(%thing,4,124)
msg %chan 1New Question:12 %question
.timer1 1 15 msg %chan 1HINT:12 $gettok(%thing,2,124)
.timer2 1 25 msg %chan 1HINT:12 $gettok(%thing,3,124)
.timer3 1 35 wrong
haltdef
}
}
on *:text:*:%chans: {
if ($1 == %answer) {
.timer3 off
.timer1 off
.timer2 off
msg %chan 1You Got It Right The Answer Was:12 $+(%answer,!)$+ $+(12,$nick)$+ 1Has 12 %score [ $+ [ $nick ] ] 1Point(s)!
inc %score [ $+ [ $nick ] ]
unset %answer
unset %question
unset %thing
.timer 1 5 new
haltdef
}
if ($1 == !strivia) {
msg %chan 1Trivia Has Been Halted!
.timer1 off
.timer2 off
.timer3 off
.timer4 off
unset %trivia
unset %answer
unset %question
unset %thing
haltdef
}
if ($1 == !won) {
if (%score [ $+ [ $nick ] ] == $null) {
notice $nick 1You Have 120 1Points
}
elseif (%score [ $+ [ $nick ] ] != $null) {
notice $nick 1You Have 12 %score [ $+ [ $nick ] ] 1Points!
}
}
}
on *:join:%chans: {
if ($me isop #) {
if (%score [ $+ [ $nick ] ] > 49) && (%score [ $+ [ $nick ] ] < 99) {
mode # +h $nick
}
elseif (%score [ $+ [ $nick ] ] > 99) {
mode # +o $nick
}
elseif (%score [ $+ [ $nick ] ] == $null) {
msg $chan 1Welcome to12 $chan 1Type12 !trivia1 to play the Trivia Game, Type 12!strivia1 to stop
}
}
}
alias chans {
if (!$1) {
set %chans $$?="Enter Channel For Trivia!"
}
else {
set %chans $1
}
}
on *:input:#: {
if ($1 == !trivia) {
if (%trivia == $null) {
msg $active $1-
msg $active 1Trivia Has Started. You Have12 30 1seconds to Answer
set %thing $read(trivia.txt)
set %question $gettok(%thing,1,124)
set %trivia on
set %answer $gettok(%thing,4,124)
msg $chan 4Question:12 %question
set %chan #
.timer1 1 15 msg $chan 1HINT:12 $gettok(%thing,2,124)
.timer2 1 25 msg $chan 1HINT:12 $gettok(%thing,3,124)
.timer3 1 35 wrong
haltdef
}
}
if ($1 == !strivia) {
msg $active $1-
msg $active Trivia Has Been Halted!
.timer1 off
.timer2 off
.timer3 off
.timer4 off
unset %trivia
unset %answer
unset %question
unset %thing
haltdef
}
if ($1 == !won) {
if (%score [ $+ [ $me ] ] == $null) {
echo -a 1You Have4 120 1Points
}
elseif (%score [ $+ [ $nick ] ] != $null) {
echo -a 1You Have12 %score [ $+ [ $nick ] ] 1Points!
}
}
if ($1 == %answer) {
msg $active $1-
.timer3 off
.timer1 off
.timer2 off
inc %score [ $+ [ $nick ] ]
msg %chan 1You Got It Right The Answer Was:12 $+(%answer,!)$+ $+(12,$nick)$+ 1Has 12 %score [ $+ [ $nick ] ] 1point(s)!
unset %answer
unset %question
unset %thing
.timer 1 5 new
haltdef
}
}