MaxEvans commented on a Page, Secret Word v2  -  Jan 19, 2012

And, in case anyone wants the older version here it is:

on *:load: { var %p = Cheerwine|Twix|Pepsi|Dr. Pepper|7 Up|Hershey's Chocolate Bar | tokenize 124 %p | write prizes.txt $* }

on *:TEXT:!prize add *:#: {
  if ($nick isop $chan) {
    write prizes.txt $3-
    .notice $nick Prize ( $+ $3- $+ ) has been added to the prize bank.
  }
  else {
    .notice $nick Sorry, you must be an op in $chan to add prizes.
  }

}

on *:TEXT:set s-word *:?: {
  if ($nick == %sw-owner) {
    set %s-word $3 
    .msg $nick Secret word is now set as %s-word $+ .
  }
  else { 
    .msg $nick Sorry, only %sw-owner can set the secret word. 
  }
}

on *:TEXT:*:#:{
  if %s-word isin $1- {
    .msg $chan Hey, $nick $+ , you just said the secret word ( $+ %s-word $+ ), you get a prize!
    .describe $chan hands $nick a(n) $read(prizes.txt)
    unset %s-word
  }
}

menu * {
  .Secret Word set up
  ..Set Bot Owner: { set %sw-owner $?="What Nick Would You Like As The Bot Owner?" | echo -a Secret Word Bot Owner Is Now Set As %sw-owner }
}
 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.