WorldDMT commented on a Page, !chance  -  Apr 09, 2010

hi
@Jethro_: no need for all that $iif() :p

on @*:text:!xbox:#: {
  var %z msg #
  goto $r(1,8)
  :1 | %z you won an op! | mode # +o $nick | halt
  :2 | %z you won halfop! | mode # +h $nick | halt
...

@MEH:
if ($me == botsnamehere) is unless

u have to check if the bot is an OP

u can use tokenize and only one msg # Congrats ...

on @*:text:*:#channelnamehere:{
  if $nick isop # {
    if $istok(!chanceon.!chanceoff,$strip($1),46) {
      set %on.off $iif($strip($1) == !chanceon,1,0)
      msg # Script is now $iif(%on.off,on,off) $+ .
    }
  }
  if %on.off {
    if $strip($1) == !chance {
      set %victim $nick(#,$r(1,$nick(#,0)))
      while (%victim == $me) set %victim $nick(#,$r(1,$nick(#,0)))
      msg # So %victim you want to take a chance on something? Let's do it...
      msg # Choose a box by typing !box <number> and u will get one of the following: kick, op, halfop, voice, admin, owner or a rabid dog
      msg # [1] [2] [3] [4] [5] [6] [7] [8]
    }
    if $strip($1) == !box && $nick == %victim {
      tokenize 124 op|kick|halfop|voice|the rabid dog|admin|owner|op
      var %t $($+($,$r(1,8)),2)
      msg # Congrats $nick $+ , you won %t $+ !
      if (%t == kick) kick # $nick Better luck next time.
      elseif %t == the rabid dog {
        timer 1 1 describe # gives $nick a rabid dog that mauls them to death.
        timer 1 2 kick # $nick You died.
      }
      else mode # $+(+,$replace(%t,halfop,h,op,o,voice,v,admin,a,owner,q)) $nick
    }
  }
}
 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.