Don't like ads? PRO users don't see any ads ;-)
Guest

mIRC Trivia Script

By: a guest on May 2nd, 2012  |  syntax: mIRC  |  size: 1.84 KB  |  hits: 88  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. on *:text:!trivia*:#: {
  2.   if (%trv == off) { notice $nick Trivia is currently down. we are sorry. but a new feature is coming!  ( $+ %trvf $+ ) }
  3.   if (%trv == on) {
  4.     inc %trivia 1
  5.     msg #  $read(trivia.txt,%trivia)
  6.     set %temp #
  7.   }
  8. }
  9. on *:text:!trivia*:?: {
  10.   if ($4 == %pass) && ($2 == off) { set %trv off | msg $nick trivia OFF ( $+ $3 $+ ) | set %trvf $3- }
  11.   if ($4 == %pass) && ($2 == on) { set %trv on | msg $nick trivia ON }
  12.   if ($2 == setpass) { set %pass $3- }
  13. }
  14. alias trivias {
  15.   if ($read(trivia.txt,%trivia) != $null) { msg %temp  $read(trivia.txt,%trivia) }
  16.   if ($read(trivia.txt,%trivia) == $null) { msg %temp  ****End of Questions/answers**** | set %trivia 0 }
  17. }
  18. on *:text:!answer*:#: {
  19.   if (%trv == off) { notice $nick trivia is down ( $+ %trfv $+ ) }
  20.   if (%trv == on) {
  21.     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 }
  22.     if ($2- == $read(answers.txt,%trivia)) { msg # 9,8Correct $nick | inc %trivia 1 | //msg # 2Next Question in 3 seconds }
  23.     timertriv 1 3 //trivias
  24.   }
  25. }
  26. on *:text:!quit*:#: {
  27.   set %trivia 0 | msg #  $nick quit
  28. }
  29. dialog t {
  30.   size -1 -1 300 300
  31.   title Weasel's trivia script
  32.   tab description , 1, 0 0 300 300
  33.   tab questions , 2, 0 0 300 300
  34.   text type !trivia|!quit|!answer to play , 3, 75 100 200 200, tab 1
  35.   button press here to edit questions and answers, 4, 100 125 200 50, tab 2
  36. }
  37. on 1:dialog:t:init:*: {
  38.   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 }
  39. }
  40. alias trivia {
  41.   dialog -m t t
  42. }
  43. on 1:dialog:t:sclick:4: {
  44.   run notepad trivia.txt | run notepad answers.txt
  45. }