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.

russian roulette

Old posts that have not been replied to for several years.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

i realy tryed to !spin like 50 times or so been banned gotten snickers voice -voice and .. but no error .. ? could you specifiy ?
XplaiN but think of me as stupid
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

I used that code what I post one post up.

And when I write !spin



<Botman> [15:13] Tcl error [my:spin]: invalid command name "? "
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

this is the third time you have problem with "?" in scripts which dont contain "?".

maybe your text editor is [censored] it up, in any case, the code provided here isn't at fault.
photon?
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Ofloo can you post here that code what you use
spock: I dont use text editor
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Quote of the day

Post by user »

Kaarel wrote:I dont use text editor
Then how did you manage to run the script? Did you source it directly from the forum?
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Re: Quote of the day

Post by Kaarel »

user wrote:
Kaarel wrote:I dont use text editor
Then how did you manage to run the script? Did you source it directly from the forum?

I copy the text into wordbad and saved as russia.tcl, then edit my eggdrop.conf and restarted the bot.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

try this then:

Code: Select all



set my(chan) ""

bind pub - !spin my:spin 

proc my:spin {nick uhost handle channel text} {
  global botnick my
  set chan [string tolower $channel]
  putserv "MSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "MSG $chan :Tick Tick ... Tick Tick ... Who will the wheel pick?" 
  switch -- [expr [rand 7] + 1] { 
    "1" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :The wheel spins until the last Tick, and with that"  
        putserv "KICK $chan $nick :You get a free kick!" 
      } 
    } 
    "2" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :The wheel will land on the one that gets a ban"
        putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]" 
      } 
    } 
    "3" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else {
        putserv "PRIVMSG $chan :You have a little time on your hands"
        set mask "*!*@[lindex [split $uhost @] 1]" 
        newchanban $chan $mask $::botnick "Because you just recieved a 10 minute ban!" 10 
      } 
    } 
    "4" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :You are on your way to the top, because you were just made a OP"
        putserv "MODE $chan +o $nick" 
      } 
    } 
    "5" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :I hope you were not on top, because you just lost your OPs" 
        putserv "MODE $chan -o $nick" 
      } 
    } 
    "6" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :It is what you fear - you just lost your voice in here" 
        putserv "MODE $chan -v $nick" 
      } 
    } 
    "7" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "PRIVMSG $chan :If it's hard to know what you type, you are in luck, a -v bites" 
        putserv "MODE $chan +v $nick" 
      } 
    } 
  } 
} 

paste it this time into a file so you
don't lose a "{" like last time

btw, does that newchanban look right?
I once was an intelligent young man, now i am old and i can not remember who i was.
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

I copy+paste that into notepad, save it, restarted the bot, but till


<Botman> [19:37] Tcl error [my:spin]: invalid command name "? "
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Kaarel wrote:I copy+paste that into notepad, save it, restarted the bot, but till

<Botman> [19:37] Tcl error [my:spin]: invalid command name "? "
Even though notepad is the worst text editor ever it has several encodings to choose from iirc. Did you by any chance save it as something else than ANSI/pure text/whatever they call it?
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

I dont know, my request, can anybody upload somewhere the working script of that russian roulette (in .tcl format) and give here a adress
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Duno what exactly you did there, is working fine at me. Is exactly the last code changed by Dedan.
Also, as I've sugested previously, please do change from:

Code: Select all

putserv "MSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "MSG $chan :Tick Tick ... Tick Tick ... Who will the wheel pick?" 
to:

Code: Select all

putserv "PRIVMSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
putserv "PRIVMSG $chan :Tick Tick ... Tick Tick ... Who will the wheel pick?"
in order to work corectly. :P

Btw, what's with the my(chan)? I don't see it in the code.. is an unfinished fdeature or something? :) Also, there is no need to call globaly botnick, cos is called globaly from $::botnick.. and the my* thing can dissapear to + set chan [string tolower $channel] :P and replacing from:

Code: Select all

proc my:spin {nick uhost handle channel text} { 
to:

Code: Select all

proc my:spin {nick uhost handle chan text} { 
if you are to lazy to replace in the entire code from $chan to $channel :P
Once the game is over, the king and the pawn go back in the same box.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

Code: Select all


######################################################################
#                             SPIN                                   #
# spin.v1.3.tcl                                                      #
######################################################################
#                                                                    #
#  - OP commands -      !s on      will enable spin                  #
#                       !s off     will disable spin                 #
#                                                                    #
#  - commands -         !spin      spins wheel                       #
#                                                                    #

# Channel you want to run the !Spin game on.  1 room ONLY
# ex. set spin_chan "#egg_game_players"

set spin_chan ""

# Set the minimum number of seconds between spins
# ex. set s_protect_seconds 7

set s_protect_seconds 7


######################################################################
#            There Are No User Settings Below this Point             #
#                                                                    #
#    Don't edit anything below unless you know what you are doing    #
######################################################################

set spin_chan [string tolower $spin_chan]
set s_master_mode 1
set smode 1
set sgmode 1
set $sbbreason "Because you just recieved a 10 minute ban!"

######################################################################
#                          Main Script                               #
######################################################################

bind pub - !spin my:spin 

proc my:spin {nick uhost handle channel text} {
  global botnick spin_chan s_master_mode smode sgmode s_protect_seconds sbbreason
  if {[$s_master_mode == "0"]} {return 0}
  set chan [string tolower $channel]
  if {![$chan == $spin_chan]} {return 0}
  if {![botisop $chan]} {
    putserv "PRIVMSG $chan :I'm not OPed here so I can not Spin"
    return 0
  }
  if {[$smode == "0"]} {return 0}
  set smode "0"
  utimer $s_protect_seconds spin:floodpro
  putserv "PRIVMSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "PRIVMSG $chan :Tick Tick ... Tick Tick ... What will the wheel pick?" 
  switch -- [expr [rand 6] + 1] { 
    "1" {
      putserv "PRIVMSG $chan :The wheel spins until the last Tick, and with that"  
      putserv "KICK $chan $nick :You get a free kick!" 
    } 
    "2" {
      putserv "PRIVMSG $chan :The wheel will land on the one that gets a ban"
      putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]" 
    } 
    "3" {
      putserv "PRIVMSG $chan :You have a little time on your hands"
      set mask "*!*@[lindex [split $uhost @] 1]" 
      newchanban $chan $mask $::botnick $sbbreason 10
    } 
    "4" {
      putserv "PRIVMSG $chan :You are on your way to the top, because you were just made a OP"
      putserv "MODE $chan +o $nick" 
    } 
    "5" {
      putserv "PRIVMSG $chan :I hope you were not on top, because you just lost your OPs" 
      putserv "MODE $chan -o $nick"
    } 
    "6" {
      putserv "PRIVMSG $chan :If it's hard for us to know what you typed, it is what you fear - you just lost your voice in here" 
      putserv "MODE $chan -v $nick"
    } 
  } 
} 

proc spin:floodpro {} {
  global smode
  set smode "1"
}

######################################################################
#                     Master shut-off Switch                         #
######################################################################

# Master shut-off switch, available to ANY OP in Channel

bind pub -|- "!s on" enable:spin
bind pub -|- "!s off" disable:spin

proc enable:spin {nick uhost handle channel} {
  global spin_chan s_master_mode
  if {![string tolower $channel == $spin_chan]} {return 0}
  if {[isop $nick $spin_chan]} {
    set s_master_mode "1"
    puthelp "PRIVMSG $spin_chan :The Spin game has been unlocked, Type: !spin to play"
  }
  return 0
}

proc disable:spin {nick uhost handle channel} {
  global spin_chan s_master_mode
  if {![string tolower $channel == $spin_chan]} {return 0}
  if {[isop $nick $spin_chan]} {
    set s_master_mode "0"
    puthelp "PRIVMSG $spin_chan :The Spin game has been locked in OFF mode"
  }
  return 0
}

######################################################################
############################### EOF ##################################

I once was an intelligent young man, now i am old and i can not remember who i was.
M
MacDaddy[IRC]

spin script

Post by MacDaddy[IRC] »

i was playing aroun with you spin script and i got it to work with 3 kicks and 3 safe with some help from a friend :lol:

Code: Select all

set spin_chan "#" 

set s_protect_seconds 7 

set spin_chan [string tolower $spin_chan] 
set s_master_mode 1 
set smode 1 
set sgmode 1 

bind pub - !spin pub:spin 

proc pub:spin {nick uhost handle channel text} { 

  global botnick spin_chan s_master_mode smode sgmode s_protect_seconds  

  if {$s_master_mode == 0} {return 0} 
  set chan [string tolower $channel] 
  if {$chan != $spin_chan} {return 0} 
  if {[botisop $chan]== 0} { 
    putserv "PRIVMSG $chan :I'm not OPed here so I can not Spin" 
    return 0 
  } 
  if {$smode == "0"} {return 0} 
  set smode "0" 
  utimer $s_protect_seconds spin:floodpro 
  putserv "PRIVMSG $chan :$nick  takes a chance...good luck" 
  switch -- [expr [rand 6] + 1] { 
    "1" { 
      putserv "PRIVMSG $chan :you are a winner"  
    } 
    "2" { 
      putserv "PRIVMSG $chan :now thats has to hurt" 
      putserv "KICK $chan $nick :now did that hurt?" 
    } 
    "3" { 
      putserv "PRIVMSG $chan :you are a winner" 
    } 
    "4" { 
      putserv "PRIVMSG $chan :did you hear something?, because i dident :-)" 
      putserv "KICK $chan $nick :will you ever learn?" 
    } 
    "5" { 
      putserv "PRIVMSG $chan :you are the weakest link good bye" 
      putserv "KICK $chan $nick :lol you fell for that old trick" 
    } 
    "6" { 
      putserv "PRIVMSG $chan :Wow a winner have another go :-)" 
    } 
  } 
} 

proc spin:floodpro {} { 
  global smode 
  set smode "1" 
} 


# Master shut-off switch, available to ANY OP in Channel 

bind pub -|- !spin_on enable:spin 
bind pub -|- !spin_off disable:spin 

proc enable:spin {nick uhost handle channel text} {
  global spin_chan s_master_mode 
  if {([string tolower $channel] == $spin_chan) && ([isop $nick $spin_chan] == 1)} { 
    set s_master_mode 1
    puthelp "PRIVMSG $spin_chan :The Spin game has been unlocked, Type: !spin to play" 
  } 
  return 0 
} 

proc disable:spin {nick uhost handle channel text} { 
  global spin_chan s_master_mode 
  if {[string tolower $channel] != $spin_chan} {return 0} 
  if {[isop $nick $spin_chan]} { 
    set s_master_mode "0" 
    puthelp "PRIVMSG $spin_chan :The Spin game has been locked in OFF mode" 
  } 
  return 0 
} 
f
feroz
Voice
Posts: 25
Joined: Wed Aug 04, 2004 11:59 am

Post by feroz »

MacDaddy :wink:
Locked