egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help on a greeting script.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
BigBen
Voice


Joined: 07 Oct 2006
Posts: 21

PostPosted: Sun Nov 05, 2006 12:28 pm    Post subject: help on a greeting script. Reply with quote

i need help on making a eggdrop script, like

on *:TEXT:*!Commands*:#: { //msg $nick Hello, to get commands.

then etc.
Back to top
View user's profile Send private message
kris
Voice


Joined: 12 Sep 2006
Posts: 14
Location: Perth, Australia

PostPosted: Sun Nov 05, 2006 12:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sun Nov 05, 2006 2:04 pm    Post subject: Reply with quote

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.

Code:
putquick


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
View user's profile Send private message
starpossen
Op


Joined: 10 Jan 2006
Posts: 139

PostPosted: Thu Dec 14, 2006 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber