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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Sun Apr 02, 2006 4:39 pm
hello i have a funbot
When somebody typ this in the chan !idle #chan the bot goes to the channel.
But the bot must say if someone twice asked !idle #chan sorry i Error: I'm already there!
and when de bot is on 20 chan he must say this Error: I'm on 20/20 chans - Please try again later!
thnx
this is a script that i have founded .
Thnx
Code: Select all
set yourchan "#chan1"
bind pub - !idle idle:chan
proc idle:chan {nick uhost hand chan arg} {
if {![string equal -nocase $::yourchan $chan]} { return 0 }
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
}
proc check:idle {n yc c} {
if {![onchan $n $yc]} {
if {[validchan $c]} {
channel remove $c
}
return 0
}
timer 1 [list check:idle $n $yc $c]
}
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Sun Apr 02, 2006 5:10 pm
this sounds more like a idle bot and not a funbot.
r0t3n @ #r0t3n @ Quakenet
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Sun Apr 02, 2006 5:27 pm
yes this is a funbot with a idle script and more fun scripts like bomb and fok
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Apr 02, 2006 6:50 pm
Change
Code: Select all
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
to
Code: Select all
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
if {[validchan $c]}} {
puthelp "privmsg $chan :Error: I'm already there!"
} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
}
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 12:20 pm
Thnx
But one more question
can you make it .
and when de bot is on 20 chan he must say this Error: I'm on 20/20 chans - Please try again later!
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Mon Apr 03, 2006 12:38 pm
Code: Select all
set yourchan "#chan"
bind pub - !idle idle:chan
proc idle:chan {nickname hostname handle channel text} {
if {![string match -nocase "$::yourchan" "$channel"]} { return }
set chan [lindex [split $text] 0]
if {$chan == ""} {
putserv "NOTICE $nickname :Usage: $::lastbind #channel."
} elseif {[string first # $chan] == "0"} {
putserv "NOTICE $nickname :Error: Channel name must start with #."
} elseif {[validchan $chan]} {
putserv "NOTICE $nickname :Error: Im already on $chan."
} elseif {[llength [channels]] >= 20} {
putserv "NOTICE $nickname :Error: Im on 20/20 chans."
} else {
channel add $chan
utimer 60 [list check:idle $nick $::yourchan $chan]
}
}
r0t3n @ #r0t3n @ Quakenet
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 12:44 pm
Tosser^^
Thnx man
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 12:52 pm
when i typ !idle #qstat
bot gives everey time this
^Fun-Bot^ Error: Channel name must start with #.
i typ !idle #trivia.nl the same answer
^Fun-Bot^ Error: Channel name must start with #.
????
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Apr 03, 2006 12:57 pm
Code: Select all
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
if {[llength [channels]] >= 20} {
puthelp "privmsg $chan :Error: I'm on 20/20 chans."
} elseif {[validchan $c]} {
puthelp "privmsg $chan :Error: I'm already there!"
} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
}
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 1:06 pm
sorry not working when i typ !idle #qstat
Code: Select all
set yourchan "#trivia.nl"
bind pub - !idle idle:chan
proc idle:chan {nick uhost hand chan arg} {
if {![string equal -nocase $::yourchan $chan]} { return 0 }
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
if {[llength [channels]] >= 20} {
puthelp "privmsg $chan :Error: I'm on 20/20 chans."
} elseif {[validchan $c]}} {
puthelp "privmsg $chan :Error: I'm already there!"
} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
}
proc check:idle {n yc c} {
if {![onchan $n $yc]} {
if {[validchan $c]} {
channel remove $c
}
return 0
}
timer 1 [list check:idle $n $yc $c]
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Apr 03, 2006 2:37 pm
That code will not work ofcourse, use:
Code: Select all
set yourchan "#trivia.nl"
bind pub - !idle idle:chan
proc idle:chan {nick uhost hand chan arg} {
if {![string equal -nocase $::yourchan $chan]} { return 0 }
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
if {[llength [channels]] >= 20} {
puthelp "privmsg $chan :Error: I'm on 20/20 chans."
} elseif {[validchan $c]} {
puthelp "privmsg $chan :Error: I'm already there!"
} {
channel add $c
timer 1 [list check:idle $nick $::yourchan $c]
}
}
}
proc check:idle {n yc c} {
if {![onchan $n $yc]} {
if {[validchan $c]} {
channel remove $c
}
return 0
}
timer 1 [list check:idle $n $yc $c]
}
Next time, check your braces' balance.
Edit: Removed extra brace, ironically it was nearly the same mistake from the previous post
Last edited by
Sir_Fz on Thu Apr 06, 2006 5:46 pm, edited 3 times in total.
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 2:42 pm
oke sorry but THNX
whiteshark
Halfop
Posts: 62 Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:
Post
by whiteshark » Mon Apr 03, 2006 3:19 pm
sorry Sir_Fz
but i have this error
(file "scripts/idlechan.tcl" line 17)
invoked from within
"source scripts/idlechan.tcl"
scripts/idlechan.tcl: ASCII text, with CRLF line terminators
line: cannot open (line)
17: cannot open (17)
its the script something its wrong
????
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Apr 03, 2006 5:39 pm
You probably used a lame editor when pasting the code, try pico instead.
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Apr 04, 2006 9:08 pm
amstelbier wrote: sorry Sir_Fz
but i have this error
(file "scripts/idlechan.tcl" line 17)
invoked from within
"source scripts/idlechan.tcl"
scripts/idlechan.tcl: ASCII text, with CRLF line terminators
line: cannot open (line)
17: cannot open (17)
its the script something its wrong
????
You cannot use Word/Wordpad to edit Unix format files but you may use Notepad as it does not insert non-standard characters with carriage returns.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM