Last active
April 6, 2017 16:01
-
-
Save ivantotov/17c3c175135a04bef839715658f0a175 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31256-02.html b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31256-02.html | |
index 5aefb66..f363b71 100644 | |
--- a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31256-02.html | |
+++ b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31256-02.html | |
@@ -1,4 +1,3 @@ | |
<html><body>Trader Leon:<br> | |
-Man, you are really a dependable person. Don't forget. | |
-You must take the box of supplies to <font color="LEVEL">Messenger Wahkan of Ketra</font> at the Ketra Orc base. | |
+Man, you are really a dependable person. Don't forget. You must take the box of supplies to <font color="LEVEL">Messenger Wahkan of Ketra</font> at the Ketra Orc base. | |
</body></html> | |
\ No newline at end of file | |
diff --git a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31296-01.htm b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31296-01.htm | |
index 295a854..250ea17 100644 | |
--- a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31296-01.htm | |
+++ b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31296-01.htm | |
@@ -1,4 +1,4 @@ | |
<html><body>Guard Cadmon:<br> | |
Are you interested in the Ketra Orcs, stranger? Well, if you are, I can tell you an interesting story. Right now, the Ketra Orcs are hiring mercenaries! It's a great opportunity to get into their outpost under the pretext of delivering military supplies! Are you interested?<br> | |
-<a action="bypass -h Quest Q00011_SecretMeetingWithKetraOrcs 31296-03.html">"I'm interested!"</a> | |
+<a action="bypass -h Quest Q00011_SecretMeetingWithKetraOrcs 31296-03.htm">"I'm interested!"</a> | |
</body></html> | |
\ No newline at end of file | |
diff --git a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31371-03.html b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31371-03.html | |
index 570ea89..a477592 100644 | |
--- a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31371-03.html | |
+++ b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/31371-03.html | |
@@ -1,3 +1,3 @@ | |
-<html><body>Ketra's Messenger Wahkan:<br> | |
-You don't have required items. | |
+<html><body> | |
+Not Used:<br> | |
</body></html> | |
\ No newline at end of file | |
diff --git a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/Q00011_SecretMeetingWithKetraOrcs.java b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/Q00011_SecretMeetingWithKetraOrcs.java | |
index 246ff21..7ccb4d2 100644 | |
--- a/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/Q00011_SecretMeetingWithKetraOrcs.java | |
+++ b/dist/game/data/scripts/quests/Q00011_SecretMeetingWithKetraOrcs/Q00011_SecretMeetingWithKetraOrcs.java | |
@@ -1,5 +1,5 @@ | |
/* | |
- * Copyright (C) 2004-2016 L2J DataPack | |
+ * Copyright (C) 2004-2017 L2J DataPack | |
* | |
* This file is part of L2J DataPack. | |
* | |
@@ -22,63 +22,71 @@ | |
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; | |
import com.l2jserver.gameserver.model.quest.Quest; | |
import com.l2jserver.gameserver.model.quest.QuestState; | |
-import com.l2jserver.gameserver.model.quest.State; | |
/** | |
- * Secret Meeting With Ketra Orcs (11)<br> | |
- * Original Jython script by Emperorc. | |
- * @author nonom | |
+ * Secret Meeting With Ketra Orcs (11) | |
+ * @author ivantotov | |
*/ | |
-public class Q00011_SecretMeetingWithKetraOrcs extends Quest | |
+public final class Q00011_SecretMeetingWithKetraOrcs extends Quest | |
{ | |
// NPCs | |
- private static final int CADMON = 31296; | |
private static final int LEON = 31256; | |
+ private static final int CADMON = 31296; | |
private static final int WAHKAN = 31371; | |
// Item | |
- private static final int BOX = 7231; | |
+ private static final int MUNITIONS_BOX = 7231; | |
+ // Misc | |
+ private static final int MIN_LEVEL = 74; | |
public Q00011_SecretMeetingWithKetraOrcs() | |
{ | |
super(11, Q00011_SecretMeetingWithKetraOrcs.class.getSimpleName(), "Secret Meeting With Ketra Orcs"); | |
addStartNpc(CADMON); | |
addTalkId(CADMON, LEON, WAHKAN); | |
- registerQuestItems(BOX); | |
+ registerQuestItems(MUNITIONS_BOX); | |
} | |
@Override | |
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) | |
{ | |
- String htmltext = event; | |
- final QuestState st = getQuestState(player, false); | |
- if (st == null) | |
+ final QuestState qs = getQuestState(player, false); | |
+ if (qs == null) | |
{ | |
- return htmltext; | |
+ return null; | |
} | |
+ String htmltext = null; | |
switch (event) | |
{ | |
- case "31296-03.html": | |
- st.startQuest(); | |
+ case "31296-03.htm": | |
+ { | |
+ qs.startQuest(); | |
+ qs.setMemoState(11); | |
+ htmltext = event; | |
break; | |
+ } | |
case "31256-02.html": | |
- if (st.isCond(1)) | |
- { | |
- st.setCond(2, true); | |
- st.giveItems(BOX, 1); | |
- } | |
+ { | |
+ giveItems(player, MUNITIONS_BOX, 1); | |
+ qs.setMemoState(21); | |
+ qs.setCond(2, true); | |
+ htmltext = event; | |
break; | |
+ } | |
case "31371-02.html": | |
- if (st.isCond(2) && st.hasQuestItems(BOX)) | |
+ { | |
+ if (hasQuestItems(player, MUNITIONS_BOX)) | |
{ | |
- st.addExpAndSp(233125, 18142); | |
- st.exitQuest(false, true); | |
+ addExpAndSp(player, 82045, 6047); | |
+ qs.exitQuest(false, true); | |
+ htmltext = event; | |
} | |
else | |
{ | |
htmltext = "31371-03.html"; | |
} | |
break; | |
+ } | |
} | |
return htmltext; | |
} | |
@@ -86,47 +94,49 @@ | |
@Override | |
public String onTalk(L2Npc npc, L2PcInstance player) | |
{ | |
+ final QuestState qs = getQuestState(player, true); | |
String htmltext = getNoQuestMsg(player); | |
- final QuestState st = getQuestState(player, true); | |
- if (st == null) | |
+ if (qs.isCreated()) | |
{ | |
- return htmltext; | |
+ if (npc.getId() == CADMON) | |
+ { | |
+ htmltext = (player.getLevel() >= MIN_LEVEL) ? "31296-01.htm" : "31296-02.html"; | |
+ } | |
} | |
- | |
- int npcId = npc.getId(); | |
- switch (st.getState()) | |
+ else if (qs.isStarted()) | |
{ | |
- case State.COMPLETED: | |
- htmltext = getAlreadyCompletedMsg(player); | |
- break; | |
- case State.CREATED: | |
- if (npcId == CADMON) | |
- { | |
- htmltext = (player.getLevel() >= 74) ? "31296-01.htm" : "31296-02.html"; | |
- } | |
- break; | |
- case State.STARTED: | |
- if ((npcId == CADMON) && st.isCond(1)) | |
+ if (npc.getId() == CADMON) | |
+ { | |
+ if (qs.isMemoState(11)) | |
{ | |
htmltext = "31296-04.html"; | |
} | |
- else if (npcId == LEON) | |
+ } | |
+ else if (npc.getId() == LEON) | |
+ { | |
+ if (qs.isMemoState(11)) | |
{ | |
- if (st.isCond(1)) | |
- { | |
- htmltext = "31256-01.html"; | |
- | |
- } | |
- else if (st.isCond(2)) | |
- { | |
- htmltext = "31256-03.html"; | |
- } | |
+ htmltext = "31256-01.html"; | |
} | |
- else if ((npcId == WAHKAN) && st.isCond(2)) | |
+ else if (qs.isMemoState(21)) | |
+ { | |
+ htmltext = "31256-03.html"; | |
+ } | |
+ } | |
+ else if (npc.getId() == WAHKAN) | |
+ { | |
+ if (hasQuestItems(player, MUNITIONS_BOX) && qs.isMemoState(21)) | |
{ | |
htmltext = "31371-01.html"; | |
} | |
- break; | |
+ } | |
+ } | |
+ else if (qs.isCompleted()) | |
+ { | |
+ if (npc.getId() == CADMON) | |
+ { | |
+ htmltext = getAlreadyCompletedMsg(player); | |
+ } | |
} | |
return htmltext; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment