Przeglądaj źródła

BETA: Q10289_FadeToBlack by plim (NOTE: SQL part not committed yet).

MELERIX 14 lat temu
rodzic
commit
67a0067e93

+ 1 - 0
L2J_DataPack_BETA/data/scripts.cfg

@@ -623,6 +623,7 @@ quests/10281_MutatedKaneusRune/__init__.py
 quests/10282_ToTheSeedOfAnnihilation/__init__.py
 quests/Q10283_RequestOfIceMerchant/Q10283_RequestOfIceMerchant.java
 quests/Q10288_SecretMission/Q10288_SecretMission.java
+quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java
 quests/Q10290_LandDragonConqueror/Q10290_LandDragonConqueror.java
 quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java
 

+ 7 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-00.htm

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

+ 7 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-01.htm

@@ -0,0 +1,7 @@
+<html>
+<body>
+Priest Greymore:<br>
+No. I can't help you.<br>
+(You must first complete the quest Secret Mission to take on this quest.)<br>
+</body>
+</html>

+ 7 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-02.htm

@@ -0,0 +1,7 @@
+<html>
+<body>
+Priest Greymore:<br>
+Hello young traveler! I can see you are strong enough to take a challenging task, don't you?<br>
+<a action="bypass -h Quest 10289_FadeToBlack 32757-03.htm">Yes, I'm listening</a><br>
+</body>
+</html>

+ 10 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-03.htm

@@ -0,0 +1,10 @@
+<html>
+<body>
+Priest Greymore:<br>
+Well, this could be dangerous, but I think you look brave.<br>
+I need you to go and capture <font color=LEVEL>Master of Splendor Anays</font> that hides here in the Monastery of Silence, guarding the Holy Grail.<br>
+You must confront Anays and take a <font color=LEVEL>Mark of Splendor</font> back to me. I won't reward you if you don't obtain this item.<br>
+Take your friends to this mission, maybe they can help you!<br>
+<a action="bypass -h Quest 10289_FadeToBlack 32757-04.htm">Ok, I'm on it!</a><br>
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-04.htm

@@ -0,0 +1,6 @@
+<html>
+<body>
+Priest Greymore:<br>
+Remember, I need a <font color=LEVEL>Mark of Splendor</font>. Such imitations like the <font color=LEVEL>Mark of Darkness</font> won't be useful to me.
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-04b.htm

@@ -0,0 +1,6 @@
+<html>
+<body>
+Priest Greymore:<br>
+What are you doing here? Go and find Anays!
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-05.htm

@@ -0,0 +1,6 @@
+<html>
+<body>
+Priest Greymore:<br>
+What?? Didn't you listen to me? I need a <font color=LEVEL>Mark of Splendor</font>! Don't make me waste my time! Go and find Anays!
+</body>
+</html>

+ 8 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-06.htm

@@ -0,0 +1,8 @@
+<html>
+<body>
+Priest Greymore:<br>
+Aha! Here it is! The <font color=LEVEL>Mark of Splendor</font>! I knew you were the right person to achieve this task. <br>
+Now, as I promised, I can give you something in exchange.<br>
+<a action="bypass -h Quest 10289_FadeToBlack 32757-07.htm">Let me see the rewards.</a><br>
+</body>
+</html>

+ 26 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-07.htm

@@ -0,0 +1,26 @@
+<html>
+<body>
+Priest Greymore:<br>
+You can choose one of these items in exchange for the <font color=LEVEL>Mark of Splendor</font>.<br>
+<a action="bypass -h Quest 10289_FadeToBlack 15775">Recipe - Sealed Moirai Helmet (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15776">Recipe - Sealed Moirai Leather Helmet(60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15777">Recipe - Sealed Moirai Circlet (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15778">Recipe - Sealed Moirai Breastplate (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15779">Recipe - Sealed Moirai Leather Breastplate (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15780">Recipe - Sealed Moirai Tunic (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15781">Recipe - Sealed Moirai Gaiter (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15782">Recipe - Sealed Moirai Leather Legging (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15783">Recipe - Sealed Moirai Stockings (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15784">Recipe - Sealed Moirai Gauntlet (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15785">Recipe - Sealed Moirai Leather Gloves (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15786">Recipe - Sealed Moirai Gloves (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15787">Recipe - Sealed Moirai Boots (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15788">Recipe - Sealed Moirai Leather Boots (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15789">Recipe - Sealed Moirai Shoes (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15790">Recipe - Sealed Moirai Sigil (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15791">Recipe - Sealed Moirai Shield (60%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15812">Recipe - Sealed Moirai Ring (70%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15813">Recipe - Sealed Moirai Earring (70%)</a><br>
+<a action="bypass -h Quest 10289_FadeToBlack 15814">Recipe - Sealed Moirai Necklace (70%)</a><br>
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/32757-08.htm

@@ -0,0 +1,6 @@
+<html>
+<body>
+Priest Greymore:<br>
+Here is your reward. I'll expect this will be useful to you.<br>
+</body>
+</html>

+ 147 - 0
L2J_DataPack_BETA/data/scripts/quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java

@@ -0,0 +1,147 @@
+package quests.Q10289_FadeToBlack;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+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;
+import com.l2jserver.gameserver.util.Util;
+
+/**
+ * @author Plim
+ */
+
+public class Q10289_FadeToBlack extends Quest
+{
+	private static final String qn = "10289_FadeToBlack";
+	
+	// NPCs
+	private static final int GREYMORE = 32757;
+	
+	// Items
+	private static final int MARK_OF_DARKNESS = 15528;
+	private static final int MARK_OF_SPLENDOR = 15527;
+
+	//MOBs
+	private static final int ANAYS = 25701;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return htmltext;
+		
+		if (npc.getNpcId() == GREYMORE)
+		{
+			if (event.equalsIgnoreCase("32757-04.htm"))
+			{
+				st.setState(State.STARTED);
+				st.set("cond", "1");
+				st.playSound("ItemSound.quest_accept");
+			}
+			else if(Util.isDigit(event) && st.getQuestItemsCount(MARK_OF_SPLENDOR) > 0)
+			{
+				int itemId = Integer.parseInt(event);
+				st.takeItems(MARK_OF_SPLENDOR, 1);
+				st.giveItems(itemId, 1);
+				st.playSound("ItemSound.quest_finish");
+				st.exitQuest(false);
+				htmltext = "32757-08.htm";
+			}
+		}
+		return htmltext;
+	}
+
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		QuestState secretMission = player.getQuestState("10288_SecretMission");
+		if (st == null)
+			return htmltext;
+		
+		if (npc.getNpcId() == GREYMORE)
+		{
+			switch(st.getState())
+			{
+				case State.CREATED :
+					if (player.getLevel() >= 82 && secretMission != null && secretMission.getState() == State.COMPLETED)
+						htmltext = "32757-02.htm";
+					else if (player.getLevel() < 82)
+						htmltext = "32757-00.htm";
+					else
+						htmltext = "32757-01.htm";
+					break;
+				case State.STARTED :
+					if (st.getInt("cond") == 1)
+						htmltext = "32757-04b.htm";
+					if (st.getInt("cond") == 2 && st.getQuestItemsCount(MARK_OF_DARKNESS) > 0)
+					{
+						htmltext = "32757-05.htm";
+						st.takeItems(MARK_OF_DARKNESS, 1);
+						player.addExpAndSp(55983, 136500);
+						st.set("cond","1");
+						st.playSound("ItemSound.quest_middle");
+					}
+					else if (st.getInt("cond") == 3)
+						htmltext = "32757-06.htm";
+					break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		L2PcInstance partyMember = getRandomPartyMember(player,"1");
+		
+		if (partyMember == null)
+			return super.onKill(npc, player, isPet);
+		
+		QuestState st = partyMember.getQuestState(qn);
+		
+		if (st != null)
+		{
+			st.giveItems(MARK_OF_SPLENDOR, 1);
+			st.playSound("ItemSound.quest_itemget");
+			st.set("cond","3");
+		}
+		
+		if (player.getParty() != null)
+		{
+			QuestState st2;
+			for(L2PcInstance pmember : player.getParty().getPartyMembers())
+			{
+				st2 = pmember.getQuestState(qn);
+				
+				if(st2 != null && st2.getInt("cond") == 1 && pmember.getObjectId() != partyMember.getObjectId())
+				{
+					st2.giveItems(MARK_OF_DARKNESS, 1);
+					st2.playSound("ItemSound.quest_itemget");
+					st2.set("cond","2");
+				}
+			}
+		}
+		
+		return super.onKill(npc, player, isPet);
+	}
+	
+	public Q10289_FadeToBlack(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(GREYMORE);
+		addTalkId(GREYMORE);
+		addKillId(ANAYS);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q10289_FadeToBlack(10289, qn, "Fade to Black");
+	}
+}