package com.rs.utils;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;

import com.rs.game.World;
import com.rs.game.WorldObject;
import com.rs.game.WorldTile;
import com.rs.game.npc.NPC;
import com.rs.utils.Utils.EntityDirection;

public class NPCSpawning {

	/**
	 * Contains the custom npc spawning
	 */

	public static void spawnNPCS() {
	    	//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
        	World.spawnNPC(6054, new WorldTile(2570, 4324, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2587, 4298, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2614, 4315, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
            	World.spawnNPC(6054, new WorldTile(2596, 4342, 0), -1, true, true);//Dragon Impling
	    	//Hunting Expert Implings
	    	new NPC(5112, new WorldTile(2589, 4317, 0), -1, false);
	    	//Robust Glass Machine
	    	World.spawnObject(new WorldObject(67968, 10, 0, 2584, 2852, 0));
	    	//Lumbridge Paint Pots
	    	World.spawnObject(new WorldObject(10710, 10, 0, 3239, 3216, 0));
	    	//Lumbridge Armour Stand
	    	World.spawnObject(new WorldObject(55222, 10, 1, 3239, 3214, 0));
	    	//Skilclape Salesmen
	    	new NPC(945, new WorldTile(2212, 3369, 1), -1, false);
	    	//Barrows Rope Leave
	    	World.spawnObject(new WorldObject(1764, 10, 0, 3547, 9698, 0));
		// Quercus
		new NPC(17065, new WorldTile(3135, 3521, 0), -1, false);
		// Armadylean
		World.spawnObject(new WorldObject(83302, 10, 0, 3030, 3589, 0));
		World.spawnObject(new WorldObject(83311, 10, 0, 3037, 3597, 0));
		World.spawnObject(new WorldObject(83320, 11, 0, 3043, 3596, 0));
		World.spawnObject(new WorldObject(83329, 10, 2, 3037, 3585, 0));
		World.spawnObject(new WorldObject(83337, 11, 7, 3044, 3588, 0));
		World.spawnObject(new WorldObject(83359, 10, 0, 3040, 3592, 0));
		// Zamorakian
		World.spawnObject(new WorldObject(83303, 10, 0, 3300, 3768, 0));
		World.spawnObject(new WorldObject(83312, 10, 0, 3307, 3776, 0));
		World.spawnObject(new WorldObject(83321, 11, 0, 3313, 3775, 0));
		World.spawnObject(new WorldObject(83330, 10, 2, 3307, 3764, 0));
		World.spawnObject(new WorldObject(83338, 11, 7, 3314, 3767, 0));
		World.spawnObject(new WorldObject(83361, 10, 0, 3310, 3771, 0));
		// Saradomin
		World.spawnObject(new WorldObject(83304, 10, 0, 3124, 3836, 0));
		World.spawnObject(new WorldObject(83313, 10, 0, 3131, 3844, 0));
		World.spawnObject(new WorldObject(83322, 11, 0, 3137, 3843, 0));
		World.spawnObject(new WorldObject(83335, 10, 2, 3131, 3832, 0));
		World.spawnObject(new WorldObject(83339, 10, 7, 3139, 3835, 0));
		World.spawnObject(new WorldObject(83360, 10, 0, 3134, 3839, 0));
	    
	    //World.spawnNPC(14362, new WorldTile(xxxx, yyyy, z), -1, false, EntityDirection.NORTH);
		//RuneSpan Spawns Low Level
		World.spawnNPC(15407, new WorldTile(3911, 6136, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(3910, 6121, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3906, 6106, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3906, 6102, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15407, new WorldTile(3919, 6135, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(3930, 6139, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(3959, 6140, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(3980, 6139, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(3994, 6134, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15405, new WorldTile(4008, 6133, 1), -1, true, true);//Water Essling
		World.spawnNPC(15403, new WorldTile(4013, 6131, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(4010, 6126, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15407, new WorldTile(4027, 6130, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(4026, 6120, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(4020, 6107, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(4017, 6102, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15406, new WorldTile(4011, 6112, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15406, new WorldTile(4001, 6104, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3999, 6111, 1), -1, true, true);//Water Essling
		World.spawnNPC(15403, new WorldTile(3990, 6110, 1), -1, true, true);//Air Essling
		World.spawnNPC(15402, new WorldTile(3996, 6099, 1), -1, true, true);//Floating Essence
		World.spawnNPC(15418, new WorldTile(3995, 6106, 1), -1, true, true);//Wizard Finix
		World.spawnNPC(15405, new WorldTile(3979, 6088, 1), -1, true, true);//Water Essling
		World.spawnNPC(15405, new WorldTile(3988, 6126, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3975, 6121, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15403, new WorldTile(3970, 6125, 1), -1, true, true);//Air Essling
		World.spawnNPC(15404, new WorldTile(3978, 6104, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15403, new WorldTile(3969, 6106, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3962, 6107, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3958, 6087, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3950, 6122, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15405, new WorldTile(3948, 6126, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3947, 6130, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15403, new WorldTile(3936, 6117, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3934, 6121, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3932, 6126, 1), -1, true, true);//Water Essling
		World.spawnNPC(15405, new WorldTile(3922, 6111, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3917, 6097, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3923, 6095, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3935, 6096, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15406, new WorldTile(3939, 6099, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15403, new WorldTile(3944, 6103, 1), -1, true, true);//Air Essling
		World.spawnNPC(15407, new WorldTile(3913, 6082, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(4020, 6088, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(4022, 6083, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(4021, 6069, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(4025, 6058, 1), -1, true, true);//Water Essling
		World.spawnNPC(15407, new WorldTile(4020, 6057, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(4020, 6043, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(4025, 6037, 1), -1, true, true);//Water Essling
		World.spawnNPC(15407, new WorldTile(4024, 6023, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(4011, 6019, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(4013, 6028, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3999, 6028, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3997, 6034, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15406, new WorldTile(3985, 6044, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3984, 6029, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3968, 6023, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15405, new WorldTile(3964, 6035, 1), -1, true, true);//Water Essling
		World.spawnNPC(15403, new WorldTile(3968, 6037, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3962, 6040, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15406, new WorldTile(3952, 6021, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15406, new WorldTile(3932, 6025, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15407, new WorldTile(3919, 6022, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15404, new WorldTile(3909, 6030, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15407, new WorldTile(3909, 6034, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15407, new WorldTile(3911, 6058, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15406, new WorldTile(3915, 6068, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15404, new WorldTile(3919, 6071, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15403, new WorldTile(3923, 6075, 1), -1, true, true);//Air Essling
		World.spawnNPC(15405, new WorldTile(3938, 6072, 1), -1, true, true);//water Essling
		World.spawnNPC(15403, new WorldTile(3949, 6078, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3953, 6068, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15403, new WorldTile(3926, 6060, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3924, 6056, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3929, 6055, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3918, 6045, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3920, 6040, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(3924, 6036, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15403, new WorldTile(3925, 6043, 1), -1, true, true);//Air Essling
		World.spawnNPC(15405, new WorldTile(3941, 6037, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3942, 6043, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15403, new WorldTile(3949, 6042, 1), -1, true, true);//Air Essling
		World.spawnNPC(15404, new WorldTile(3947, 6036, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15403, new WorldTile(3946, 6057, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(3979, 6054, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3981, 6064, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(3986, 6071, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3987, 6077, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(4001, 6074, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15403, new WorldTile(4002, 6086, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(4006, 6061, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15405, new WorldTile(3996, 6054, 1), -1, true, true);//Water Essling
		World.spawnNPC(15403, new WorldTile(4009, 6049, 1), -1, true, true);//Air Essling
		//Runespan Spawns Middle Floor
		World.spawnNPC(15402, new WorldTile(4141, 6087, 1), -1, true, true);//Floating Essence
		World.spawnNPC(15418, new WorldTile(4137, 6092, 1), -1, true, true);//Wizard Finix
		World.spawnNPC(15412, new WorldTile(4101, 6126, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4112, 6134, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15409, new WorldTile(4123, 6122, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15411, new WorldTile(4117, 6116, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15410, new WorldTile(4110, 6114, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15411, new WorldTile(4110, 6100, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15410, new WorldTile(4126, 6099, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4132, 6100, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4127, 6106, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15412, new WorldTile(4143, 6116, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4137, 6120, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15412, new WorldTile(4136, 6136, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4150, 6134, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15405, new WorldTile(4162, 6129, 1), -1, true, true);//Water Essling
		World.spawnNPC(15406, new WorldTile(4164, 6126, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15411, new WorldTile(4160, 6124, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15412, new WorldTile(4158, 6120, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15405, new WorldTile(4158, 6108, 1), -1, true, true);//Water Essling
		World.spawnNPC(15403, new WorldTile(4147, 6102, 1), -1, true, true);//Air Essling
		World.spawnNPC(15404, new WorldTile(4159, 6101, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15412, new WorldTile(4159, 6096, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15411, new WorldTile(4166, 6095, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15408, new WorldTile(4174, 6107, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15412, new WorldTile(4172, 6113, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15410, new WorldTile(4187, 6112, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15406, new WorldTile(4186, 6125, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15411, new WorldTile(4185, 6128, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15412, new WorldTile(4180, 6128, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4172, 6139, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15412, new WorldTile(4196, 6138, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15410, new WorldTile(4198, 6125, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15413, new WorldTile(4211, 6131, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15412, new WorldTile(4209, 6116, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4209, 6111, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15404, new WorldTile(4214, 6111, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15404, new WorldTile(4199, 6101, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15412, new WorldTile(4198, 6092, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15412, new WorldTile(4212, 6094, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15411, new WorldTile(4211, 6081, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15406, new WorldTile(4177, 6089, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15404, new WorldTile(4179, 6095, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15408, new WorldTile(4184, 6091, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15408, new WorldTile(4198, 6072, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15410, new WorldTile(4202, 6066, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4217, 6061, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4215, 6045, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15413, new WorldTile(4216, 6021, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15410, new WorldTile(4209, 6035, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4204, 6028, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15411, new WorldTile(4191, 6028, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15406, new WorldTile(4198, 6044, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15410, new WorldTile(4196, 6047, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4193, 6052, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15405, new WorldTile(4176, 6077, 1), -1, true, true);//Water Essling
		World.spawnNPC(15404, new WorldTile(4181, 6074, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15406, new WorldTile(4181, 6064, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15409, new WorldTile(4171, 6056, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15408, new WorldTile(4163, 6064, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15405, new WorldTile(4174, 6044, 1), -1, true, true);//Water Essling
		World.spawnNPC(15409, new WorldTile(4175, 6038, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15410, new WorldTile(4180, 6038, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15410, new WorldTile(4165, 6028, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15409, new WorldTile(4155, 6042, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15412, new WorldTile(4152, 6032, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15410, new WorldTile(4149, 6029, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15409, new WorldTile(4144, 6031, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15411, new WorldTile(4139, 6033, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15413, new WorldTile(4146, 6018, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15413, new WorldTile(4129, 6027, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15412, new WorldTile(4113, 6024, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4101, 6020, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15411, new WorldTile(4101, 6035, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15409, new WorldTile(4110, 6035, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15412, new WorldTile(4110, 6040, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15410, new WorldTile(4102, 6041, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4108, 6056, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15413, new WorldTile(4103, 6067, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15410, new WorldTile(4105, 6080, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15411, new WorldTile(4111, 6084, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15409, new WorldTile(4117, 6088, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15410, new WorldTile(4117, 6068, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4122, 6063, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4123, 6058, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15410, new WorldTile(4128, 6048, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4127, 6042, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4122, 6040, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15411, new WorldTile(4144, 6053, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15410, new WorldTile(4136, 6059, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15412, new WorldTile(4148, 6062, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4150, 6068, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15409, new WorldTile(4142, 6078, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15408, new WorldTile(4131, 6075, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15411, new WorldTile(4132, 6084, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15404, new WorldTile(4137, 6089, 1), -1, true, true);//Mind Essling
		//Runespan Spawns Upper Floor
		World.spawnNPC(15402, new WorldTile(4294, 6027, 1), -1, true, true);//Floating Essence
		World.spawnNPC(15418, new WorldTile(4291, 6033, 1), -1, true, true);//Wizard Finix
		World.spawnNPC(15406, new WorldTile(4292, 6031, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15408, new WorldTile(4292, 6024, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15405, new WorldTile(4304, 6025, 1), -1, true, true);//Water Essling
		World.spawnNPC(15412, new WorldTile(4308, 6032, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15414, new WorldTile(4299, 6038, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15406, new WorldTile(4307, 6048, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15414, new WorldTile(4303, 6050, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15411, new WorldTile(4299, 6055, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15413, new WorldTile(4302, 6061, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15405, new WorldTile(4292, 6070, 1), -1, true, true);//Water Essling
		World.spawnNPC(15408, new WorldTile(4297, 6073, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15410, new WorldTile(4305, 6076, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15414, new WorldTile(4299, 6081, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15415, new WorldTile(4299, 6088, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15405, new WorldTile(4298, 6102, 1), -1, true, true);//Water Essling
		World.spawnNPC(15415, new WorldTile(4300, 6110, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15412, new WorldTile(4308, 6112, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15406, new WorldTile(4294, 6116, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15414, new WorldTile(4295, 6129, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15403, new WorldTile(4305, 6124, 1), -1, true, true);//Air Essling
		World.spawnNPC(15406, new WorldTile(4316, 6132, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15414, new WorldTile(4325, 6136, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15412, new WorldTile(4325, 6122, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15412, new WorldTile(4345, 6012, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15416, new WorldTile(4349, 6112, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15413, new WorldTile(4342, 6116, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15415, new WorldTile(4335, 6115, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15408, new WorldTile(4331, 6110, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15414, new WorldTile(4321, 6103, 1), -1, true, true);//Death Esshound
		World.spawnNPC(15416, new WorldTile(4338, 6093, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15416, new WorldTile(4348, 6097, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15416, new WorldTile(4358, 6116, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15404, new WorldTile(4323, 6090, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15415, new WorldTile(4319, 6093, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15410, new WorldTile(4314, 6083, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15415, new WorldTile(4320, 6081, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15408, new WorldTile(4318, 6074, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15403, new WorldTile(4323, 6078, 1), -1, true, true);//Air Essling
		World.spawnNPC(15415, new WorldTile(4337, 6075, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15415, new WorldTile(4336, 6062, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15416, new WorldTile(4327, 6067, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15409, new WorldTile(4319, 6055, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15414, new WorldTile(4314, 6055, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15412, new WorldTile(4322, 6030, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15405, new WorldTile(4329, 6030, 1), -1, true, true);//Water Essling
		World.spawnNPC(15414, new WorldTile(4336, 6033, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15406, new WorldTile(4334, 6028, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15408, new WorldTile(4341, 6025, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15410, new WorldTile(4329, 6044, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15405, new WorldTile(4335, 6049, 1), -1, true, true);//Water Essling
		World.spawnNPC(15408, new WorldTile(4346, 6047, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15415, new WorldTile(4357, 6046, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15416, new WorldTile(4353, 6064, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15413, new WorldTile(4365, 6068, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15416, new WorldTile(4370, 6064, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15415, new WorldTile(4381, 6060, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15412, new WorldTile(4377, 6056, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15408, new WorldTile(4380, 6044, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15414, new WorldTile(4380, 6038, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15404, new WorldTile(4351, 6021, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15410, new WorldTile(4358, 6027, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15403, new WorldTile(4365, 6025, 1), -1, true, true);//Air Essling
		World.spawnNPC(15403, new WorldTile(4375, 6028, 1), -1, true, true);//Air Essling
		World.spawnNPC(15405, new WorldTile(4378, 6022, 1), -1, true, true);//Water Essling
		World.spawnNPC(15405, new WorldTile(4391, 6032, 1), -1, true, true);//Water Essling
		World.spawnNPC(15414, new WorldTile(4400, 6031, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15413, new WorldTile(4396, 6036, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15409, new WorldTile(4394, 6042, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15415, new WorldTile(4401, 6040, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15411, new WorldTile(4408, 6036, 1), -1, true, true);//Astral Esshound
		World.spawnNPC(15406, new WorldTile(4405, 6045, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15406, new WorldTile(4402, 6061, 1), -1, true, true);//Earth Essling
		World.spawnNPC(15414, new WorldTile(4397, 6064, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15415, new WorldTile(4392, 6060, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15409, new WorldTile(4405, 6068, 1), -1, true, true);//Cosmic Esshound
		World.spawnNPC(15403, new WorldTile(4410, 6073, 1), -1, true, true);//Air Essling
		World.spawnNPC(15414, new WorldTile(4408, 6081, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15403, new WorldTile(4405, 6089, 1), -1, true, true);//Air Essling
		World.spawnNPC(15414, new WorldTile(4396, 6090, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15412, new WorldTile(4393, 6080, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15405, new WorldTile(4397, 6073, 1), -1, true, true);//Water Essling
		World.spawnNPC(15405, new WorldTile(4381, 6077, 1), -1, true, true);//Water Essling
		World.spawnNPC(15414, new WorldTile(4377, 6074, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15416, new WorldTile(4377, 6082, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15416, new WorldTile(4364, 6085, 1), -1, true, true);//Soul Esswraith
		World.spawnNPC(15413, new WorldTile(4363, 6091, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15412, new WorldTile(4367, 6090, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15405, new WorldTile(4387, 6088, 1), -1, true, true);//Water Essling
		World.spawnNPC(15415, new WorldTile(4383, 6089, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15407, new WorldTile(4401, 6041, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15412, new WorldTile(4378, 6100, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15414, new WorldTile(4386, 6106, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15415, new WorldTile(4366, 6102, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15413, new WorldTile(4361, 6106, 1), -1, true, true);//Law Esshound
		World.spawnNPC(15412, new WorldTile(4374, 6114, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15415, new WorldTile(4374, 6123, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15414, new WorldTile(4380, 6116, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15410, new WorldTile(4406, 6102, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15403, new WorldTile(4412, 6105, 1), -1, true, true);//Air Essling
		World.spawnNPC(15404, new WorldTile(4401, 6106, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15414, new WorldTile(4401, 6114, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15404, new WorldTile(4408, 6117, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15410, new WorldTile(4399, 6139, 1), -1, true, true);//Chaos Esshound
		World.spawnNPC(15414, new WorldTile(4399, 6132, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15404, new WorldTile(4388, 6131, 1), -1, true, true);//Mind Essling
		World.spawnNPC(15407, new WorldTile(4383, 6137, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15415, new WorldTile(4368, 6136, 1), -1, true, true);//Blood Esswraith
		World.spawnNPC(15408, new WorldTile(4364, 6129, 1), -1, true, true);//Body Esshound
		World.spawnNPC(15403, new WorldTile(4359, 6133, 1), -1, true, true);//Air Essling
		World.spawnNPC(15405, new WorldTile(4355, 6138, 1), -1, true, true);//Water Essling
		World.spawnNPC(15407, new WorldTile(4374, 6123, 1), -1, true, true);//Fire Essling
		World.spawnNPC(15414, new WorldTile(4351, 6134, 1), -1, true, true);//Death Esswraith
		World.spawnNPC(15405, new WorldTile(4349, 6138, 1), -1, true, true);//Water Essling
		World.spawnNPC(15412, new WorldTile(4342, 6138, 1), -1, true, true);//Nature Esshound
		World.spawnNPC(15403, new WorldTile(4340, 6134, 1), -1, true, true);//Air Essling
		World.spawnNPC(15408, new WorldTile(4337, 6130, 1), -1, true, true);//Body Esshound
		
		World.spawnNPC(16594, new WorldTile(3226, 3220, 0), -1, true, true);//Meg Lumbridge

	  /*
	  objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	  */
	    //World.spawnObject(new WorldObject(OBJECT, 10, 1, xxxx, yyyy, z));

	}

	/**
	 * The NPC classes.
	 */
	private static final Map<Integer, Class<?>> CUSTOM_NPCS = new HashMap<Integer, Class<?>>();

	public static void npcSpawn() {
		int size = 0;
		boolean ignore = false;
		try {
			for (String string : FileUtilities
					.readFile("data/npcs/spawns.txt")) {
				if (string.startsWith("//") || string.equals("")) {
					continue;
				}
				if (string.contains("/*")) {
					ignore = true;
					continue;
				}
				if (ignore) {
					if (string.contains("*/")) {
						ignore = false;
					}
					continue;
				}
				String[] spawn = string.split(" ");
				@SuppressWarnings("unused")
				int id = Integer.parseInt(spawn[0]), x = Integer
						.parseInt(spawn[1]), y = Integer.parseInt(spawn[2]), z = Integer
						.parseInt(spawn[3]), faceDir = Integer
						.parseInt(spawn[4]);
				NPC npc = null;
				Class<?> npcHandler = CUSTOM_NPCS.get(id);
				if (npcHandler == null) {
					npc = new NPC(id, new WorldTile(x, y, z), -1, true, false);
				} else {
					npc = (NPC) npcHandler.getConstructor(int.class)
							.newInstance(id);
				}
				if (npc != null) {
					WorldTile spawnLoc = new WorldTile(x, y, z);
					npc.setLocation(spawnLoc);
					World.spawnNPC(npc.getId(), spawnLoc, -1, true, false);
					size++;
				}
			}
		} catch (NumberFormatException e1) {
			e1.printStackTrace();
		} catch (IllegalArgumentException e1) {
			e1.printStackTrace();
		} catch (SecurityException e1) {
			e1.printStackTrace();
		} catch (IOException e1) {
			e1.printStackTrace();
		} catch (InstantiationException e1) {
			e1.printStackTrace();
		} catch (IllegalAccessException e1) {
			e1.printStackTrace();
		} catch (InvocationTargetException e1) {
			e1.printStackTrace();
		} catch (NoSuchMethodException e1) {
			e1.printStackTrace();
		}
		System.err.println("Loaded " + size + " custom npc spawns!");
	}

}