if ($1 == !heads) {
var %coinflip $rand(1,2)
describe $chan flips a coin
if (%coinflip == 1) {
writeini money.ini CMoney $nick $calc($readini(money.ini, CMoney, $nick + 1))
describe $chan sees the coin land on Heads
msg $chan You now have $readini(money.ini, CMoney, $nick) coins.
}
if (%coinflip == 2) {
describe $chan sees the coin fall on tails.
msg $chan sorry $nick $+ , you lose.
}
}
if ($1 == !tails) {
var %coinflip $rand(1,2)
describe $chan flips a coin
if (%coinflip == 2) {
writeini money.ini CMoney $nick $calc($readini(money.ini, CMoney, $nick + 1))
describe $chan sees the coin land on Tails
msg $chan You now have $readini(money.ini, CMoney, $nick) coins.
}
if (%coinflip == 1) {
describe $chan sees the coin fall on Heads
msg $chan sorry $nick $+ , you lose.
}
}
}
}
That section could be re-written to:
if (($1 == !heads) || ($1 == !tales)) {
} else { } }
var %x $iif($1 == !heads,1,2)
var %t $rand(1,2)
describe $chan flips a coin.
if (%t == %x) {
You see it cut out lots of space (replace and with your commands for each occasion).