| View previous topic :: View next topic |
| Author |
Message |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Tue Sep 06, 2005 5:22 pm Post subject: On text help |
|
|
Hello, IŽd like my eggdrop to say a certain message into a channel if an user writes a keyword. For instance he writes "hi "and the eggdrop says a certain message (like: hi, how are you?)
Can someone please help me? Thanks so much. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Sep 06, 2005 5:31 pm Post subject: |
|
|
try to help yourself by reading all-you-need-to-know-about-eggdrop-scripting file named tcl-commands.doc, included with eggdrop
hints: pay attention to [bind] command, which allows you to set up triggers that will be fired up on events like, for example, saying something on channel
more hints: you need to use [bind pubm] and [putserv]
(if you don't know Tcl, you should take some time off posting here and learn some Tcl basics) |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Sep 06, 2005 9:41 pm Post subject: |
|
|
| ...and there is even AI (artificial intelligence) module called MegaHAL, which supposedly tries to make the bot to look 'smarter' by learning (automatically adding) new phrases to bot's dictionary |
|
| Back to top |
|
 |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Wed Sep 07, 2005 1:31 am Post subject: |
|
|
yes, but i am slowly sick of being referred to tuts. whats a forum then for? can someone write it here? shouldnt be to hard to copy it out of your scripts. thanks  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Sep 07, 2005 2:15 am Post subject: |
|
|
well, let us see... did you even bother to look at [bind]'s description in tcl-commands.doc? if so, what exactly is it you didn't understand? what about [putserv]? I bet you did not
I, for one, won't write a single line of code for a person who is not willing to do a minimal effort to also help themselves (and I suspect that handful of people who contribute code for these forums feel the same way) - if you are sick of this, I feel sorry for you but that's that |
|
| Back to top |
|
 |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Wed Sep 07, 2005 6:49 pm Post subject: |
|
|
ok is this correct?
| Code: |
bind pub - <TRIGGERWORD> pub:homepage
proc pub:homepage { nick uhost handle channel arg } {
putserv "PRIVMSG $channel : <MSG TO CHANNEL>
}
|
|
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Sep 07, 2005 9:01 pm Post subject: |
|
|
that is awesome
just put closing quotes (") at the end of [putserv] statement |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Sep 08, 2005 6:32 am Post subject: |
|
|
and note that the current example will beging with a space, just in case it matters ^-^. The text should start right after the ":". _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|