| View previous topic :: View next topic |
| Author |
Message |
BigBen Voice
Joined: 07 Oct 2006 Posts: 21
|
Posted: Sun Nov 05, 2006 12:28 pm Post subject: help on a greeting script. |
|
|
i need help on making a eggdrop script, like
on *:TEXT:*!Commands*:#: { //msg $nick Hello, to get commands.
then etc. |
|
| Back to top |
|
 |
kris Voice

Joined: 12 Sep 2006 Posts: 14 Location: Perth, Australia
|
Posted: Sun Nov 05, 2006 12:37 pm Post subject: |
|
|
i hope you know thats mIRC not TCL.
this is TCL
| Code: |
bind pub "-|-" !commands msg_command
proc msg_command { nick chan host handle text } {
putquick "NOTICE $nick :TEXT"
}
|
that'll work, but its not hard, ill explain for you.
bind = tells the eggdrop that a command is starting.
proc = starts the command.
putquick = makes it start the text in ""
} = close' it, im not to good at explaining, but i know what it does, just search on google and you will learn, also these people here are also good to read scripts, they know their stuff. _________________ KrisDC Eggdrop Services - 2006 |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Nov 05, 2006 2:04 pm Post subject: |
|
|
| Code: | bind pub -|- !commands msg_command
proc msg_command {nick host handle chan text} {
putquick "NOTICE $nick :TEXT"
} |
Insert proper indenting.
Explaining it abit better..
| Code: | | bind pub -|- !commands msg_command |
This makes an internal 'bind' to pub (PUBLIC) with flags -|- (which means anyone). The command the bot needs to watch for is "!commands" in this case, and if the bot finds this command, it should send the data to the handler 'msg_command'.
| Code: | | proc msg_command { nick chan host handle text } { |
This is the start of our handler (AKA Procedure).
We start with the name of the handler so TCL knows what you mean when you call it later.
"nick host handle chan text" are the handler arguments, these are filled in by eggdrop.
These should be fairly self-explaining.
putquick is simply a procedure (handler) to send something to the queue.
An IRC command generally comes after this, such as notice in the example.
NOTE: You MUST always end with as much closing braces/brackets (}/]) as you start.
For example
if {$bla} {
return 1
} |
|
| Back to top |
|
 |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Thu Dec 14, 2006 6:15 pm Post subject: |
|
|
Kinda old topic but is there anyway to modify it like only reacting in a specific
channel, and also make it not notice voiced users and above? |
|
| Back to top |
|
 |
|