type /trivia to configure, !trivia to play !answer to answer and !quit to quit!
fun trivia game!
if Colors are blocked wont work properally!!
8/17/2009
Ver 2.0
Major update
8/16/2009
8:592:50 PM
update: 1.2
minor bug fix
[size=25]
major update!
!!!
now when initilizing type /msg !trivia
now you can set trivia on/ogg
type /msg !trivia <on|off> <reason
[/size]
on *:text:!trivia*:#: {
if (%trv == off) { notice $nick Trivia is currently down. we are sorry. but a new feature is coming! ( $+ %trvf $+ ) }
if (%trv == on) {
inc %trivia 1
msg # $read(trivia.txt,%trivia)
set %temp #
}
}
on *:text:!trivia*:?: {
if ($4 == %pass) && ($2 == off) { set %trv off | msg $nick trivia OFF ( $+ $3 $+ ) | set %trvf $3- }
if ($4 == %pass) && ($2 == on) { set %trv on | msg $nick trivia ON }
if ($2 == setpass) { set %pass $3- }
}
alias trivias {
if ($read(trivia.txt,%trivia) != $null) { msg %temp $read(trivia.txt,%trivia) }
if ($read(trivia.txt,%trivia) == $null) { msg %temp ****End of Questions/answers**** | set %trivia 0 }
}
on *:text:!answer*:#: {
if (%trv == off) { notice $nick trivia is down ( $+ %trfv $+ ) }
if (%trv == on) {
if ($2- != $read(answers.txt,%trivia)) { msg # incorrect, correct answer was $read(answers.txt,%trivia) $+ , you answered $2- | inc %trivia 1 | //msg # 2Next Question in 3 seconds }
if ($2- == $read(answers.txt,%trivia)) { msg # 9,8Correct $nick | inc %trivia 1 | //msg # 2Next Question in 3 seconds }
timertriv 1 3 //trivias
}
}
on *:text:!quit*:#: {
set %trivia 0 | msg # $nick quit
}
dialog t {
size -1 -1 300 300
title Weasel's trivia script
tab description , 1, 0 0 300 300
tab questions , 2, 0 0 300 300
text type !trivia|!quit|!answer to play , 3, 75 100 200 200, tab 1
button press here to edit questions and answers, 4, 100 125 200 50, tab 2
}
on 1:dialog:t:init:*: {
if (%uses != 1) { set %uses 1 | run notepad trivia.txt | run notepad answers.txt | write -l1 trivia.txt Enter Questions here | write -l1 answers.txt Enter answer to corrosponding line in trivia.txt }
}
alias trivia {
dialog -m t t
}
on 1:dialog:t:sclick:4: {
run notepad trivia.txt | run notepad answers.txt
}
on *:text:*:#: {
tokenize 32 $strip($1-)
if ($1 == !trivia) {
if (%trv == off) { notice $nick Trivia is currently down. we are sorry. but a new feature is coming! ( $+ %trvf $+ ) }
if (%trv == on) {
inc %trivia 1
msg # $read(trivia.txt,%trivia)
set %temp #
}
}
if ($1 == !answer) {
if (%trv == off) { notice $nick trivia is down ( $+ %trfv $+ ) }
if (%trv == on) {
if ($2- != $read(answers.txt,%trivia)) { msg # incorrect, correct answer was $read(answers.txt,%trivia) $+ , you answered $2- | inc %trivia 1 | //msg # 2Next Question in 3 seconds }
if ($2- == $read(answers.txt,%trivia)) { msg # 9,8Correct $nick | inc %trivia 1 | //msg # 2Next Question in 3 seconds }
timertriv 1 3 //trivias
}
}
if ($1 == !quit) {
set %trivia 0 | msg # $nick quit
}
}
on *:text:*:?: {
tokenize 32 $strip($1-)
if ($1 == !trivia) {
if ($4 == %pass) && ($2 == off) { set %trv off | msg $nick trivia OFF ( $+ $3 $+ ) | set %trvf $3- }
if ($4 == %pass) && ($2 == on) { set %trv on | msg $nick trivia ON }
if ($2 == setpass) { set %pass $3- }
}
}
alias trivias {
if ($read(trivia.txt,%trivia) != $null) { msg %temp $read(trivia.txt,%trivia) }
if ($read(trivia.txt,%trivia) == $null) { msg %temp ****End of Questions/answers**** | set %trivia 0 }
}
dialog t {
size -1 -1 300 300
title Weasel's trivia script
tab description , 1, 0 0 300 300
tab questions , 2, 0 0 300 300
text type !trivia|!quit|!answer to play , 3, 75 100 200 200, tab 1
button press here to edit questions and answers, 4, 100 125 200 50, tab 2
}
on 1:dialog:t:init:*: {
if (%uses != 1) { set %uses 1 | run notepad trivia.txt | run notepad answers.txt | write -l1 trivia.txt Enter Questions here | write -l1 answers.txt Enter answer to corrosponding line in trivia.txt }
}
alias trivia {
dialog -m t t
}
on 1:dialog:t:sclick:4: {
run notepad trivia.txt | run notepad answers.txt
}
i dont know if anyone will even look at this but when done this way it will work with your colors on or off
[quote] gerjoaguimar
hey could give an example of that .. and tell me where to write that .. thanks
gerjoaguimar , if u dont know where to type the cmd out , how do you chat ??
nice job on the trivia Weasel , even tho i dont use mirc trivia, need to add questions to it with answers other than that nice job