toin coss
public text v1 · immutableon *: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. | msg $chan It lands on %outcome $+ . $nick wins!
else { msg $chan $nick needs %pi to win. | describe $chan flips the coin. | msg $chan It lands on %outcome . $nick loses.
}
}
}
}
else msg $chan Sorry $2 is not an actual outcome :P
}