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 

Announce: Jokes.tcl Script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Nov 25, 2006 5:27 am    Post subject: Announce: Jokes.tcl Script Reply with quote

Just something I threw together in about half an hour, because I wanted a jokes script that would allow me to have a delay between parts for multi-part jokes.

Desc:
Pulls a random joke from a file and spits it out in channel. If you format jokes with a semi-colon seperator, it'll add a small delay to the subsequent parts of a joke (for like, Have you heard about? type jokes) Lines can have more than 1 seperator.

Example: What do you call two butches bonding?;Hockey night in Canada.
The second part ("Hockey night in Canada") will be shown after the delay.

If there is no semi-colon seperator, then the entire joke on one line will be shown. Joke length per line is limited by your IRCD's line length (generally 400 chars long.)

http://members.dandy.net/~fbn/jokes.tcl.txt
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Nov 25, 2006 7:49 pm    Post subject: v0.1b Reply with quote

Minor update to shuffle the jokes when loading them so it produces more random output.
Back to top
View user's profile Send private message
gasak
Halfop


Joined: 09 Aug 2010
Posts: 45

PostPosted: Thu Jun 16, 2011 10:19 am    Post subject: Reply with quote

hi rosc2112,

tried your tcl but got hopeless about the way to set the jokes files.. I already set the jokes file format: "/eggdrop/jokes.txt" but when i load it always says "Jokes.tcl: No joke file found. Not binding command.."

what kind of format then should i put for the file destination? please help.

Thanks.
_________________
Learning Knows No Boundaries!!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Jun 16, 2011 11:05 am    Post subject: Reply with quote

Presumably you didn't specify the correct path to the file to get that error. I also assume you're running eggdrop under a unix-like system because I don't do windoze and windoze doesn't understand [file exists] type language AFAIR.

Also note I haven't run an eggdrop for quite a few years so I have no way to debug errors any longer.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jun 16, 2011 12:41 pm    Post subject: Reply with quote

Just a comment or two;
file exists (along with the other file commands) works perfectly well under windows - assuming you provide a proper file and pathname. One thing to look out for under windows-systems, is that the directory separator symbol (\) is used for escape-sequences; thus it must be escaped, or escape-substitutions must be avoided.

But, as rosc said, doublecheck the jokefile setting, especially the path. If you start the path using a /, this would be an absolute path "starting" from the root filesystem. If you installed your eggdrop in your own home directory, the setting should probably be "eggdrop/jokes.txt" rather than "/eggdrop/jokes.txt".
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
gasak
Halfop


Joined: 09 Aug 2010
Posts: 45

PostPosted: Thu Jun 16, 2011 10:43 pm    Post subject: Reply with quote

thanks for the advice nml375. It was able to read the file now, but then have another problem. I got several line of jokes on file jokes.txt, but when i type .joke on pub it only shows the first line joke. Tried typing .joke again and still keep showing the same line joke. Its suppose to show the entire jokes that i have in file right?

Please advice.
_________________
Learning Knows No Boundaries!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
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