If the command should be triggered by someone else
besides you:
on *:TEXT:!pick:[color:red]#channel[/color]: {
var %all = $nick([color:red]#channel[/color],0)
var %nick = $nick([color:red]#channel[/color],$rand(1,%all))
msg $chan [color:green]Hey there, %nick :)[/color]
}
If the command should be triggered by
you alone - usage is: /pick <#channel>
alias pick {
if (!$1) { echo $color(info) -a * You must specify a channel. }
var %all = $nick($$1,0)
var %nick = $nick($$1,$rand(1,%all))
msg $$1 [color:green]Hey there, %nick :)[/color]
}
In the first code you can change the
#channel to any channel you wish, or just use
# to ALL channels. The 2nd script is activated through an alias called
/pick - you should use it like
/pick #channelIn both cases you can change the
message sent to the channel. Also in both codes, the %variable that holds the nickname chosen is
%nick, meaning wherever you want to say the person's nick, use that variable
Have fun!
Zyzzy.