code:
on *:text:!setowner*:#:{
if ($nick == seen) {
set %owner $2
msg $chan 12 The person who can change commands has been set to %owner
}
}
alias addq {
/write trivia.txt $1-
msg $chan 12 A new question has been added to my trivia!
}
on *:text:!trivia*:%chans:{
if (%trivia = $Null) {
msg $chan 12 Trivia has been started you have 30 seconds to reply.
set %thing $read(trivia.txt)
set %question $gettok(%thing,1,124)
set %trivia on
set %answer $gettok(%thing,4-10,124)
set %chan #
msg %chan 12First Question:4 %question
.timer1 1 15 msg $chan 4[-HINT-]:12 $gettok(%thing,2,124)
.timer2 1 25 msg $chan 4[-HINT-]:12 $gettok(%thing,3,124)
.timer3 1 35 wrong
haltdef
}
else notice $nick Trivia is already in action stupid!
}
alias wrong {
if (%trivia == on) {
msg %chan 12You Failed To Answer The Question! next Question in4 5 12seconds! 12 Answer:4 %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-6,124)
msg %chan 12Next Question:4 %question
.timer1 1 15 msg %chans 4[-HINT-]:12 $gettok(%thing,2,124)
.timer2 1 25 msg %chans 4[-HINT-]:12 $gettok(%thing,3,124)
.timer3 1 35 wrong
haltdef
}
}
on *:text:*:%chans: {
if ($1- == %answer) {
.timer3 off
.timer1 off
.timer2 off
msg %chan 12Well done $Nick $+ ! Thats how to do it:4 $+(%answer,!)$+ $+(12,$nick)$+ 4Has12 %score [ $+ [ $nick ] ] Point(s)!
inc %score [ $+ [ $nick ] ]
unset %answer
unset %question
unset %thing
.timer 1 5 new
haltdef
}
if ($1 == !STOP) {
msg %chan 12Trivia Has Been Stopped By $Nick
.timer1 off
.timer2 off
.timer3 off
.timer4 off
unset %trivia
unset %answer
unset %question
unset %thing
haltdef
}
if ($1 == !points) {
if (%score [ $+ [ $nick ] ] == $null) {
notice $nick You Have 0 Points
}
elseif (%score [ $+ [ $nick ] ] != $null) {
notice $nick 12You Have %score [ $+ [ $nick ] ] Points! get 200+ for halfop and 300+ for op
}
}
}
on *:join:%chans: {
if ($me isop #) {
if (%score [ $+ [ $nick ] ] > 199) && (%score [ $+ [ $nick ] ] < 299) {
mode # +h $nick
/cs access # add $Nick 4
}
elseif (%score [ $+ [ $nick ] ] > 300) {
mode # +o $nick
cs access # add $Nick 5
msg $chan 12@@@@@@@@@ Gratz on op $Nick @@@@@@@@@@@@
}
elseif (%score [ $+ [ $nick ] ] == $null) {
msg $chan 12Welcome to4 $chan 12Type !trivia to play the Trivia Rpg, Type !stop to stop The game
}
}
}
on *:text:!setchan*:#:{
if ($nick isop $chan) {
set %chans $2
msg $chan 12 The trivia channel has been set to %chans
}
}