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.

Eggdrop/TCL random answers

Old posts that have not been replied to for several years.
Locked
t
tessa
Voice
Posts: 4
Joined: Sat Jan 15, 2005 11:33 am

Eggdrop/TCL random answers

Post by tessa »

Hi@all,

need a little bit help with tcl :D

My Eggdrop should vote between 3 possible random answers.



Example:

Trigger:

------> !hello Testuser


Possible Answers:

------> $nick says hello to $args !
------> $args , ur welcome!
------> $nick says: $args , nice to see you!

Can't find a tcl-example in google....plz,plz help me

Greetzzz, Tessa :D

sry 4 my bad english ^^
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

bind pub o !hello pub:hello
proc pub:hello { n u h c t } {
  if {[llength [split $t]] != 1} { return }
  switch [rand 3] {
    0 { puthelp "PRIVMSG $c :$n says hello to $t" }
    1 { puthelp "PRIVMSG $c :$t, ur welcome" }
    2 { puthelp "PRIVMSG $c :$n says: $t, nice to see you" }
  }
  return
}
photon?
t
tessa
Voice
Posts: 4
Joined: Sat Jan 15, 2005 11:33 am

Post by tessa »

IT WORXXX!!! :D :D :D :D :D

1000 thanks and kisses 8)
Locked