Here is my short question:
How to msg 3 random users on level 1000?
thanks
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.
$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-
}