rendered paste bodyon *:TEXT:!toss*:#:{
if ($2 == heads) || ($2 == tails) {
/set %pi $2
var %flip = $rand(1,2)
if (%flip == 1) {
/set %outcome Heads
else { /set %outcome Tails }
if (%outcome == %pi) { msg $chan $nick needs %pi to win. | describe $chan flips the coin. | timertoss 1 1.5 /msg $chan It lands on %outcome $+ . $nick wins!
else { msg $chan $nick needs %pi to win. | describe $chan flips the coin. | timertoss 1 1.5 /msg $chan It lands on %outcome . $nick loses.
}
}
}
else notice $nick Sorry, $2- is not an actual outcome.
}