瀏覽代碼

BETA: Improved quest '''Secret Mission'''.

- Patch by: jurchiks
- Review by: 
	Adry_85
	!UnAfraid
Adry_85 12 年之前
父節點
當前提交
a4e6dd93f6
共有 22 個文件被更改,包括 132 次插入183 次删除
  1. 5 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-01.htm
  2. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-02.html
  3. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-02b.html
  4. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-03.html
  5. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-04.htm
  6. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-05.htm
  7. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-06.html
  8. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-07.htm
  9. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-07.html
  10. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-01.htm
  11. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-01.html
  12. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-02.htm
  13. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-02.html
  14. 3 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-03.html
  15. 0 8
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-00.html
  16. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-01.html
  17. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-02.html
  18. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-03.html
  19. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-04.html
  20. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-05.html
  21. 4 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-06.html
  22. 69 72
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/Q10288_SecretMission.java

+ 5 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-01.htm

@@ -1,8 +1,6 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
-It's time plans were put into motion... yes... it's time those silent sycophants saw the truth of things... time for you to finally earn the right to be in my presence as well. I've got a task for you... yes if you're willing, there's something that needs being done and you will be rewarded with more than my mere respect.<br>
-<a action="bypass -h Quest Q10288_SecretMission 31350-03.htm">Ask what needs to be done.</a><br>
-<a action="bypass -h Quest Q10288_SecretMission 31350-02.htm">Back away slowly and quietly.</a><br>
-</body>
-</html>
+It's time plans were put into motion… yes… it's time those silent sycophants saw the truth of things... time for you to finally earn the right to be in my presence as well. I've got a task for you… yes if you're willing, there's something that needs being done and you will be rewarded with more than my mere respect.<br>
+<a action="bypass -h Quest Q10288_SecretMission 31350-03.html">Ask what needs to be done.</a><br>
+<a action="bypass -h Quest Q10288_SecretMission 31350-02.html">Back away slowly and quietly.</a>
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-02.html

@@ -1,6 +1,4 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
-Why are you here? Stop testing my patience and perform the simple tasks to which I have turned to you.<br>
-</body>
-</html>
+Why are you here? Stop testing my patience and perform the simple tasks to which I have turned to you.
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-02b.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 No. You lack strength.<br>
-(Only characters of level 82 and above are permitted to take on this quest.)<br>
-</body>
-</html>
+(Only characters of level 82 and above are permitted to take on this quest.)
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-03.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 As a matter of business, I find simplicity in things to be... ideal. Beautiful even. Your task is to deliver a message to someone, nothing more and nothing less. Someone named <font color="LEVEL">Greymore</font>. The task is simple, but as important as what the letter says...<br>
-<a action="bypass -h Quest Q10288_SecretMission 31350-04.htm">"What does the letter say?"</a><br>
-</body>
-</html>
+<a action="bypass -h Quest Q10288_SecretMission 31350-04.htm">"What does the letter say?"</a>
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-04.htm

@@ -1,9 +1,7 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 None of your business. Your role in task is simply delivery. To find Greymore, talk to <font color="LEVEL">Aquilani</font>.<br>
 He stands outside the western entrance of the <font color="LEVEL">Monastery of Silence</font>. He knows precisely where you'll find Greymore.<br>
 Yes... simply shoulder this epistle. A task so simple someone such as yourself could not slip up.<br>
-<a action="bypass -h Quest Q10288_SecretMission 31350-05.htm">Accept the task.</a><br>
-</body>
-</html>
+<a action="bypass -h Quest Q10288_SecretMission 31350-05.htm">Accept the task.</a>
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-05.htm

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 Here is the letter. This task makes you one of my own, which means that should you lose this letter or fail this task, you will be mine to punish. It also means Aquilani will recognize my presence in you when you seek him out.<br>
-Do not deter from the path. Seek <font color="LEVEL">Aquilani</font> and he will show you the way to Greymore in the <font color="LEVEL">Monastery of Silence</font>.<br>
-</body>
-</html>
+Do not deter from the path. Seek <font color="LEVEL">Aquilani</font> and he will show you the way to Greymore in the <font color="LEVEL">Monastery of Silence</font>.
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-06.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 You are on the path I have laid out for you. Do not dilly-dally, do not be distracted.<br>
-And don't forget, first talk to <font color="LEVEL">Aquilani</font> at the entrance to the <font color="LEVEL">Monastery of Silence</font> and he shall show you the way to Greymore.<br>
-</body>
-</html>
+And don't forget, first talk to <font color="LEVEL">Aquilani</font> at the entrance to the <font color="LEVEL">Monastery of Silence</font> and he shall show you the way to Greymore.
+</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-07.htm

@@ -1,6 +0,0 @@
-<html>
-<body>
-Priest Dominic:<br>
-Ahhh... that mission has been.. satisfied. It's time for a new mission.<br>
-</body>
-</html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/31350-07.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Priest Dominic:<br>
 Aquilani tells me I was right to trust you with that task. I am not easily impressed, but you have indeed proven yourself worthy of my presence. I suspect Greymore may require help if you wish to assist us further.<br>
-(You have already completed this quest.)<br>
-</body>
-</html>
+(You have already completed this quest.)
+</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-01.htm

@@ -1,7 +0,0 @@
-<html>
-<body>
-Greymore:<br>
-Blast! You startled me, fool. Who are you?<br>
-<a action="bypass -h Quest Q10288_SecretMission 32757-02.htm">"Ah, I've found you!"</a><br>
-</body>
-</html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-01.html

@@ -0,0 +1,5 @@
+<html><body>
+Greymore:<br>
+Blast! You startled me, fool. Who are you?<br>
+<a action="bypass -h Quest Q10288_SecretMission 32757-02.html">"Ah, I've found you!"</a>
+</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-02.htm

@@ -1,7 +0,0 @@
-<html>
-<body>
-Greymore:<br>
-What?! You followed me here? Fool!<br>
-<a action="bypass -h Quest Q10288_SecretMission 32757-03.htm">"Relax, I'm here with a parcel from Brother Dominic."</a><br>
-</body>
-</html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-02.html

@@ -0,0 +1,5 @@
+<html><body>
+Greymore:<br>
+What?! You followed me here? Fool!<br>
+<a action="bypass -h Quest Q10288_SecretMission 32757-03.html">"Relax, I'm here with a parcel from Brother Dominic."</a>
+</body></html>

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32757-03.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Greymore:<br>
 Ah, now that, that is different. You must travel as silently as a feline, for you startled me and I am usually quite perceptive.<br>
-Well, I must read this letter and it is not for the eyes of the uninitiated. So unless you have something else to tell me, you can be on your way now, wanderer. Ah, here for your troubles.<br>
-</body>
-</html>
+Well, I must read this letter and it is not for the eyes of the uninitiated. So unless you have something else to tell me, you can be on your way now, wanderer. Ah, here for your troubles.
+</body></html>

+ 0 - 8
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-00.html

@@ -1,8 +0,0 @@
-<html>
-<body>
-Aquilani:<br>
-Be cautious of your every thought here. Those who desecrate these sacred grounds never forget.. ever. And when you leave this place, don't ever reflect back on it. Some things are best forgotten.<br>
-Our brothers and sisters find a comfort here that the rest of the world would deny them. Remember that.<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a><br>
-</body>
-</html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-01.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Your presence is known. No one would lie about working for the temple. I am your family now. What do you need?<br>
-<a action="bypass -h Quest Q10288_SecretMission 32780-02.html">Teleport to Greymore</a><br>
-</body>
-</html>
+Halt your approach, wanderer. I wish not to be bothered. Your ignorance will not be forgiven should you trespass.<br>
+<a action="bypass -h Quest Q10288_SecretMission 32780-02.html">Present Dominic's Letter.</a>
+</body></html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-02.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Let me confirm once more. You want to meet Greymore?<br>
-<a action="bypass -h Quest Q10288_SecretMission teleport">Teleport</a><br>
-</body>
-</html>
+Ah, so you are Brother Dominic's creature. Welcome. But this letter is not for me, it is for Brother Greymore. Are you ready to see him?<br>
+<a action="bypass -h Quest Q10288_SecretMission 32780-03.html">Nod.</a>
+</body></html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-03.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Halt your approach, wanderer. I wish not to be bothered. Your ignorance will not be forgiven should you trespass.<br>
-<a action="bypass -h Quest Q10288_SecretMission 32780-04.html">Present Dominic's Letter.</a><br>
-</body>
-</html>
+Good. To find Greymore, you must enter the Monastery of Silence. Greymore studies his craft in a room in-between the 1st and 2nd floor there.<br>
+Bring him this letter, and then perhaps you will take part in the next step. I will also be able to teleport you directly to his location, once I am able to sense his presence in you.
+</body></html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-04.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Ah, so you are Brother Dominic's creature. Welcome. But this letter is not for me, it is for Brother Greymore. Are you ready to see him?<br>
-<a action="bypass -h Quest Q10288_SecretMission 32780-05.html">Nod.</a><br>
-</body>
-</html>
+Sorry creature, I am not able to teleport you now. Do not test me on this, it is merely the way of things. Bring Brother Dominic's letter to Greymore in the Monastery. He will be between the 1st and 2nd floor.<br>
+As I told you before, once you have completed that task, I shall henceforth be able to teleport you directly to his location.
+</body></html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-05.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Good. To find Greymore, you must enter the Monastery of Silence. Greymore studies his craft in a room in-between the 1st and 2nd floor there.<br>
-Bring him this letter, and then perhaps you will take part in the next step. I will also be able to teleport you directly to his location, once I am able to sense his presence in you.<br>
-</body>
-</html>
+Your presence is known. No one would lie about working for the temple. I am your family now. What do you need?<br>
+<a action="bypass -h Quest Q10288_SecretMission 32780-06.html">Teleport to Greymore</a>
+</body></html>

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/32780-06.html

@@ -1,7 +1,5 @@
-<html>
-<body>
+<html><body>
 Aquilani:<br>
-Sorry creature, I am not able to teleport you now. Do not test me on this, it is merely the way of things. Bring Brother Dominic's letter to Greymore in the Monastery. He will be between the 1st and 2nd floor.<br>
-As I told you before, once you have completed that task, I shall henceforth be able to teleport you directly to his location.<br>
-</body>
-</html>
+Let me confirm once more. You want to meet Greymore?<br>
+<a action="bypass -h Quest Q10288_SecretMission teleport">Teleport</a>
+</body></html>

+ 69 - 72
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10288_SecretMission/Q10288_SecretMission.java

@@ -21,63 +21,62 @@ import com.l2jserver.gameserver.model.quest.QuestState;
 import com.l2jserver.gameserver.model.quest.State;
 
 /**
- * 2010-08-07 Based on Freya PTS
+ * Secret Mission (10288)
  * @author Gnacik
  */
 public class Q10288_SecretMission extends Quest
 {
-	// NPC's
-	private static final int _dominic = 31350;
-	private static final int _aquilani = 32780;
-	private static final int _greymore = 32757;
+	// NPCs
+	private static final int DOMINIC = 31350;
+	private static final int AQUILANI = 32780;
+	private static final int GREYMORE = 32757;
+	
 	// Items
-	private static final int _letter = 15529;
+	private static final int LETTER = 15529;
 	
 	@Override
 	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = event;
 		QuestState st = player.getQuestState(getName());
 		
 		if (st == null)
 		{
-			return htmltext;
+			return getNoQuestMsg(player);
 		}
+		String htmltext = event;
 		
-		if (npc.getNpcId() == _dominic)
-		{
-			if (event.equalsIgnoreCase("31350-05.htm"))
-			{
-				st.setState(State.STARTED);
-				st.set("cond", "1");
-				st.giveItems(_letter, 1);
-				st.playSound("ItemSound.quest_accept");
-			}
-		}
-		else if ((npc.getNpcId() == _greymore) && event.equalsIgnoreCase("32757-03.htm"))
-		{
-			st.unset("cond");
-			st.takeItems(_letter, -1);
-			st.giveItems(57, 106583);
-			st.addExpAndSp(417788, 46320);
-			st.playSound("ItemSound.quest_finish");
-			st.exitQuest(false);
-		}
-		else if (npc.getNpcId() == _aquilani)
+		switch (event)
 		{
-			if (st.isStarted())
-			{
-				if (event.equalsIgnoreCase("32780-05.html"))
+			case "31350-03.html":
+				if (player.getLevel() < 82)
 				{
-					st.set("cond", "2");
-					st.playSound("ItemSound.quest_middle");
+					htmltext = "31350-02b.html";
+				}
+				break;
+			case "31350-05.htm":
+				st.startQuest();
+				st.giveItems(LETTER, 1);
+				break;
+			case "32780-03.html":
+				if (st.isCond(1) && st.hasQuestItems(LETTER))
+				{
+					st.setCond(2, true);
+				}
+				break;
+			case "32757-03.html":
+				if (st.isCond(2) && st.hasQuestItems(LETTER))
+				{
+					st.giveAdena(106583, true);
+					st.addExpAndSp(417788, 46320);
+					st.exitQuest(false, true);
+				}
+				break;
+			case "teleport":
+				if ((npc.getNpcId() == AQUILANI) && st.isCompleted())
+				{
+					player.teleToLocation(118833, -80589, -2688);
+					return null;
 				}
-			}
-			else if (st.isCompleted() && event.equalsIgnoreCase("teleport"))
-			{
-				player.teleToLocation(118833, -80589, -2688);
-				return null;
-			}
 		}
 		return htmltext;
 	}
@@ -92,45 +91,43 @@ public class Q10288_SecretMission extends Quest
 			return htmltext;
 		}
 		
-		final int npcId = npc.getNpcId();
-		final int cond = st.getInt("cond");
-		switch (npcId)
+		final int cond = st.getCond();
+		switch (npc.getNpcId())
 		{
-			case _dominic:
+			case DOMINIC:
 				switch (st.getState())
 				{
 					case State.CREATED:
-						htmltext = (player.getLevel() >= 82) ? "31350-01.htm" : "31350-00.htm";
+						htmltext = "31350-01.htm";
 						break;
 					case State.STARTED:
-						if (cond == 1)
+						if (st.isCond(1))
 						{
-							htmltext = "31350-06.htm";
-						}
-						else if (cond == 2)
-						{
-							htmltext = "31350-07.htm";
+							htmltext = "31350-06.html";
 						}
 						break;
 					case State.COMPLETED:
-						htmltext = "31350-08.htm";
+						htmltext = "31350-07.html";
 						break;
 				}
 				break;
-			case _aquilani:
-				if (cond == 1)
+			case AQUILANI:
+				if (st.isStarted())
 				{
-					htmltext = "32780-03.html";
-				}
-				else if (cond == 2)
-				{
-					htmltext = "32780-06.html";
+					if ((cond == 1) && st.hasQuestItems(LETTER))
+					{
+						htmltext = "32780-01.html";
+					}
+					else if (cond == 2)
+					{
+						htmltext = "32780-04.html";
+					}
 				}
 				break;
-			case _greymore:
-				if (cond == 2)
+			case GREYMORE:
+				if (st.isStarted() && st.isCond(2) && st.hasQuestItems(LETTER))
 				{
-					return "32757-01.htm";
+					return "32757-01.html";
 				}
 				break;
 		}
@@ -141,25 +138,25 @@ public class Q10288_SecretMission extends Quest
 	public String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
 		QuestState st = player.getQuestState(getName());
-		if (st == null)
+		// dialog only changes when you talk to Aquilani after quest completion
+		if ((st != null) && st.isCompleted())
 		{
-			st = newQuestState(player);
+			return "32780-05.html";
 		}
 		
-		if (npc.getNpcId() == _aquilani)
-		{
-			return st.isCompleted() ? "32780-01.html" : "32780-00.html";
-		}
-		return null;
+		return "data/html/default/32780.htm";
 	}
 	
 	public Q10288_SecretMission(int questId, String name, String descr)
 	{
 		super(questId, name, descr);
-		
-		addStartNpc(_dominic, _aquilani);
-		addTalkId(_dominic, _greymore, _aquilani);
-		addFirstTalkId(_aquilani);
+		addStartNpc(AQUILANI, DOMINIC);
+		addFirstTalkId(AQUILANI);
+		addTalkId(DOMINIC, GREYMORE, AQUILANI);
+		questItemIds = new int[]
+		{
+			LETTER
+		};
 	}
 	
 	public static void main(String[] args)