on *:text:!gamble*:#: {
if (%floodgamble) || ($($+(%,floodgamble.,$nick),2)) { return }
set -u5 %floodgamble On
set -u2400 %floodgamble. $+ $nick On
if ($2 isnum 1-50) {
var %randgamble = $rand(1,100)
if (%randgamble <= 70) {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) - $2)
msg $chan $nick rolls a %randgamble and loses! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks.
halt }
if (%randgamble >= 96) {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) + ($2 * 3))
msg $chan $nick rolls a %randgamble and wins triple their bet! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks!
halt }
else {
writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) + ($2 * 2))
msg $chan $nick rolls a %randgamble and wins double their bet! $nick now has $readini(Points.ini,$+(#,.,$nick),Points) SN1PEbucks! }
}
elseif ($2 isnum) msg $chan You can only gamble in the range of 1 - 50 SN1PEbucks.
else msg $chan To gamble SN1PEbucks, use the form !gamble <amount (1-50)>
}