Beleth respawn time never stored

Issue #282 new
ShinichiYao created an issue

After Beleth dead the respawn time wont update, always 0.

Comments (3)

  1. CostyKiller

    I use this to check beleth respawn,

    #!
    
    GlobalVariablesManager.getInstance().getLong("elpy_respawn_time", 0);
    
  2. Emilio Diaz

    Ai.individual.beleth

        @Override
        public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) {
            if (npc.getId() == REAL_BELETH) {
                cancelQuestTimer("CHECK_ATTACK", null, null);
    
                setBelethKiller(killer);
                GrandBossManager.getInstance().setBossStatus(REAL_BELETH, DEAD);
                final long respawnTime = (grandBoss().getIntervalOfBelethSpawn() + getRandom(-grandBoss().getRandomOfBelethSpawn(), grandBoss().getRandomOfBelethSpawn())) * 3600000;
                GrandBossManager.getInstance().getStatsSet(REAL_BELETH).set("respawn_time", (System.currentTimeMillis() + respawnTime));
    /*          StatsSet info = GrandBossManager.getInstance().getStatsSet(REAL_BELETH);
                info.set("respawn_time", System.currentTimeMillis() + respawnTime);*/
    //          GrandBossManager.getInstance().setStatsSet(REAL_BELETH, info);
                startQuestTimer("BELETH_UNLOCK", respawnTime, null, null);
    
                deleteAll();
                npc.deleteMe();
    
                for (L2Character c : ZONE.getCharactersInside()) {
                    c.disableAllSkills();
                    c.setIsInvul(true);
                    c.setIsImmobilized(true);
                }
    
                _beleth = addSpawn(REAL_BELETH, new Location(16323, 213170, grandBoss().getBelethZcord(), 49152));
                _beleth.disableAllSkills();
                _beleth.setIsInvul(true);
                _beleth.setIsImmobilized(true);
    
                _priest = addSpawn(ELF, new Location(_beleth));
                _priest.setShowSummonAnimation(true);
                _priest.decayMe();
    
                _stone = addSpawn(STONE_COFFIN, new Location(12470, 215607, -9381, 49152));
    
                startQuestTimer("SPAWN26", 1000, null, null);
            } else if (npc.getObjectId() == _allowedObjId) {
                deleteAll();
    
                _killedCount++;
                if (_killedCount >= 5) {
                    startQuestTimer("SPAWN_REAL", 60000, null, null);
                } else {
                    startQuestTimer("SPAWN25", 60000, null, null);
                }
            }
    
            return null;
        }
    

  3. Log in to comment