diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32314.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32314.htm deleted file mode 100644 index ba1df373edcaff38adea893b23a9695b816f3bfe..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32314.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is not operational. Something seems to be needed to open it.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32315.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32315.htm deleted file mode 100644 index 0fd5a37d8de3e7f030c80f009d3e936a1184ce6d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32315.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is now operational.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32316.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32316.htm deleted file mode 100644 index 0fd5a37d8de3e7f030c80f009d3e936a1184ce6d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32316.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is now operational.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32317.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32317.htm deleted file mode 100644 index 0fd5a37d8de3e7f030c80f009d3e936a1184ce6d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32317.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is now operational.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32318.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32318.htm deleted file mode 100644 index 0fd5a37d8de3e7f030c80f009d3e936a1184ce6d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32318.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is now operational.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32319.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32319.htm deleted file mode 100644 index 0fd5a37d8de3e7f030c80f009d3e936a1184ce6d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/32319.htm +++ /dev/null @@ -1,4 +0,0 @@ -<html><body>Warpgate:<br> -The Warpgate is now operational.<br> -<a action="bypass -h npc_%objectId%_Quest Warpgate">Enter Hellbound Island.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/warpgate-locked.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-01.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/warpgate-locked.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-01.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-02.html b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-02.html new file mode 100644 index 0000000000000000000000000000000000000000..126c2640c7601360e103866858721e562b574a70 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-02.html @@ -0,0 +1,4 @@ +<html><body>Warpgate:<br> +The Warpgate is now operational.<br> +<a action="bypass -h Quest Warpgate enter">Enter Hellbound Island.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-03.html b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-03.html new file mode 100644 index 0000000000000000000000000000000000000000..f5404b2c63225a7aabef3aa3d0879cde3f1fc99d --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate-03.html @@ -0,0 +1,3 @@ +<html><body>Warp Gate:<br> +You cannot enter the gate. Apparently some other requirement must be met. +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate.java b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate.java index cca2107f42d6b1a6d31132d9f6543d4a04f62e90..cafc24c7bb760ff4d8efe22fa0a0a50c083d7d81 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/Warpgate.java @@ -47,13 +47,14 @@ public final class Warpgate extends AbstractNpcAI 32316, 32317, 32318, - 32319 + 32319, }; // Locations - private static final Location HELLBOUND = new Location(-11272, 236464, -3248); - protected static final Location REMOVE_LOC = new Location(-16555, 209375, -3670); - // Misc + private static final Location ENTER_LOC = new Location(-11272, 236464, -3248); + private static final Location REMOVE_LOC = new Location(-16555, 209375, -3670); + // Item private static final int MAP = 9994; + // Misc private static final int ZONE = 40101; public Warpgate() @@ -68,7 +69,18 @@ public final class Warpgate extends AbstractNpcAI @Override public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { - if (event.equals("TELEPORT")) + if (event.equals("enter")) + { + if (canEnter(player)) + { + player.teleToLocation(ENTER_LOC, true); + } + else + { + return "Warpgate-03.html"; + } + } + else if (event.equals("TELEPORT")) { player.teleToLocation(REMOVE_LOC, true); } @@ -78,30 +90,7 @@ public final class Warpgate extends AbstractNpcAI @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { - if (!canEnter(player)) - { - if (HellboundEngine.getInstance().isLocked()) - { - return "warpgate-locked.htm"; - } - } - return npc.getId() + ".htm"; - } - - @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { - if (!canEnter(player)) - { - return "warpgate-no.htm"; - } - player.teleToLocation(HELLBOUND, true); - - if (HellboundEngine.getInstance().isLocked()) - { - HellboundEngine.getInstance().setLevel(1); - } - return super.onTalk(npc, player); + return HellboundEngine.getInstance().isLocked() ? "Warpgate-01.html" : "Warpgate-02.html"; } @Override @@ -109,16 +98,15 @@ public final class Warpgate extends AbstractNpcAI { if (character.isPlayer()) { - if (!canEnter(character.getActingPlayer()) && !character.canOverrideCond(PcCondOverride.ZONE_CONDITIONS)) + final L2PcInstance player = character.getActingPlayer(); + + if (!canEnter(player) && !player.canOverrideCond(PcCondOverride.ZONE_CONDITIONS) && !player.isOnEvent()) { - startQuestTimer("TELEPORT", 1000, null, (L2PcInstance) character); + startQuestTimer("TELEPORT", 1000, null, player); } - else if (!character.getActingPlayer().isMinimapAllowed()) + else if (!player.isMinimapAllowed() && hasAtLeastOneQuestItem(player, MAP)) { - if (character.getInventory().getItemByItemId(MAP) != null) - { - character.getActingPlayer().setMinimapAllowed(true); - } + player.setMinimapAllowed(true); } } return super.onEnterZone(character, zone); @@ -136,16 +124,9 @@ public final class Warpgate extends AbstractNpcAI return true; } - QuestState st; - if (!HellboundEngine.getInstance().isLocked()) - { - st = player.getQuestState(Q00130_PathToHellbound.class.getSimpleName()); - if ((st != null) && st.isCompleted()) - { - return true; - } - } - st = player.getQuestState(Q00133_ThatsBloodyHot.class.getSimpleName()); - return ((st != null) && st.isCompleted()); + final QuestState path_to_hellbound_st = player.getQuestState(Q00130_PathToHellbound.class.getSimpleName()); + final QuestState thats_bloody_hot_st = player.getQuestState(Q00133_ThatsBloodyHot.class.getSimpleName()); + + return (((path_to_hellbound_st != null) && path_to_hellbound_st.isCompleted()) || ((thats_bloody_hot_st != null) && thats_bloody_hot_st.isCompleted())); } } \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/warpgate-no.htm b/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/warpgate-no.htm deleted file mode 100644 index 9fd5a7c142d47a01f85eb306d5f911a2d702beee..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/hellbound/AI/NPC/Warpgate/warpgate-no.htm +++ /dev/null @@ -1,3 +0,0 @@ -<html><body>Warp Gate:<br> -You cannot enter the gate. Apparently some other requirements must be met. -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00133_ThatsBloodyHot/Q00133_ThatsBloodyHot.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00133_ThatsBloodyHot/Q00133_ThatsBloodyHot.java index 96bf6b723069fe75637e1f50e7591f1a37bcb3a7..625eeac6cf6d95d1e1962dd8f2ffd9561bd6117e 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00133_ThatsBloodyHot/Q00133_ThatsBloodyHot.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00133_ThatsBloodyHot/Q00133_ThatsBloodyHot.java @@ -136,6 +136,7 @@ public class Q00133_ThatsBloodyHot extends Quest } else { + HellboundEngine.getInstance().setLevel(1); st.giveAdena(254247, true); st.addExpAndSp(325881, 32524); st.exitQuest(false, true);