All pastes #491432 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-16 17:36 UTC
rendered paste body
on $*:TEXT:/^[!@](coin|coinflip|flip|coins) */Si:#:{ 
  /set %coin $rand(1,2) 
  /set %coinht $rand(1,2)

  if ($2 == $null) { .notice $nick Please state a username to flip the coin with! | halt }
  if ($2 == $me) { .notice $nick You can't flip the coin with me! im a bot! | halt }
  if ($2 == $nick) { .notice $nick You can't flip a coin with yourself! | halt }
  if (!$nick($chan,$2)) { .notice $nick $2 isn't on this channel! | halt }


  if (%coinht == 1)  .msg $chan 1[7 $nick 1]3 Your 1[7 heads 1]3 ...and... 1[7 $2 1]3 You're 1[7 Tails! 1]
  if (%coinht == 2)  .msg $chan 1[7 $nick 1]3 Your 1[7 Tails 1]3 ...and... 1[7 $2 1]3 You're 1[7 Heads! 1]

  .timer 1 1 .describe $chan flips the coin...
  .timer 1 2 .msg $chan 3... 1[ 7Coin landing.. 1] 3and...


  if (%coin == 1)  .timer 1 3 .msg $chan 3Its 1[7 heads! 1] 
  if (%coin == 2)  .timer 1 3 .msg $chan 3Its 1[7 Tails! 1] 


  if (%coinht == 1) && (%coin == 1)  .timer 1 4 .msg $chan 3And the winner is.. 1[7 $nick 1]3 - 1[7 $2 1]3 .. You lose!! 
  if (%coinht == 2) && (%coin == 2)  .timer 1 4 .msg $chan 3And the winner is.. 1[7 $nick 1]3 - 1[7 $2 1]3 .. You lose!! 
  if (%coinht == 1) && (%coin == 2)  .timer 1 4 .msg $chan 3And the winner is.. 1[7 $2 1]3 - 1[7 $nick 1]3 .. You lose!!
  if (%coinht == 2) && (%coin == 1)  .timer 1 4 .msg $chan 3And the winner is.. 1[7 $2 1]3 - 1[7 $nick 1]3 .. You lose!!

  .timer 1 6 .notice $nick you have been ignored for 30 seconds to prevent spam!  
  .timer 1 6 ignore -u30 $nick | halt 

}