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.
Old posts that have not been replied to for several years.
Thunderdome
Op
Posts: 187 Joined: Tue Mar 15, 2005 4:42 pm
Post
by Thunderdome » Wed Apr 20, 2005 11:49 am
Code: Select all
set bnick "bot"
set frases {
{egghelp rules!}
}
bind pub - "$bnick" pub_falar
proc pub_falar {nick uhost hand chan text} {
global frases
set frasedizer [lindex $frases [rand [llength $frases]]]
putserv "PRIVMSG $chan :1»4»5 $nick 4«1«:2 $frasedizer"
}
This is a nice script for making the egg talk when someone speaks his name... but only works even his name is in the beggining of the sentence. how can I change it in order to work for the name in any place of a sentence?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Apr 20, 2005 1:32 pm
change bind pub - "$bnick" pub_falar to bind pubm - "* $bnick *" pub_falar
Thunderdome
Op
Posts: 187 Joined: Tue Mar 15, 2005 4:42 pm
Post
by Thunderdome » Wed Apr 20, 2005 1:53 pm
erm... I tough of that too....
now it just replies when someone types
Perhaps it is another way...
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Apr 20, 2005 2:19 pm
No, this should reply on "<whatever> bnick <whatever>" so '*' is considered <whatever> too.
Thunderdome
Op
Posts: 187 Joined: Tue Mar 15, 2005 4:42 pm
Post
by Thunderdome » Wed Apr 20, 2005 2:33 pm
erm... weird, but now it works...
perhaps I had copied it wrong or something...
by the way, why pubm and not just pub?
Thanks a lot for the help!
/me throws a cold beer!
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Apr 20, 2005 8:52 pm
Read tcl-commands.doc (/doc dir in your eggdrop's dir) about pub and pubm.