WAR'S OFF MEN.
BUT TO PRESERVE IT'S LEGACY I AM UPLOADING THE TRAINING PROTOCOL.
$GLASSWARS_DIFFICULTY=105;
$GLASSWARS_CONSIST=1;
$GLASSWARS_COUNT=0;
$GLASSWARS_MAXCOUNT=30;
$GLASSWARS_SCORE=0;
$GLASSWARS_IDTICK=0;
$GLASSWARS_SPAWNRATE= 800;
$GLASSWARS_PRESSURE=1;
$GLASSWARS_MAXPRESSURE=3;
$GLASSWARS_PRESSUREBUILDUP=0;
$GLASSWARS_PRESSUREUP=5;
$GLASSWARS_sw=0;
function servercmdGWP(%client){
	if(%client.issuperadmin){
		$GLASSWARS_x = getword(%client.player.getposition(),0);
		$GLASSWARS_y = getword(%client.player.getposition(),1);
		$GLASSWARS_z = getword(%client.player.getposition(),2);
	}
}
function servercmdGWO(%client){
	if(%client.issuperadmin){
		$GLASSWARS_ox = getword(%client.player.getposition(),0);
		$GLASSWARS_oy = getword(%client.player.getposition(),1);
		$GLASSWARS_oz = getword(%client.player.getposition(),2);
	}
}
function servercmdGWC(%client){
	if(%client.issuperadmin){
		$GLASSWARS_cx = getword(%client.player.getposition(),0);
		$GLASSWARS_cy = getword(%client.player.getposition(),1);
		$GLASSWARS_cz = getword(%client.player.getposition(),2);
	}
}
function servercmdGWstart(%client){
	if(%client.issuperadmin){
		announce("The GLASSWARS Training Protocol will begin shortly.");
		schedule($GLASSWARS_SPAWNRATE,0,"glasswarstick",%client);
		$GLASSWARS_ACTIVE=1;
	}
}
function servercmdGWstop(%client){
	if(%client.issuperadmin){
		announce("The GLASSWARS Training Round has been stopped.");
		announce("\c5The glass has overwhelmed the recruits! \c5End score:\c1 " @ $GLASSWARS_SCORE);
		$GLASSWARS_ACTIVE=0;
		$GLASSWARS_SCORE=0;
		$GLASSWARS_PRESSURE=1;
		$GLASSWARS_PRESSUREBUILDUP=0;
		clearglasswars();
	}
}
function makeglass(%id,%pos,%scale,%rotation){
	%a = getrandom(1,5);
	if(%a==5){
		%scale=getrandom(100,5)/10 SPC getrandom(100,5)/10 SPC getrandom(100,5)/10;
		$Glass[%id] = new StaticShape()
		{
	   	 rotation = %rotation;
	    	scale = %scale;
	    	position = %pos;
	   	 canSetIFLs = "0";
	   	 datablock = "lightBulbA";
	   	 indestructable = true;
		
		
		};
		$Glass[%id].bulb=1;
	}else{
	$Glass[%id] = new StaticShape()
	{
	    rotation = %rotation;
	    scale = %scale;
	    position = %pos;
	    canSetIFLs = "0";
	    datablock = "glassA";
	    indestructable = true;
		
		
	};
	}
	$Glass[%id].isglass=1;
	$Glass[%id].vol = getword(%scale,0) * getword(%scale,1) * getword(%scale,2);
	$GLASSWARS_COUNT++;
	$GLASSWARS_IDTICK++;
	if($GLASSWARS_COUNT>=$GLASSWARS_MAXCOUNT){
		announce("\c5The glass has overwhelmed the recruits! \c5End score:\c1 " @ $GLASSWARS_SCORE);
		for(%i = 0; %i < ClientGroup.getCount(); %i++)
		{
			%cl = ClientGroup.getObject(%i);
			%cl.totalgscore+=%cl.glassscore;
			messageclient(%cl,'',"\c5Your score for this round was\c1 " @ %cl.glassscore SPC "\c5And your total score is\c1 " @ %cl.totalgscore);
			
			%cl.glassscore=0;
		}
		$GLASSWARS_ACTIVE=0;
		$GLASSWARS_SCORE=0;
		$GLASSWARS_PRESSURE=1;
		$GLASSWARS_PRESSUREBUILDUP=0;
		clearglasswars();
	}
}
function clearglasswars(){
	%i=0;
	while(%i<$GLASSWARS_IDTICK){
		if(isobject($Glass[%i])){
			$Glass[%i].delete();
		}
		%i++;
	}
	$GLASSWARS_COUNT=0;
	$GLASSWARS_IDTICK=0;
}
function glasswarstick(%client){
	%obj=%client.player;
	if($GLASSWARS_ACTIVE){
	if($GLASSWARS_sw==0){
	%i=0;
	while(%i<$GLASSWARS_PRESSURE){
		%pos=getrandom($GLASSWARS_x,$GLASSWARS_ox) SPC getrandom($GLASSWARS_y,$GLASSWARS_oy) SPC getrandom($GLASSWARS_z,$GLASSWARS_oz);
		%scale=getrandom(100,5)/10 SPC getrandom(10,5)/10 SPC getrandom(100,5)/10;
					%a=getrandom(1,3);
			if(%a==1){
				%rot="0 1 0" SPC getrandom(25,90);
			}
			if(%a==2){
				%rot="1 0 0" SPC getrandom(25,90);
			}
			if(%a==3){
				%rot="0 0 1" SPC getrandom(25,90);
			}
		makeglass($GLASSWARS_IDTICK,%pos,%scale,%rot);
		%i++;
		%i++;
	}
	$GLASSWARS_PRESSUREBUILDUP++;
	if($GLASSWARS_PRESSUREBUILDUP>=$GLASSWARS_PRESSUREUP){
		$GLASSWARS_PRESSURE++;
		if($GLASSWARS_PRESSURE>$GLASSWARS_MAXPRESSURE){
			$GLASSWARS_PRESSURE=$GLASSWARS_MAXPRESSURE;
		}
	}
	$GLASSWARS_sw=1;
	}else{
		if($GLASSWARS_sw==3){
			$GLASSWARS_sw=0;
			lightbulbfire();
		}
		if($GLASSWARS_sw==2){
			$GLASSWARS_sw=3;
		}
		if($GLASSWARS_sw==1){
			$GLASSWARS_sw=2;
			lightbulbfire();
		}
	}
	//%pos=getrandom($GLASSWARS_x,$GLASSWARS_ox) SPC getrandom($GLASSWARS_y,$GLASSWARS_oy) SPC getrandom($GLASSWARS_z,$GLASSWARS_oz);
	//%k=0;
	
	
	//}
	moveglasscloser();
	$GLASSWARS_SCORE+=mfloor($GLASSWARS_DIFFICULTY/10);
	schedule($GLASSWARS_SPAWNRATE,0,"glasswarstick",%client);
	}
}
function lightbulbfire(){
%i=0;
	while(%i<$GLASSWARS_IDTICK){
		if(isobject($Glass[%i])){
			if($Glass[%i].bulb){
			%pos=$Glass[%i].getposition();
			while(%k<3){
			%p = new Projectile()
			{
				dataBlock = "spearprojectile";
				initialVelocity = getrandom(-50,50) SPC getrandom(-50,50) SPC getrandom(-45,0);
				initialPosition = %pos;
				sourceObject = %obj;
				sourceSlot = 1;
				client = %obj.client;
				minigame = %obj.client.minigame;
			};
			%p.setscale(getrandom(7,3)/10 SPC getrandom(7,3)/10 SPC getrandom(7,3)/10);
			MissionCleanup.add(%p);
			%k++;
			}
			}else{
				if(getrandom(1,5)==1){
				%p = new Projectile()
				{
					dataBlock = "tankshellprojectile";
					initialVelocity = %vel;
					initialPosition = %pos;
					sourceObject = %obj;
					sourceSlot = 1;
					client = %obj.client;
					minigame = %obj.client.minigame;
				};
				%p.setscale(getrandom(4,1)/10 SPC getrandom(4,1)/10 SPC getrandom(4,1)/10);
				MissionCleanup.add(%p);
				}
			}
		}
	%i++;
	}
}
function moveglasscloser(){
	%i=0;
	while(%i<$GLASSWARS_IDTICK){
		if(isobject($Glass[%i])){
			%pos=$Glass[%i].getposition();
			%x=getword(%pos,0);
			%y=getword(%pos,1);
			%z=getword(%pos,2);
			%cx = $GLASSWARS_cx;
			%cy = $GLASSWARS_cy;
			%cz = $GLASSWARS_cz;
			%nx=0;
			%ny=0;
			%nz=0;
			if(%x>%cx){
				%nx=-0.3;
			}
			if(%x<%cx){
				%nx=0.3;
			}
			if(%y>%cy){
				%ny=-0.3;
			}
			if(%y<%cy){
				%ny=0.3;
			}
			if(%z>%cz){
				%nz=-0.3;
			}
			if(%z<%cz){
				%nz=0.3;
			}
			%a=getrandom(1,3);
			if(%a==1){
				%rot="0 1 0" SPC getrandom(25,90);
			}
			if(%a==2){
				%rot="1 0 0" SPC getrandom(25,90);
			}
			if(%a==3){
				%rot="0 0 1" SPC getrandom(25,90);
			}
			//explode if they get close enough?
			%t = $Glass[%i].gettransform();
			%g = getwords(%t,3,6);
			$Glass[%i].settransform(vectoradd(%pos,%nx SPC %ny SPC %nz) SPC %rot);
		}
		%i++;
	}
}
package GLASSWARS_glass
{
function ProjectileData::onCollision(%this,%obj,%col,%fade,%pos,%normal){
	//echo("colloded");
	if(%col.isglass){
		if(!%col.brickhp){
			%col.brickhp=%col.vol*$GLASSWARS_DIFFICULTY;
		}
		%max=%col.vol*$GLASSWARS_DIFFICULTY;
		//echo("T" @ %col.brickhp @ %this.directdamage*8);
		
		//echo(%col.brickhp SPC %max*0.50);
		if(%obj.getdatablock() == nametoid("tankshellprojectile")){
			
			%sx = getword(%col.getscale(),0);
			%sy = getword(%col.getscale(),1);
			%sz = getword(%col.getscale(),2);
			%sx/=2;
			%sz/=2;
			%col.setscale(%sx SPC %sy SPC %sz);
			%col.brickhp=%col.vol*$GLASSWARS_DIFFICULTY;
			%scale = %col.getscale();
			%col.vol = getword(%scale,0) * getword(%scale,1) * getword(%scale,2);
			%obj.client.glassscore+=200;
			$GLASSWARS_SCORE+=200;
			%obj.client.setscore(%obj.client.glassscore);
			%col.brickhp-=%this.directdamage*4;
		}
		%col.brickhp-=%this.directdamage*4;
		if(%col.brickhp<=0){
			$GLASSWARS_SCORE+=mfloor(%col.vol/10)*$GLASSWARS_DIFFICULTY;
			%obj.client.glassscore+=mfloor(%col.vol/10)*$GLASSWARS_DIFFICULTY;
			%obj.client.setscore(%obj.client.glassscore);
			%vel=getrandom(-50,50) SPC getrandom(-50,50) SPC getrandom(-15,15);
			if($GLASSWARS_CONSIST){
				%vel=getrandom(-10,10) SPC getrandom(-10,10) SPC getrandom(-5,5);
			}
			%p = new Projectile()
			{
				dataBlock = "tankshellprojectile";
				initialVelocity = %vel;
				initialPosition = %pos;
				sourceObject = %obj;
				sourceSlot = 1;
				client = %obj.client;
				minigame = %obj.client.minigame;
			};
			%p.setscale(getrandom(9,3)/10 SPC getrandom(9,3)/10 SPC getrandom(9,3)/10);
			MissionCleanup.add(%p);
			if(getrandom(1,10)==1){
				%p.explode();
			}
			%col.delete();
			$GLASSWARS_COUNT--;
			bottomprintall("\c5Score: \c1" @ $GLASSWARS_SCORE,10);
			
		}
	}
	Parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
}
};
activatepackage(GLASSWARS_glass);
SIMULATED GLASS SPAWNS AND MOVES TO THE CENTER. SHOOT TO KILL.
/GWP
-use it at one corner of the three dimensional box in which glass spawns
/GWO
-use it at the opposite corner of said box
/GWC
-use it where glass should move to.
/GWstart
/GWstop
self explanatory.