Arrays are underutilized and very favorable for repetitive tasks.
They can eliminate many logic steps.
X=floor(random(55))
array(0-54,0) stores 1st set of data for conditions 0-54
array(0-54,1) stores 2nd set of data for conditions 0-54
array(0-54,n) stores n set of data for conditions 0-54
then using x as the condition variable...plug the values from array into appropriate conditions and spawnings etc...
spawn array(x,0) Monsters at array(x,1) x axis and array(x,2) y axis with a speed of array(x,3)
or random x,y, speed....
spawn array(x,0) Monsters at floor(random(array(x,1)) x axis and floor(random(array(x,2)) y axis with a speed of floor(random(array(x,3))
taking it one step further, the Monsters spawned could be stored in array(x,4) so that more than 1 type of monster could be picked.