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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
mopar
Halfop
Posts: 87 Joined: Sat Oct 26, 2002 3:38 pm
Location: Grebbestad Sweden
Post
by mopar » Thu Jan 05, 2006 11:31 am
Hi,
First of all, I really don't know much about tcl coding i'm quite a n00b.
I would however like to have a small tcl to add on one of my bots that would work something like this.
If someone says the bots nick, and / or another specified word (not more than 2 in all) I would like the bot to reply with a short string.
If someone has the time and feel like it i would really apreciate if you could help me out.
Thanks in advance
mopar
It's never to late to give up..
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 05, 2006 1:24 pm
Code: Select all
set word "bla bla"
bind pubm - "#yourchan $botnick $word*" reply
proc reply {nick uhost hand chan arg} {
puthelp "privmsg $chan :hey $nick, I got your $::word"
}
Example:
<nick> botnick bla bla
<botnick> hey nick, I got your bla bla
mopar
Halfop
Posts: 87 Joined: Sat Oct 26, 2002 3:38 pm
Location: Grebbestad Sweden
Post
by mopar » Thu Jan 05, 2006 3:03 pm
Thank you Sir_Fz
I did not get it to work however, I saved the code into a file called "my.tcl" and added to the end of the bots conf.file
I changed your code to this;
set word "test"
bind pubm - "#testchannel $botnick $word*" reply
proc reply {nick uhost hand chan arg} {
puthelp "privmsg $chan :hey $nick, testreply $::word"
}
The bot load just fine, and i don't get a tcl error or anything, but on the other hand i don't get a reply either. What else do i need to change, and was i right by putting it in a file like is did.
Really soory for my stupid questions but I have never done anything but added already exsisting tcl's to my bots.
Apreciate the help
mopar
It's never to late to give up..
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 05, 2006 8:44 pm
The script worked fine for me, save it to my.tcl and put it in the scripts/ directory. In the .conf file add
and make sure your bot is on #testchannel and you type the text in the channel (not in private).
mopar
Halfop
Posts: 87 Joined: Sat Oct 26, 2002 3:38 pm
Location: Grebbestad Sweden
Post
by mopar » Fri Jan 06, 2006 12:11 pm
Ok thanks mate
/mopar
It's never to late to give up..