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.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

this might work:
I shortened the putservs to stop a flood

Code: Select all


bind pub - !spin my:spin 

proc my:spin {nick host handle channel text} { 
  putserv "MSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "MSG $chan :Where it will point nobody knows .... Tick Tick Tick ... Tick Tick ... Tick" 
  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 :And $nick gets a free kick out of here ... *snicker*"  
        putserv "KICK $chan $nick :Your free kick!"
      } 
    } 
    "2" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "MODE $chan +b *!*@[lindex [split $host @] 1]"
      }
    } 
    "3" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else {
        set mask "*!*@[lindex [split $host @] 1]" 
        newchanban $chan $mask $::botnick "Here is your prise.. 10 mintes 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 :And $nick gets op in here.." 
        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 :One deop comming up! hehe" 
        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 :One -voice comming up!" 
        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 :One +voice comming up!" 
        putserv "MODE $chan +v $nick" 
      } 
    }
  } 
} 



i hope this helps
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 »

dedan: from yours bot says <Botman> [22:09] Tcl error [my:spin]: can't read "chan": no such variable




caesar: from yours bot says <Botman> [22:01] Tcl error [my:spin]: extra characters after close-quote
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Then replace from Dedan's code:

Code: Select all

proc my:spin {nick host handle channel text} {
with:

Code: Select all

proc my:spin {nick host handle chan text} {
and should do fine.. Also, instead of:

Code: Select all

putserv "MSG .. bla bla bla"
replace it with:

Code: Select all

putserv "PRIVMSG .. bla bla bla"
replace the bla bla bla with the actual stuff you got there.
Last edited by caesar on Thu Aug 14, 2003 5:26 am, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Code: Select all

bind pub - !spin my:spin 

proc my:spin {nick host handle chan text} 
  putserv "PRIVMSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "PRIVMSG $chan :Where it will point nobody knows .... Tick Tick Tick ... Tick Tick ... Tick" 
  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 :And $nick gets a free kick out of here ... *snicker*"  
        putserv "KICK $chan $nick :Your free kick!" 
      } 
    } 
    "2" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "MODE $chan +b *!*@[lindex [split $host @] 1]" 
      } 
    } 
    "3" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        set mask "*!*@[lindex [split $host @] 1]" 
        newchanban $chan $mask $::botnick "Here is your prise.. 10 mintes 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 :And $nick gets op in here.." 
        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 :One deop comming up! hehe" 
        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 :One -voice comming up!" 
        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 :One +voice comming up!" 
        putserv "MODE $chan +v $nick" 
      } 
    } 
  } 
} 
And when I restarted my bot, it sayd

<Botman> [11:31] Tcl error in file 'eggdrop.conf':
<Botman> [11:31] wrong # args: should be "proc name args body"
<Botman> while executing
<Botman> "proc my:spin {nick host handle chan text} "
<Botman> (file "scripts/russia.tcl" line 3)
<Botman> invoked from within
<Botman> "source scripts/russia.tcl"
<Botman> (file "eggdrop.conf" line 306)
<Botman> [11:31] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
-
DCC session closed
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

proc my:spin {nick host handle chan text} 
should be

Code: Select all

proc my:spin {nick host handle chan text} {
Elen sila lúmenn' omentielvo
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

newchanban $chan $mask $::botnick "Here is your prise.. 10 mintes ban!" 10
there is a 10 outside the " maybe remove it don't se the use for it .. so

and add an } on the end
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

change msg
Last edited by Ofloo on Thu Aug 14, 2003 5:36 am, edited 2 times in total.
XplaiN but think of me as stupid
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Uhhh.. damn { thing :) My appologies.. I've forgot to add it.. ;(

I also don't think/see the use of the else's is a good ideea, but hey.. is your code.. do whatever you want with it and don't complain when it you've screwed it up :) kidding :lol:
Once the game is over, the king and the pawn go back in the same box.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

sorry saw it to late wanted to edit it hehe but .. :oops: noticed you allready replyed hehe

the msgges eh ;)
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

no its cause when the bot was opped it sad it needed ops .. so i figured it should be changed i mean the


msg

else

action

if you know what i mean but i gues my bot is stupid cause now its working fine .. :/
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

and indeeed its a greate idea why in the hell would you wana run the bot when its not opped suggestion maybe also do the tick tick tick thing i mean the putserv in front to show if the bot is opped cause if the bot joins an other chan with same script .. well lol that could give some strange effects if you know what i mean ..
XplaiN but think of me as stupid
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Did not crash this time but still error on restart
<Botman> [12:45] Tcl error [my:spin]: invalid command name "? "
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

u must have changed smething the code, i guess u have something like "[?" or u executed a command "?"

if u did any changes, include them in your post.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

euhm where in the script is a ? been used ?? can't seem to find one ..

can you show whats been changed ?
XplaiN but think of me as stupid
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Code: Select all

bind pub - !spin my:spin 

proc my:spin {nick host handle chan text} {
  putserv "PRIVMSG $chan :$nick  spins the wheel ... Round and round it goes ... Where it will point nobody knows ..." 
  putserv "PRIVMSG $chan :Where it will point nobody knows .... Tick Tick Tick ... Tick Tick ... Tick" 
  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 :And $nick gets a free kick out of here ... *snicker*"  
        putserv "KICK $chan $nick :Your free kick!" 
      } 
    } 
    "2" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        putserv "MODE $chan +b *!*@[lindex [split $host @] 1]" 
      } 
    } 
    "3" { 
      if {![botisop $chan]} { 
        putserv "PRIVMSG $chan :I'm not oped here so I can't give you your prise.." 
      } else { 
        set mask "*!*@[lindex [split $host @] 1]" 
        newchanban $chan $mask $::botnick "Here is your prise.. 10 mintes 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 :And $nick gets op in here.." 
        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 :One deop comming up! hehe" 
        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 :One -voice comming up!" 
        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 :One +voice comming up!" 
        putserv "MODE $chan +v $nick" 
      } 
    } 
  } 
} 


Thats the code
Locked