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.

one command all x sek.

Old posts that have not been replied to for several years.
Locked
s
sever
Voice
Posts: 9
Joined: Sat Mar 27, 2004 8:04 pm

one command all x sek.

Post by sever »

set colist "#sever"
bind pub - !help proc_help
proc proc_help {nick host hand chan text} {
global pro
if {[string match *[string tolower $chan]* $::colist] && [botisop $chan] && $nick!=$::botnick} {
if {pro = "on"} { return 0 }
putserv "PRIVMSG $chan :» \037\002h\002elp:\037 !rank ¬ !server ¬ !bot ¬ more coming soon"
set pro on
timer 10 "unset pro"
}
}
that doesnt work.

ich have read http://peterre.com/characters.html but i dont undestandt it! :(

please help

thanks
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Change the:

Code: Select all

if {pro = "on"} { return 0 }
to:

Code: Select all

if {$pro = "on"} { return 0 }
:P
Xpert.
User avatar
CrazyCat
Revered One
Posts: 1253
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

hum....

Code: Select all

if {$pro == "on"} { return 0 }
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Yeah, forgot one '=' :mrgreen:
Xpert.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

if {[string match *[string tolower $chan]* $::colist] && [botisop $chan] && $nick!=$::botnick} {
If you intend to use just on channel in the colist variable then use the folowing code:

Code: Select all

if {[string equal -nocase $chan $::colist] && [botisop $chan] && ![string equal -nocase $nick $::botnick]} {
else replace the "equal" with "match" and put $chan in "*$chan*" Also.. will be a lot smater if you move the nick check thing outside and before this if like. There is no reason to use that chek at the end. Either place it first or ad another if before this one that will do an return or what you want. Same thing goes with the if the bot is op check. :)
Once the game is over, the king and the pawn go back in the same box.
s
sever
Voice
Posts: 9
Joined: Sat Mar 27, 2004 8:04 pm

Post by sever »

set colist "#sever"
bind pub - !help proc_help
proc proc_help {nick host hand chan text} {
global pro
if {[string equal -nocase $chan $::colist] && [botisop $chan] && ![string equal -nocase $nick $::botnick]} {
if {$pro == "on"} { return 0 }
putserv "PRIVMSG $chan :» \037\002h\002elp:\037 !rank ¬ !server ¬ !bot ¬ more coming soon"
set pro on
timer 10 "unset pro"
}
}
doesnt work

Tcl error [proc_help]: can't read "pro": no such variable

i have .restart the eggdrop, but it doesnt work. :)
s
sever
Voice
Posts: 9
Joined: Sat Mar 27, 2004 8:04 pm

Post by sever »

set colist "#sever"
bind pub - !help proc_help
proc proc_help {nick host hand chan text} {
global pro
if {[string match *[string tolower $chan]* $::colist] && [botisop $chan] && ![string match *[string tolower $chan]* $::botnick]} {
if {![info exists ::pro]} {
putserv "PRIVMSG $chan :» \037\002h\002elp:\037 !rank !server !bot more coming soon"
} else { return 0 }
set ::pro "on"
timer 5 "
  • "
    }
    }
that works, a friend has help me! :)

thx
Locked