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.
Old posts that have not been replied to for several years.
-
teecee
- Voice
- Posts: 4
- Joined: Wed Apr 27, 2005 5:16 am
Post
by teecee »
Hey guys how would i modify this script so that instead of just notifing the one channel how do I make it msg every channel the bot is it
}
if { $pwf_playernumber == $pwf_maxpl } {
pwf_launchgame
set pwf_quality 0
} elseif { $pwf_playernumber > [expr $pwf_maxpl - $pwf_playerleft] } {
set pwf_playerneeded [expr $pwf_maxpl -$pwf_playernumber]
putserv "NOTICE $channel :[pwf_txt start5] $channel !! [pwf_txt separator2] $pwf_playerneeded [pwf_txt start6]"
}
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
replace
Code: Select all
putserv "NOTICE $channel :[pwf_txt start5] $channel !! [pwf_txt separator2] $pwf_playerneeded [pwf_txt start6]"
with
Code: Select all
foreach chan [channels] {
putserv "NOTICE $chan :[pwf_txt start5] $chan !! [pwf_txt separator2] $pwf_playerneeded [pwf_txt start6]"
}
-
teecee
- Voice
- Posts: 4
- Joined: Wed Apr 27, 2005 5:16 am
Post
by teecee »
Still errors
I will post the full section of that script
proc pwf_addme { nick uhost handle channel team } {
global pwf_teamaserver pwf_teambserver pwf_playernumber pwf_maxpl pwf_pickupchan pwf_active pwf_quality pwf_shutupchan pwf_playerleft
set channel [string tolower $channel]
if { $channel == $pwf_pickupchan } {
if { $pwf_shutupchan == 0 } {
if { $pwf_active == 1 } {
set team [string tolower $team]
set nick [pwf_charfilter $nick]
if { $team == "" } {
set numberteama [lsearch -exact $pwf_teamaserver $nick ]
set numberteamb [lsearch -exact $pwf_teambserver $nick ]
set ispresent [expr $numberteama + $numberteamb]
if { $ispresent == -2 } {
if { [llength $pwf_teambserver] < [llength $pwf_teamaserver] } {
set team b
} else {
set team a
}
} else {
putserv "NOTICE $nick :[pwf_txt addme1]"
return 0
}
}
if { $pwf_quality == 1 } {
if { ( [isvoice $nick $channel] ) || ( [isop $nick $channel] ) } {
if { ( [lsearch -exact $team a ] >-1 ) && ( [lsearch -exact $pwf_teamaserver $nick ] <0 ) && ( [llength $pwf_teamaserver] < [expr $pwf_maxpl/2] ) } {
set pwf_teamaserver [linsert $pwf_teamaserver end $nick ]
if {[lsearch -exact $pwf_teambserver $nick ] >-1 } {
set playerindex [lsearch -exact $pwf_teambserver $nick ]
set pwf_teambserver [lreplace $pwf_teambserver $playerindex $playerindex ]
}
set pwf_playernumber [expr [llength $pwf_teamaserver]+[llength $pwf_teambserver]]
pwf_settopic
} elseif { ( [lsearch -exact $team b] >-1 ) && ( [lsearch -exact $pwf_teambserver $nick ] <0 ) && ( [llength $pwf_teambserver] < [expr $pwf_maxpl/2] ) } {
set pwf_teambserver [linsert $pwf_teambserver end $nick ]
if {[lsearch -exact $pwf_teamaserver $nick ] >-1 } {
set playerindex [lsearch -exact $pwf_teamaserver $nick ]
set pwf_teamaserver [lreplace $pwf_teamaserver $playerindex $playerindex ]
}
set pwf_playernumber [expr [llength $pwf_teamaserver]+[llength $pwf_teambserver]]
pwf_settopic
} else {
putserv "NOTICE $nick :[pwf_txt addme1]"
}
if { $pwf_playernumber == $pwf_maxpl } {
pwf_launchgame
set pwf_quality 0
} elseif { $pwf_playernumber > [expr $pwf_maxpl - $pwf_playerleft] } {
set pwf_playerneeded [expr $pwf_maxpl -$pwf_playernumber]
putserv "NOTICE $channel :[pwf_txt start5] $channel !! [pwf_txt separator2] $pwf_playerneeded [pwf_txt start6]"
}
} else {
putserv "NOTICE $nick :[pwf_txt addme2]"
}
} elseif { $pwf_quality == 0 } {
if { ( [lsearch -exact $team a ] >-1 ) && ( [lsearch -exact $pwf_teamaserver $nick ] <0 ) && ( [llength $pwf_teamaserver] < [expr $pwf_maxpl/2] ) } {
set pwf_teamaserver [linsert $pwf_teamaserver end $nick ]
if {[lsearch -exact $pwf_teambserver $nick ] >-1 } {
set playerindex [lsearch -exact $pwf_teambserver $nick ]
set pwf_teambserver [lreplace $pwf_teambserver $playerindex $playerindex ]
}
set pwf_playernumber [expr [llength $pwf_teamaserver]+[llength $pwf_teambserver]]
pwf_settopic
} elseif { ( [lsearch -exact $team b] >-1 ) && ( [lsearch -exact $pwf_teambserver $nick ] <0 ) && ( [llength $pwf_teambserver] < [expr $pwf_maxpl/2] ) } {
set pwf_teambserver [linsert $pwf_teambserver end $nick ]
if {[lsearch -exact $pwf_teamaserver $nick ] >-1 } {
set playerindex [lsearch -exact $pwf_teamaserver $nick ]
set pwf_teamaserver [lreplace $pwf_teamaserver $playerindex $playerindex ]
}
set pwf_playernumber [expr [llength $pwf_teamaserver]+[llength $pwf_teambserver]]
pwf_settopic
} else {
putserv "NOTICE $nick :[pwf_txt addme1]"
}
if { $pwf_playernumber == $pwf_maxpl } {
pwf_launchgame
} elseif { $pwf_playernumber > [expr $pwf_maxpl - $pwf_playerleft] } {
set pwf_playerneeded [expr $pwf_maxpl - $pwf_playernumber]
putserv "NOTICE $channel :[pwf_txt start5] $channel !! [pwf_txt separator2] $pwf_playerneeded [pwf_txt start6]"
}
}
} else {
putserv "NOTICE $nick :[pwf_txt addme3]"
}
} else {
putserv "NOTICE $nick :[pwf_txt addme4]"
}
}
}
set pwf_reply(start6) "more player(s) needed !!"
so basicly start6 is where it says it in the channel
-
De Kus
- Revered One
- Posts: 1361
- Joined: Sun Dec 15, 2002 11:41 am
- Location: Germany
Post
by De Kus »
there is a
Code: Select all
tag for that *sigh*
btw. "not working" is not error description, I am surely wont look into a non-formated code for errors without a hint.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...