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.
NoFear
Halfop
Posts: 46 Joined: Wed Sep 10, 2003 8:36 am
Location: cW
Post
by NoFear » Mon Oct 06, 2003 12:16 pm
Hi!
This is my first script, but it doesn't work.. i youst don't know what the problem is.
Code: Select all
###############################
# .:[H-Town Team]:. #
# .:[JoinGreet Script]:. #
# #
###############################
#
# Vpiši pozdravni text.
set text "Text"
set text2 "Text2"
# Nastavi kanale na katerih bo deloval greet. ( "" Za vse kanale ali #Kanal1, #kanal2)
set chans "#Kanal1 #Kanal2"
# Od tu naprej ne spreminjaj nic!
bind join - pozdrav
proc pozdrav {nick args chan} {
global chans botnick
if {![validchan $chans] && ![botonchan $chans]} {
putserv "NOTICE $nick : $Text"
putserv "NOTICE $nick : $Text2"
}
return 0
}
putlog "H-Town Team JoinGreet Script Loaded"
Please help me
thanks
Way Away From Here..
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Mon Oct 06, 2003 12:38 pm
maybe this will work
Code: Select all
set text1 "Text"
set text2 "Text2"
set poz_chans "#Kanal1 #Kanal2"
bind join -|- * pozdrav
proc pozdrav {nick uhost handle channel} {
global botnick poz text1 text2
set chan [string tolower $channel]
if {![info exists poz($chan)]} {return 0}
if {![botisop $chan]} {return 0}
putserv "NOTICE $nick : $text1 "
putserv "NOTICE $nick : $text2 "
return 0
}
if {$poz_chans != ""} {
foreach chan [string tolower $poz_chans] {
set poz([string tolower $chan]) 1
}
}
I once was an intelligent young man, now i am old and i can not remember who i was.
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Mon Oct 06, 2003 12:47 pm
i just edited
"putserv "NOTICE $nick : $Text1 "
to "putserv "NOTICE $nick : $text1 "
btw, I would be nice if you changed your avatar.
I once was an intelligent young man, now i am old and i can not remember who i was.
NoFear
Halfop
Posts: 46 Joined: Wed Sep 10, 2003 8:36 am
Location: cW
Post
by NoFear » Mon Oct 06, 2003 2:30 pm
Ok i changed my avatar to nothing
hm.. nope doesn't works :/
Way Away From Here..
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Oct 06, 2003 2:36 pm
or simpler would be:
Code: Select all
set text1 "Text"
set text2 "Text2"
set poz_chans "#Kanal1 #Kanal2"
bind join - * pozdrav
proc pozdrav {nick uhost hand chan} {
global poz_chans text text2
if {[lsearch -exact $poz_chans $chan] == -1} {return 0}
putserv "NOTICE $nick :$Text1"
putserv "NOTICE $nick :$Text2"
}
if you want the bot to greet only if its oped then add
|| ![botisop $chan] in the if statement.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Oct 06, 2003 3:07 pm
the:
Code: Select all
if {[lsearch -exact $poz_chans $chan] == -1} {return 0}
should be:
Code: Select all
if {[lsearch -exact [strlwr $poz_chans] [strlwr $chan]] == -1} {return 0}
just due the lower and upper names of the channels. Observere:
(caesar) .tcl set text "moo bla oink" ; lsearch -exact $text "BLA"
(moo) Tcl: -1
(caesar) .tcl set text "moo bla oink" ; lsearch -exact $text "bla"
(moo) Tcl: 1
Once the game is over, the king and the pawn go back in the same box.
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Mon Oct 06, 2003 3:10 pm
CaSe SeNsTiVe?
I once was an intelligent young man, now i am old and i can not remember who i was.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Oct 06, 2003 3:12 pm
ExAcTlY!
Once the game is over, the king and the pawn go back in the same box.
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Mon Oct 06, 2003 3:24 pm
NoFear, was your bot an OP when you tried my code?
I once was an intelligent young man, now i am old and i can not remember who i was.
NoFear
Halfop
Posts: 46 Joined: Wed Sep 10, 2003 8:36 am
Location: cW
Post
by NoFear » Tue Oct 07, 2003 11:13 am
yes he had op. no this don't work.. :/
Way Away From Here..
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Oct 07, 2003 1:46 pm
they should work. do you .rehash or .restart when you load the script ?
NoFear
Halfop
Posts: 46 Joined: Wed Sep 10, 2003 8:36 am
Location: cW
Post
by NoFear » Tue Oct 07, 2003 2:17 pm
yes i do but there is some error "there is no such variable text1" something like that.
Way Away From Here..
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Oct 07, 2003 4:41 pm
Umm.. yes.. the:
Code: Select all
putserv "NOTICE $nick :$Text1"
putserv "NOTICE $nick :$Text2"
lines.. change them to something that suits your needs.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Oct 08, 2003 10:01 am
NoFear wrote: Hi!
This is my first script, but it doesn't work.. i youst don't know what the problem is.
Code: Select all
###############################
# .:[H-Town Team]:. #
# .:[JoinGreet Script]:. #
# #
###############################
#
# Vpiši pozdravni text.
set text "Text"
set text2 "Text2"
[snip]
[snip]
you forgot to change text to text1 as we did in our codes.
NoFear
Halfop
Posts: 46 Joined: Wed Sep 10, 2003 8:36 am
Location: cW
Post
by NoFear » Wed Oct 08, 2003 12:09 pm
no i have changed it
Way Away From Here..