mIRC Home    About    Download    Register    News    Help

Print Thread
#142628 18/02/06 06:09 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
I tried to make a code that when you type !rand <#,#>
you would get back a random number between #,#...
I tried $rand($2), $rand( $2 ), and $rand( $+ $2 $+ )
none work confused ...
anybody got a solution?

Last edited by blk; 18/02/06 06:10 PM.

-blk-
#142629 18/02/06 06:18 PM
Joined: Feb 2006
Posts: 164
V
Vogon poet
Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
$rand(1,99)

#142630 18/02/06 06:19 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$rand( [ $2 ] )

#142631 18/02/06 06:30 PM
Joined: Feb 2006
Posts: 95
B
blk Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
ty grin


-blk-
#142632 18/02/06 06:46 PM
Joined: Oct 2003
Posts: 9
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2003
Posts: 9
Code:
on *:TEXT:!rand *:#:{ if (!$2) || (!$3) { halt } | msg $chan Random: $r($2,$3) }
 


Now get someone to type: !rand # #
ex: !rand 1 99 returns a random number between 1 and 99 =)


--==> Wizard Suntop <==--
#142633 18/02/06 07:38 PM
Joined: Feb 2006
Posts: 164
V
Vogon poet
Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
My bad, i read it as i was playing poker. blush


Link Copied to Clipboard