-gamble

By Cookies on Feb 12, 2011

ANOTHER snipplet i made to go along with the money system.

COMMANDS

-gamble ammount


How to use

To gamble you must have at least three ( 3 ) times the ammount you are trying to gamble in your account, because the script won't let you go negative. so if it says you don't have enough money to gamble, that's why.

on *:TEXT:-gamble*:#:{
  if ( $readini(mnycount.ini,$nick,money) >= $calc( $2 * 3 ) ) {
    /writeini -n mnycount.ini $nick Randimization $rand(1,6)
    if ( $readini(mnycount.ini,$nick,Randimization) == 1 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) + $calc( $2 * 2 ) )
      /notice $nick %c2 $nick %c1 you gained 2 times the amount you gambled
      /remini mnycount.ini $nick Randimization
    }
    if ( $readini(mnycount.ini,$nick,Randimization) == 2 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) - $calc( $2 * 3 ) )
      /notice $nick %c2 $nick %c1 you lost 2 times the amount you gambled
      /remini mnycount.ini $nick Randimization
    }
    if ( $readini(mnycount.ini,$nick,Randimization) == 3 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) - $calc( $2 * 1 ) )
      /notice $nick %c2 $nick %c1 You just lost what you %red BET
      /remini mnycount.ini $nick Randimization
    }
    if ( $readini(mnycount.ini,$nick,Randimization) == 4 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) + $calc( $2 * 1 ) )
      /notice $nick %c2 $nick %c1 You just gained what you %red BET
      /remini mnycount.ini $nick Randimization
    }
    if ( $readini(mnycount.ini,$nick,Randimization) == 5 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) + $calc( $2 * 3 ) )
      /notice $nick %c2 $nick %c1 You just %RED Gained %c2 what you bet
      /remini mnycount.ini $nick Randimization
    }
    if ( $readini(mnycount.ini,$nick,Randimization) == 6 ) {
      /writeini -n mnycount.ini $nick money $calc( $readini(mnycount.ini,$nick,money) - $calc( $2 * 3 ) )
      /notice $nick %c2 $nick %c1 You just %red Lost three times what you gambled.
      /remini mnycount.ini $nick Randimization
    }
  }
  else {
    /msg $chan Sorry %red $nick %c1 you don't have enough money to bet that
  }
}

Comments

Sign in to comment.
MoshMage   -  Feb 15, 2011

Cookies is mad. take a look at the small !gamble thingy i set up on slapthegame [tho it's outdated.. i should update that shinanigan] to see what i mean about how he does that thingy

 Respond  
Cookies   -  Feb 14, 2011

it works, and it's not laggy... so this would be the best way to do it.

 Respond  
Jethro   -  Feb 13, 2011

He was trying to say that the use of INI is a little too excessive for the simple randomization of this gambling game.

 Respond  
Cookies   -  Feb 13, 2011

i don't get it? am i mad about what?

 Respond  
MoshMage   -  Feb 13, 2011

$readini(mnycount.ini,$nick,Randimization) == 3 ) are you mad?

 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.