Advertisement
Guest User

Raid Boss Manager

a guest
Nov 28th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.79 KB | None | 0 0
  1. /*
  2.  * This program is free software: you can redistribute it and/or modify it under
  3.  * the terms of the GNU General Public License as published by the Free Software
  4.  * Foundation, either version 3 of the License, or (at your option) any later
  5.  * version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful, but WITHOUT
  8.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9.  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10.  * details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License along with
  13.  * this program. If not, see <http://www.gnu.org/licenses/>.
  14.  */
  15. package net.sf.l2j.gameserver.model.actor.instance;
  16.  
  17. import net.sf.l2j.gameserver.datatables.NpcTable;
  18. import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
  19. import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager.StatusEnum;
  20. import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
  21. import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  22.  
  23. /**
  24.  * @author Devlin
  25.  *
  26.  */
  27. public class L2BossStatusManagerInstance extends L2NpcInstance
  28. {
  29.     public L2BossStatusManagerInstance(int objectId, NpcTemplate template)
  30.     {
  31.         super(objectId, template);
  32.     }
  33.    
  34.     @Override
  35.     public void showChatWindow(L2PcInstance player, int val)
  36.     {  
  37.         NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  38.         StringBuilder sb = new StringBuilder("");
  39.         sb.append("<html><body>");
  40.         sb.append("<center>");
  41.         sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
  42.         sb.append("<br>");
  43.         sb.append("</center>");
  44.         sb.append("<center>");
  45.        
  46.         int raidBossId1 = 25299;
  47.         if (RaidBossSpawnManager.getInstance().getRaidBossStatusId(raidBossId1) == StatusEnum.ALIVE)
  48.             sb.append(NpcTable.getInstance().getTemplate(raidBossId1).getName()+" <font color=\"00FF00\">is alive!</font><br1>");
  49.         else
  50.             sb.append(NpcTable.getInstance().getTemplate(raidBossId1).getName()+" <font color=\"0000FF\">is dead!</font><br1>");
  51.        
  52.         int raidBossId2 = 25309;
  53.         if (RaidBossSpawnManager.getInstance().getRaidBossStatusId(raidBossId2) == StatusEnum.ALIVE)
  54.             sb.append(NpcTable.getInstance().getTemplate(raidBossId2).getName()+" <font color=\"00FF00\">is alive!</font><br1>");
  55.         else
  56.             sb.append(NpcTable.getInstance().getTemplate(raidBossId2).getName()+" <font color=\"0000FF\">is dead!</font><br1>");
  57.        
  58.         sb.append("<br>");
  59.         sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>");
  60.         sb.append("<br>");
  61.         sb.append("Powered by <font color=\"CD853F\">L2Quintus</font>");
  62.         sb.append("</center>");
  63.         sb.append("</body></html>");
  64.         html.setHtml(sb.toString());
  65.         player.sendPacket(html);
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement