Moviequiz

By Mr-Juul on May 11, 2009

This is a classic forum quiz.

A pic is posted, and people guess. The one who gets it write, get to post a new pic :)
If u get it right, you get a point in movie.ino, and pm the bot or user with the new pic and answer :)

syntax:
!moviequiz - Shows the link and who posted it
!guess - Makes u guess :)

on *:LOAD: {
  set %moviequiz 1
  set %winner $me
  set %movieurl $$?="Link for the first quiz?"
  set %correct $$?="Answer for the first quiz?"
}
on *:TEXT:*:#: {
  if ($1 = !moviequiz) {
    if (%moviequiz = 1) {
      msg $chan MOVIEQUIZ: %movieurl Posted by: %winner
      timer 1 2 msg $chan Guess the movie syntax: !guess <your guess>
    }
  }
  if ($1 = !guess) {
    if (%moviequiz = 1) {
      if ($2- = %correct) {
        set %winner $nick
        set %picker $nick
        set %pick 1
        unset %moviequiz
        writeini movie.ini $chan $nick $calc($readini(movie.ini,$chan,$nick) + 1 )
        msg $chan CONGRATULATIONS $nick $+ . You won! You now have $readini(movie.ini,$chan,$nick) points!
        notice %picker It's now your turn to post a new movie to guess!
        notice %picker find a pic on google, and post it in a PM to me
        notice %picker start the post with !setmovie, then the url, then the correct title!
        notice %picker like this: !setmovie www.shorturl.com/j32po43 Anchorman - The legend of Ron Burgundy
      }
      else {
        msg $chan Sorry $nick, wrong answer! Try again.
        set -u120 %flood. $+ $nick 1
      }
    }
    else msg $chan Moviequiz isn't on.. Slap %winner to set a new link!
  }
}
on *:TEXT:*:?: {
  if ($1 = !setmovie) {
    if (%pick = 1) {
      if ($nick = %picker) {
        set %movieurl $2
        set %correct $3-
        set %moviequiz 1
        notice $nick Thanks!
      }
      else msg $nick You are NOT allowed to set the new movie!
    }
  }
}

Comments

Sign in to comment.
WorldDMT   -  May 11, 2009

oh sorry i forget some thing

about if (%moviequiz = 1) and if (%pick = 1)

you can only put

if (%moviequiz) and if (%pick)

 Respond  
WorldDMT   -  May 11, 2009

hi

sorry i don't speak english verry well :p

on :TEXT::#: {
if ($1 = !moviequiz) {

must be

on :TEXT::#: {
if ($strip($1) == !moviequiz) {

cz user can use a color style or bold, underline ..

also for

!setmovie

u must add conditions for $2 & $3- like this

on *:TEXT:*:?: {
  if ($strip($1) == !setmovie) {
    if (%pick) {
      if ($nick = %picker) {
        if ($2) && ($3-) {
          set %movieurl $2
          set %correct $3-
          set %moviequiz 1
          notice $nick Thanks!
        }
        else msg $nick setmovie syntax: !setmovie <Link for the quiz> <Answer for the quiz>
      }
      else msg $nick You are NOT allowed to set the new movie!
    }
  }
}

for .ini file beter use hash table cz i see writeini movie.ini $chan $nick

mabe the nick can be [blabla] in the ini file he will be registred ~blabla~ so
while the $readini comand u will not have a good result

i mean $readini(movie.ini,$chan,$nick) here $nick == [blabla] & they no nick like this into movie.ini cz wen u write it he been ~blabla~

sorry about my language :p

 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.