BossForever

Untitled

Jul 6th, 2017
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 18.90 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: config/functions/l2jfrozen.properties
  4. ===================================================================
  5. --- config/functions/l2jfrozen.properties   (revision 1132)
  6. +++ config/functions/l2jfrozen.properties   (working copy)
  7. @@ -281,4 +281,23 @@
  8.  ProtectorSkillLevel = 13
  9.  ProtectorSkillTime = 600
  10.  # Npc Protector Message
  11. -ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
  12. \ No newline at end of file
  13. +ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
  14. +
  15. +#=============================================================
  16. +#                       Custom settings
  17. +#=============================================================
  18. +# Limit of displayed raid boss per page
  19. +# Default: 15
  20. +RaidBossInfoPageLimit = 15
  21. +
  22. +# Limit of displayed drop per page
  23. +# Default: 15
  24. +RaidBossDropPageLimit = 15
  25. +
  26. +# Displayed date format for dead raid boss
  27. +# Default: (MMM dd, HH:mm)
  28. +RaidBossDateFormat = (MMM dd, HH:mm)
  29. +
  30. +# Displayed raid boss
  31. +# Syntax: bossId,bossId, ...
  32. +RaidBossIds = 25238,25112,25281,25234,29019,25109,25188,25395,25029,29020,25434,25044,25269,25137,25426,25057,25176,25266,25073,25501,25020,25392,25067,25131,25079,25063,25450,29006,25404,25088,25189,25217,25290,25509,25460,25220,25276,25282,25182,25322,25372,25248,25418,25192,25328,25095,25319,25070,25444,25032,25493,25441,25385,25398,25496,25498,25198,25214,25423,29033,29030,29037,29036,25125,25143,25152,25325,25524,25431,29045,25010,25354,25255,25475,25013,25106,25162,25352,25512,29095,25467,25473,25001,25179,25118,25490,25463,25241,25140,25293,25115,25296,25166,25447,25260,25047,25026,25380,25054,25263,25305,25302,25299,25158,25092,25202,25366,25127,25245,25244,25470,25082,25134,25277,25170,25126,25407,25378,25481,25373,25429,25453,25119,25456,25415,25412,25504,25391,25205,29014,25420,25280,25249,25252,25019,25159,25272,25365,25523,25394,25076,29001,25514,25169,25051,25506,25388,25122,25041,25007,25383,25410,25226,25163,25099,29065,29046,29047,25211,25098,25146,25102,25155,25035,25478,25401,25103,25223,25306,25316,25369,25089,25233,25023,25229,25357,25256,25185,25016,25438,25360,25173,25085,25437,25230,25038,25362,25004,25060,25527,29028,25235,25315,25312,25309,25050,25128,25208,25199,25487,29040,25064,29022,25259,25484,25149,25375
  33. Index: head-src/com/l2jfrozen/gameserver/managers/RaidBossSpawnManager.java
  34. ===================================================================
  35. --- head-src/com/l2jfrozen/gameserver/managers/RaidBossSpawnManager.java    (revision 1132)
  36. +++ head-src/com/l2jfrozen/gameserver/managers/RaidBossSpawnManager.java    (working copy)
  37. @@ -203,7 +203,10 @@
  38.             {
  39.                 updateDb();
  40.             }
  41. -          
  42. +            if (Config.LIST_RAID_BOSS_IDS.contains(bossId))
  43. +            {
  44. +                RaidBossInfoManager.getInstance().updateRaidBossInfo(bossId, 0);
  45. +            } 
  46.         }
  47.     }
  48.    
  49. @@ -242,6 +245,10 @@
  50.             {
  51.                 updateDb();
  52.             }
  53. +            if (Config.LIST_RAID_BOSS_IDS.contains(boss.getNpcId()))
  54. +            {
  55. +                RaidBossInfoManager.getInstance().updateRaidBossInfo(boss.getNpcId(), respawnTime);
  56. +            }
  57.         }
  58.         else
  59.         {
  60. Index: head-src/com/l2jfrozen/gameserver/managers/GrandBossManager.java
  61. ===================================================================
  62. --- head-src/com/l2jfrozen/gameserver/managers/GrandBossManager.java    (revision 1132)
  63. +++ head-src/com/l2jfrozen/gameserver/managers/GrandBossManager.java    (working copy)
  64. @@ -301,6 +301,9 @@
  65.         _storedInfo.put(bossId, info);
  66.         // Update immediately status in Database.
  67.         fastStoreToDb();
  68. +              
  69. +       if (Config.LIST_RAID_BOSS_IDS.contains(bossId))
  70. +           RaidBossInfoManager.getInstance().updateRaidBossInfo(bossId, info.getLong("respawn_time"));
  71.     }
  72.    
  73.     private void fastStoreToDb()
  74. Index: head-src/com/l2jfrozen/Config.java
  75. ===================================================================
  76. --- head-src/com/l2jfrozen/Config.java  (revision 1132)
  77. +++ head-src/com/l2jfrozen/Config.java  (working copy)
  78. @@ -2427,6 +2427,11 @@
  79.     public static String FARM2_CUSTOM_MESSAGE;
  80.     public static String PVP1_CUSTOM_MESSAGE;
  81.     public static String PVP2_CUSTOM_MESSAGE;
  82. +   public static int RAID_BOSS_INFO_PAGE_LIMIT;
  83. +   public static int RAID_BOSS_DROP_PAGE_LIMIT;
  84. +   public static String RAID_BOSS_DATE_FORMAT;
  85. +   public static String RAID_BOSS_IDS;
  86. +   public static FastList<Integer> LIST_RAID_BOSS_IDS;
  87.    
  88.     // ============================================================
  89.     public static void loadL2JFrozenConfig()
  90. @@ -2546,6 +2551,17 @@
  91.             FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
  92.             PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
  93.             PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
  94. +           RAID_BOSS_INFO_PAGE_LIMIT = Integer.parseInt(L2JFrozenSettings.getProperty("RaidBossInfoPageLimit", "15"));
  95. +           RAID_BOSS_DROP_PAGE_LIMIT = Integer.parseInt(L2JFrozenSettings.getProperty("RaidBossDropPageLimit", "15"));
  96. +           RAID_BOSS_DATE_FORMAT = L2JFrozenSettings.getProperty("RaidBossDateFormat", "MMM dd, HH:mm");
  97. +           RAID_BOSS_IDS = L2JFrozenSettings.getProperty("RaidBossIds", "0,0");
  98. +           LIST_RAID_BOSS_IDS = new FastList<>();
  99. +           for (String val : RAID_BOSS_IDS.split(","))
  100. +           {
  101. +               int npcId = Integer.parseInt(val);
  102. +               LIST_RAID_BOSS_IDS.add(npcId);
  103. +           }
  104. +                  
  105.         }
  106.         catch (final Exception e)
  107.         {
  108. Index: head-src/com/l2jfrozen/gameserver/managers/RaidBossInfoManager.java
  109. ===================================================================
  110. --- head-src/com/l2jfrozen/gameserver/managers/RaidBossInfoManager.java (nonexistent)
  111. +++ head-src/com/l2jfrozen/gameserver/managers/RaidBossInfoManager.java (working copy)
  112. @@ -0,0 +1,85 @@
  113. +package com.l2jfrozen.gameserver.managers;
  114. +
  115. +import java.sql.Connection;
  116. +import java.sql.PreparedStatement;
  117. +import java.sql.ResultSet;
  118. +import java.util.logging.Logger;
  119. +
  120. +import com.l2jfrozen.Config;
  121. +import com.l2jfrozen.util.CloseUtil;
  122. +import com.l2jfrozen.util.database.DatabaseUtils;
  123. +import com.l2jfrozen.util.database.L2DatabaseFactory;
  124. +
  125. +import javolution.util.FastMap;
  126. +
  127. +/**
  128. + * @author rapfersan92
  129. + */
  130. +public class RaidBossInfoManager
  131. +{
  132. +   private static final Logger _log = Logger.getLogger(RaidBossInfoManager.class.getName());
  133. +  
  134. +   private final FastMap<Integer, Long> _raidBosses;
  135. +  
  136. +   public static RaidBossInfoManager getInstance()
  137. +   {
  138. +       return SingletonHolder._instance;
  139. +   }
  140. +  
  141. +   protected RaidBossInfoManager()
  142. +   {
  143. +       _raidBosses = new FastMap<>();
  144. +       load();
  145. +   }
  146. +  
  147. +   public void load()
  148. +   {
  149. +       Connection con = null;
  150. +       try
  151. +       {
  152. +           con = L2DatabaseFactory.getInstance().getConnection(false);
  153. +           PreparedStatement statement;
  154. +           ResultSet rs;
  155. +          
  156. +           statement = con.prepareStatement("SELECT boss_id, respawn_time FROM grandboss_data UNION SELECT boss_id, respawn_time FROM raidboss_spawnlist ORDER BY boss_id");
  157. +           rs = statement.executeQuery();
  158. +           while (rs.next())
  159. +           {
  160. +               int bossId = rs.getInt("boss_id");
  161. +               if (Config.LIST_RAID_BOSS_IDS.contains(bossId))
  162. +                   _raidBosses.put(bossId, rs.getLong("respawn_time"));
  163. +           }
  164. +           DatabaseUtils.close(rs);
  165. +           rs = null;
  166. +           DatabaseUtils.close(statement);
  167. +           statement = null;
  168. +       }
  169. +       catch (final Exception e)
  170. +       {
  171. +           if (Config.ENABLE_ALL_EXCEPTIONS)
  172. +               e.printStackTrace();
  173. +           _log.warning("Exception: RaidBossInfoManager load: " + e);
  174. +       }
  175. +       finally
  176. +       {
  177. +           CloseUtil.close(con);
  178. +           con = null;
  179. +       }
  180. +       _log.info("RaidBossInfoManager: Loaded " + _raidBosses.size() + " instances.");
  181. +   }
  182. +  
  183. +   public void updateRaidBossInfo(int bossId, long respawnTime)
  184. +   {
  185. +       _raidBosses.put(bossId, respawnTime);
  186. +   }
  187. +  
  188. +   public long getRaidBossRespawnTime(int bossId)
  189. +   {
  190. +       return _raidBosses.get(bossId);
  191. +   }
  192. +  
  193. +   private static class SingletonHolder
  194. +   {
  195. +       protected static final RaidBossInfoManager _instance = new RaidBossInfoManager();
  196. +   }
  197. +}
  198. \ No newline at end of file
  199. Index: head-src/com/l2jfrozen/gameserver/GameServer.java
  200. ===================================================================
  201. --- head-src/com/l2jfrozen/gameserver/GameServer.java   (revision 1132)
  202. +++ head-src/com/l2jfrozen/gameserver/GameServer.java   (working copy)
  203. @@ -112,6 +112,7 @@
  204.  import com.l2jfrozen.gameserver.managers.MercTicketManager;
  205.  import com.l2jfrozen.gameserver.managers.PetitionManager;
  206.  import com.l2jfrozen.gameserver.managers.QuestManager;
  207. +import com.l2jfrozen.gameserver.managers.RaidBossInfoManager;
  208.  import com.l2jfrozen.gameserver.managers.RaidBossPointsManager;
  209.  import com.l2jfrozen.gameserver.managers.RaidBossSpawnManager;
  210.  import com.l2jfrozen.gameserver.managers.SiegeManager;
  211. @@ -351,6 +352,7 @@
  212.         if (!Config.ALT_DEV_NO_RB)
  213.         {
  214.             RaidBossSpawnManager.getInstance();
  215. +           RaidBossInfoManager.getInstance();
  216.             GrandBossManager.getInstance();
  217.             RaidBossPointsManager.init();
  218.         }
  219. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInfoInstance.java
  220. ===================================================================
  221. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInfoInstance.java  (nonexistent)
  222. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2RaidBossInfoInstance.java  (working copy)
  223. @@ -0,0 +1,266 @@
  224. +/*
  225. + * This program is free software: you can redistribute it and/or modify it under
  226. + * the terms of the GNU General Public License as published by the Free Software
  227. + * Foundation, either version 3 of the License, or (at your option) any later
  228. + * version.
  229. + *
  230. + * This program is distributed in the hope that it will be useful, but WITHOUT
  231. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  232. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  233. + * details.
  234. + *
  235. + * You should have received a copy of the GNU General Public License along with
  236. + * this program. If not, see <http://www.gnu.org/licenses/>.
  237. + */
  238. +package com.l2jfrozen.gameserver.model.actor.instance;
  239. +
  240. +import java.text.SimpleDateFormat;
  241. +import java.util.ArrayList;
  242. +import java.util.Date;
  243. +import java.util.List;
  244. +import java.util.StringTokenizer;
  245. +
  246. +import com.l2jfrozen.Config;
  247. +import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
  248. +import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
  249. +import com.l2jfrozen.gameserver.managers.RaidBossInfoManager;
  250. +import com.l2jfrozen.gameserver.model.L2DropData;
  251. +import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
  252. +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  253. +import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
  254. +import com.l2jfrozen.util.random.Rnd;
  255. +
  256. +import javolution.text.TextBuilder;
  257. +import javolution.util.FastList;
  258. +import javolution.util.FastMap;
  259. +
  260. +
  261. +/**
  262. + * @author rapfersan92
  263. + */
  264. +public class L2RaidBossInfoInstance extends L2NpcInstance
  265. +{
  266. +   private final FastMap<Integer, Integer> _lastPage = new FastMap<>();
  267. +  
  268. +   private final String[][] _messages =
  269. +   {
  270. +       {
  271. +           "<font color=\"LEVEL\">%player%</font>, are you not afraid?",
  272. +           "Be careful <font color=\"LEVEL\">%player%</font>!"
  273. +       },
  274. +       {
  275. +           "Here is the drop list of <font color=\"LEVEL\">%boss%</font>!",
  276. +           "Seems that <font color=\"LEVEL\">%boss%</font> has good drops."
  277. +       },
  278. +   };
  279. +  
  280. +   public L2RaidBossInfoInstance(int objectId, L2NpcTemplate template)
  281. +   {
  282. +       super(objectId, template);
  283. +   }
  284. +  
  285. +   @Override
  286. +   public void showChatWindow(L2PcInstance player, int val)
  287. +   {
  288. +       String name = "data/html/mods/raidbossinfo/" + getNpcId() + ".htm";
  289. +       if (val != 0)
  290. +           name = "data/html/mods/raidbossinfo/" + getNpcId() + "-" + val + ".htm";
  291. +      
  292. +       NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  293. +       html.setFile(name);
  294. +       html.replace("%objectId%", getObjectId());
  295. +       player.sendPacket(html);
  296. +       player.sendPacket(ActionFailed.STATIC_PACKET);
  297. +   }
  298. +  
  299. +   @Override
  300. +   public void onBypassFeedback(L2PcInstance player, String command)
  301. +   {
  302. +       StringTokenizer st = new StringTokenizer(command, " ");
  303. +       String currentCommand = st.nextToken();
  304. +      
  305. +       if (currentCommand.startsWith("RaidBossInfo"))
  306. +       {
  307. +           int pageId = Integer.parseInt(st.nextToken());
  308. +           _lastPage.put(player.getObjectId(), pageId);
  309. +           showRaidBossInfo(player, pageId);
  310. +       }
  311. +       else if (currentCommand.startsWith("RaidBossDrop"))
  312. +       {
  313. +           int bossId = Integer.parseInt(st.nextToken());
  314. +           int pageId = st.hasMoreTokens() ? Integer.parseInt(st.nextToken()) : 1;
  315. +           showRaidBossDrop(player, bossId, pageId);
  316. +       }
  317. +      
  318. +       super.onBypassFeedback(player, command);
  319. +   }
  320. +  
  321. +   private void showRaidBossInfo(L2PcInstance player, int pageId)
  322. +   {
  323. +       FastList<Integer> infos = new FastList<>();
  324. +       infos.addAll(Config.LIST_RAID_BOSS_IDS);
  325. +      
  326. +       final int limit = Config.RAID_BOSS_INFO_PAGE_LIMIT;
  327. +       final int max = infos.size() / limit + (infos.size() % limit == 0 ? 0 : 1);
  328. +       infos = (FastList<Integer>) infos.subList((pageId - 1) * limit, Math.min(pageId * limit, infos.size()));
  329. +      
  330. +       final TextBuilder sb = new TextBuilder();
  331. +       sb.append("<html>");
  332. +       sb.append("<center>");
  333. +       sb.append("<body>");
  334. +       sb.append("<table width=\"256\">");
  335. +       sb.append("<tr><td width=\"256\" align=\"center\">%name%</td></tr>");
  336. +       sb.append("</table>");
  337. +       sb.append("<br>");
  338. +       sb.append("<table width=\"256\">");
  339. +       sb.append("<tr><td width=\"256\" align=\"left\">" + _messages[0][Rnd.get(_messages.length)].replace("%player%", player.getName()) + "</td></tr>");
  340. +       sb.append("</table>");
  341. +       sb.append("<br>");
  342. +       sb.append("<table width=\"224\" bgcolor=\"000000\">");
  343. +       sb.append("<tr><td width=\"224\" align=\"center\">Raid Boss Infos</td></tr>");
  344. +       sb.append("</table>");
  345. +       sb.append("<br>");
  346. +       sb.append("<table width=\"256\">");
  347. +      
  348. +       for (int bossId : infos)
  349. +       {
  350. +           final L2NpcTemplate template = NpcTable.getInstance().getTemplate(bossId);
  351. +           if (template == null)
  352. +               continue;
  353. +          
  354. +           String bossName = template.getName();
  355. +           if (bossName.length() > 23)
  356. +               bossName = bossName.substring(0, 23) + "...";
  357. +          
  358. +           final long respawnTime = RaidBossInfoManager.getInstance().getRaidBossRespawnTime(bossId);
  359. +           if (respawnTime <= System.currentTimeMillis())
  360. +           {
  361. +               sb.append("<tr>");
  362. +               sb.append("<td width=\"146\" align=\"left\"><a action=\"bypass -h npc_%objectId%_RaidBossDrop " + bossId + "\">" + bossName + "</a></td>");
  363. +               sb.append("<td width=\"110\" align=\"right\"><font color=\"9CC300\">Alive</font></td>");
  364. +               sb.append("</tr>");
  365. +           }
  366. +           else
  367. +           {
  368. +               sb.append("<tr>");
  369. +               sb.append("<td width=\"146\" align=\"left\"><a action=\"bypass -h npc_%objectId%_RaidBossDrop " + bossId + "\">" + bossName + "</a></td>");
  370. +               sb.append("<td width=\"110\" align=\"right\"><font color=\"FB5858\">Dead</font> " + new SimpleDateFormat(Config.RAID_BOSS_DATE_FORMAT).format(new Date(respawnTime)) + "</td>");
  371. +               sb.append("</tr>");
  372. +           }
  373. +       }
  374. +      
  375. +       sb.append("</table>");
  376. +       sb.append("<br>");
  377. +       sb.append("<table width=\"224\" cellspacing=\"2\">");
  378. +       sb.append("<tr>");
  379. +      
  380. +       for (int x = 0; x < max; x++)
  381. +       {
  382. +           final int pageNr = x + 1;
  383. +           if (pageId == pageNr)
  384. +               sb.append("<td align=\"center\">" + pageNr + "</td>");
  385. +           else
  386. +               sb.append("<td align=\"center\"><a action=\"bypass -h npc_%objectId%_RaidBossInfo " + pageNr + "\">" + pageNr + "</a></td>");
  387. +       }
  388. +      
  389. +       sb.append("</tr>");
  390. +       sb.append("</table>");
  391. +       sb.append("<br>");
  392. +       sb.append("<table width=\"160\" cellspacing=\"2\">");
  393. +       sb.append("<tr>");
  394. +       sb.append("<td width=\"160\" align=\"center\"><a action=\"bypass -h npc_%objectId%_Chat 0\">Return</a></td>");
  395. +       sb.append("</tr>");
  396. +       sb.append("</table>");
  397. +       sb.append("<br>");
  398. +       sb.append("<table width=\"256\">");
  399. +       sb.append("<tr><td width=\"256\" align=\"center\">L2jBrasil</td></tr>");
  400. +       sb.append("</table>");
  401. +       sb.append("</center>");
  402. +       sb.append("</body>");
  403. +       sb.append("</html>");
  404. +      
  405. +       final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  406. +       html.setHtml(sb.toString());
  407. +       html.replace("%name%", getName());
  408. +       html.replace("%objectId%", getObjectId());
  409. +       player.sendPacket(html);
  410. +   }
  411. +  
  412. +   private void showRaidBossDrop(L2PcInstance player, int bossId, int pageId)
  413. +   {
  414. +       final L2NpcTemplate template = NpcTable.getInstance().getTemplate(bossId);
  415. +       if (template == null)
  416. +           return;
  417. +      
  418. +       List<Integer> drops = new ArrayList<>();
  419. +       for (L2DropData drop : template.getAllDropData())
  420. +           drops.add(drop.getItemId());
  421. +      
  422. +       final int limit = Config.RAID_BOSS_DROP_PAGE_LIMIT;
  423. +       final int max = drops.size() / limit + (drops.size() % limit == 0 ? 0 : 1);
  424. +       drops = drops.subList((pageId - 1) * limit, Math.min(pageId * limit, drops.size()));
  425. +      
  426. +       final TextBuilder sb = new TextBuilder();
  427. +       sb.append("<html>");
  428. +       sb.append("<center>");
  429. +       sb.append("<body>");
  430. +       sb.append("<table width=\"256\">");
  431. +       sb.append("<tr><td width=\"256\" align=\"center\">%name%</td></tr>");
  432. +       sb.append("</table>");
  433. +       sb.append("<br>");
  434. +       sb.append("<table width=\"256\">");
  435. +       sb.append("<tr><td width=\"256\" align=\"left\">" + _messages[1][Rnd.get(_messages.length)].replace("%boss%", template.getName()) + "</td></tr>");
  436. +       sb.append("</table>");
  437. +       sb.append("<br>");
  438. +       sb.append("<table width=\"224\" bgcolor=\"000000\">");
  439. +       sb.append("<tr><td width=\"224\" align=\"center\">Raid Boss Drops</td></tr>");
  440. +       sb.append("</table>");
  441. +       sb.append("<br>");
  442. +       sb.append("<table width=\"256\">");
  443. +      
  444. +       for (int itemId : drops)
  445. +       {
  446. +           String itemName = ItemTable.getInstance().getTemplate(itemId).getName();
  447. +           if (itemName.length() > 47)
  448. +               itemName = itemName.substring(0, 47) + "...";
  449. +          
  450. +           sb.append("<tr><td width=\"256\" align=\"center\">" + itemName + "</td></tr>");
  451. +       }
  452. +      
  453. +       sb.append("</table>");
  454. +       sb.append("<br>");
  455. +       sb.append("<table width=\"64\" cellspacing=\"2\">");
  456. +       sb.append("<tr>");
  457. +      
  458. +       for (int x = 0; x < max; x++)
  459. +       {
  460. +           final int pageNr = x + 1;
  461. +           if (pageId == pageNr)
  462. +               sb.append("<td align=\"center\">" + pageNr + "</td>");
  463. +           else
  464. +               sb.append("<td align=\"center\"><a action=\"bypass -h npc_%objectId%_RaidBossDrop " + bossId + " " + pageNr + "\">" + pageNr + "</a></td>");
  465. +       }
  466. +      
  467. +       sb.append("</tr>");
  468. +       sb.append("</table>");
  469. +       sb.append("<br>");
  470. +       sb.append("<table width=\"160\" cellspacing=\"2\">");
  471. +       sb.append("<tr>");
  472. +       sb.append("<td width=\"160\" align=\"center\"><a action=\"bypass -h npc_%objectId%_RaidBossInfo " + _lastPage.get(player.getObjectId()) + "\">Return</a></td>");
  473. +       sb.append("</tr>");
  474. +       sb.append("</table>");
  475. +       sb.append("<br>");
  476. +       sb.append("<table width=\"256\">");
  477. +       sb.append("<tr><td width=\"256\" align=\"center\">L2jBrasil</td></tr>");
  478. +       sb.append("</table>");
  479. +       sb.append("</center>");
  480. +       sb.append("</body>");
  481. +       sb.append("</html>");
  482. +      
  483. +       final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
  484. +       html.setHtml(sb.toString());
  485. +       html.replace("%name%", getName());
  486. +       html.replace("%objectId%", getObjectId());     
  487. +       player.sendPacket(html);
  488. +   }
  489. +}
  490. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment