View Single Post
  #3  
Old 04-13-2011, 12:07 AM
Plague Plague is offline
Member
 
Join Date: Nov 2010
Posts: 50
Gender: Unknown/Other
Credits: 3,913
Plague is an unknown quantity at this point
Default

I could be wrong but I think the issue is here:

Code:
// $numnew = new number
// $curnum = current number
// $max = upper limit (5 in this case)

if (rand(1,2) == 1) {
$numnew = ($curnum + rand(-1,1));
}

if ($numnew == 0) {
$numnew = $max;
}

if ($numnew > $max) {
$numnew = 1;
}
I think maybe setting it like this:

Code:
if (rand(0,4) == 1) {
That might rectify the issue.