| View previous topic :: View next topic |
| Author |
Message |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Thu May 11, 2006 4:59 am Post subject: found slot script |
|
|
i have found this slot script but when i loaded the script the bot die
help me? please
| Code: | #######################################################################
# --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" |
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Thu May 11, 2006 6:16 am Post subject: |
|
|
this error give it
[12:16] Tcl error in file 'eggdrop.conf':
[12:16] can't set "botnick": read-only variable
while executing
"set botnick "$botnick""
(file "scripts/slots.tcl" line 25)
invoked from within
"source scripts/slots.tcl"
(file "eggdrop.conf" line 1376)
[12:16] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR) |
|
| Back to top |
|
 |
whiteshark Halfop
Joined: 12 Jun 2005 Posts: 62 Location: netherlands
|
Posted: Thu May 11, 2006 6:46 am Post subject: |
|
|
oke i have founded i have delete de line set botnick
now its work |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu May 11, 2006 1:44 pm Post subject: |
|
|
| Code: | | set botnick $botnick |
lol, as if you're naming me Fayez - which is already my name  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|