Well, I decided to add in my coin toss. This is meant to be used on a bot.
Type !toss.
It randomly chooses what you have to match to win, and randomly chooses what you get. If they match, it says you won. If not, it says you lost.
on *:TEXT:*!toss*:#:{
set %z $rand(1,2)
if (%z == 1) { set %pi Heads }
else { set %pi Tails }
set %wow $rand(1,2)
if (%wow == 1) { set %outcome Heads }
else { set %outcome Tails }
if (%outcome == %pi) { msg $chan $nick needs %pi to win. $me flips the coin. It lands on %outcome . $nick wins! }
else { msg $chan $nick needs %pi to win. $me flips the coin. It lands on %outcome . $nick loses. }
}
;Commented Version
;Activates when !toss is used in a room.
;It will work with colored nick names and text :)
on *:TEXT:*!toss*:#:{
;Sets z to a 1 or a 2
set %z $rand(1,2)
;If z is a 1, it sets %pi to heads.
if (%z == 1) { set %pi Heads }
;If z is a 2, it sets %pi to tails
else { set %pi Tails }
;Sets %wow to a 1 or a 2
set %wow $rand(1,2)
;If wow is a 1, sets %outcome to Heads
if (%wow == 1) { set %outcome Heads }
;If wow is a 2, sets %outcome to Tails
else { set %outcome Tails }
/* Checks to see if %pi is the same as %outcome eg. Heads and Heads
If so, it messages the channel what the person needed to win, and
what they got, and says they won. */
if (%outcome == %pi) { msg $chan $nick needs %pi to win. $me flips the coin. It lands on %outcome . $nick wins! }
/* If they don't match, eg. Heads and Tails, it shows what they needed
to win and what they recieved, and messages the channel that they lost.
*/
else { msg $chan $nick needs %pi to win. $me flips the coin. It lands on %outcome . $nick loses. }
}