Top

Comments

  (33)  RSS
Lord-Harlot's
greenlanter420
Comments: 42
 
mIRC Snippet:  Gambleing time
Posted on Jun 21, 2008 10:05 am
what about using the persons address instead of nickname so it follows them if they change nicknames
vaseline28
Comments: 115
 
mIRC Snippet:  Gambleing time
Posted on Jun 21, 2008 2:20 am
I was thinking about this yesterday actually, you could make your script even more compact

Quote:
if (($1 == !heads) || ($1 == !tales)) {
describe $chan flips a coin.
if ($iif($1 == !heads,1,2) == $rand(1,2)) {
<commands if won>
}
else {
<commands if lost>
}
}


You see the way in which I cut the lines back by naming the variables inside the if statement rather than outside?
Hawkee
Comments: 403
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 8:39 pm
You can change it by clicking the edit button to the top right of your snippet code.
Lord-Harlot
Comments: 21
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 8:01 pm
/me is a dumbo

:P
Eugenio
Comments: 517
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 7:37 pm
rofl
Hawkee
Comments: 403
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 7:07 pm
Isn't it spelled "Gambling"?
EL
Comments: 913
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 5:41 pm
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.`-.-ยด
Lord-Harlot
Comments: 21
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 4:15 pm
Thanks for the comments

vaseline28
Comments: 115
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 3:54 pm
Code:
  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:

Quote:
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) {
<commands if won>
}
else {
<commands if lost>
}
}


You see it cut out lots of space (replace <commands if won> and <commands if lost> with your commands for each occasion).
NindoLover
Comments: 6
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 3:50 pm
Tajke out the } at the very very end .
vaseline28
Comments: 115
 
mIRC Snippet:  Gambleing time
Posted on Jun 20, 2008 3:40 pm
Looks like you've got one too many "}" at the end, just from a glance, I may be wrong.
mountaindew
Comments: 1,422
 
mIRC Snippet:  Warp my features
Posted on Jun 16, 2008 11:23 am
Rather than the two ifs at the end, use $iif to change it to beautiful/ugly.
Lord-Harlot
Comments: 21
 
mIRC Snippet:  Fishy slaps
Posted on Jun 14, 2008 3:30 pm
:]
what else could i add to it?
PunkTuReD
Comments: 59
 
mIRC Snippet:  Fishy slaps
Posted on Jun 14, 2008 10:25 am
lol this is a gd one
napa182
Comments: 797
 
mIRC Snippet:  Fishy slaps
Posted on Jun 13, 2008 7:19 pm
you can clean up the beginning of the code abit and make it like this
Code:
on *:action:$($+(*,slap,*,$me,*,trout,*)):#:{
  var %i $r(1,20), %money $calc(%i * 6)
  $iif(%tmoney >= 1000000,unset %tmoney,inc %tmoney %money)
Lord-Harlot
Comments: 21
 
Image:  Dirty wwf
Posted on Apr 30, 2008 6:26 am
Well obv.

Eugenio
Comments: 517
 
Image:  Dirty wwf
Posted on Apr 29, 2008 1:58 am
lmfao
graphics totaly pwn XBOX
Xemnas
Comments: 44
 
mIRC Snippet:  Pokemon catch snippet
Posted on Mar 21, 2008 3:36 am
LOL.
Lord-Harlot
Comments: 21
 
mIRC Snippet:  Pokemon catch snippet
Posted on Mar 20, 2008 9:30 pm
And I give you my many thank yous for that :)
DarkNES
Comments: 11
 
mIRC Snippet:  Pokemon catch snippet
Posted on Mar 20, 2008 3:54 am
Heh, if it wasn't for me, it never would've worked ;p
btw, DarkNES = Apocalypse :x
1 2 Next
Bottom