mIRC Home    About    Download    Register    News    Help

Print Thread
Level messages #124899 12/07/05 02:26 PM
Joined: Apr 2005
Posts: 53
A
Abuser__ Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Here is my short question:

How to msg 3 random users on level 1000?

thanks

Re: Level messages #124900 12/07/05 03:29 PM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
step1: generate 3 random numbers from 1 to number_of_users_with_level_1000
step2: find out the nicknames of the users coresponding with the numbers
step3: msg the users.

Re: Level messages #124901 12/07/05 03:43 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
$ulist is what you need:

alias randommsg {
; usage /randommsg text to sent to 3 random nicks
var %num = $ulist(*,1000,0), %r1 = $r(1,%num), %r2 = $r(1,%num), %r3 = $r(1,%num)
if (%num !isnum 3-) return
while (%r1 == %r2) var %r2 = $r(1,%num)
while (%r1 == %r3) || (%r3 == %r2) var %r3 = $r(1,%num)
msg $gettok($ulist(*,1000,%r1),1,33) $1-
msg $gettok($ulist(*,1000,%r2),1,33) $1-
msg $gettok($ulist(*,1000,%r3),1,33) $1-
}