getRandom:
when wanting to assign a variable to getrandom, use this:
%var = getRandom(x,y);
x is the minimum number, y is the maximum.
uses for getrandom:
%var = getRandom(0,5);
if(%var $="1")
{
do stuff when variable is 1
}
else if(%var $="2")
{
do stuff when variable is 2
}
else if(%var $="3")
{
do stuff when variable is 3
}
else if(%var $="4")
{
do stuff when variable is 4
}
else if(%var $="5")
{
do stuff when variable is 5
}
Obviously this would have to be inside a function and all that stuff, i'm just not going to do that cause i'm lazy.