rendered paste bodyon *:TEXT:!trivia:#:{
if (%trivia. [ $+ [ $chan ] ] == $null) {
/set %trivia. [ $+ [ $chan ] ]
/notice $chan Trivia has been activated by $nick $+ . Game Starts in 5 seconds.
:one
/msg $chan $read(questions.txt)
/set %questionnumber. [ $+ [ $readn ] ]
/set %answer. [ $+ [ $read(answers.txt, %questionnumber.) ] ]
/timerhint 1 10 /hint
/timernew 1 20 {
/set %blah. on
/msg $chan Whoa! Too bad time has run out! new question pl0x!
goto one
}
else {
/notice $nick There is already an active trivia game in $chan $+ .
}
}
}
on *:text:**:#:{
if ((%trivia. [ $+ [ $chan ] ] != $null) && ($1- == %answer.)) {
/timerhint off
/timernew off
/inc %tpoints. [ $+ [ $nick ] ] 1
/msg $chan Yah!!! Congratz $nick Your right! You now have %points.
:one
/timerq 1 5 /msg $chan $read(questions.txt)
/set %questionnumber. [ $readn ]
/set %answer. [ $+ [ $read(answers.txt, %questionnumber.) ] ]
/timerhint 2 10 /hint
/timernew 3 10 {
/msg $chan Whoa! Too bad time has run out! new question pl0x!
goto one
}
}
}