All pastes #557146 Raw Edit

toss

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