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.
Help for those learning Tcl or writing their own scripts.
-
sdays
- Halfop
- Posts: 98
- Joined: Sat Oct 21, 2006 4:46 am
Post
by sdays »
i made this my self but when i type: !ascii test it wont msg the channel any thing.. dose any one know what it could be?
Code: Select all
set ascii_dir "scripts/db/ascii"
bind pub - "!ascii*" proc:ascii
proc proc:ascii {nick uhost handle chan arg} {
global botnick ascii ascii_msg asciifile
set ascii_msg [ascii]
set asciifile [lindex $arg 0]
putserv "PRIVMSG $chan :[ascii]"
}
proc ascii {} {
global ascii_dir ascii_file
set asciifile $ascii_file
set file [open "$ascii_dir/$ascii_file" r]
set data [split [read $file] \n]
close $file
}
-
Alchera
- Revered One
- Posts: 3344
- Joined: Mon Aug 11, 2003 12:42 pm
- Location: Ballarat Victoria, Australia
-
Contact:
Post
by Alchera »
Post the results of ".set errorInfo".
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
-
sdays
- Halfop
- Posts: 98
- Joined: Sat Oct 21, 2006 4:46 am
Post
by sdays »
Alchera wrote:Post the results of ".set errorInfo".
This is all i get:
Code: Select all
<sdays> .set errorInfo
<Evi1Bot> [10:35] #sdays# set errorInfo
<Evi1Bot> Currently:
-
r0t3n
- Owner
- Posts: 507
- Joined: Tue May 31, 2005 6:56 pm
- Location: UK
Post
by r0t3n »
The ascii proc returns nothing, it just opens a file and catchs data, but nothing is returned.
Try this:
Code: Select all
set ascii_dir "scripts/db/ascii"
bind pub - "!ascii*" proc:ascii
proc proc:ascii {nick uhost handle chan arg} {
global botnick ascii ascii_msg asciifile
set ascii_msg "[ascii]"
set asciifile [lindex $arg 0]
putserv "PRIVMSG $chan :[ascii]"
}
proc ascii {} {
global ascii_dir ascii_file
set asciifile $ascii_file
set file [open "$ascii_dir/$ascii_file" r]
set data [read -nonewline $file]
close $file
return "[split $data \n]"
}
r0t3n @ #r0t3n @ Quakenet
-
sdays
- Halfop
- Posts: 98
- Joined: Sat Oct 21, 2006 4:46 am
Post
by sdays »
ok that works but i want it to play it like mirc dose /play #channel test.txt
i want to changs this:
<sdays> !ascii test.txt
<Evi1Bot> test test1 test2
to:
<Evi1Bot> test
<Evi1Bot> test1
<Evi1Bot> test2
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
I guess you mean 'test' as a complete line?
Code: Select all
set ascii_dir "scripts/db/ascii"
bind pub - !ascii proc:ascii
proc proc:ascii {nick uhost handle chan arg} {
set asciifile [lindex [split $arg] 0]
foreach l [ascii $asciifile] {
puthelp "PRIVMSG $chan :$l"
}
}
proc ascii f {
global ascii_dir
if {![file exists $ascii_dir/$f]} {return ""}
set file [open "$ascii_dir/$f" r]
set data [split [read $file] \n]
close $file
set data
}
-
KaL-eL
- Voice
- Posts: 3
- Joined: Sat Sep 15, 2007 9:45 am
Post
by KaL-eL »
is it possible to make a delay between those lines? if possible, how can I do it?

-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
KaL-eL wrote:is it possible to make a delay between those lines? if possible, how can I do it?

Create your own queue but IMO puthelp should be slow enough.
-
KaL-eL
- Voice
- Posts: 3
- Joined: Sat Sep 15, 2007 9:45 am
Post
by KaL-eL »
actually i want my bot to read those lines in a 6-7 sec. delay. should I use sth else instead of puthelp? what is your suggestion

-
awyeah
- Revered One
- Posts: 1580
- Joined: Mon Apr 26, 2004 2:37 am
- Location: Switzerland
-
Contact:
Post
by awyeah »
You can try this script and create your own delayed queue with this.
Queues
This is a utility for script developers. It allows you to create more queues so that you aren't limited by just three queues.
Download the script from:
http://barkerjr.net/pub/irc/eggdrop/Scr ... cl.tar.bz2
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
-
KaL-eL
- Voice
- Posts: 3
- Joined: Sat Sep 15, 2007 9:45 am
Post
by KaL-eL »
thank you very much and pardon me if I haven't searched enough
