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 with multi responce pleease

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


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Fri Jul 14, 2006 10:11 am    Post subject: Help with multi responce pleease Reply with quote

Ok I need a script that give a different responce on a public trigger..

I tried this..

Code:

bind pub "!test" test

proc test {nick uhost hand chan args} {
 
putquick "privmsg $chan :test1"\
    "test2" }


Obviously didn't work caue im now here Razz

Any suggestions please Smile
_________________
www.NT-Hosts.Net - More than just a host
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Jul 14, 2006 4:29 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
shag
Voice


Joined: 13 Jul 2006
Posts: 3

PostPosted: Fri Jul 14, 2006 4:34 pm    Post subject: Reply with quote

if you mean something like a random quote, there are many scripts in the archive as well as on the forum already.
Back to top
View user's profile Send private message
NTHosts
Op


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Sun Jul 16, 2006 4:40 pm    Post subject: yeah... Reply with quote

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 Razz
_________________
www.NT-Hosts.Net - More than just a host
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Jul 16, 2006 8:58 pm    Post subject: Reply with quote

Code:

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"
}
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