All pastes #557215 Raw Edit

coin toss (sort of)

public text v1 · immutable
·published 2007-06-10 22:03 UTC
rendered paste body
on *:TEXT:!toss*:#: {
  if ($2 == heads) || ($2 == tails) {
    set %pflip $2
    var %flip == $rand(heads,tails)
    msg $chan $nick needs heads to win! 
    describe $chan flips a coin 
      if (%flip == heads) && (%pflip == %flip) msg $chan The outcome is... %flip! $nick wins!
      if (%flip == tails) && (%pflip == %flip) msg $chan The outcome is... %flip! $nick wins!
      if (%flip == heads) && (%pflip != %flip) msg $chan The outcome is... %flip. $nick loses.
      if (%flip == tails) && (%pflip != %flip) msg $chan The outcome is... %flip. $nick loses.
  }
  else msg $chan Sorry, $2- is not an outcome
}