on *:TEXT:!coinfilp*:#tokens: { if ($2 != heads) && ($2 != tails) { notice $nick notice $nick Syntax: !cionflip Heads/Tails } elseif ($2 == heads) { var % [ $+ coinhead. $+ [ $nick ] ] $rand(1,4) if (% [ $+ coinhead. $+ [ $nick ] ] == 1) { notice $nick The coin landed tails up... you have lost 25 Tokens. dec % [ $+ tokens. $+ [ $nick ] ] 25 } elseif (% [ $+ coinhead. $+ [ $nick ] ] == 2) { notice $nick Congratulations! The coin landed heads up and you have won 50 Tokens! inc % [ $+ tokens. $+ [ $nick ] ] 50 } elseif (% [ $+ coinhead. $+ [ $nick ] ] == 3) { notice $nick The coin landed tails up... you have lost 25 Tokens. dec % [ $+ tokens. $+ [ $nick ] ] 25 } elseif (% [ $+ coinhead. $+ [ $nick ] ] == 4) { notice $nick Congratulations! The coin landed heads up and you have won 50 Tokens! inc % [ $+ tokens. $+ [ $nick ] ] 50 } } elseif ($2 == tails) { var % [ $+ cointail. $+ [ $nick ] ] $rand(1,4) if (% [ $+ cointail. $+ [ $nick ] ] isnum 1) { /notice $nick The coin landed heads up... you have lost 25 Tokens. dec %tokens. [ $+ [ $nick ] ] 25 } elseif (% [ $+ cointail. $+ [ $nick ] ] isnum 2) { /notice $nick Congratulations! The coin landed tails up and you have won 50 Tokens! inc %tokens. [ $+ [ $nick ] ] 50 } elseif (% [ $+ cointail. $+ [ $nick ] ] isnum 3) { /notice $nick The coin landed heads up... you have lost 25 Tokens. dec %tokens. [ $+ [ $nick ] ] $nick 25 } elseif (% [ $+ cointail. $+ [ $nick ] ] isnum 4) { /notice $nick Congratulations! The coin landed tails up and you have won 50 Tokens! inc %tokens. [ $+ [ $nick ] ] 50 } elseif (% [ $+ cointail. $+ [ $nick ] ] isnum 5) { /notice $nick You have lost your coin. You have to buy one by saying !Token BuyCoin amount. dec %coins. [ $+ [ $nick ] ] } } }