public Zaken(int questId, String name, String descr) { super(questId, name, descr); // Zaken doors handling ThreadPoolManager.getInstance() .scheduleGeneralAtFixedRate( new Runnable() { public void run() { try { if (getTimeHour() == 0) { DoorTable.getInstance().getDoor(21240006).openMe(); ThreadPoolManager.getInstance() .scheduleGeneral( new Runnable() { public void run() { try { DoorTable.getInstance().getDoor(21240006).closeMe(); } catch (Throwable e) { e.printStackTrace(); log.warn("Cannot close door ID: 21240006 " + e); } } }, 300000L); } } catch (Throwable e) { e.printStackTrace(); log.warn("Cannot open door ID: 21240006 " + e); } } }, 2000L, 600000L); addEventId(ZAKEN, Quest.QuestEventType.ON_KILL); addEventId(ZAKEN, Quest.QuestEventType.ON_ATTACK); addEventId(ZAKEN, Quest.QuestEventType.ON_SPELL_FINISHED); addEventId(ZAKEN, Quest.QuestEventType.ON_AGGRO_RANGE_ENTER); addEventId(ZAKEN, Quest.QuestEventType.ON_FACTION_CALL); addEventId(doll_blader_b, Quest.QuestEventType.ON_KILL); addEventId(vale_master_b, Quest.QuestEventType.ON_KILL); addEventId(pirates_zombie_captain_b, Quest.QuestEventType.ON_KILL); addEventId(pirates_zombie_b, Quest.QuestEventType.ON_KILL); _Zone = GrandBossManager.getInstance().getZone(55312, 219168, -3223); StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN); Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN); if (status == DEAD) { // load the unlock date and time for zaken from DB long temp = info.getLong("respawn_time") - System.currentTimeMillis(); // if zaken is locked until a certain time, mark it so and start the unlock timer // the unlock time has not yet expired. if (temp > 0) startQuestTimer("zaken_unlock", temp, null, null); else { // the time has already expired while the server was offline. Immediately spawn zaken. L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0); GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE); spawnBoss(zaken); } } else { int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading"); int hp = info.getInteger("currentHP"); int mp = info.getInteger("currentMP"); L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0); zaken.setCurrentHpMp(hp, mp); spawnBoss(zaken); } }