Browse Source

BETA: The Enveloping Darkness and Light Fragment quests by Gladicek
A little bit changed by me

Rumen Nikiforov 13 năm trước cách đây
mục cha
commit
985570ae83
74 tập tin đã thay đổi với 915 bổ sung0 xóa
  1. 3 0
      L2J_DataPack_BETA/dist/game/data/html/default/32567.htm
  2. 11 0
      L2J_DataPack_BETA/dist/game/data/instances/SecretArea.xml
  3. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  4. 130 0
      L2J_DataPack_BETA/dist/game/data/scripts/instances/SecretArea/SecretArea.java
  5. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-01.htm
  6. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-02.htm
  7. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-03.htm
  8. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-01.htm
  9. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-02.htm
  10. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-03.htm
  11. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-04.htm
  12. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-05.htm
  13. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-06.htm
  14. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-07.htm
  15. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-08.htm
  16. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-09.htm
  17. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-01.htm
  18. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-02.htm
  19. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-03.htm
  20. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-04.htm
  21. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-05.htm
  22. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-06.htm
  23. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-07.htm
  24. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-08.htm
  25. 169 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/Q10271_TheEnvelopingDarkness.java
  26. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-01.htm
  27. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-02.htm
  28. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-03.htm
  29. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-04.htm
  30. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-05.htm
  31. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-06.htm
  32. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-01.htm
  33. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-02.htm
  34. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-03.htm
  35. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-04.htm
  36. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-05.htm
  37. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-06.htm
  38. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-07.htm
  39. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-08.htm
  40. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-09.htm
  41. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-10.htm
  42. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-11.htm
  43. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-12.htm
  44. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-13.htm
  45. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-14.htm
  46. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-15.htm
  47. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-16.htm
  48. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-17.htm
  49. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-18.htm
  50. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-19.htm
  51. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-01.htm
  52. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-02.htm
  53. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-03.htm
  54. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-04.htm
  55. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-05.htm
  56. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-06.htm
  57. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-07.htm
  58. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-01.htm
  59. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-02.htm
  60. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-03.htm
  61. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-04.htm
  62. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-04a.htm
  63. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-05.htm
  64. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-06.htm
  65. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-06a.htm
  66. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-08.htm
  67. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-09.htm
  68. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-10.htm
  69. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-01.htm
  70. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-02.htm
  71. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-03.htm
  72. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-04.htm
  73. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-05.htm
  74. 295 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/Q10272_LightFragment.java

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/html/default/32567.htm

@@ -0,0 +1,3 @@
+<html><head><body>
+Shilen Priest Relrikia:<br>May the great goddess of death be praised... A new world order is coming...<br>
+<a action="bypass -h npc_%objectId%_Quest">Quest</a></body></html>

+ 11 - 0
L2J_DataPack_BETA/dist/game/data/instances/SecretArea.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<instance name="Secret Area in the Keucereus Fortress" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="instance.xsd">
+	<activityTime val="15" />
+	<allowSummon val="false" />
+	<emptyDestroyTime val="1" />
+	<spawnPoint spawnX="-185057" spawnY="242821" spawnZ="1576" />
+	<spawnlist>
+		<!-- Lelrikia -->
+	    <spawn npcId="32567" x="-23985" y="-8965" z="-5388" heading="0" respawn="0" />
+	</spawnlist>
+</instance>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -226,6 +226,7 @@ instances/Kamaloka/Kamaloka.java
 instances/Pailaka/PailakaSongOfIceAndFire.java
 instances/Pailaka/PailakaDevilsLegacy.java
 instances/RankuFloor/RankuFloor.java
+instances/SecretArea/SecretArea.java
 instances/SeedOfInfinity/HallOfSuffering.java
 instances/SeedOfDestruction/Stage1.java
 instances/NornilsGarden/NornilsGarden.java
@@ -670,6 +671,8 @@ quests/10279_MutatedKaneusOren/__init__.py
 quests/10280_MutatedKaneusSchuttgart/__init__.py
 quests/10281_MutatedKaneusRune/__init__.py
 quests/10282_ToTheSeedOfAnnihilation/__init__.py
+quests/Q10271_TheEnvelopingDarkness/Q10271_TheEnvelopingDarkness.java
+quests/Q10272_LightFragment/Q10272_LightFragment.java
 quests/Q10283_RequestOfIceMerchant/Q10283_RequestOfIceMerchant.java
 quests/Q10288_SecretMission/Q10288_SecretMission.java
 quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java

+ 130 - 0
L2J_DataPack_BETA/dist/game/data/scripts/instances/SecretArea/SecretArea.java

@@ -0,0 +1,130 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package instances.SecretArea;
+
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.instancemanager.InstanceManager.InstanceWorld;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.entity.Instance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.network.SystemMessageId;
+
+/**
+ ** @author Gladicek Secret Area in the Keucereus Fortress (For Quest 10272 Light Fragment)
+ */
+public class SecretArea extends Quest
+{
+	private static final String qn = "SecretArea";
+	
+	private static final int INSTANCE_ID = 117;
+	private static final String _ENTER = "<html><head><body>Soldier Ginby:<br>Hurry! Come back before anybody sees you!</body></html>";
+	private static final String _EXIT = "<html><head><body>Shilen Priest Lelrikia:<br>Doomed creature, either you obey the power of Shilen or you fight.Regardless of your decision, the shadow of death will not simply fade away...</body></html>";
+	private static final int GINBY = 32566;
+	private static final int LELRIKIA = 32567;
+	private static final int ENTER = 0;
+	private static final int EXIT = 1;
+	private static final Location[] TELEPORTS =
+	{
+		new Location(-23758, -8959, -5384), new Location(-185057, 242821, 1576)
+	};
+	
+	private class SecretAreaWorld extends InstanceWorld
+	{
+		
+	}
+	
+	private void teleportPlayer(L2PcInstance player, Location loc, int instanceId)
+	{
+		player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+		player.setInstanceId(instanceId);
+		player.teleToLocation(loc, false);
+		if (player.getPet() != null)
+		{
+			player.getPet().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+			player.getPet().setInstanceId(instanceId);
+			player.getPet().teleToLocation(loc, false);
+		}
+	}
+	
+	protected void enterInstance(L2PcInstance player)
+	{
+		InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+		if (world != null)
+		{
+			if (!(world instanceof SecretAreaWorld))
+			{
+				player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
+				return;
+			}
+			Instance inst = InstanceManager.getInstance().getInstance(world.instanceId);
+			if (inst != null)
+			{
+				teleportPlayer(player, TELEPORTS[ENTER], world.instanceId);
+			}
+		}
+		else
+		{
+			final int instanceId = InstanceManager.getInstance().createDynamicInstance("SecretArea.xml");
+			
+			world = new SecretAreaWorld();
+			world.instanceId = instanceId;
+			world.templateId = INSTANCE_ID;
+			world.status = 0;
+			InstanceManager.getInstance().addWorld(world);
+			
+			world.allowed.add(player.getObjectId());
+			teleportPlayer(player, TELEPORTS[ENTER], instanceId);
+		}
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		if (st == null)
+			st = newQuestState(player);
+		
+		if (npc.getNpcId() == GINBY && event.equalsIgnoreCase("enter"))
+		{	
+			enterInstance(player);
+			return _ENTER;	
+		}
+		else if (npc.getNpcId() == LELRIKIA && event.equalsIgnoreCase("exit"))
+		{
+			teleportPlayer(player, TELEPORTS[EXIT], 0);
+			return _EXIT;
+		}
+		return htmltext;
+	}
+	
+	public SecretArea(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		
+		addStartNpc(GINBY);
+		addTalkId(GINBY);
+		addTalkId(LELRIKIA);
+	}
+	
+	public static void main(String[] args)
+	{
+		new SecretArea(-1, qn, "instances");
+	}
+}

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-01.htm

@@ -0,0 +1,3 @@
+<html><head><body>Corpse of Medibal:<br>
+(You find a document after searching his chest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-02.htm

@@ -0,0 +1,4 @@
+<html><head><body>Corpse of Medibal:<br>
+(This is the corpse of Inspector Medibal, who was dispatched to investigate the Seed of Destruction. Apparently he is now at rest.)<br>
+(You have already completed this quest.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32528-03.htm

@@ -0,0 +1,3 @@
+<html><head><body>Corpse of Medibal:<br>
+(Nothing comes out now.)
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-01.htm

@@ -0,0 +1,5 @@
+<html><head><body>Soldier El:<br>
+Hey, I'm injured here! Ask a healthy soldier and leave me alone! 
+It's bad enought that I couldn't sleep because of a nightmare.<br> 
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32556-03.htm">"Orbyu sent me."</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-02.htm

@@ -0,0 +1,5 @@
+<html><head><body>Soldier El:<br>
+Thanks to you I can now look at the faces of my friends in heaven.
+ I feel stronger already. Thank you!<br>
+(You have already completed this quest.)
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-03.htm

@@ -0,0 +1,8 @@
+<html><head><body>Soldier El:<br>
+Obryu sent you? 
+He just can't leave well enough alone. <br>
+Yes, as you can see I'm the sole survivor of that troop. Do you know what that means?
+ I fled to save my own miserable life while my fellow soldiers were dying.
+ I'm a coward. And we failed to accomplish <font color="LEVEL">the mission</font>.
+ Now every night I have nightmares about my dead friends. I should have died there...<br>
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32556-04.htm">"What happened?"</a></body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-04.htm

@@ -0,0 +1,10 @@
+<html><head><body>Soldier El:<br>
+We were sent to <font color="LEVEL">protect the group dispatched to investigate the Seed of Destruction</font>.
+ We were part of a large force and felt invincible. At first everything went well.<br>
+Then...we were attacked by the Mounted Troop.
+ We kept fighting in order to complete our mission. 
+While some of us kept up a rearguard defense, a few others tried to deliver the documents containing records of our investigation to the fortress. 
+<font color="LEVEL">Inspector Medibal</font> and I were ordered to deliver them. 
+Thanks to our soldiers' efforts we were able to get out...barely. But as we were almost clear, Medibal and I were both hit. And...and I couldn't grab the <font color="LEVEL">inspection documents</font> he was holding. 
+I betrayed the trust of my comrades. I failed them...<br>
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32556-05.htm">"But surely we can recover the documents?"</a></body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-05.htm

@@ -0,0 +1,8 @@
+<html><head><body>Soldier El:<br>
+I thought about that. But I'm too injured. And even if I weren't, I'm not sure I could go back there. 
+I've never been so scared in all my life....<br>Why are you so interested?
+ I guess you came here looking for information about the Seed of Destruction, eh?
+ Well, if you coud recover that document, you'd get all the information we currently have about the Seed.<br>
+Perhaps you can help me...<br>It won't bring our dead soldiers back, but completing that mission will restore their honor -- and mine. 
+You'd have my eternal gratitude.<br>
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32556-06.htm">"Leave it to me."</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-06.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier El:<br>
+Very well. I'll put my trust in you. Help me restore our honor.<br>
+Find <font color="LEVEL">Medibal's corpse</font> in the <font color="LEVEL">Seed of Destruction</font> and retrieve <font color="LEVEL">Inspector Medibal's documents</font> from his chest.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-07.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier El:<br>
+Help me restore our honor by completing our mission.<br>
+Find <font color="LEVEL">Medibal's corpse</font> in the <font color="LEVEL">Seed of Destruction</font> and retrieve <font color="LEVEL">Inspector Medibal's documents</font> from his chest.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-08.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier El:<br>
+Have you returned? Did you bring the documents?<br> 
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32556-09.htm">"I found the documents just where you said they would be."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32556-09.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier El:<br>
+Thank you! You have restored the honor of my fallen comrades and myself. I won't forget your help. 
+If you take those documents to <font color="LEVEL">Soldier Orbyu</font>, I know he will reward you as well. 
+The money that was promised to us will be given to you by right. You've earned it!</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-01.htm

@@ -0,0 +1,5 @@
+<html><head><body>Soldier Orbyu:<br>
+We've been assigned a mission by Admiral Keucereus, commander of this Alliance Base.
+ But it's so dangerous that we haven't had anyone volunteer. Adventurer, will you take it on?<br>
+ <a action="bypass -h Quest 10271_TheEnvelopingDarkness 32560-04.htm">"Tell me what it is first."</a>
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-02.htm

@@ -0,0 +1,6 @@
+<html><head><body>Soldier Orbyu:<br>
+We've been assigned a mission by Admiral Keucereus, commander of this Alliance Base.
+ But it's so dangerous that we haven't had anyone volunteer. <br>What? You're interested? 
+Uh, no thanks. You wouldn't last long! Thanks for the offer, though.<br>
+(Only characters who are level 75 and above are permitted to undertake this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-03.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+Thank you! I heard Admiral Keucereus was very pleased.<br>
+(You have already completed this quest.)
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-04.htm

@@ -0,0 +1,8 @@
+<html><head><body>Soldier Orbyu:<br>
+To the west of Keucereus Alliance Base lies a place called the <font color="LEVEL">Seed of Destruction</font>.
+ It is ruled by the lord of the Dragon Race.<br>
+We have sent many scouts to gather information about the Seed, but few of them ever returned. 
+The rest were too afraid to venture deeply into the area. Obviously we cannot wage war effectively if we know so little about our enemy.<br>
+That's why we need your help to gather information about the Seed. Will you do it?<br>
+<a action="bypass -h Quest 10271_TheEnvelopingDarkness 32560-05.htm">"I'll help you. What should I do?"</a>
+</body></html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-05.htm

@@ -0,0 +1,9 @@
+<html><head><body>Soldier Orbyu:<br>
+Ah! Thank you! You are the answer to our prayers.<br>
+I won't lie to you -- this is going to be a very difficult mission.
+ Before you go, I'd advise you to go talk to <font color="LEVEL">Soldier El</font>. 
+He accompanied a group of researchers into the Seed of Destruction. 
+He is the only person, in fact, who has been to the deepest dungeon of the Seed of Destruction and come back alive. 
+Others...have not been as fortunate.<br>
+You can find Soldier El in the center of the fortress.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-06.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Orbyu:<br>
+In learning additional information about the mission, speak to <font color="LEVEL">Soldier El</font>.<br>
+You can find him near the center of the fortress.</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-07.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+I heard that you are carrying out a mission you on behalf of Soldier El.
+ Do you have any business with me? El is in the center of the fortress, if you need to find him.
+</body></html>

+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/32560-08.htm

@@ -0,0 +1,2 @@
+<html><head><body>Soldier Orbyu:<br>
+You have completed your mission! Excellent! Here is the reward El promised you. </body></html>

+ 169 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10271_TheEnvelopingDarkness/Q10271_TheEnvelopingDarkness.java

@@ -0,0 +1,169 @@
+package quests.Q10271_TheEnvelopingDarkness;
+
+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;
+
+/**
+ * The Enveloping Darkness (10271)
+ * @author Gladicek
+ */
+public class Q10271_TheEnvelopingDarkness extends Quest
+{
+	private static final String qn = "10271_TheEnvelopingDarkness";
+	
+	private static final int ORBYU = 32560;
+	private static final int EL = 32556;
+	private static final int MEDIBAL_CORPSE = 32528;
+	private static final int MEDIBAL_DOCUMENT = 13852;
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		if (st == null)
+			return htmltext;
+		
+		if (npc.getNpcId() == ORBYU)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					QuestState _prev = player.getQuestState("10269_ToTheSeedOfDestruction");
+					if ((_prev != null) && (_prev.getState() == State.COMPLETED) && (player.getLevel() >= 75))
+						htmltext = "32560-01.htm";
+					else
+						htmltext = "32560-02.htm";
+					break;
+				case State.STARTED:
+					htmltext = "32560-05.htm";
+					break;
+				case State.COMPLETED:
+					htmltext = "32560-03.htm";
+					break;
+			}
+			if (st.getInt("cond") == 2)
+			{
+				htmltext = "32560-06.htm";
+			}
+			else if (st.getInt("cond") == 3)
+			{
+				htmltext = "32560-07.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32560-08.htm";
+				st.unset("cond");
+				st.setState(State.COMPLETED);
+				st.giveItems(57, 62516);
+				st.addExpAndSp(377403, 37867);
+				st.playSound("ItemSound.quest_finish");
+				st.exitQuest(false);
+			}
+			
+		}
+		
+		else if (npc.getNpcId() == EL)
+		{
+			switch (st.getState())
+			{
+				case State.COMPLETED:
+					htmltext = "32556-02.htm";
+					break;
+			}
+			if (st.getInt("cond") == 1)
+			{
+				htmltext = "32556-01.htm";
+			}
+			else if (st.getInt("cond") == 2)
+			{
+				htmltext = "32556-07.htm";
+			}
+			else if (st.getInt("cond") == 3)
+			{
+				htmltext = "32556-08.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32556-09.htm";
+			}
+		}
+		
+		else if (npc.getNpcId() == MEDIBAL_CORPSE)
+		{
+			switch (st.getState())
+			{
+				case State.COMPLETED:
+					htmltext = "32528-02.htm";
+					break;
+			}
+			if (st.getInt("cond") == 2)
+			{
+				htmltext = "32528-01.htm";
+				st.playSound("ItemSound.quest_middle");
+				st.set("cond", "3");
+				st.giveItems(MEDIBAL_DOCUMENT, 1);
+			}
+			else if (st.getInt("cond") == 3)
+			{
+				htmltext = "32528-03.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32528-03.htm";
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return htmltext;
+		
+		if (event.equalsIgnoreCase("32560-05.htm"))
+		{
+			st.setState(State.STARTED);
+			st.set("cond", "1");
+			st.playSound("ItemSound.quest_accept");
+		}
+		else if (event.equalsIgnoreCase("32556-06.htm"))
+		{
+			st.set("cond", "2");
+			st.playSound("ItemSound.quest_middle");
+		}
+		else if (event.equalsIgnoreCase("32556-09.htm"))
+		{
+			st.set("cond", "4");
+			st.playSound("ItemSound.quest_middle");
+			st.takeItems(MEDIBAL_DOCUMENT, 1);
+			
+		}
+		return htmltext;
+	}
+	
+	public Q10271_TheEnvelopingDarkness(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(ORBYU);
+		addTalkId(ORBYU);
+		addTalkId(EL);
+		addTalkId(MEDIBAL_CORPSE);
+		questItemIds = new int[]
+		{
+			MEDIBAL_DOCUMENT
+		};
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q10271_TheEnvelopingDarkness(10271, qn, "The Enveloping Darkness");
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-01.htm

@@ -0,0 +1,4 @@
+<html><head><body>Engineer Lekon:<br>
+Uh, I'm so busy! Hey, what's going on over there?<br>
+<a action="bypass -h Quest 10272_LightFragment 32557-02.htm">"Can you use the fragment power of Broken Light to make me a weapon capable of defeating Tiat?"</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-02.htm

@@ -0,0 +1,5 @@
+<html><head><body>Engineer Lekon:<br>
+Well, nothing is impossible...say, did you really bring the materials I need? 
+May I see them? Then we can get started...<br>
+<a action="bypass -h Quest 10272_LightFragment 32557-03.htm">Give him the materials.</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-03.htm

@@ -0,0 +1,3 @@
+<html><head><body>Engineer Lekon:<br>
+Ah, you really brought the necessary materials! I must have taken you a great deal of effort to collect so much... I must think about how to proceed. Will you give me a moment?
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-04.htm

@@ -0,0 +1,3 @@
+<html><head><body>Engineer Lekon:<br>
+Is this some kind of joke? I cannot do anything without the necessary materials. Why are you wasting my time?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-05.htm

@@ -0,0 +1,4 @@
+<html><head><body>Engineer Lekon:<br>
+Finished! It's more fragile than I would have wished, but that's the nature of the original materials. 
+I can guess how you plan to use this... Perhaps you had better speak with War Mage Artius first, though.
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32557-06.htm

@@ -0,0 +1 @@
+<html><head><body>Engineer Lekon:<br>Does the item meet with your approval? Then go see War Mage Artius.</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-01.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+It takes my full concentration to control the Barrier Orb. 
+I don't have time for chit-chat.<br>Do you have any pressing business with me?<br> 
+<a action="bypass -h Quest 10272_LightFragment 32559-02.htm">"I brought the documents from Inspector Medibal."</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-02.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+Ah, you mean the inspector who went to investigate the Seed of Destruction.
+ You retrieved his documents? Well done!<br>Hand them over right away. <br>
+ <a action="bypass -h Quest 10272_LightFragment 32559-03.htm">Hand them over.</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-03.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+Very interesting... These definitely merit a closer look. Give me some time to read this thoroughly.<br>
+It won't take too long. Visit me again soon.
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-04.htm

@@ -0,0 +1,8 @@
+<html><head><body>War Mage Artius:<br>
+Hmm, as I expected... These are indeed very valuable documents.
+They contain detailed information about the Mounted Troop that  is occupying the Seed of Destruction.
+ This will give us a considerable tactical advantage.<br>
+Ah, I see he also recorded his observations of the magic power and origin of the Seed from the perspective of a Magister.<br>
+This last part is particularly interesting....<br>
+<a action="bypass -h Quest 10272_LightFragment 32559-05.htm">"What does it say?"</a> 
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-05.htm

@@ -0,0 +1,8 @@
+<html><head><body>War Mage Artius:<br>
+It concerns a girl dressed in witch's clothing who apparently controls the Fleet Steed Troop. See here!<br>
+<font color="LEVEL">The Mounted Troop seems to be a group of soldiers controlled by someone called Tiat. Interesting... 
+How can such a formidable group follow such a slight girl?
+ Ah, she is surrounded by infernal energy... Hmm...</font>Apparently our team was discovered by the Mounted Troop while recording this last part.
+ After this, the text is nearly illegible. I can only make out the words "Tiat," "magic power,"  and "transformation."<br>
+We need someone else to shed light on this development...<br>
+<a action="bypass -h Quest 10272_LightFragment 32559-06.htm">"Do you mean Shilen Priest Lelrikia?"</a></body></html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-06.htm

@@ -0,0 +1,9 @@
+<html><head><body>War Mage Artius:<br>
+It concerns a girl dressed in witch's clothing who apparently controls the Fleet Steed Troop.
+ See here!<br>
+<font color="LEVEL">The Mounted Troop seems to be a group of soldiers controlled by someone called Tiat.
+ Interesting... How can such a formidable group follow such a slight girl? Ah, she is surrounded by infernal energy... Hmm...</font>
+Apparently our team was discovered by the Mounted Troop while recording this last part. 
+After this, the text is nearly illegible. I can only make out the words "Tiat," "magic power,"  and "transformation."<br>
+I don't like it, but I think we need that fellow's help in this matter...<br>
+<a action="bypass -h Quest 10272_LightFragment 32559-07.htm">"That fellow?"</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-07.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+That's right. Since you already know, I won't go into the details.
+ Go to him and obtain information about Tiat.
+ In order to meet Lelrikia, you must first bribe <font color="LEVEL">Soldier Ginby</font> in Keucereus Alliance Base.</body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-08.htm

@@ -0,0 +1,7 @@
+<html><head><body>War Mage Artius:<br>
+Actually, there is Temple of Shilen Temple here in Keucereus Alliance Base. Inside, a priest named Lelrikia is in hiding.<br>
+Even before catastrophe befell Gracia, the priests of Shilen tried to delude many of our people.<br>
+What bothers me is that I don't know his purpose. He surrendered to us willingly, which bothers me. 
+But I think we have no choice but to involve him in this. Go to him and see what you can find out about Tiat.<br>
+To get to Lelrikia, you must speak with <font color="LEVEL">Soldier Ginby</font> in Keucereus Alliance Base. With the proper persuasion, he will allow you to see the priest...
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-09.htm

@@ -0,0 +1,3 @@
+<html><head><body>War Mage Artius: <br>
+Go to <font color="LEVEL">Soldier Ginby</font> in Keucereus Alliance Base and bribe him to lead you to Lelrikia.
+ </body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-10.htm

@@ -0,0 +1,3 @@
+<html><head><body>War mage Artius:<br>
+So did you meet Lelrikia? What did he say?<br>
+<a action="bypass -h Quest 10272_LightFragment 32559-11.htm">Tell the truth.</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-11.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+So it's true that Tiat draws her power from the Dark Black Dragon! That is not good news.
+ Still, there might be a way...<br> 
+<a action="bypass -h Quest 10272_LightFragment 32559-12.htm">"What is it?"</a></body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-12.htm

@@ -0,0 +1,8 @@
+<html><head><body>War Mage Artius:<br>
+The power of the Dark Black Dragon is extremely potent.
+ If she somehow acquired the power, she will be a formidable adversary.
+ But there may be a chance... We must act quickly.<br>I will explain more later.
+ Right now, you must go to the Seed of Destruction, hunt members of the Mounted Troop, and bring me <font color="LEVEL">Powders of Broken Darkness</font>.
+ We will purify it into a weapon we can use against Tiat. We must at least have <font color="LEVEL">100</font> Powders of Broken Darkness. 
+Now hurry -- there is no time to waste!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-13.htm

@@ -0,0 +1,3 @@
+<html><head><body>War Mage Artius:<br>
+Leave now for the Seed of Destruction. Don't forget that we need at least <font color="LEVEL">100 Powders of Broken Darkness</font>.
+</body></html>

+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-14.htm

@@ -0,0 +1,2 @@
+<html><head><body>War Mage Artius: We need <br>
+<font color="LEVEL">100 Powders of Broken Darkenss</font>. You haven't brought enough.</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-15.htm

@@ -0,0 +1,3 @@
+<html><head><body>War Mage Artius:<br>
+You collected them all. Well done! Now listen carefully.<br>Now we must purify this substance. 
+To do so, we will need help from the Mother Tree. You must approach with care -- the residents of the Elven Village may well attack you rather than allow you to bring so dark a power near their sacred tree.<br>Still, you must go to the Mother Tree north of the village and purify this <font color="LEVEL">Powder of Broken Darkness</font> into <font color="LEVEL">Powder of Broken Light</font>. Then bring it to me at once.</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-16.htm

@@ -0,0 +1,4 @@
+<html><head><body>War Mage Artius:<br>
+We need 100 Powders of Broken Light. Bring more, quickly!<br>
+Purify <font color="LEVEL">Powdesr of Broken Darkness</font> in the shadow of the Mother Tree north of the Elven Village to create <font color="LEVEL">Powder of Broken Light</font>.
+ Then bring it to me.</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-17.htm

@@ -0,0 +1,5 @@
+<html><head><body>War Mage Artius:<br>
+Ah, you've brought it! Well done!<br>I can already feel the sacred energy of the Mother Tree in this powder. 
+Now we have a chance to defeat Tiat.<br>
+Of course, it is still not in a very practical form. Go to <font color="LEVEL">Engineer Lekon</font> and ask him to turn this powder into a solid weapon. 
+If anyone can do it, he can. Hurry!</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-18.htm

@@ -0,0 +1,3 @@
+<html><head><body>War Mage Artius:<br>Very well done. I'm sure it was a difficult trip, but you exceeded my expectations. This now contains the sacred energy of the Mother Tree.<br>It will not be particularly effective against normal undead, but it can strike a great blow against Tiat. Keep this sacred sign with you in case you encounter her. You won't regret it.<br>Here is a reward for your efforts so far. Use it well.<br>
+(Double-click the sacred sign to use it against Tiat; it can only be used once, and only against her.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32559-19.htm

@@ -0,0 +1,3 @@
+<html><head><body>War Mage Artius:<br>
+(You have already completed this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-01.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+Thanks to you, we were able to learn vital information about the Seed of Destruction.
+ We are in your debt. But there's one more thing left to do...<br> 
+<a action="bypass -h Quest 10272_LightFragment 32560-05.htm">"What is it?"</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-02.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+For this mission, you need more information about the Seed of Destruction.<br>
+(Only characters who have completed the "The Enveloping Darkness" quest may undertake this quest.)
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-03.htm

@@ -0,0 +1,6 @@
+<html><head><body>Soldier Orbyu:<br>
+I'm afraid you just aren't experienced enough for a mission of this magnitude. 
+I'm sorry. We just can't afford to take chances with something so important.
+ I'm sure you understand.<br> 
+(Only characters who are level 75 or above may undertake this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-04.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+I heard that you successfully completed the mission. Well done!<br>
+(You have already completed this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-05.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Orbyu:<br>
+Will you bring the research documents you delivered to War Mage Artius?<br>
+Based on the information, he might give you a new mission.<br>
+<a action="bypass -h Quest 10272_LightFragment 32560-06.htm">Say yes.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-06.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Orbyu:<br>
+Please help us! Take the documents you recovered from Researcher Medibal to War Mage Artius immediately
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32560-07.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Orbyu:<br>
+Please hurry! Take the documents you recovered from Researcher Medibal to War Mage Artius.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-01.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Ginby:<br>
+If you don't have any business here, get out!<br>
+<a action="bypass -h Quest 10272_LightFragment 32566-04.htm">"I'm here to see Lelrikia."</a></body></html>

+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-02.htm

@@ -0,0 +1,2 @@
+<html><head><body>Soldier Ginby:<br>
+I said get lost! Do I have to repeat myself?</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-03.htm

@@ -0,0 +1,5 @@
+<html><head><body>Soldier Ginby:<br>
+Oh ho! A familiar face. We're both very busy, so I'll get right to the point. 
+If you want to enter, it'll cost you. <br>
+<center>
+<a action="bypass -h Quest 10272_LightFragment pay">Give him 10,000 Adena.</a></body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-04.htm

@@ -0,0 +1,6 @@
+<html><head><body>Soldier Ginby:<br>
+Oh ho! So that's why you're here.
+ But that's not enough for me to take you to him. 
+Unless you were to make it worth my while...<br>
+<center> 
+<a action="bypass -h Quest 10272_LightFragment pay">Give him 10,000 Adena.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-04a.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Ginby:<br>
+What a good-for-nothing! You've wasted my time!
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-05.htm

@@ -0,0 +1,5 @@
+<html><head><body>Soldier Ginby:<br>
+Good, good. You're smarter than you look! I'll be on the lookout, but hurry. Understand? 
+If the other guards see you talking to the Shilen Priest, it'll be bad news for both of us.<br>
+<a action="bypass -h Quest 10272_LightFragment 32566-06.htm">"Then hurry and lead me inside."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-06.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Ginby:<br>
+Ready? Then let's go!<br>
+<a action="bypass -h Quest SecretArea enter">Teleport to the Temple of Shilen.</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-06a.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Ginby:<br>
+Ready? Then let's go!<br>
+<a action="bypass -h menu_select?ask=10272&reply=4">Teleport to the Temple of Shilen.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-08.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Ginby:<br>
+Eh, he must be busy. Come back later. 
+(You cannot enter the Instant Zone now.)</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-09.htm

@@ -0,0 +1,4 @@
+<html><head><body>Soldier Ginby:<br>
+Hey, are you done?<br>
+<a action="bypass -h Quest SecretArea enter">"No, let me back in."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32566-10.htm

@@ -0,0 +1,3 @@
+<html><head><body>Soldier Ginby:<br>
+Finished your business? Well, just don't go blabbing about everything you heard and saw. If you do... Now scram!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-01.htm

@@ -0,0 +1,4 @@
+<html><head><body>Shilen Priest Lelrikia:<br>
+No outsider has ventured here for a long time. Doomed creature, what brought you here?<br>
+ <a action="bypass -h Quest 10272_LightFragment 32567-02.htm">Ask about a girl dressed as a witch in the Seed of Destruction.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-02.htm

@@ -0,0 +1,4 @@
+<html><head><body>Shilen Priest Lelrikia:<br>
+Are you talking about Tiat, the witch of the Dark Black Dragon? 
+I can tell you what I know of her...<br>
+<a action="bypass -h Quest 10272_LightFragment 32567-03.htm">Listen.</a></body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-03.htm

@@ -0,0 +1,7 @@
+<html><head><body>Shilen Priest Lelrikia:<br>
+The Dark Black Dragon was a follower of Shilen and widely regarded as one of the most powerful Dragons in existence. 
+But it is imprisoned just like the goddess herself... 
+That's the official history. But how can you explain the Seed of Destruction if the Dragon's power remains inaccesible?
+ It is foolish to imagine that such power can be forever imprisoned.<br>
+I do not know much about Tiat, but it is obvious that her power was inherited form the Dark Black Dragon.<br>
+<a action="bypass -h Quest 10272_LightFragment 32567-04.htm">Keep listening.</a></body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-04.htm

@@ -0,0 +1,5 @@
+<html><head><body>Shilen Priest Lelrikia:<br>
+All these stories are probably not very helpful...you must want to know Tiat's weaknesses. 
+Reflect on what I said. If she inherited his power, she must have inherited his limitations as well...<br>
+I have no more to say. Go now.<br>
+<a action="bypass -h Quest SecretArea exit">Go to the fortress.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/32567-05.htm

@@ -0,0 +1,3 @@
+<html><head><body>Shilen Priest Lelrikia:<br>
+I have nothing more to say. Go now.<br>
+<a action="bypass -h Quest SecretArea exit">Go to the fortress.</a></body></html>

+ 295 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10272_LightFragment/Q10272_LightFragment.java

@@ -0,0 +1,295 @@
+package quests.Q10272_LightFragment;
+
+import com.l2jserver.Config;
+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;
+
+/**
+ * Light Fragment (10272)
+ * @author Gladicek Updated 28-10-2011
+ */
+public class Q10272_LightFragment extends Quest
+{
+	private static final String qn = "10272_LightFragment";
+	
+	private static final int ORBYU = 32560;
+	private static final int ARTIUS = 32559;
+	private static final int GINBY = 32566;
+	private static final int LELRIKIA = 32567;
+	private static final int LEKON = 32557;
+	private static final int[] Monsters =
+	{
+		22536, 22537, 22538, 22539, 22540, 22541, 22542, 22543, 22544, 22547, 22550, 22551, 22552, 22596
+	};
+	private static final int FRAGMENT_POWDER = 13853;
+	private static final int LIGHT_FRAGMENT_POWDER = 13854;
+	private static final int LIGHT_FRAGMENT = 13855;
+	private static final double DROP_CHANCE = 60;
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		if (st == null)
+			return htmltext;
+		
+		if (npc.getNpcId() == ORBYU)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					QuestState _prev = player.getQuestState("10271_TheEnvelopingDarkness");
+					if ((_prev != null) && (_prev.getState() == State.COMPLETED) && (player.getLevel() >= 75))
+						htmltext = "32560-01.htm";
+					else
+						htmltext = "32560-02.htm";
+					if (player.getLevel() <= 75)
+						htmltext = "32560-03.htm";
+					break;
+				case State.STARTED:
+					htmltext = "32560-06.htm";
+					break;
+				case State.COMPLETED:
+					htmltext = "32560-04.htm";
+					break;
+			}
+			
+			if (st.getInt("cond") == 2)
+			{
+				htmltext = "32560-06.htm";
+			}
+		}
+		else if (npc.getNpcId() == ARTIUS)
+		{
+			switch (st.getState())
+			{
+				case State.COMPLETED:
+					htmltext = "32559-19.htm";
+					break;
+			}
+			if (st.getInt("cond") == 1)
+			{
+				htmltext = "32559-01.htm";
+			}
+			if (st.getInt("cond") == 2)
+			{
+				htmltext = "32559-04.htm";
+			}
+			if (st.getInt("cond") == 3)
+			{
+				htmltext = "32559-08.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32559-10.htm";
+			}
+			else if (st.getInt("cond") == 5)
+			{
+				if (st.getQuestItemsCount(FRAGMENT_POWDER) >= 100)
+				{
+					htmltext = "32559-15.htm";
+					st.set("cond", "6");
+				}
+				else if (st.getQuestItemsCount(FRAGMENT_POWDER) >= 1)
+				{
+					htmltext = "32559-14.htm";
+				}
+				else if (st.getQuestItemsCount(FRAGMENT_POWDER) < 1)
+				{
+					htmltext = "32559-13.htm";
+				}
+			}
+			else if (st.getInt("cond") == 6)
+			{
+				if (st.getQuestItemsCount(LIGHT_FRAGMENT_POWDER) < 100)
+					htmltext = "32559-16.htm";
+				else
+				{
+					st.set("cond", "7");
+					st.playSound("ItemSound.quest_middle");
+					htmltext = "32559-17.htm";
+				}
+			}
+			else if (st.getInt("cond") == 8)
+			{
+				st.unset("cond");
+				st.giveItems(57, 556980);
+				st.addExpAndSp(1009016, 91363);
+				st.playSound("ItemSound.quest_finish");
+				st.setState(State.COMPLETED);
+				st.exitQuest(false);
+				htmltext = "32559-18.htm";
+			}
+		}
+		else if (npc.getNpcId() == GINBY)
+		{
+			if (st.getInt("cond") == 1)
+			{
+				htmltext = "32566-02.htm";
+			}
+			else if (st.getInt("cond") == 2)
+			{
+				htmltext = "32566-02.htm";
+			}
+			else if (st.getInt("cond") == 3)
+			{
+				htmltext = "32566-01.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32566-09.htm";
+			}
+			else if (st.getInt("cond") == 5)
+			{
+				htmltext = "32566-10.htm";
+			}
+			else if (st.getInt("cond") == 6)
+			{
+				htmltext = "32566-10.htm";
+			}
+			
+		}
+		else if (npc.getNpcId() == LELRIKIA)
+		{
+			if (st.getInt("cond") == 3)
+			{
+				htmltext = "32567-01.htm";
+			}
+			else if (st.getInt("cond") == 4)
+			{
+				htmltext = "32567-05.htm";
+			}
+		}
+		else if (npc.getNpcId() == LEKON)
+		{
+			if (st.getInt("cond") == 7)
+			{
+				htmltext = "32557-01.htm";
+				
+				if (st.getInt("wait") == 1)
+				{
+					st.giveItems(LIGHT_FRAGMENT, 1);;
+					st.set("cond", "8");
+					st.unset("wait");
+					st.playSound("ItemSound.quest_middle");
+					htmltext = "32557-05.htm";
+				}
+			}
+			else if (st.getInt("cond") == 8)
+			{
+				htmltext = "32557-06.htm";
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return htmltext;
+		
+		if (event.equalsIgnoreCase("32560-06.htm"))
+		{
+			st.setState(State.STARTED);
+			st.set("cond", "1");
+			st.playSound("ItemSound.quest_accept");
+		}
+		else if (event.equalsIgnoreCase("32559-03.htm"))
+		{
+			st.set("cond", "2");
+		}
+		else if (event.equalsIgnoreCase("32559-07.htm"))
+		{
+			st.set("cond", "3");
+		}
+		else if (event.equalsIgnoreCase("pay"))
+		{
+			if (st.getQuestItemsCount(57) >= 10000)
+				st.takeItems(57, 10000);
+			htmltext = "32566-05.htm";
+			if (st.getQuestItemsCount(57) < 10000)
+				htmltext = "32566-04a.htm";
+		}
+		else if (event.equalsIgnoreCase("32567-04.htm"))
+		{
+			st.set("cond", "4");
+			st.playSound("ItemSound.quest_middle");
+		}
+		else if (event.equalsIgnoreCase("32559-12.htm"))
+		{
+			st.set("cond", "5");
+		}
+		else if (event.equalsIgnoreCase("32557-03.htm"))
+		{
+			if (st.getQuestItemsCount(LIGHT_FRAGMENT_POWDER) >= 100)
+			{
+				st.takeItems(LIGHT_FRAGMENT_POWDER, 100);
+				st.set("wait", "1");
+			}
+			else
+				htmltext = "32557-04.htm";
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public final String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(qn);
+		if (st.getInt("cond") == 5)
+		{
+			final long count = st.getQuestItemsCount(FRAGMENT_POWDER);
+			if (count < 100)
+			{
+				int chance = (int) (Config.RATE_QUEST_DROP * DROP_CHANCE);
+				int numItems = chance / 100;
+				chance = chance % 100;
+				if (st.getRandom(100) < chance)
+					numItems++;
+				if (numItems > 0)
+				{
+					if (count + numItems >= 100)
+					{
+						numItems = 100 - (int) count;
+					}
+					else
+						st.playSound("ItemSound.quest_itemget");
+					st.giveItems(FRAGMENT_POWDER, numItems);
+				}
+			}
+		}
+		return null;
+	}
+	
+	public Q10272_LightFragment(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(ORBYU);
+		addTalkId(ORBYU);
+		addTalkId(ARTIUS);
+		addTalkId(GINBY);
+		addTalkId(LELRIKIA);
+		addTalkId(LEKON);
+		for (int i : Monsters)
+		{
+			addKillId(i);
+		}
+		questItemIds = new int[]
+		{
+			FRAGMENT_POWDER, LIGHT_FRAGMENT_POWDER,
+		};
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q10272_LightFragment(10272, qn, "Light Fragment");
+	}
+}