This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

found slot script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

found slot script

Post by whiteshark »

i have found this slot script but when i loaded the script the bot die
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"
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What's the error message?
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

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)
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

oke i have founded i have delete de line set botnick
now its work
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set botnick $botnick
lol, as if you're naming me Fayez - which is already my name :lol:
Post Reply