Trivia Hack 0.5

By shadow-Majestic on Jul 26, 2009

A simple script i made that works with a few trivia scripts (for example the few most used).
Just sit, idle and enjoy the show :) eventually youll be #1 and noone will notice :D

    on *:TEXT:*:#trivia:{
      if ($char(3) $+ 7 isin $1-) {
       if (? isin $ [ $+ [ $0 ] ] ) {
         set %triv 0
         while (%triv <= $readini(trivia.ini, total, q)) {
          inc %triv
          if ($2- isin $readini(trivia.ini, q, %triv)) {
            timer 1 $rand(2,6) msg $chan $readini(trivia.ini, a, %triv)
            echo -a Saying Answer!
            set %said 1
            halt
          }
         }
         unset %triv
         set %trivq 1
         writeini -n trivia.ini total q $calc($readini(trivia.ini, total, q) + 1)
         if ($readini(trivia.ini, total, a) == $readini(trivia.ini, total, q)) { echo -a Error! Reseting last Question | writeini -n trivia.ini total q $calc($readini(trivia.ini, total, q) - 1) | halt }
         writeini -n trivia.ini q $readini(trivia.ini, total, q) $2-
         echo -a Inserted Question nr: $readini(trivia.ini, total, q)

       }
      }
      if (Here's a hint, isin $1-) {
       if ($chr(95) isin $1-) { halt }
       set %hint $rand(1,4)
       if (%hint == 1) {
         echo -a Saying Answer
         timer 1 $rand(0,2) msg $chan $lower($remove($4-, $chr(2)))
       }
       set %ping $rand(1,50)
       if (%ping == 25) {
         echo -a Doing a !Ping request!
         timer 1 $rand(5,15) msg # !ping
       }
       set %sayline $rand(1,15)
       if (%sayline == 1) {
         msg # $readini(trivia.txt, sayline, $rand(1,5)
       }
       unset %sayline
       unset %ping
       unset %hint
      }
      if (Time's up! The answer was: isin $1-) {
       if (%said == 1) { unset %said | halt }
       if ($readini(trivia.ini, total, a) == $readini(trivia.ini, total, q)) { echo -a There was no Question Inserted! | halt }

       if (%trivq != 1) { halt }
       writeini -n trivia.ini total a $calc($readini(trivia.ini, total, a) + 1)
       writeini -n trivia.ini a $readini(trivia.ini, total, a) $6-
       echo -a Inserted Answer nr: $readini(trivia.ini, total, a) For Question nr: $readini(trivia.ini, total, q)
       unset %trivq 
      }
      if (Winner: isin $1-) {
       set %winner: $calc(($0 - 14) +4)
       if (Previously: isin $1-) {
         set %winner: $calc(($0 - 16) +4)
       }
       if (%said == 1) { unset %said | halt }
       if (%trivq != 1) { halt }
       if ($readini(trivia.ini, total, a) == $readini(trivia.ini, total, q)) { echo -a There was no Question Inserted! | halt }
       writeini -n trivia.ini total a $calc($readini(trivia.ini, total, a) + 1)
       writeini -n trivia.ini a $readini(trivia.ini, total, a) $4- [ $+ [ %winner: ] ]
       echo -a Inserted Answer nr: $readini(trivia.ini, total, a) For Question nr: $readini(trivia.ini, total, q)
       unset %trivq
      }
    }

Comments

Sign in to comment.
Psyrix   -  Aug 17, 2009

It worx on some of the questions, but not all the questions....Tested it on 20 questions, and it only inserted 4 of em into the .ini file...and another thing im wonderin.... on the

msg # $readini(trivia.txt, sayline, $rand(1,5)

Is it suppose to be a .txt or a .ini, and if so...what goes in it?

 Respond  
FullMetalAlchemist   -  Jul 26, 2009

how is it meant to work, i put into remotes, and changed #trivia to my channel and it says no question inserted ?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.