This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
estaz
Hello again ;)
I have a problem with hellbound now.
I have completed a quest Path to Hellbound, and warpgate is teleporting me to hellbound already?
You have to complete Thats Bloody Hot quest too to enter hellbound, but i can enter the island without completion of the quest.
package custom.HellboundIsland; import L2j.Infinity.gameserver.instancemanager.hellbound.HellboundManager; import L2j.Infinity.gameserver.model.actor.L2Npc; import L2j.Infinity.gameserver.model.actor.instance.L2PcInstance; import L2j.Infinity.gameserver.model.quest.Quest; import L2j.Infinity.gameserver.model.quest.State; import L2j.Infinity.gameserver.model.quest.QuestState; public class HellboundIsland extends Quest { private static final String THATS_BLOODY_HOT = "133_ThatsBloodyHot"; private static final String PATH_TO_HELLBOUND = "130_PathToHellbound"; private final static int[] npcIds = { 32314, 32315, 32316, 32317, 32318, 32319 }; public HellboundIsland(int questId, String name, String descr) { super(questId, name, descr); for (final int id : npcIds) { addStartNpc(id); addFirstTalkId(id); addTalkId(id); } } private static final boolean canEnter(L2PcInstance player) { if (player.isFlying()) return false; QuestState st; if (!HellboundManager.getInstance().isLocked()) { st = player.getQuestState(PATH_TO_HELLBOUND); if (st != null && st.getState() == State.COMPLETED) return true; } st = player.getQuestState(THATS_BLOODY_HOT); if (st != null && st.getState() == State.COMPLETED) return true; return false; } @Override public final String onFirstTalk(L2Npc npc, L2PcInstance player) { if (!canEnter(player)) { if (HellboundManager.getInstance().isLocked()) return "warpgate-locked.htm"; } return npc.getNpcId() + ".htm"; } @Override public final String onTalk(L2Npc npc, L2PcInstance player) { if (!canEnter(player)) return "warpgate-no.htm"; player.teleToLocation(-11272, 236464, -3248, true); HellboundManager.getInstance().unlock(); return null; } public static void main(String[] args) { new HellboundIsland(-1, "HellboundIsland", "custom"); } }I think, that this code shows, that it is checking, if Thats bloody Hot quest is completed, but then why it allows to teleport??
- estaz
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now