egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help me please
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Sun Apr 02, 2006 4:39 pm    Post subject: help me please Reply with quote

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:
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]
}
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Apr 02, 2006 5:10 pm    Post subject: Reply with quote

this sounds more like a idle bot and not a funbot.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Sun Apr 02, 2006 5:27 pm    Post subject: Reply with quote

yes this is a funbot with a idle script and more fun scripts like bomb and fok
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Apr 02, 2006 6:50 pm    Post subject: Reply with quote

Change
Code:
if {[string first # [set c [lindex [split $arg] 0]]] == 0} {
 channel add $c
 timer 1 [list check:idle $nick $::yourchan $c]
}

to
Code:
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]
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 12:20 pm    Post subject: Reply with quote

Thnx Laughing Laughing

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!
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Mon Apr 03, 2006 12:38 pm    Post subject: Reply with quote

Code:
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
Back to top
View user's profile Send private message MSN Messenger
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 12:44 pm    Post subject: Reply with quote

Tosser^^
Thnx man Razz Razz
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 12:52 pm    Post subject: Reply with quote

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 #.

????
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 03, 2006 12:57 pm    Post subject: Reply with quote

Code:
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]
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 1:06 pm    Post subject: Reply with quote

sorry not working when i typ !idle #qstat


Code:
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]
}
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 03, 2006 2:37 pm    Post subject: Reply with quote

That code will not work ofcourse, use:
Code:
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 Razz
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Thu Apr 06, 2006 5:46 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 2:42 pm    Post subject: Reply with quote

oke sorry but THNX
Back to top
View user's profile Send private message Visit poster's website
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Mon Apr 03, 2006 3:19 pm    Post subject: Reply with quote

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
????
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 03, 2006 5:39 pm    Post subject: Reply with quote

You probably used a lame editor when pasting the code, try pico instead.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Apr 04, 2006 9:08 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber