| View previous topic :: View next topic |
| Author |
Message |
noobie10111 Voice
Joined: 23 Sep 2014 Posts: 1
|
Posted: Tue Sep 23, 2014 12:27 am Post subject: Simple trigger script |
|
|
Hey all, I'm really new to this
I have my eggdrop up and running thankfully
I'm looking for a script so if someone types !ts it prints back the ip of my ts server, e.g. 244.244.244.244
It could be anything really just so I can get the syntax for a simple trigger response
I've browsed through alot of the pages but can't find anything
Would really appreciate the help, thanks |
|
| Back to top |
|
 |
Get_A_Fix Master

Joined: 07 May 2005 Posts: 206 Location: New Zealand
|
Posted: Tue Sep 23, 2014 8:10 am Post subject: |
|
|
The answers you seek are inside the eggdrop directory, inside doc. It's a file called tcl-commands.doc - which explains all of the commands and events you can use. Have a read of this and this? _________________ We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
|
| Back to top |
|
 |
AlphaTech Voice
Joined: 23 Jul 2014 Posts: 12 Location: New York, USA
|
Posted: Tue Oct 07, 2014 5:12 pm Post subject: Reply |
|
|
heres a simple script that does exactly what you want
| Code: |
#set what you want the command to be below.
set command !example_command
#set what you want it to say below
set message Sample Message
#No need to edit below this line
bind pubm - "$command" my_simple_script
proc my_simple_script {nick uhost handle chan text} {putquick "privmsg $chan :$message"} |
Don't forget to edit those variables up there! Once your done just put it in a .tcl file a drop it in your scripts directory. In your eggdrop.conf add that .tcl file and your done! Enjoy! |
|
| Back to top |
|
 |
Get_A_Fix Master

Joined: 07 May 2005 Posts: 206 Location: New Zealand
|
Posted: Thu Oct 09, 2014 9:21 am Post subject: Re: Reply |
|
|
Just a couple of things;
Firstly, the set command is fine, but with set message, you'd want to brace your text string with "" .. like
| Code: | | set message "this is a message text" |
Secondly, for a pub bind, the proper arguments are | Code: | | {nick uhost hand chan arg} { |
Instead of using "" in the bind, you can just do
You also forgot to declare the message as a global var, within the proc, otherwise it will error as $message can't be read.
or you can not declare, like you did, and call it using
You're still learning, so it's good to try many different methods then find what works best. _________________ We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals. |
|
| Back to top |
|
 |
|