try
{
statement2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id");
statement2.setInt(1, keyNpcId);
statement2.setInt(2, type);
rset2 = statement2.executeQuery();
GArray<Location> locations = new GArray<Location>();
while(rset2.next())
{
locations.add(new Location(rset2.getInt("locx"), rset2.getInt("locy"), rset2.getInt("locz"), rset2.getInt("heading"), rset2.getInt("npc_templateid")));
count++;