help me? please
Code: Select all
#######################################################################
# --The Ultimate eggdrop Slot Machine -- #
# Slots v2.0 -- original code by Lorna MacTavish (v1.0) 6/22/97 #
# v2.0 by Chuck Jedlicka 11/15/97 #
#######################################################################
#
# This script is ready to go! No edits needed.
# Works great on eggdrop v1.0 and v1.1.5
#
# Slots.TCL Written by Lorna MacTavish (macgirl@poboxes.com)
# June 22/1997
# This is a slot machine proc for your eggdrop bot
# Tested on eggdrop 1.0p
#
# Syntax: !slots
# type this on the channel
#
# revised November 15,1997 by Chuck Jedlicka [jcme (jcme1@hotmail.com)]
# changed output to channel, added message funtionality so
# your users don't tie up the channel. Added prizes and more...
#
# Command for chan: !slots
# Command for /msg: slots
set botnick "$botnick"
set slots {
"Hearts"
"Lemon"
"Orange"
"Cherry"
"Lime"
"Bar"
"Bell"
}
bind pub - !slots play_slots
proc play_slots {nick uhost handle chan args} {
putserv "PRIVMSG $chan :<<$nick>> puts a quarter in the slot machine"
putserv "PRIVMSG $chan :<<$nick>> pulls the lever"
putserv "PRIVMSG $chan :The wheels are spinning..."
putserv "PRIVMSG $chan :coming to a stop..."
putserv "PRIVMSG $chan :<<$nick>> is feeling mighty lucky today!"
putserv "PRIVMSG $chan :here ya go!"
global slots botnick
set slot1 [lindex $slots [rand [llength $slots]]]
set slot2 [lindex $slots [rand [llength $slots]]]
set slot3 [lindex $slots [rand [llength $slots]]]
putserv "PRIVMSG $chan :| $slot1 | $slot2 | $slot3 |"
if {$slot1 == $slot2} {
if {$slot2 == $slot3} {
putserv "PRIVMSG $chan :Congratulations! $nick You won the jackpot! \$500 !! =)"
putserv "PRIVMSG $chan :Hey everyone! $nick Just won the Jackpot!"
putserv "notice $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $chan :Aww gee Shucks! $nick, :( 2 out of 3 only pays \$50 ! =)"
putserv "NOTICE $nick :Too bad it's only true on IRC... like your other \"scores\" :P"
return 1
}
if {$slot3 == $slot2} {
if {$slot2 == $slot1} {
putserv "PRIVMSG $chan :Congratulations! $nick You won the Jackpot! \$500 !! =)"
putserv "PRIVMSG $chan :Hey everyone! $nick Just won the Jackpot!"
putserv "notice $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $chan :Not too shabby $nick you just won \$50 ! =)"
putserv "NOTICE $nick :Too bad it's only true on IRC... like your other \"scores\" :P"
return 1
}
if {$slot1 == $slot3} {
if {$slot2 == $slot1} {
putserv "PRIVMSG $chan :Congratulations! $nick You won the Jackpot! \$500 !! =)"
putserv "PRIVMSG $chan :Hey everyone! $nick Just won the Jackpot!"
putserv "notice $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $chan :Getting close there $nick, outside pays \$25 ! =)"
putserv "NOTICE $nick :Too bad its like your other \"SCORES\" on IRC :P"
return 1
}
putserv "PRIVMSG $chan :Sorry $nick not everyone can be a winner. Better luck next time!"
putserv "NOTICE $nick :You can also play in private! Use /msg $botnick slots Good Luck!!"
return 1
}
bind msg - slots play_slotsm
proc play_slotsm {nick uhost handle chan args} {
putserv "PRIVMSG $nick :<<$nick>> puts a quarter in the slot machine"
putserv "PRIVMSG $nick :<<$nick>> pulls the lever"
putserv "PRIVMSG $nick :The wheels are spinning..."
putserv "PRIVMSG $nick :coming to a stop..."
putserv "PRIVMSG $nick :<<$nick>> is feeling mighty lucky today!"
putserv "PRIVMSG $nick :here ya go!"
global slots
set slot1 [lindex $slots [rand [llength $slots]]]
set slot2 [lindex $slots [rand [llength $slots]]]
set slot3 [lindex $slots [rand [llength $slots]]]
putserv "PRIVMSG $nick :| $slot1 | $slot2 | $slot3 |"
if {$slot1 == $slot2} {
if {$slot2 == $slot3} {
putserv "PRIVMSG $nick :Congratulations! $nick You won the jackpot! \$500 !! =)"
putserv "PRIVMSG $nick :Hey everyone! $nick Just won the Jackpot!"
putserv "PRIVMSG $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $nick :Aww gee Shucks! $nick, :( 2 out of 3 only pays \$50 ! =)"
putserv "PRIVMSG $nick :Too bad it's only true on IRC... like your other \"scores\" :P"
return 1
}
if {$slot3 == $slot2} {
if {$slot2 == $slot1} {
putserv "PRIVMSG $nick :Congratulations! $nick You won the Jackpot! \$500 !! =)"
putserv "PRIVMSG $nick :Hey everyone! $nick Just won the Jackpot!"
putserv "PRIVMSG $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $nick :Not too shabby $nick you just won \$50 ! =)"
putserv "PRIVMSG $nick :Too bad it's only true on IRC... like your other \"scores\" :P"
return 1
}
if {$slot1 == $slot3} {
if {$slot2 == $slot1} {
putserv "PRIVMSG $nick :Congratulations! $nick You won the Jackpot! \$500 !! =)"
putserv "PRIVMSG $nick :Hey everyone! $nick Just won the Jackpot!"
putserv "PRIVMSG $nick :Don't ya wish it were Real!! hehehe :P"
return 1
}
putserv "PRIVMSG $nick :Getting close there $nick, outside pays \$25 ! =)"
putserv "PRIVMSG $nick :Too bad its like your other \"SCORES\" on IRC :P"
return 1
}
putserv "PRIVMSG $nick :Sorry $nick not everyone can be a winner. Better luck next time!"
putserv "PRIVMSG $nick :Thanks for playing privately! Your fellow channel members appreciate it! =)"
return 1
}
putlog "Slots 2.0 loaded succesfully"