FLIP SCRIPT

By version9 on Jan 02, 2010

USAGE: .CMD FLIP
USAGE: .CMD ROLL
LOOKS LIKE:
1:
USER: .CMD FLIP
BOT: HEADS
2:
USER: .CMD ROLL 6
BOT: 4

on *:TEXT:*:#: { 
  if ( $1 == .cmd ) { /notice $nick MyBot command processing.
    if ( $2 == flip ) { 
      /notice $nick Flip Command Recognized...
      var %flipside = $rand(1,2)
      if ( %flipside == 1 ) { /msg $chan HEADS }
      if ( %flipside == 2 ) { /msg $chan TAILS }
    }
    if ( $2 == roll ) { 
      /notice $nick Roll Command Recognized...
      var %rollnumber = $rand( 1, $3 )
      /msg $chan %rollnumber
    }
  }
}

Comments

Sign in to comment.
Jethro   -  Jan 03, 2010

Never mind. I saw it wrong. lol

 Respond  
gooshie   -  Jan 02, 2010
on $*:TEXT:/^.cmd (flip|roll) ?(\d+)?$/iS:#: {
  var %m $iif($r(0,1),HEADS,TAILS)
  if ($regml(1) = roll) %m = $r(1,$regml(2))
  msg # %m
}
 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.