All pastes #620452 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-15 14:30 UTC
rendered paste body
ON *:TEXT:!Coin:#:{ if ($2 == $null) { 
    notice $nick *** [ 7ERROR ] Syntax: !coin <7Opponent>
  }
  else {
    set %coin $rand(1,2) | set %Head $rand($1,$2) {
      if (%Head == $1) {
        set %Tail $2 
        elseif (%Head == $2) {
          set %Tail $1
        }
        timer 1 2 if (%Coin == 1) { /Describe $chan Flips a ten pence coin, The coin lands on Heads | set %Winhead 1 }
        timer 1 2 if (%Coin == 2) { /Describe $chan Flips a ten pence coin, The coin lands on Tails | set %Winhead 2  }
        if (%winhead == 1) { msg $chan %head is the winner }
        elseif (%Winhead == 2) { msg $chan %Tail is the winner }
      }       
      { 
        unset %head %Tail %Coin %winhead 
      }
    }
  }
}