hit !deal and bot shall deal a complete random hand.
if you want more cards per hand just change the line
var %cards 5
to .. whatever.
on *:text:!deal*:#:{ dealcards $chan }
alias dealcards {
var %figures A,K,Q,J
var %faces ♥,♦,♣,♠
var %numbers 8
var %cards 5
;figure-to-face rate = if random from 1 till %figtofacemax is bigger than %figtofacelim
;then it's a figure, otherwise it's a number
var %figtofacelim 1
var %figtofacemax 2
while (%cards) {
var %number $rand(2,%numbers)
var %x $numtok(%figures,44)
var %fig-rand $rand(1,%x)
var %figure $gettok(%figures,%fig-rand,44)
var %x $numtok(%faces,44)
var %face-rand $rand(1,%x)
var %face $gettok(%faces,%face-rand,44)
;figure-or-number rate
var %y $rand(1,%figtofacemax)
if (%y > %figtofacelim) set %hand %hand $+(%figure,%face)
else set %hand %hand $+(%number,%face)
dec %cards
}
msg $iif($1,$1,$active) dealt hand: %hand
unset %hand
}