Version1. This script was written by DarkDragon! (give credit where credit is due)
Code:
//===============================================
// FFC SCRIPT ENEMY MAKER 1(overworld/interiors)
// D0-D7 Enemies that will spawn *check std.zh for values*
//===============================================
bool is_walkable(int x, int y)
{
	return Screen->ComboS[x+y*16]==0;
}

ffc script Enemymaker1 {
	void run(int e1, int e2, int e3, int e4, int e5, int e6, int e7, int e8) {
		putenemy(e1);
		putenemy(e2);
		putenemy(e3);
		putenemy(e4);
		putenemy(e5);
		putenemy(e6);
		putenemy(e7);
		putenemy(e8);
	}

	void putenemy(int eid)
	{
		//to do this properly we really need priority queues in ZScript ;)
		
		int x = Rand(16);
		int y = Rand(11);
		while(!is_walkable(x,y))
		{
			x = Rand(16);
			y = Rand(11);
		}
		npc en = Screen->CreateNPC(eid);
		if(en->isValid())
		{
			en->X = x*16;
			en->Y = y*16;
		}
		//simulate staggered spawning
		Waitframe();
	}
}
Use this for overworld/interior spawning, so as they don't get stuck in doorways....



Code:
//===============================================
// FFC SCRIPT ENEMY MAKER 2(dungeons)
// D0-D7 Enemies that will spawn *check std.zh for values*
//===============================================
bool is_walkable(int x, int y)
{
	return Screen->ComboS[x+y*16]==0;
}

ffc script Enemymaker2 {
	void run(int e1, int e2, int e3, int e4, int e5, int e6, int e7, int e8) {
		putenemy(e1);
		putenemy(e2);
		putenemy(e3);
		putenemy(e4);
		putenemy(e5);
		putenemy(e6);
		putenemy(e7);
		putenemy(e8);
	}

	void putenemy(int eid)
	{
		//to do this properly we really need priority queues in ZScript ;)
		
		int x = Rand(12)+2;
		int y = Rand(7)+2;
		while(!is_walkable(x,y))
		{
			x = Rand(12)+2;
			y = Rand(7)+2;
		}
		npc en = Screen->CreateNPC(eid);
		if(en->isValid())
		{
			en->X = x*16;
			en->Y = y*16;
		}
		//simulate staggered spawning
		Waitframe();
	}
}

Revision by Shadowmancer. Thanks!:) -Use this one for dungeons.

and....


Code:
//====================================================
// FFC SCRIPT ENEMY MAKER (dungeons)
// D0-D6; Enemies that might spawn,
// D7; Number of max enemies you want to spawn.
// <in Addition to boss or any other enemies set to screen enemies> ;)
// Thanks to DarkDragon! :=D
//====================================================

bool is_walkable(int x, int y)
{
	return Screen->ComboS[x+y*16]==0;
}

ffc script enemymaker {
        void run(int e1, int e2, int e3, int e4, int e5, int e6, int e7, int enemy_max) {
                int RandNum = Rand(7);
                int en_count = enemy_max;
                while(en_count > 0){

                               if (RandNum == 0){ 
		                       putenemy(e1);
                             } if (RandNum == 1){ 
		                       putenemy(e2);
                             } if (RandNum == 2){ 
		                       putenemy(e3);
                             } if (RandNum == 3){ 
		                       putenemy(e4);
                             } if (RandNum == 4){ 
		                       putenemy(e5);
                             } if (RandNum == 5){ 
		                       putenemy(e6);
                             } if (RandNum == 6){ 
		                       putenemy(e7);
                             } 
                               en_count = en_count - 1;
                               RandNum = Rand(7);
                             
                   } 
	       
	}

	void putenemy(int eid) 
	{
		//to do this properly we really need priority queues in ZScript ;)
		
		int x = Rand(12)+2;
		int y = Rand(7)+2;
		while(!is_walkable(x,y))
		{
			x = Rand(12)+2;
			y = Rand(7)+2;
		}
		npc en = Screen->CreateNPC(eid);
		if(en->isValid())
		{
			en->X = x*16;
			en->Y = y*16;
		}
		//simulate staggered spawning
		Waitframe();
	}
}
....here is my version. Big changes with this one, allow me to explain.

D0-D6; Enemies that might spawn,
D7; Number of max enemies you want to spawn.
D0-D6 may or may not spawn, because......they're chosen at random! *Note the higher the number of D7, the greater chance any single one may appear.*

D7: Here is the kicker; What happens when you set D7 to 100??? ...Well try it and find out...hehe.....

You may want to give Link a potion before you try that though...

...And yes, it works with bosses.

EDIT:

Here's how it works:

It will spawn enemies of your choice,(D0-D7) and spawn them in random locations on the screen if walkable. Just like normal enemies. As for what enemies will spawn, check the enemy data either in std.zh, or in you quest under the enemy editor. Any enemy you have made in the editor is an eligible candidate for this script. Have fun with these!
Oh, almost forgot:
Code:
bool is_walkable(int x, int y)
{
	return Screen->ComboS[x+y*16]==0;
}
This part is a global bit, so I believe you only need it once.

-Enjoy!