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 

Simple trigger script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
noobie10111
Voice


Joined: 23 Sep 2014
Posts: 1

PostPosted: Tue Sep 23, 2014 12:27 am    Post subject: Simple trigger script Reply with quote

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


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Tue Sep 23, 2014 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Sep 23, 2014 8:53 am    Post subject: Reply with quote

Check out:

http://suninet.the-demon.de/04.htm
http://suninet.the-demon.de/041.htm

and
(from Get-A-Fix's link) :
http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html#binda

Hint -
see: bind pub

I hope this helps.
Let us know how you do.
Back to top
View user's profile Send private message
AlphaTech
Voice


Joined: 23 Jul 2014
Posts: 12
Location: New York, USA

PostPosted: Tue Oct 07, 2014 5:12 pm    Post subject: Reply Reply with quote

heres a simple script that does exactly what you want Smile

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
View user's profile Send private message Send e-mail
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Thu Oct 09, 2014 9:21 am    Post subject: Re: Reply Reply with quote

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
Code:
${command}


You also forgot to declare the message as a global var, within the proc, otherwise it will error as $message can't be read.
Code:
global message

or you can not declare, like you did, and call it using
Code:
$::message


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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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