Jump to content
  • 0

Community Board Rb Status On Costum Rbs


ČυяŞŀŅğ

Question

on topbbsmanger.java

		if (fileName.equals("data/html/CommunityBoard/56.htm"));
		{
			// Raid Status
			raidBosses();
			content = content.replaceAll("%antharas%", bossStatus(29019));
			content = content.replaceAll("%valakas%", bossStatus(29028));
			content = content.replaceAll("%baium%", bossStatus(29020));
			content = content.replaceAll("%antqueen%", bossStatus(29001));
			content = content.replaceAll("%core%", bossStatus(29006));
			content = content.replaceAll("%zaken%", bossStatus(29022));
			content = content.replaceAll("%frintezza%", bossStatus(29045));
			content = content.replaceAll("%orfen%", bossStatus(29014));
			content = content.replaceAll("%freya%", bossStatus(29178));
			content = content.replaceAll("%beleth%", bossStatus(29118));
			
		}

and the way im taking the respawn infi is this

	/**
	 * @param bossId
	 * @return
	 */
	private static String bossStatus(int bossId)
	{
		long delay=0;
		if(bossId==29178)
		{
			delay=bosses.get("Freya");
			if(delay<=System.currentTimeMillis())
				return "<font color=\"9CC300\">Alive!</font>";
			else
				return "<font color=\"ff0000\">Dead!</font>";
		}
		else if(bossId==29118)
		{
			delay=bosses.get("Beleth");
			if(delay<=System.currentTimeMillis())
				return "<font color=\"9CC300\">Alive!</font>";
			else
				return "<font color=\"ff0000\">Dead!</font>";
		}
		delay = GrandBossManager.getInstance().getStatsSet(bossId).getLong("respawn_time");
		if (delay <= System.currentTimeMillis())
		{
			return "<td><tr><font color=\"9CC300\">Alive!</font></td></tr>";
		}
		else
		{
			return "<font color=\"ff0000\">Dead!</font>";
		}
		
	}

For normal grandbosses is working fine, but since im using costum beleth and Freya with no AI since i dont have it .. The cb is not working.. I use %freya% on 56.htm and not replacing the respawn status of those 2 rbs.. :/

 

On database l2npc those 2 bosses are L2RaidBoss and Also there is no more than one "Beleth or Freya npc as name..

 

any idea? :/

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

i think its like this right now ! but again its not  problem? I have added to many requests there :/

 

I want like this

 

 

https://imageshack.com/i/0uouznp

 

I think is the best idea like on my npc :D

Edited by ČυяŞŀŅğ
Link to comment
Share on other sites

  • 0

Fixed, It was on wrong html -_- Like this is working.. Thank you very much !

 

One question , i want to make Community board , refresh every X time. 

 

example from my respawn info npc 

        private void sendRaidBosses(L2PcInstance player, int bosslevel)
        {
                TextBuilder tb = new TextBuilder();
                tb.append("<html><title>Grand Boss Info</title><body><br><center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><table width=260>");
                for (Raidboss rb : RAID_BOSSES)
                {
                        String name = rb.getName();
                        if(name.equals("Freya") || name.equals("Beleth"))
                        	continue;
                        int level = rb.getLevel();
                        int min = bosslevel;
                        int max = min + 10;
                        if (level >= min && level <= max)
                        {
                                long delay = rb.getRespawn();
                                long currentTime = System.currentTimeMillis();
                                if (delay <= currentTime)
                                        tb.append("<tr><td><font color=\"00C3FF\">" + name + " (" + level + ")</color>:<br></td><td><font color=\"32C332\">Alive</color></td></tr>");

                                else
                                {
                              	 tb.append("<tr><td><font color=\"00C3FF\">" + name + "</color>:<br></td><td><font color=\"FF0000\">Respawn at :"+sdf.format(new Date(delay))+"</color></td></tr>");
                                }
                        }
                }

Something like this for cb , to refresh every X time , and also to shows somewere when updated , and when the next update will be. I guess this should happen on TopBBSmanager , but how? :/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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...