| View previous topic :: View next topic |
| Author |
Message |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Nov 25, 2006 5:27 am Post subject: Announce: Jokes.tcl Script |
|
|
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 |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Nov 25, 2006 7:49 pm Post subject: v0.1b |
|
|
| Minor update to shuffle the jokes when loading them so it produces more random output. |
|
| Back to top |
|
 |
gasak Halfop
Joined: 09 Aug 2010 Posts: 45
|
Posted: Thu Jun 16, 2011 10:19 am Post subject: |
|
|
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 |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Jun 16, 2011 11:05 am Post subject: |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Jun 16, 2011 12:41 pm Post subject: |
|
|
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 |
|
 |
gasak Halfop
Joined: 09 Aug 2010 Posts: 45
|
Posted: Thu Jun 16, 2011 10:43 pm Post subject: |
|
|
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 |
|
 |
|