Jump to content
  • 0

Help How to make Raidboss Status in NPC (Alive-Dead)



btw i using l2jserver6670


pls anyone how to make a code Raidboss status show in NPC  Alive and Dead

and how to make Show announce raidboss to spawn to all player online to know


i should start from where? please.

and Examp the code please?

if announce to all player how to do if this code for show in NPC?




SpawnTable.getInstance().addNewSpawn(spawnDat, false);
        if ((respawnTime == 0L) || (time > respawnTime))
            L2RaidBossInstance raidboss = null;
            if (bossId == 11111,22222,33333,44444,55555)
                raidboss = (L2RaidBossInstance) spawnDat.doSpawn();
            if (raidboss != null)
                _bosses.put(bossId, raidboss);
                final StatsSet info = new StatsSet();
                info.set("currentHP", currentHP);
                info.set("currentMP", currentMP);
                info.set("respawnTime", 0L);
                _storedInfo.put(bossId, info);
            final long spawnTime = respawnTime - Calendar.getInstance().getTimeInMillis();
            _schedules.put(bossId, ThreadPoolManager.getInstance().scheduleGeneral(new SpawnSchedule(bossId), spawnTime));
        _spawns.put(bossId, spawnDat);
        if (storeInDb)
            try (Connection con = L2DatabaseFactory.getInstance().getConnection();
                PreparedStatement statement = con.prepareStatement("INSERT INTO raidboss_spawnlist (boss_id,amount,loc_x,loc_y,loc_z,heading,respawn_time,currentHp,currentMp) VALUES(?,?,?,?,?,?,?,?,?)"))
                statement.setInt(1, spawnDat.getId());
                statement.setInt(2, spawnDat.getAmount());
                statement.setInt(3, spawnDat.getX());
                statement.setInt(4, spawnDat.getY());
                statement.setInt(5, spawnDat.getZ());
                statement.setInt(6, spawnDat.getHeading());
                statement.setLong(7, respawnTime);
                statement.setDouble(8, currentHP);
                statement.setDouble(9, currentMP);
            catch (Exception e)
                // problem with storing spawn
                _log.log(Level.WARNING, getClass().getSimpleName() + ": Could not store raidboss #" + bossId + " in the DB:" + e.getMessage(), e);

Edited by aonniemnoi
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock