Advertisement
illpastethat

Trivia Winner - v3

Apr 6th, 2011
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.93 KB | None | 0 0
  1. on *:exit: {
  2.   /hsave -o Trivia Trivia.hsh
  3.   /hfree Trivia
  4. }
  5. on *:start: {
  6.   /hload -s trivia trivia.hsh
  7.   remote off
  8.   timer 1 5 remote on
  9. }
  10. On *:text:*:#: {
  11.   if ($nick == Trivia) {
  12.     if ($remove($1,.) isnum) {
  13.       set -u85 $+(%,question,.,$chan) $2-
  14.       if ($me != nick1) {
  15.         if ($hget(Trivia,$remove($($+(%,question,.,$chan),2),$chr(32))) != $null) {
  16.           echo -a $($+(%,question,.,$chan),2)
  17.           echo -a $hget(Trivia,$remove($($+(%,question,.,$chan),2),$chr(32)))
  18.         }
  19.       }
  20.     }
  21.     elseif ($1 == Hint:) {
  22.       halt
  23.     }
  24.     elseif (($1 == Time's) && ($($+(%,question,.,$chan),2))) {
  25.       hadd -m Trivia $remove($($+(%,question,.,$chan),2),$chr(32)) $remove($1-,Time's up! The answer was:)
  26.     }
  27.     elseif (($1 == Winner:) && ($($+(%,question,.,$chan),2))) {
  28.       tokenize 59 $1-
  29.       hadd -m Trivia $remove($($+(%,question,.,$chan),2),$chr(32)) $remove($2,Answer: )
  30.     }
  31.   }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement