alias bet.money {
var %a = $iif((!$4),$2,$iif(($gus.getid($1,$4) == $null),$2,$v1))
if (!$4) mta.pm $1 $2 Error! Type !bet
elseif ($gus.money($1,$2) < $5) mta.pm $1 $2 You cannot bet more money than you got!
elseif ($gus.money($1,%a) < $gus.money($1,$2)) mta.pm $1 $2 $mta.nick($1,$2) doesnt have enought money!
elseif (%a == $2) mta.pm $1 $2 Error! - You cannot bet money with yourself!
elseif ($4 !isnum) mta.pm $1 $2 Error - Type only numbers in !
else {
mta.pm $1 %a $mta.nick($1,$2) wanna bet with you $5 $+ $ ! Type !agreebet to agree (30s time!)
$+(.bettime,$1,%a) 1 30 mta.pm $1 $2 $mta.nick($1,%a) is not responding. Try again later!
}
}
}
elseif ($3 == !agreebet) {
if ($timer($+(bet,$1,$2))) {
$+(.bettime,$1,$2) off
mta.pm $1 $2 You just agreed to bet $5 $+ $ with $mta.nick($1,$2) in this round!
mta.pm $1 %a Has just agreed to bet with you $5 $+ $!
}
}
}
on *:SIGNAL:mta.death: {
elseif (mta.nick($1,$2) == $mta.dead($1,$2)) mta.pm $1 $2 You lose $5 $+ $ for $mta.nick($1,%a) !
!writeini -n money.ini MONEY $mta.nick($1,$2) $calc($readini(money.ini,MONEY,$mta.nick($1,$2)) - $5)
!writeini -n money.ini MONEY $mta.nick($1,%a) $calc($readini(money.ini,MONEY,$mta.nick($1,%a)) + $5)
elseif (mta.nick($1,%a) == $mta.dead($1,%a)) mta.pm $1 %a You lose $5 $+ $ for $mta.nick($1,$2) !
!writeini -n money.ini MONEY $mta.nick($1,%a) $calc($readini(money.ini,MONEY,$mta.nick($1,%a)) - $5)
!writeini -n money.ini MONEY $mta.nick($1,$2) $calc($readini(money.ini,MONEY,$mta.nick($1,$2)) + $5)
!halt
}
}
!inc %a
}
}
}
}
anyone can find bugs and fix?