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.

Beginner in TCL...Question

Old posts that have not been replied to for several years.
Locked
m
mixx941

Beginner in TCL...Question

Post by mixx941 »

Hi guys. I'm trying to get into TCL scripting to write something very basic for my Eggdrop bot.

I'm not a huge fan of mIRC, but I could do it in mIRC scripting. I'm trying to make something for when someone does !something in the channel, it will output a predefined string like for example
<MIXX941> !hello
<Bot> Hi, how are you?
I've looked at some TCL scripts, and this is what I tried, but it didnt work at all

Code: Select all

set hitrigger "!hello"

proc hi { target } {
global hitrigger
putserv "privmsg #channel :Hi, how are you?"
}
This is probably the simplest thing next to "Hello World", but any help would be appreciated.

Thanks

-Mark
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

bind pub -|- !hello hi
proc hi {nick uhost hand chan text} {
 putserv "PRIVMSG $chan :Hi, how are you?"
}
m
mixx941

Post by mixx941 »

Is there something I need in the TCL script to start or end it? Right now I just have the TCL script being loaded and the code you put in it...but it does nothing when I do !hello.

Thanks
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

It worked for me. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
m
mixx941

Post by mixx941 »

Well I copied and pasted it directly, restarted/rehashed my eggdrop bot, and the command didnt return anything :-?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

[06:28] <Alchera> !hello
[06:28] <Bazza> Hi, how are you?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
m
mixx941

Post by mixx941 »

Nevermind, my bad. Bot must've been just laggy :roll:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

... and isn't that annoying? LOL
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked