A Game With Bugs

By `JoKeR´ on Sep 28, 2008

I was browsing around for fun games to play. I think I've worked out most of the kinks. I haven't added a score table, but if people really want one, I'll add one, I guess.

[i]Notes:
You will need to create a text file called bugs.txt and create your own questions for people to guess.[/i]

Please leave constructive criticism only.

Comments and suggestions are always welcome.

Have fun. :)

on *:text:!bugs:#:{
  if !%bugs {
    var %rand $calc($rand(1,5) + $rand(1,5))
    var %a 1
    while %a < %rand {
      var %shake $instok(%shake,*shake*,10,32)
      inc %a
    }
    $iif(%a = %rand,describe # picks up a jar of bugs as he covers the opening with his hand and shakes it. %shake)
    set %bugs $read(bugs.txt)
    set %question $gettok(%bugs,1,42)
    set %answer $numtok(%bugs,32)
    msg # 10Question:14 %question
  }
  else {
    msg # 5There's already a game going..
    msg # 10Question:14 %question
    halt
  }
}

on *:text:!answer*:#:{
  if !%bugs {
    msg # 5There isn't a game going.  Type 4!bugs 5to start a new game!
    halt
  }
  if $2 != %answer {
    msg # 14I'm sorry,13 %answer 14was the right answer.  Type 4!bugs 14to try again!
    unset %bugs %question %answer
  }
  if $2 = %answer {
    msg # 7 $+ $nick 14got it! Type 4!bugs 14to start a new game!
    unset %bugs %question %answer
  }
}

Comments

Sign in to comment.
b0sse   -  Aug 30, 2009

???

 Respond  
b0sse   -  Jul 19, 2009

how would I set up the bugs.txt file?

could you give me an example of a question/answer, and how to type it in the txt file?

 Respond  
`JoKeR´   -  Sep 29, 2008

Why not? They accomplish the same thing. I just didn't feel like writing out

if %a = %rand {
  describe # picks up a jar of bugs as he covers the opening with his hand and shakes it. %shake
}

Since they accomplish the same thing, I didn't feel it mattered. -shrugs-

 Respond  
guest598594   -  Sep 29, 2008
    $iif(%a = %rand,describe # picks up a jar of bugs as he covers the opening with his hand and shakes it. %shake)

Why $iif instead of if?

 Respond  
Blitzjager   -  Sep 29, 2008

Hmm. Guess I better check it then. My buddy stole my keyboard though so I'll do it tomorrow.
/me closes on-screen keyboard.

I tried it and liked it because it wasn't just irctrivia but it was too simple. If I was more creative I'd give suggestions. =/

Suggestion: If it's meant to bug people why not just make the answer a random number and make sure that it doesn't come up as what they answer. :P

 Respond  
`JoKeR´   -  Sep 29, 2008

The game ends if you get the answer right or wrong. The reason behind it is so people don't catch on to the reasoning behind the answer. It makes them frustrated trying to figure it out, which is the point of the game. :)

 Respond  
Blitzjager   -  Sep 28, 2008

I think he'd only need to add a 'not' in there if he changed %answer with $2.

I haven't tried it but from what it looks like it ends if you get the question wrong, right? Personally I think it would be better if it went until it was skipped/ended/or guessed correctly.

 Respond  
napa182   -  Sep 28, 2008
if $2 != %answer {
    msg # 14I'm sorry,13 %answer 14was the right answer.  Type 4!bugs 14to try again!

you are saying
I'm sorry, %answer was the right answer.
i think you forgot " not " in there

 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.