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 

How to grab the 2nd word as a variable? (For Triggers)

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


Joined: 18 Oct 2011
Posts: 26

PostPosted: Sat Oct 29, 2011 7:49 pm    Post subject: How to grab the 2nd word as a variable? (For Triggers) Reply with quote

Hello, On my old bot it was simple to make it read the 2nd, 3rd, 4th word of a trigger command. (Example !trigger First Second Third)

Well on the script its already reading the 1st thing after it (Which turns the game on or off) But I am trying to add and improve on that, to make it where if the user turns the game on and adds a number to the end of the trigger, it would apply that as a variable to use in the script. I just spent some time on google between binds, variables and so, however I dont know what eggdrop really calls that, I assumed something with $aug or so, thing is, since aug is already being used, just need somehow to read the variable after that one.

Any guide or place for me to read up on something like this? Thanks. =)
_________________
~Battlez-avec la Mystique?~
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Oct 29, 2011 9:42 pm    Post subject: Reply with quote

Possibly bind pub , and split the text?

http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html
and scroll down to
bind pub

Then:
http://www.tcl.tk/man/tcl8.5/TclCmd/split.htm
and
http://www.tcl.tk/man/tcl8.5/TclCmd/lindex.htm


Here are some links that I think are very good, for getting started with TCL for Eggdrop:

http://suninet.the-demon.de/
http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html
http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm

With those three, you can do a LOT. Smile

I hope that helps.
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Sun Oct 30, 2011 11:15 am    Post subject: Reply with quote

is this a script release? can you read where you post stuff?
_________________
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Mysticales
Voice


Joined: 18 Oct 2011
Posts: 26

PostPosted: Sun Oct 30, 2011 8:57 pm    Post subject: Reply with quote

Actually, thats a good question. You see, its not my script, its one that was already posted to the archives that I am trying to alter to make better. So the question is, is this kinda topic more for script support since its based on one already released. Or script help. But the way I read script help, is if I was making one from scratch that is 100% my own work. Which I am not claiming to.

(Tho been meaning to ask about that, if I alter a script to make improvements on a script that has had no updates in a year or so, am I allowed to release one with the updates?)
_________________
~Battlez-avec la Mystique?~
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