/* This script produces random numbers of a length that the user sets. The final number can be used in other scripts by changing
the var %rand to set %rand
*/
alias rand {
var %leng = $$?="Number of places?"
:check
var %rand = $rand(0,9)
var %rand = $str(%rand,4)
var %rand = $calc($int($asin($rand(1,%rand))))
var %rand = $calc((%rand * %leng) * (%rand * $rand(1,9)))
if ($len(%rand) < %leng) {
goto check
}
var %rand = $right(%rand,%leng)
; change var to set %rand when used for other scripts
.echo The Random Number is %rand
}