This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
-
NTHosts
- Op
- Posts: 100
- Joined: Mon Oct 10, 2005 9:57 pm
- Location: UK
-
Contact:
Post
by NTHosts »
Ok I need a script that give a different responce on a public trigger..
I tried this..
Code: Select all
bind pub "!test" test
proc test {nick uhost hand chan args} {
putquick "privmsg $chan :test1"\
"test2" }
Obviously didn't work caue im now here
Any suggestions please
-
metroid
- Owner
- Posts: 771
- Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid »
1. Don't use args, use arg or any other name but args.
2. I'm not sure what you're talking about, you need to be clear if you expect help
-
shag
- Voice
- Posts: 3
- Joined: Thu Jul 13, 2006 3:07 pm
Post
by shag »
if you mean something like a random quote, there are many scripts in the archive as well as on the forum already.
-
NTHosts
- Op
- Posts: 100
- Joined: Mon Oct 10, 2005 9:57 pm
- Location: UK
-
Contact:
Post
by NTHosts »
But im trying to write my own, it only needs to be basic..
Metroid, what i want is when i do say.. !m00
the bot replys with either
<bot> m001
or
<bot> m002
sorry i wernt clear last time, been a long day
-
rosc2112
- Revered One
- Posts: 1454
- Joined: Sun Feb 19, 2006 8:36 pm
- Location: Northeast Pennsylvania
Post
by rosc2112 »
Code: Select all
bind pub - !mytrigger someproc
proc someproc {nick uhost hand chan text} {
set somerandomstrings {
{string one here}
{string two yadda yadda}
{string three yippee}
}
set randomstring [lindex $somerandomstrings [rand [llength $somerandomstrings]]]
puthelp "PRIVMSG $chan :$randomstring"
}