so I created a dice script for script which rolls a number of d10s, then sorts it based on 7 or above being a success, with double successes for 10s, and botches for 1s (this couldn't possibly be for white wolf, no sir, not possible).

all in all, its a decent script, even with my less than decent scripting knowledge.

it works perfectly fine, but while we were testing it (and trying to break it) we found a flaw.

It will roll any number of dice from 1 die to 445 dice. but 446 or more dice won't work.

that is way beyond the number of dice that will actually be used in any situation we are going to use the script, but it still bugs me that it stops at 445 for some reason I cannot see.

Code:
/exalt {
  ; $$1 is channel
  ; $$2 is number of rolls
  var %RAW.ROLL
  var %d = $$2
  while (%d > 0) {
    %RAW.ROLL = [ %RAW.ROLL ] $rand(1,10)
    dec %d
  }
  %NUM.SUCCESS = $count(%RAW.ROLL,7,8,9,10)
  %NUM.CRIT = $count(%RAW.ROLL,10)
  %NUM.FAILURE = $calc($$2 - %NUM.SUCCESS)
  %NUM.BOTCH = $findtok(%RAW.ROLL,1,0,32)
  %TOTAL.SUCCESS = $calc(%NUM.SUCCESS + %NUM.CRIT)
  %CUT1.ROLL = $deltok(%RAW.ROLL,11 - $$2,32)
  %CUT2.ROLL = $deltok(%RAW.ROLL,1 - $calc($$2 - 10),32)
  if $$2 <= 30 {
    msg $$1 Failure: %NUM.FAILURE $+ / $+ $$2 Botch: %NUM.BOTCH Success: %NUM.SUCCESS $+ / $+ $$2 Critcal: %NUM.CRIT TOTAL SUCCESS: %TOTAL.SUCCESS $+ / $+ $$2 Raw Roll ( $+ %RAW.ROLL $+ )
    halt
  }
  if $$2 > 30 {
    ; Displays the first ten and the last ten numbers
    msg $$1 Failure: %NUM.FAILURE $+ / $+ $$2 Botch: %NUM.BOTCH Success: %NUM.SUCCESS $+ / $+ $$2 Critcal: %NUM.CRIT TOTAL SUCCESS: %TOTAL.SUCCESS $+ / $+ $$2 Raw Roll ( $+ %CUT1.ROLL $+ ... $+ %CUT2.ROLL $+ )
    halt
  }
}


its an ugly bastard child of mine, but can someone see if its anything I did to make it stop at 446+? or is this just something inherent to mirc?