Slot Machine

By ChemicalZ on Jan 30, 2010

I am not the best scripter so please be nice :)

Commands:
!coins
!cjackpot
!slot
!slot2
!jackpot

Owner Commands:
.coin
.jackpot
!coinchan
!reset

menu nicklist {
  owner:/auser owner $$1
}

on *:LOAD:{
  var %owner $$?" Person to be Owner "
  auser owner %owner
  .msg %owner !coinchan <channel> To set channels to play on
  SET %Winners 0
  SET %jackpot. [ $+ [ $network ] ] 100
  SET %symbol.0 1,8 BELL 
  SET %symbol.1 1,4 CHERRY 
  SET %symbol.2 1,6 PLUM 
  SET %symbol.3 1,9 WEED 
  SET %symbol.4 0,4 STRAWBERRY 
  SET %symbol.5 0,1 COAL 
  SET %symbol.6 1,11 BLUEBERRY 
  SET %symbol.7 1,7 ORANGE 
  SET %symbol.8 4,3 APPLE 
  set %symbol.9 3,4 WATERMELON
  set %symbol.10 0,1 CRACK
  SET %symbol.11 4,12 BLOOD 
  set %symbol.12 5,3 POOP 
  set %symbol.13 12,11 WATER 
  set %symbol.14 11,12 ECSTASY
  set %symbol.15 8,1 JACKPOT 
  set %symbol.16 Slots Brought to you by Chemy of tskchat.com:6667
}

ON *:UNLOAD:{
  UNSET %jackpot. [ $+ [ $network ] ]
  UNSET %symbol.*
}

on $*:TEXT:/^[@!.]slot/Si:#:{
  if ( $istok(%chanslot. [ $+ [ $network ] ] ,$chan,32) ) {
    if ( %symbol.16 != Slots Brought to you by Chemy of tskchat.com:6667 ) { .msg $chan Invalid Files found Please restore script | HALT }
    set %acdc %symbol.16
    if ( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] > 0 ) {
      dec %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ]
      set %slot $chan
      set %nickslot $nick
      IF ($timer(%nickslot) == $null) {
        .TIMER [ $+ [ %nickslot ] ] 1 5 echo -s 
        set %jackpot. [ $+ [ $network ] ] $calc( %jackpot. [ $+ [ $network ] ] + 2 )
        .notice $nick %acdc
        .notice $nick remeber there is also !slot2 and !jackpot
        MSG %slot [7SLOT-MACHINE] Current Jackpot: %jackpot. [ $+ [ $network ] ]  :::  Rolling the wheels.
        PLAYSLOT
      }
      ELSE {
        NOTICE %nickslot You have to wait $timer(%nickslot).secs seconds before playing again.
      }
    }
    else { .notice $nick You Don't Have enough points!!! try posting in # [ $+ [ %coinchan ] ] }
  }
}
alias playslot {
  IF ( %slot.lose. [ $+ [ %nickslot ] ] == $null ) SET %slot.lose. [ $+ [ %nickslot ] ] 0
  INC %slot.lose. [ $+ [ %nickslot ] ]
  SET %col.0 %symbol. [ $+ [ $rand(0,15) ] ]
  SET %col.1 %symbol. [ $+ [ $rand(0,15) ] ]
  SET %col.2 %symbol. [ $+ [ $rand(0,15) ] ]
  SET %col.3 %symbol. [ $+ [ $rand(0,15) ] ]
  SET %col.4 %symbol. [ $+ [ $rand(0,15) ] ]
  SET %col.5 %symbol. [ $+ [ $rand(0,15) ] ]
  IF ( (%col.0 == %symbol.15) && (%col.0 == %col.1) && (%col.1 == %col.2) && (%col.2 == %col.3) && (%col.3 == %col.4) && (%col.4 == %col.5) ) {
    SET %winlineslot 0 1,8 J 1,4 A 1,9 C 1,7 K 1,13 P 1,11 O 1,5 T    !!! %nickslot just won %jackpot. [ $+ [ $network ] ] points in channel %chanslot !
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + %jackpot. [ $+ [ $network ] ] )
    SET %jackpot. [ $+ [ $network ] ] 200
    inc %jackpot. [ $+ [ $network ] ].winner
    set %lastwinner. [ $+ [ $network ] ] %nickslot

  }
  IF ( ( %col.0 == %col.1 ) || ( %col.1 == %col.2 ) || ( %col.2 == %col.3 ) || ( %col.3 == %col.4 ) || ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 2 )
  }

  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 4 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 4 )

  }

  IF ( ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 4 )

  }
  IF ( ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 4 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.2 == %col.3 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }

  MSG %slot %col.0 %col.1 %col.2 %col.3 %col.4 %col.5  :::  $iif(%winlineslot == $null,%nickslot lost,%nickslot win)
  .notice $nick you now have %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] coins
  IF (%winlineslot != $null) MSG %slot %winlineslot
  UNSET %winlineslot
}

alias playslot2 {
  IF ( %slot.lose. [ $+ [ %nickslot ] ] == $null ) SET %slot.lose. [ $+ [ %nickslot ] ] 0
  INC %slot.lose. [ $+ [ %nickslot ] ]
  SET %col.0 %symbol. [ $+ [ $rand(8,15) ] ]
  SET %col.1 %symbol. [ $+ [ $rand(8,15) ] ]
  SET %col.2 %symbol. [ $+ [ $rand(8,15) ] ]
  SET %col.3 %symbol. [ $+ [ $rand(8,15) ] ]
  SET %col.4 %symbol. [ $+ [ $rand(8,15) ] ]
  SET %col.5 %symbol. [ $+ [ $rand(8,15) ] ]
  IF ( (%col.0 == %symbol.15) && (%col.0 == %col.1) && (%col.1 == %col.2) && (%col.2 == %col.3) && (%col.3 == %col.4) && (%col.4 == %col.5) ) {
    SET %winlineslot 0 1,8 J 1,4 A 1,9 C 1,7 K 1,13 P 1,11 O 1,5 T    !!! %nickslot just won %jackpot. [ $+ [ $network ] ] points in channel %chanslot. [ $+ [ $network ] ]  !
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + %jackpot. [ $+ [ $network ] ] )
    SET %jackpot. [ $+ [ $network ] ] 200
    inc %jackpot. [ $+ [ $network ] ].winner
    set %lastwinner. [ $+ [ $network ] ] %nickslot

  }
  IF ( ( %col.0 == %col.1 ) || ( %col.1 == %col.2 ) || ( %col.2 == %col.3 ) || ( %col.3 == %col.4 ) || ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 4 )
  }

  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }

  IF ( ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.2 == %col.3 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 10 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 10 )

  }

  MSG %slot  %col.0 %col.1 %col.2 %col.3 %col.4 %col.5  :::  $iif(%winlineslot == $null,%nickslot lost,%nickslot win)
  .notice $nick you now have %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] coins
  IF (%winlineslot != $null) MSG %slot  %winlineslot
  UNSET %winlineslot
}

ON *:UNLOAD:{
  UNSET %jackpot. [ $+ [ $network ] ]
  UNSET %symbol.*
}

on $*:TEXT:/^[@.!]jackpot/Si:#:{
  if ( $istok(%chanslot. [ $+ [ $network ] ] ,$chan,32) ) {

    if ( %symbol.16 != Slots Brought to you by Chemy of tskchat.com:6667 ) { .msg $chan Invalid Files found Please restore script | HALT }
    if ( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] > 49 ) {
      set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] - 50 )
      set %slot $chan
      set %nickslot $nick
      IF ($timer(1 $+ %nickslot) == $null) {
        .TIMER $+ 1 [ $+ [ %nickslot ] ] 1 360 ECHO -s timer for %nickslot deactivated
        set %jackpot. [ $+ [ $network ] ] $calc( %jackpot. [ $+ [ $network ] ] + 7 )
        .notice $nick %acdc
        MSG %slot  [7SLOT-MACHINE] Current Jackpot: %jackpot. [ $+ [ $network ] ]  :::  Rolling the wheels.
        PLAYSLOT3
      }
      ELSE {
        NOTICE %nickslot You have to wait $timer(1 $+ %nickslot).secs seconds before playing again.
      }
    }
    else { .notice $nick You Don't Have enough points!!! try posting in # [ $+ [ %coinchan ] ] }
  }
}
alias playslot3 {
  IF ( %slot.lose. [ $+ [ %nickslot ] ] == $null ) SET %slot.lose. [ $+ [ %nickslot ] ] 0
  INC %slot.lose. [ $+ [ %nickslot ] ]
  SET %col.0 %symbol. [ $+ [ $rand(13,15) ] ]
  SET %col.1 %symbol. [ $+ [ $rand(13,15) ] ]
  SET %col.2 %symbol. [ $+ [ $rand(13,15) ] ]
  SET %col.3 %symbol. [ $+ [ $rand(13,15) ] ]
  SET %col.4 %symbol. [ $+ [ $rand(13,15) ] ]
  SET %col.5 %symbol. [ $+ [ $rand(13,15) ] ]
  IF ( (%col.0 == %symbol.15) && (%col.0 == %col.1) && (%col.1 == %col.2) && (%col.2 == %col.3) && (%col.3 == %col.4) && (%col.4 == %col.5) ) {
    SET %winlineslot 0 1,8 J 1,4 A 1,9 C 1,7 K 1,13 P 1,11 O 1,5 T    !!! %nickslot just won %jackpot. [ $+ [ $network ] ] points in channel %chanslot. [ $+ [ $network ] ]  !
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + %jackpot. [ $+ [ $network ] ] )
    SET %jackpot. [ $+ [ $network ] ] 200
    inc %jackpot. [ $+ [ $network ] ].winner
    set %lastwinner. [ $+ [ $network ] ] %nickslot

  }
  IF ( ( %col.0 == %col.1 ) || ( %col.1 == %col.2 ) || ( %col.2 == %col.3 ) || ( %col.3 == %col.4 ) || ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 6 )
  }

  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }

  IF ( ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 8 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 10 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 10 )

  }
  IF ( ( %col.2 == %col.3 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 10 )

  }
  IF ( ( %col.0 == %col.1 ) && ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 12 )

  }
  IF ( ( %col.1 == %col.2 ) && ( %col.2 == %col.3 ) && ( %col.3 == %col.4 ) && ( %col.4 == %col.5 ) ) {
    SET %winlineslot  12,9W7,9I4,9N13,9N4,9E13,9R  4!!!
    INC %Winners
    SET %Last.Winner %nickslot
    SET %Last.Amount %jackpot. [ $+ [ $network ] ]
    inc %slot.win. [ $+ [ %nickslot ] ]
    set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] $calc( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] + 12 )

  }

  MSG %slot %col.0 %col.1 %col.2 %col.3 %col.4 %col.5  :::  $iif(%winlineslot == $null,%nickslot lost,%nickslot win)
  .notice $nick you now have %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] coins
  IF (%winlineslot != $null) MSG %slot  %winlineslot
  UNSET %winlineslot
  unset %chanslot. [ $+ [ $network ] ]
}
on *:text:!coins*:#: {
  if ( $istok(%chanslot. [ $+ [ $network ] ] ,$chan,32) ) {

    if ( $2 == $null ) { .notice $nick coins: %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] }
    else { .notice $nick $2 coins: %coins. [ $+ [ $address($2,3) ] ] [ $+ [ $network ] ] }
  }
}
on 1:text:*:#: {
  if ( $chan isin %chanslot. [ $+ [ $network ] ] ) {
    if ( %coined. [ $+ [ $address($nick,3) ] ] >= 1 ) { halt }
    if ( ban iswm %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] ) { halt }
    if ( %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] < 0 ) {
      if ( %poorrobbed. [ $+ [ $address(%robber,3) ] == 1 ) { goto jackernub }
      set %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] 0 
      .msg %service. $+ $network $nick points reset 
      halt
    }
    :jackernub
    set %coined. [ $+ [ $address($nick,3) ] ] 1
    inc %coins. [ $+ [ $address($nick,3) ] ] [ $+ [ $network ] ] 5
    .timercoined [ $+ [ $address($nick,3) ] ] 1 60 unset %coined. [ $+ [ $address($nick,3) ] ]
  }

  if ( $1 == !cjackpot ) {
    .msg $chan Current Jackpot is %jackpot. [ $+ [ $network ] ]

  }
}

on owner:text:*:#: {
  if ( $1 == !coinchan ) {
    set %chanslot. [ $+ [ $network ] ] $addtok($2,%chanslot. [ $+ [ $network ] ],32)
    /join $2
    if ( $me ison $2 ) { .msg $2 Slot game enabled on this channel | halt }
    .msg $2 I've been assigned to this channel as a SlotBot: commands !slot !slot2 !jackpot !coins <nick>
  }
  if ( $1 == !reset ) {
    unset %jacked.*
    unset %robbed.*
    unset %coins.*
    unset %nickslot
    unset %chanslot*
    /timers off
    set %jackpot 200
    .amsg Everything has been reset
    SET %Winners 0
    SET %jackpot 100
    SET %symbol.0 1,8 BELL 
    SET %symbol.1 1,4 CHERRY 
    SET %symbol.2 1,6 PLUM 
    SET %symbol.3 1,9 WEED 
    SET %symbol.4 0,4 STRAWBERRY 
    SET %symbol.5 0,1 COAL 
    SET %symbol.6 1,11 BLUEBERRY 
    SET %symbol.7 1,7 ORANGE 
    SET %symbol.8 4,3 APPLE 
    set %symbol.9 3,4 WATERMELON
    set %symbol.10 0,1 CRACK
    SET %symbol.11 4,12 BLOOD 
    set %symbol.12 5,3 POOP 
    set %symbol.13 12,11 WATER 
    set %symbol.14 11,12 ECSTASY
    set %symbol.15 8,1 JACKPOT 
    set %symbol.16 Slots Brought to you by Chemy of tskchat.com:6667
  }
  if ( $1 == .jackpot ) {
    set %jackpot. [ $+ [ $network ] ] $2
  }
  if ( $1 == .coin) {
    set %coins. [ $+ [ $address($2,3) ] ] [ $+ [ $network ] ] $3
    .notice $2 Your coin coint is now $3 Courtesy of $nick
    .notice $nick $2 coin count set to $3
  }
}

Comments

Sign in to comment.
hello2u   -  Feb 10, 2010

I went through it and made it 1/5th the length, and better XD
It definitely needs some work.
If you'd like my modified version, let me know, but it will only work with my bot, unless we/you/I make some changes to it.

 Respond  
ChemicalZ   -  Jan 31, 2010

Only things set are the symbols and everything else is unset at the end of the game aliases

And what isn't unset can be using the !reset command

I hit the caps lock keys alot when i type that is why there are SET and set

 Respond  
gooshie   -  Jan 31, 2010

Ok, to be specific, when I scroll through a snippet this size and see no local (/var) variables and only global (/set) variables I know right away it's in trouble. Generally when I look at msl and see too many set variables, halts or goto jumps it indicates to me very quickly that it could be written better. To be honest I never installed and ran this snippet because I did not want to have to clean out that many set variables after I tested it. Another admitedly minor complaint I have is being inconsistent with how commands etc are capitalized or not as in when you use both SET and set. To me it looks as if there was no attention to detail that may indicate other problems not so readily apparent.

 Respond  
ChemicalZ   -  Jan 30, 2010

Explain :)

I love constructive criticism

 Respond  
gooshie   -  Jan 30, 2010

Needs about four dozen halts and goto jumps to really make this complete.

 Respond  
napa182   -  Jan 30, 2010

holy var setting =/

 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.