npcDat.set("baseMpReg", 3.e-3f);
npcDat.set("basePDef", pdef);
npcDat.set("baseMDef", mdef);
L2CharTemplate template = new L2CharTemplate(npcDat);
L2DoorInstance door = new L2DoorInstance(IdFactory.getInstance().getNextId(),template, id, name, unlockable);
door.setRange(rangeXMin, rangeYMin, rangeZMin, rangeXMax, rangeYMax, rangeZMax);
try
{
door.setMapRegion(MapRegionTable.getInstance().getMapRegion(x,y));
}
catch (Exception e)
{
_log.severe("Error in door data, ID:"+id);
}
door.setCurrentHpMp(door.getMaxHp(), door.getMaxMp());
door.setOpen(1);
door.setXYZInvisible(x,y,z);
return door;
}