Gambling time

By Lord-Harlot on Jun 20, 2008

I remake my slots script. My old one was like 68 lines so I redid it an made it 6 lines. I took out storing money because I'm lazy.

To use:
Press alt +r and paste this script in

if ($1 == !slots) && (!$2) { 
      var %a = $r(1,5), %b = $r(1,5), %c = $r(1,5)  
      describe # sees $nick pull on the leaver
      describe # sees the reel land on ( $+ $replacex(%a,1,4Cherry,2,3Grapes,3,8Lemons,4,7Oranges,5,3M4e3l4o3n4s) $+ )( $+ $replacex(%b,1,4Cherry,2,3Grapes,3,8Lemons,4,7Oranges,5,3M4e3l4o3n4s) $+ )( $+ $replacex(%c,1,4Cherry,2,3Grapes,3,8Lemons,4,7Oranges,5,3M4e3l4o3n4s) $+ )
  msg # $iif(%a == %b && %b == %c,Congratz, you won $chr(36) $+ $replace(%a,1,10,2,20,3,50,4,100,5,500) $+ !!!,You lose - Please try again)
}

Comments

Sign in to comment.
greenlanter420   -  Jun 21, 2008

what about using the persons address instead of nickname so it follows them if they change nicknames

 Respond  
vaseline28   -  Jun 21, 2008

I was thinking about this yesterday actually, you could make your script even more compact

if (($1 == !heads) || ($1 == !tales)) {
describe $chan flips a coin.
if ($iif($1 == !heads,1,2) == $rand(1,2)) {

} else { } }

You see the way in which I cut the lines back by naming the variables inside the if statement rather than outside?

 Respond  
Hawkee   -  Jun 20, 2008

You can change it by clicking the edit button to the top right of your snippet code.

 Respond  
Lord-Harlot   -  Jun 20, 2008

/me is a dumbo

:P

 Respond  
Eugenio   -  Jun 20, 2008

rofl

 Respond  
Hawkee   -  Jun 20, 2008

Isn\'t it spelled \"Gambling\"?

 Respond  
EL   -  Jun 20, 2008

hmm think you should and this is spamin my server but this may help alot of the gambling game makers.Goto /server -m irc.chatscape.net:7000 -j #Casino_Scape and check out the small casino i put together i think it may help you with codes like these.If you dont obv it dont matter just ryin to help cause i made the code in like a half day has a registry system money system(Tokens) a loan system a give system and you messagin system to other players and a few more things ATM theres slots,craps and lotto and soon ima add roulette.`-.-´

 Respond  
Lord-Harlot   -  Jun 20, 2008

Thanks for the comments

 Respond  
vaseline28   -  Jun 20, 2008
  if ($1 == !heads) {
    var %coinflip $rand(1,2)
    describe $chan flips a coin
    if (%coinflip == 1) {
      writeini money.ini CMoney $nick $calc($readini(money.ini, CMoney, $nick + 1))
      describe $chan sees the coin land on Heads
      msg $chan You now have $readini(money.ini, CMoney, $nick) coins.
    }
    if (%coinflip == 2) { 
      describe $chan sees the coin fall on tails.
      msg $chan sorry $nick $+ , you lose.
    }
  }
  if ($1 == !tails) {
    var %coinflip $rand(1,2)
    describe $chan flips a coin
    if (%coinflip == 2) {
      writeini money.ini CMoney $nick $calc($readini(money.ini, CMoney, $nick + 1))
      describe $chan sees the coin land on Tails
      msg $chan You now have $readini(money.ini, CMoney, $nick) coins.
    }
    if (%coinflip == 1) { 
      describe $chan sees the coin fall on Heads
      msg $chan sorry $nick $+ , you lose.
    }
  }
}
}

That section could be re-written to:

if (($1 == !heads) || ($1 == !tales)) {
var %x $iif($1 == !heads,1,2)
var %t $rand(1,2)
describe $chan flips a coin.
if (%t == %x) {

} else { } }

You see it cut out lots of space (replace and with your commands for each occasion).

 Respond  
NindoLover   -  Jun 20, 2008

Taj\ke out the } at the very very end .

 Respond  
vaseline28   -  Jun 20, 2008

Looks like you\'ve got one too many \"}\" at the end, just from a glance, I may be wrong.

 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.