!slotmachine !heads n !tails

By sercan386 on May 13, 2008

This rather simple script is a slot machine game, bundled with !heads and !tails! Quite fun and addictive! just load em into ur remote d(-_-)b

on *:TEXT:!slotmachine:#: {
if ( % [ $+ [ $nick ] $+ ] .points == $null ) { /set % $+ $nick $+ .points 0  }
  if ( % [ $+ [ $nick ] $+ ] .points < 1 ) { msg $chan Sorry, you don't have enough cash!
    .notice $nick Why not earn some with !heads and !tails
    /halt
  }
  elseif ( %stoptheslots != 1 ) { /msg $chan 4Slot Machine game has been started by $nick $+ ...
    .set -u20 %slotmachine1 $rand(1,2)
    .set -u20 %slotmachine2 $rand(1,2)
    .set -u20 %slotmachine3 $rand(1,2)
    .set -u20 %nick $nick
    .set -u20 %channel $chan
    .set -u11 %stoptheslots 1
    .timer1 1 2 /msg $chan 13The first 9number 9is %slotmachine1 !
    .timer2 1 4 /msg $chan 2The second 9number 6is %slotmachine2 !
    .timer3 1 6 /msg $chan 2The third 3number 14is %slotmachine3 !
    .timer4 1 8 /slot
  }
  else /msg $chan 4Don't overuse the commands, addict!
}
alias slot {
  dec % $+ %nick $+ .points 1
  if ( %slotmachine1 == %slotmachine2 ) && ( %slotmachine2 == %slotmachine3 ) && (%slotmachine1 == %slotmachine3 ) { /msg %channel 3You win with the numbers %slotmachine1 , %slotmachine2 , and %slotmachine3 , lucky.
    inc % $+ %nick $+ .points 20
    msg %channel %nick $+ , 10you have 5this amount 4of coins 6: % [ $+ [ %nick ] $+ ] .points
  }
  else { msg %channel 4Ahh, you lose. poor you. Numbers %slotmachine1 , %slotmachine2 , and %slotmachine3 didn't match.
    /timer5 1 1 /msg %channel 10 %nick $+ , 13you have this amount 3of coins: % [ $+ [ %nick ] $+ ] .points
    /set %slapbomb $rand(1,8) 
    if (%slapbomb == 1) /describe %channel shoots %nick in the head.
    if (%slapbomb == 2) /describe %channel 12slaps %nick with a 4R12A9I8N4B6O13W12 trout.
    if (%slapbomb == 3) /describe %channel kills %nick $+ .
    if (%slapbomb == 4) /describe %channel throws up on %nick $+ .
    if (%slapbomb == 5) /describe %channel slaps %nick around with 9nuclear 6waste.
    if (%slapbomb == 6) /describe %channel sends hordes of lemmings over %nick $+ .
    if (%slapbomb == 7) /describe %channel discovers %nick $+ 's picture at uglypeople.com
    if (%slapbomb == 8) /describe %channel pushes %nick off a cliff.
  }
}
on *:TEXT:!heads:#: {
if ( % [ $+ [ $nick ] $+ ] .points == $null ) { /set % $+ $nick $+ .points 0  }
  if ( %stoptheslots != 1 ) {
    /set -u8 %hedtail $rand(1,2)
    /set -u8 %chan $chan
    /set -u8 %nick $nick
    /set -u8 %stoptheslots 1
    /describe $chan throws up a coin...
    .timer 1 2 /describe $chan sees the coin landed with...
    .timer 1 3 /hed
  }
  else msg $chan 4Don't overuse the commands, addict!
}
alias hed {
  if ( %hedtail == 1 ) { /msg %chan heads!
    /inc % [ $+ [ %nick ] $+ ] .points 1
    .timer 1 1 /msg %chan 10you win! You 13have % [ $+ [ %nick ] $+ ] .points 6coins!
    /halt
  }
  else /msg %chan Tails!
  /timer 1 1 /msg %chan 4sorry, you lose.
}
on *:TEXT:!tails:#: {
if ( % [ $+ [ $nick ] $+ ] .points == $null ) { /set % $+ $nick $+ .points 0  }
  if ( %stoptheslots != 1 ) {
    /set -u8 %hedtail $rand(1,2)
    /set -u8 %chan $chan
    /set -u8 %nick $nick
    /set -u8 %stoptheslots 1
    /describe $chan throws up a coin...
    .timer 1 2 /describe $chan sees the coin landed with...
    .timer 1 3 /tail
  }
  else /msg $chan 4Don't overuse the commands, addict!
}
alias tail {
  if ( %hedtail == 2 ) { /msg %chan tails!
    /inc % [ $+ [ %nick ] $+ ] .points 1
    .timer 1 1 /msg %chan 3you win! 13You have % [ $+ [ %nick ] $+ ] .points 15coins!
    /halt
  }
  else /msg %chan Heads!
  /timer 1 1 /msg %chan sorry, you lose.
}

Comments

Sign in to comment.
EL   -  Jun 23, 2008

workz wd.`-.-´

 Respond  
criminal   -  May 19, 2008

If you say

if (%slotmachine1 == %slotmachine2) && (%slotmachine2 == %slotmachine3) {

You don\'t need to add: if (%slotmachine1 == %slotmachine3)
Ofcourse they\'re the same then.

One more thing: You don\'t need to add / for a msg, notice, set, ...
Also, nice that you add a flood protection :)

 Respond  
sercan386   -  May 14, 2008

mmkay...

 Respond  
guest598594   -  May 13, 2008

I would silence the timers and perhaps name them:

.timers1 set ...
.timers2 set ...
.timers3 set ...
dma  -  Jul 03, 2016

I think it needs more info on the slots that came out.. ya knows what i mean?

Sign in to comment

Jonesy44   -  May 13, 2008

sloth .. lol :D

 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.