From 394abd78f551030e5a2e821f044418fbf687ec44 Mon Sep 17 00:00:00 2001 From: MELERIX <MELERIX@users.noreply.github.com> Date: Sat, 7 Jan 2012 23:51:31 +0000 Subject: [PATCH] BETA/STABLE: Updating signboards to show proper htmls (also updated their htmls), thans '''nonom''' for test. --- .../dist/game/data/html/signboard.htm | 2 - .../data/html/signboards/pvp_signboard.htm | 3 ++ .../html/signboards/tomb_of_crystalgolem.htm | 1 + .../L2StaticObjectInstanceAction.java | 41 +++++++++++++++---- 4 files changed, 37 insertions(+), 10 deletions(-) delete mode 100644 L2J_DataPack_BETA/dist/game/data/html/signboard.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/html/signboards/pvp_signboard.htm create mode 100644 L2J_DataPack_BETA/dist/game/data/html/signboards/tomb_of_crystalgolem.htm diff --git a/L2J_DataPack_BETA/dist/game/data/html/signboard.htm b/L2J_DataPack_BETA/dist/game/data/html/signboard.htm deleted file mode 100644 index 3e9b781a95..0000000000 --- a/L2J_DataPack_BETA/dist/game/data/html/signboard.htm +++ /dev/null @@ -1,2 +0,0 @@ -<html><body>This is the<font color="LEVEL"> dueling area</font>.<br>Your character won't become chaotic even if you fight or kill others here. And if you die, you won't lose experience points or drop items. Therefore, please enjoy battling each other without unnecessary concerns.<br>Please note that the area outside the fence is a<font color="LEVEL"> peace zone</font> where you may not attack each other at all. The area inside the fence is the<font color="LEVEL"> dueling area</font>. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/html/signboards/pvp_signboard.htm b/L2J_DataPack_BETA/dist/game/data/html/signboards/pvp_signboard.htm new file mode 100644 index 0000000000..cc77afd759 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/html/signboards/pvp_signboard.htm @@ -0,0 +1,3 @@ +<html><head><body>Welcome to the <font color="LEVEL">Dueling Area</font>.<br>Fighting and killing does not lead to chaos here. Death does not cause forfeiture of experience points or items. You may fight, kill and die as you please.<br> The area outside the fence is a <font color="LEVEL">Peaceful Zone</font> where violence is not tolerated.<br> +*Warning: If a chaotic character whose PK count is 6 or higher dies in a dueling arena, he/she has a chance of dropping an item. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/html/signboards/tomb_of_crystalgolem.htm b/L2J_DataPack_BETA/dist/game/data/html/signboards/tomb_of_crystalgolem.htm new file mode 100644 index 0000000000..36641eeeed --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/html/signboards/tomb_of_crystalgolem.htm @@ -0,0 +1 @@ +<html><head><body>Tomb of the Crystalline Golem:<br>Faint wavy writings grow clearer and bolder as you read:<br>...Long ago, Balor was gravely injured by the Water Dragon. Since then, he has feared the <font color="LEVEL">Water Dragon's Claw</font>... The claw has been passed down to the Dragon's children in the Chromatic Highlands...</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/actionhandlers/L2StaticObjectInstanceAction.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/actionhandlers/L2StaticObjectInstanceAction.java index 81556c6b18..1de22682d0 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/actionhandlers/L2StaticObjectInstanceAction.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/actionhandlers/L2StaticObjectInstanceAction.java @@ -30,8 +30,10 @@ public class L2StaticObjectInstanceAction implements IActionHandler @Override public boolean action(L2PcInstance activeChar, L2Object target, boolean interact) { - if(((L2StaticObjectInstance)target).getType() < 0) - _log.info("L2StaticObjectInstance: StaticObject with invalid type! StaticObjectId: "+((L2StaticObjectInstance)target).getStaticObjectId()); + if (((L2StaticObjectInstance) target).getType() < 0) + { + _log.info("L2StaticObjectInstance: StaticObject with invalid type! StaticObjectId: " + ((L2StaticObjectInstance) target).getStaticObjectId()); + } // Check if the L2PcInstance already target the L2NpcInstance if (activeChar.getTarget() != target) @@ -52,21 +54,44 @@ public class L2StaticObjectInstanceAction implements IActionHandler } else { - if(((L2StaticObjectInstance)target).getType() == 2) + if ((((L2StaticObjectInstance) target).getType() == 2) && (((L2StaticObjectInstance) target).getStaticObjectId() == 24230101)) + { + String filename = "data/html/signboards/tomb_of_crystalgolem.htm"; + String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename); + NpcHtmlMessage html = new NpcHtmlMessage(target.getObjectId()); + + if (content == null) + { + html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>"); + } + else + { + html.setHtml(content); + } + + activeChar.sendPacket(html); + } + else if ((((L2StaticObjectInstance) target).getType() == 2) && (((L2StaticObjectInstance) target).getStaticObjectId() != 24230101)) { - String filename = "data/html/signboard.htm"; + String filename = "data/html/signboards/pvp_signboard.htm"; String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename); NpcHtmlMessage html = new NpcHtmlMessage(target.getObjectId()); if (content == null) - html.setHtml("<html><body>Signboard is missing:<br>"+filename+"</body></html>"); + { + html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>"); + } else + { html.setHtml(content); + } activeChar.sendPacket(html); } - else if(((L2StaticObjectInstance)target).getType() == 0) - activeChar.sendPacket(((L2StaticObjectInstance)target).getMap()); + else if (((L2StaticObjectInstance) target).getType() == 0) + { + activeChar.sendPacket(((L2StaticObjectInstance) target).getMap()); + } } } return true; @@ -77,4 +102,4 @@ public class L2StaticObjectInstanceAction implements IActionHandler { return InstanceType.L2StaticObjectInstance; } -} \ No newline at end of file +} -- GitLab