European Roulette Game (no 00)

By Flaco22 on Nov 29, 2010

A roulette; as usual paste this in your remotes and enjoy!

!gamble red 500000
%r-max is the maxbet (so people dont gamble their mothers rofl).

Feel free to ask any questions about it, i will answer asap.

on *:text:!gamble *:%bot-fun:{
  /set %roullet-msg 
  if ( ( $$2 != odd ) && ( $$2 != even ) && ( $$2 != red ) && ( $$2 != black ) && ( $$2 != 1col ) && ( $$2 != 2col ) && ( $$2 != 3col ) && ( $$2 !isnum 1-36 ) && ( $$2 != 1-18 ) && ( $$2 != 19-36 )) {
    /msg %bot-fun Wrong command... the commands are: odd; even; red; black; 1col; 2col; 3col; 1,2,3...36; 1-18; 19-36;
    halt
  }
  if ( $$3 > %r-max ) { 
    /msg %bot-fun Sorry...You only can gamble until $ %r-max 
    halt
  }
  if ( $$3 < 0 ) {
    /writeini system\roulette.ini users $nick $calc( $readini(system\roulette.ini, users, $nick ) + $$3 )
    /msg %bot-fun Cheater!!! You win $$3 ah ah ah! $nick have $readini(system\roulette.ini, users, $nick )
    halt  
  }
  else { 
    /writeini system\roulette.ini users $nick $calc( $readini(system\roulette.ini, users, $nick ) - $$3 )
  }

  set %r-num $rand(0,36)

  if ( %r-num == 0 ) {
    /msg %bot-fun 0,3 0 You have betted $ $$3 and you made $ 0 || $nick have $readini(system\roulette.ini, users, $nick ) ||
    halt
  }

  if ( , $+ %r-num $+ , isin %r-red ) { /set %roullet-msg 0,4 %r-num  }
  if ( , $+ %r-num $+ , isin %r-black ) { /set %roullet-msg 0,1 %r-num  }

  if ( $$2 == odd ) {
    if ( $calc( %r-num % 2 ) ) { 
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == even ) {
    if ( $calc( %r-num % 2 ) ) { 
      /roulette-msg $nick 0 $$3
      halt
    }
    else { 
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
  }
  if ( $$2 == red ) {
    if ( , $+ %r-num $+ , isin %r-red ) { 
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == black ) {
    if ( , $+ %r-num $+ , isin %r-black ) { 
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }

  if ( $$2 == 1col ) {
    if ( , $+ %r-num $+ , isin %r-1col ) { 
      /roulette-msg $nick $calc( $$3 * 3 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == 2col ) {
    if ( , $+ %r-num $+ , isin %r-2col ) { 
      /roulette-msg $nick $calc( $$3 * 3 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == 3col ) {
    if ( , $+ %r-num $+ , isin %r-3col ) { 
      /roulette-msg $nick $calc( $$3 * 3 ) $$3
      halt
    }
    else {
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 isnum 1-36 ) {
    if ( $$2 == %r-num ) {
      /roulette-msg $nick $calc( $$3 * 36 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == 1-18 ) {
    if ( %r-num isnum 1-18 ) {
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
  if ( $$2 == 19-36 ) {
    if ( %r-num isnum 19-36 ) {
      /roulette-msg $nick $calc( $$3 * 2 ) $$3
      halt
    }
    else { 
      /roulette-msg $nick 0 $$3
      halt
    }
  }
}

Comments

Sign in to comment.
utanamun   -  Feb 23, 2013

not finished script. bad!

 Respond  
Flaco22   -  Nov 30, 2010

Add this to your aliases:

/roulette-msg {
/writeini system\roulette.ini users $$1 $calc( $readini(system\roulette.ini, users, $$1 ) + $$2 )
/set %roullet-msg $addtok(%roullet-msg,You have betted $ $$3 and you made $ $$2 || $$1 have $readini(system\roulette.ini, users, $$1 ) ||,0)
/msg %bot-fun %roullet-msg
}

 Respond  
_Teen_   -  Nov 29, 2010

i dont know what is wrong, but i tried to use it and didnt worked ._.

by the way,

look

set %r-num $rand(0,36)

if you will only use %r-num on this script you could use

var %r-num $rand(0,36)

 Respond  
Flaco22   -  Nov 29, 2010

Set %bot-fun (in variables) to the channel you want to run it. Or replace %bot-fun in the text for #Channel

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.