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.

On text help

Old posts that have not been replied to for several years.
Locked
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

On text help

Post by isis123 »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Also, there already exist such scripts (ai).
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

...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
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

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 :(
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

ok is this correct?

Code: Select all


bind pub - <TRIGGERWORD> pub:homepage

proc pub:homepage { nick uhost handle channel arg } {
putserv "PRIVMSG $channel : <MSG TO CHANNEL>

}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

that is awesome :)

just put closing quotes (") at the end of [putserv] statement
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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