on *:TEXT:!bet *:#: {
set %rand $rand(1,6)
var %cash $readini(rxcoin.ini,%user,coins)
var %spend $2
var %calc calc(%spend * 4)
var %user $nick
if (%cash == 0) {
msg $chan sorry $nick you have no credits to bet on!
halt
}
$rand(1,6)
if (%rand == 1) {
msg $chan number one has been called, you lose your points!
set %money.withdraw $calc($readini(rxcoin.ini,$nick,coins) - $2)
writeini -n rxcoin.ini $nick coins %money.withdraw
unset %money.withdraw
}
elseif (%rand == 2) {
msg $chan number two has been called, you lose your points!
set %money.withdraw $calc($readini(rxcoin.ini,$nick,coins) - $2)
writeini -n rxcoin.ini $nick coins %money.withdraw
unset %money.withdraw
}
elseif (%rand == 3) {
msg $chan number three has been called, you lose your points!
set %money.withdraw $calc($readini(rxcoin.ini,$nick,coins) - $2)
writeini -n rxcoin.ini $nick coins %money.withdraw
unset %money.withdraw
}
elseif (%rand == 4) {
msg $chan number four has been called, you lose your points!
set %money.withdraw $calc($readini(rxcoin.ini,$nick,coins) - $2)
writeini -n rxcoin.ini $nick coins %money.withdraw
unset %money.withdraw
}
elseif (%rand == 5) {
msg $chan number five has been called, you lose your points!
set %money.withdraw $calc($readini(rxcoin.ini,$nick,coins) - $2)
writeini -n rxcoin.ini $nick coins %money.withdraw
unset %money.withdraw
}
elseif (%rand == 6) {
msg $chan number six has been called, you win %calc credits!
set %money.add calc($readini(rxcoin.ini,$nick,coins) + %calc)
writeini -n rxcoin.ini $nick coins %money.add
unset %money.add
}
}