This one is in spanish, my mother language. Paste all in remote and enjoy it.
How it works:
You can gamble on even, odd, or a number between 1 and 10 (included). You get payed 10x your bet if you guess the number, and you get payed x2 if you guess even/odd.
How to run it:
Type !ng <number/impar/par>
Example: !ng 10 50000
Example2: !ng par 50000
Clues:
%ng-max is maxbet
%par is even
%impar is odd
Enjoy and feel free to ask any questions!
on *:text:!ng *:%bot-fun:{
/set %ng-msg
if ( ( $$2 !isnum 1-10 ) && ( $$2 != impar ) && ( $$2 != par ) ) {
/msg %bot-fun Comando equivocado, por favor elija un numero entre 1 y 10, par o impar.
halt
}
if ( $$3 > %ng-max) {
/msg %bot-fun Disculpa, la apuesta maxima para este juego es de $ %ng-max
halt
}
if ( $$3 < 0 ) {
/writeini system\ng.ini users $nick $calc( $readini(system\ng.ini, users, $nick ) + $$3 )
/msg %bot-fun Por tramposo pierdes $$3 Ahora $nick tienes $readini(system\ng.ini, users, $nick )
halt
}
else {
/writeini system\ng.ini users $nick $calc( $readini(system\ng.ini, users, $nick ) - $$3 )
}
set %ng-num $rand(1,10)
if ( , $+ %ng-num $+ , isin %par ) { /set %ng-msg 0,3 %ng-num - }
if ( , $+ %ng-num $+ , isin %impar ) { /set %ng-msg 0,4 %ng-num - }
if ( $$2 == impar ) {
if ( $calc( %ng-num % 2 ) ) {
/ng-msg $nick $calc( $$3 * 2 ) $$3
halt
}
else {
/ng-msg $nick 0 $$3
halt
}
}
if ( $$2 == par ) {
if ( $calc( %ng-num % 2 ) ) {
/ng-msg $nick 0 $$3
halt
}
else {
/ng-msg $nick $calc( $$3 * 2 ) $$3
halt
}
}
if ( $$2 isnum 1-10 ) {
if ( $$2 == %ng-num ) {
/ng-msg $nick $calc( $$3 * 10 ) $$3
halt
}
else {
/ng-msg $nick 0 $$3
halt
}
}
}