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.

Random Nick

Help for those learning Tcl or writing their own scripts.
Post Reply
S
SL0RD
Voice
Posts: 19
Joined: Sun Oct 05, 2008 11:44 am

Random Nick

Post by SL0RD »

I am just wondering if there is a way to select a random nick from the channel list, I want to make a script that on a trigger selects a random nick and then says it in the channel.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

(Note: #test would be the name of YOUR Channel)

Easy way would be to use:

Code: Select all

lindex [chanlist #test] [rand [llength [chanlist #test]]]
Example:

Code: Select all

set rnick [lindex [chanlist #test] [rand [llength [chanlist #test]]]]
Post Reply