Forráskód Böngészése

BETA: Updating reward system for quests '''Exploration of the Giants' Cave'''.
Reported by: lion, !UnAfraid
Reviewed by: jurchiks
Thanks to: lion

Adry_85 11 éve
szülő
commit
1d4344f1c0
15 módosított fájl, 297 hozzáadás és 241 törlés
  1. 174 0
      L2J_DataPack_BETA/dist/game/data/multisell/2014.xml
  2. 76 0
      L2J_DataPack_BETA/dist/game/data/multisell/2015.xml
  3. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04.html
  4. 0 13
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04a.html
  5. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04b.html
  6. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-no.html
  7. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-ok.html
  8. 21 104
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/Q00376_ExplorationOfTheGiantsCavePart1.java
  9. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04.html
  10. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04a.html
  11. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04b.html
  12. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-cont.html
  13. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-no.html
  14. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-ok.html
  15. 21 77
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/Q00377_ExplorationOfTheGiantsCavePart2.java

+ 174 - 0
L2J_DataPack_BETA/dist/game/data/multisell/2014.xml

@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
+	<npcs>
+		<npc>31147</npc> <!-- Sobling -->
+	</npcs>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Sword (60%) -->
+		<production count="1" id="9967" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Blade (60%) -->
+		<production count="1" id="9968" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Phantom (60%) -->
+		<production count="1" id="9969" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Bow (60%) -->
+		<production count="1" id="9970" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Knife (60%) -->
+		<production count="1" id="9971" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Halberd (60%) -->
+		<production count="1" id="9972" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Cudgel (60%) -->
+		<production count="1" id="9973" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Mace (60%) -->
+		<production count="1" id="9974" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="10" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="10" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="10" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="10" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="10" id="14840" />
+		<!-- Recipe - Dynasty Bagh-Nakh (60%) -->
+		<production count="1" id="9975" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="1" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="1" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="1" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="1" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="1" id="14840" />
+		<!-- Leonard -->
+		<production count="8" id="9628" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="1" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="1" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="1" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="1" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="1" id="14840" />
+		<!-- Adamantine -->
+		<production count="4" id="9629" />
+	</item>
+	<item>
+		<!-- Knowledge of the Giants Anthology, Chapter 1 -->
+		<ingredient count="1" id="14836" />
+		<!-- Knowledge of the Giants Anthology, Chapter 2 -->
+		<ingredient count="1" id="14837" />
+		<!-- Knowledge of the Giants Anthology, Chapter 3 -->
+		<ingredient count="1" id="14838" />
+		<!-- Knowledge of the Giants Anthology, Chapter 4 -->
+		<ingredient count="1" id="14839" />
+		<!-- Knowledge of the Giants Anthology, Chapter 5 -->
+		<ingredient count="1" id="14840" />
+		<!-- Orichalcum -->
+		<production count="6" id="9630" />
+	</item>
+</list>

+ 76 - 0
L2J_DataPack_BETA/dist/game/data/multisell/2015.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
+	<npcs>
+		<npc>31147</npc> <!-- Sobling -->
+	</npcs>
+	<item>
+		<!-- Wisdom of the Giants Text, Chapter 1 -->
+		<ingredient count="5" id="14842" />
+		<!-- Wisdom of the Giants Text, Chapter 2 -->
+		<ingredient count="5" id="14843" />
+		<!-- Wisdom of the Giants Text, Chapter 3 -->
+		<ingredient count="5" id="14844" />
+		<!-- Wisdom of the Giants Text, Chapter 4 -->
+		<ingredient count="5" id="14845" />
+		<!-- Wisdom of the Giants Text, Chapter 5 -->
+		<ingredient count="5" id="14846" />
+		<!-- Giant's Codex - Oblivion -->
+		<production count="1" id="9625" />
+	</item>
+	<item>
+		<!-- Wisdom of the Giants Text, Chapter 1 -->
+		<ingredient count="5" id="14842" />
+		<!-- Wisdom of the Giants Text, Chapter 2 -->
+		<ingredient count="5" id="14843" />
+		<!-- Wisdom of the Giants Text, Chapter 3 -->
+		<ingredient count="5" id="14844" />
+		<!-- Wisdom of the Giants Text, Chapter 4 -->
+		<ingredient count="5" id="14845" />
+		<!-- Wisdom of the Giants Text, Chapter 5 -->
+		<ingredient count="5" id="14846" />
+		<!-- Giant's Codex - Discipline -->
+		<production count="1" id="9626" />
+	</item>
+	<item>
+		<!-- Wisdom of the Giants Text, Chapter 1 -->
+		<ingredient count="1" id="14842" />
+		<!-- Wisdom of the Giants Text, Chapter 2 -->
+		<ingredient count="1" id="14843" />
+		<!-- Wisdom of the Giants Text, Chapter 3 -->
+		<ingredient count="1" id="14844" />
+		<!-- Wisdom of the Giants Text, Chapter 4 -->
+		<ingredient count="1" id="14845" />
+		<!-- Wisdom of the Giants Text, Chapter 5 -->
+		<ingredient count="1" id="14846" />
+		<!-- Leonard -->
+		<production count="8" id="9628" />
+	</item>
+	<item>
+		<!-- Wisdom of the Giants Text, Chapter 1 -->
+		<ingredient count="1" id="14842" />
+		<!-- Wisdom of the Giants Text, Chapter 2 -->
+		<ingredient count="1" id="14843" />
+		<!-- Wisdom of the Giants Text, Chapter 3 -->
+		<ingredient count="1" id="14844" />
+		<!-- Wisdom of the Giants Text, Chapter 4 -->
+		<ingredient count="1" id="14845" />
+		<!-- Wisdom of the Giants Text, Chapter 5 -->
+		<ingredient count="1" id="14846" />
+		<!-- Adamantine -->
+		<production count="4" id="9629" />
+	</item>
+	<item>
+		<!-- Wisdom of the Giants Text, Chapter 1 -->
+		<ingredient count="1" id="14842" />
+		<!-- Wisdom of the Giants Text, Chapter 2 -->
+		<ingredient count="1" id="14843" />
+		<!-- Wisdom of the Giants Text, Chapter 3 -->
+		<ingredient count="1" id="14844" />
+		<!-- Wisdom of the Giants Text, Chapter 4 -->
+		<ingredient count="1" id="14845" />
+		<!-- Wisdom of the Giants Text, Chapter 5 -->
+		<ingredient count="1" id="14846" />
+		<!-- Orichalcum -->
+		<production count="6" id="9630" />
+	</item>
+</list>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04.html

@@ -1,5 +1,4 @@
 <html><body>Expedition Captain Sobling:<br>
-Rewards appropriate for your effort are always prepared. If you make enough effort, you can take anything. But, what would you like?<br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 31147-04a.html">Receive S80 Weapon Recipe as a reward (Requires 10 sets of Knowledge of the Giants Anthology)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 31147-04b.html">Receive High Grade Materials (Requires 1 set of Knowledge of the Giants Anthology)</a>
+Rewards appropriate to your effort are always ready. If you make enough effort, you can take anything. Take a look to see if you need anything.<br>
+<a action="bypass -h npc_%objectId%_multisell 2014">Check reward list.</a>
 </body></html>

+ 0 - 13
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04a.html

@@ -1,13 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-Recipes? You may choose from the following.<br>
-As promised, I will take 10 sets of Knowledge of the Giants Anthology when you choose an item.<br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9967">Recipe - Dynasty Sword(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9968">Recipe - Dynasty Blade(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9969">Recipe - Dynasty Phantom(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9970">Recipe - Dynasty Bow(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9971">Recipe - Dynasty Knife(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9972">Recipe - Dynasty Halberd(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9973">Recipe - Dynasty Cudgel(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9974">Recipe - Dynasty Mace(60%)</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9975">Recipe - Dynasty Bagh-Nakh(60%)</a>
-</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-04b.html

@@ -1,7 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-High grade materials? You may choose from the following.<br>
-As promised, I'll take a set of Knowledge of the Giant Anthology when you choose the item.<br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9628">6 Leonard</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9629">3 Adamantine</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 9630">4 Orichalcum</a>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-no.html

@@ -1,3 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-I know you've worked hard, but isn't that too much to ask for those items? I can give you all these if you bring enough sets of Knowledge of the Giants Anthology.
-</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/31147-ok.html

@@ -1,7 +0,0 @@
-<html><body>Expedition Leader Sobling:<br>
-Thank you! I think our expedition will be a success now thanks to you, adventurer.<br>
-Well, do you have any other business with me?<br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 31147-03.html">Receive reward.</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 31147-cont.html">Keep hunting.</a><br>
-<a action="bypass -h Quest Q00376_ExplorationOfTheGiantsCavePart1 31147-quit.html">Say you want to quit.</a>
-</body></html>

+ 21 - 104
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00376_ExplorationOfTheGiantsCavePart1/Q00376_ExplorationOfTheGiantsCavePart1.java

@@ -18,20 +18,16 @@
  */
 package quests.Q00376_ExplorationOfTheGiantsCavePart1;
 
-import com.l2jserver.gameserver.enums.QuestSound;
 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.network.serverpackets.RadarControl;
-import com.l2jserver.gameserver.util.Util;
 
 /**
  * Exploration of the Giants' Cave Part 1 (376)<br>
  * Original Jython script by Gnacik.
  * @author nonom
- * @version 2010-02-17 based on official Franz server
  */
 public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 {
@@ -44,8 +40,6 @@ public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 	private static final int BOOK3 = 14838;
 	private static final int BOOK4 = 14839;
 	private static final int BOOK5 = 14840;
-	// Drop Chance
-	private static final int DROP_CHANCE = 20;
 	// Mobs
 	private static final int[] MOBS =
 	{
@@ -58,23 +52,10 @@ public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 		22676,
 		22677
 	};
-	// Rewards
-	private static final int RECIPE_DYNASTY_SWORD_60 = 9967;
-	private static final int RECIPE_DYNASTY_BLADE_60 = 9968;
-	private static final int RECIPE_DYNASTY_PHANTOM_60 = 9969;
-	private static final int RECIPE_DYNASTY_BOW_60 = 9970;
-	private static final int RECIPE_DYNASTY_KNIFE_60 = 9971;
-	private static final int RECIPE_DYNASTY_HALBERD_60 = 9972;
-	private static final int RECIPE_DYNASTY_CUDGEL_60 = 9973;
-	private static final int RECIPE_DYNASTY_MACE_60 = 9974;
-	private static final int RECIPE_DYNASTY_BAGHNAKH_60 = 9975;
-	private static final int LEONARD = 9628;
-	private static final int ADAMANTINE = 9629;
-	private static final int ORICHALCUM = 9630;
 	
-	public Q00376_ExplorationOfTheGiantsCavePart1(int id, String name, String descr)
+	private Q00376_ExplorationOfTheGiantsCavePart1()
 	{
-		super(id, name, descr);
+		super(376, Q00376_ExplorationOfTheGiantsCavePart1.class.getSimpleName(), "Exploration of the Giants' Cave - Part 1");
 		addStartNpc(SOBLING);
 		addTalkId(SOBLING);
 		addKillId(MOBS);
@@ -91,56 +72,18 @@ public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 			return htmltext;
 		}
 		
-		if (event.equalsIgnoreCase("31147-02.htm"))
+		switch (event)
 		{
-			st.startQuest();
-			player.sendPacket(new RadarControl(0, 2, 185712, 47414, -4350));
-		}
-		else if (event.equalsIgnoreCase("31147-quit.html"))
-		{
-			st.exitQuest(true, true);
-		}
-		else if (Util.isDigit(event))
-		{
-			final int val = Integer.parseInt(event);
-			switch (val)
+			case "31147-02.htm":
 			{
-				case RECIPE_DYNASTY_SWORD_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Sword (60%)
-					break;
-				case RECIPE_DYNASTY_BLADE_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Blade (60%)
-					break;
-				case RECIPE_DYNASTY_PHANTOM_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Phantom (60%)
-					break;
-				case RECIPE_DYNASTY_BOW_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Bow (60%)
-					break;
-				case RECIPE_DYNASTY_KNIFE_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Knife (60%)
-					break;
-				case RECIPE_DYNASTY_HALBERD_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Halberd (60%)
-					break;
-				case RECIPE_DYNASTY_CUDGEL_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Cudgel (60%)
-					break;
-				case RECIPE_DYNASTY_MACE_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Mace (60%)
-					break;
-				case RECIPE_DYNASTY_BAGHNAKH_60:
-					htmltext = exchangeRequest(st, val, 1, 10); // Recipe Dynasty Bagh-Nakh (60%)
-					break;
-				case LEONARD:
-					htmltext = exchangeRequest(st, val, 6, 1); // Leonard
-					break;
-				case ADAMANTINE:
-					htmltext = exchangeRequest(st, val, 3, 1); // Adamantine
-					break;
-				case ORICHALCUM:
-					htmltext = exchangeRequest(st, val, 4, 1); // Orichalcum
-					break;
+				st.startQuest();
+				player.sendPacket(new RadarControl(0, 2, 185712, 47414, -4350));
+				break;
+			}
+			case "31147-quit.html":
+			{
+				st.exitQuest(true, true);
+				break;
 			}
 		}
 		return htmltext;
@@ -149,16 +92,10 @@ public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
 	{
-		final QuestState st = player.getQuestState(getName());
-		if (st == null)
-		{
-			return null;
-		}
-		
-		if (st.isCond(1) && (getRandom(100) < DROP_CHANCE))
+		final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
+		if (st != null)
 		{
-			st.giveItems(ANCIENT_PARCHMENT, 1);
-			st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			giveItemRandomly(player, npc, ANCIENT_PARCHMENT, 1, 0, 0.2, true);
 		}
 		return super.onKill(npc, player, isSummon);
 	}
@@ -173,39 +110,19 @@ public class Q00376_ExplorationOfTheGiantsCavePart1 extends Quest
 			return htmltext;
 		}
 		
-		if (npc.getId() == SOBLING)
+		if (st.isCreated())
 		{
-			switch (st.getState())
-			{
-				case State.CREATED:
-					htmltext = (player.getLevel() >= 79) ? "31147-01.htm" : "31147-00.html";
-					break;
-				case State.STARTED:
-					htmltext = (st.hasQuestItems(BOOK1) && st.hasQuestItems(BOOK2) && st.hasQuestItems(BOOK3) && st.hasQuestItems(BOOK4) && st.hasQuestItems(BOOK5)) ? "31147-03.html" : "31147-02a.html";
-					break;
-			}
+			htmltext = (player.getLevel() >= 79 ? "31147-01.htm" : "31147-00.html");
 		}
-		return htmltext;
-	}
-	
-	private static String exchangeRequest(QuestState st, int giveid, int qty, int rem)
-	{
-		if ((st.getQuestItemsCount(BOOK1) >= rem) && (st.getQuestItemsCount(BOOK2) >= rem) && (st.getQuestItemsCount(BOOK3) >= rem) && (st.getQuestItemsCount(BOOK4) >= rem) && (st.getQuestItemsCount(BOOK5) >= rem))
+		else if (st.isStarted())
 		{
-			st.takeItems(BOOK1, rem);
-			st.takeItems(BOOK2, rem);
-			st.takeItems(BOOK3, rem);
-			st.takeItems(BOOK4, rem);
-			st.takeItems(BOOK5, rem);
-			st.giveItems(giveid, qty);
-			st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH);
-			return "31147-ok.html";
+			htmltext = (st.hasQuestItems(BOOK1, BOOK2, BOOK3, BOOK4, BOOK5) ? "31147-03.html" : "31147-02a.html");
 		}
-		return "31147-no.html";
+		return htmltext;
 	}
 	
 	public static void main(String[] args)
 	{
-		new Q00376_ExplorationOfTheGiantsCavePart1(376, Q00376_ExplorationOfTheGiantsCavePart1.class.getSimpleName(), "Exploration of the Giants' Cave - Part 1");
+		new Q00376_ExplorationOfTheGiantsCavePart1();
 	}
 }

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04.html

@@ -1,5 +1,4 @@
 <html><body>Expedition Captain Sobling:<br>
-Rewards appropriate for your effort are always prepared. If you make enough effort, you can take anything. But, what would you like?<br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 31147-04a.html">Receive Giant's Codex - Oblivion or Discipline (Requires 5 sets of Wisdom of the Giants Text)</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 31147-04b.html">Receive High Grade Materials (Requires 1 set of Knowledge of the Giants Anthology)</a>
+Rewards appropriate to your effort are always ready. Do great things, and reap great rewards. Take a look around and let me know if you need anything.<br>
+<a action="bypass -h npc_%objectId%_multisell 2015">Check reward list.</a>
 </body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04a.html

@@ -1,6 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-Giant's Codex? You may choose from the following.<br>
-As promised, I will take 5 sets of Wisdom of the Giants Text when you choose an item.<br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 9625">Giant's Codex - Oblivion</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 9626">Giant's Codex - Discipline</a>
-</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-04b.html

@@ -1,7 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-High grade materials? You may choose from the following.<br>
-As promised, I'll take a set of Wisdom of the Giants Text when you choose the item.<br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 9628">6 Leonard</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 9629">3 Adamantine</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 9630">4 Orichalcum</a>
-</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-cont.html

@@ -1,3 +1,3 @@
 <html><body>Researcher Sobling:<br>
-I can spot a good adventurer from a mile away. I look forward to working with you again.
+I've always had an eye for talent! Thank you for agreeing to help!<br>
 </body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-no.html

@@ -1,3 +0,0 @@
-<html><body>Expedition Captain Sobling:<br>
-I know you've worked hard, but isn't that too much to ask for those items? I can give you all these if you bring enough sets of Wisdom of the Giants Text.
-</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/31147-ok.html

@@ -1,7 +0,0 @@
-<html><body>Expedition Leader Sobling:<br>
-Thank you! I think our expedition will be a success now thanks to you, adventurer.<br>
-Well, do you have any other business with me?<br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 31147-03.html">Receive reward.</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 31147-cont.html">Keep hunting.</a><br>
-<a action="bypass -h Quest Q00377_ExplorationOfTheGiantsCavePart2 31147-quit.html">Say you want to quit.</a>
-</body></html>

+ 21 - 77
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00377_ExplorationOfTheGiantsCavePart2/Q00377_ExplorationOfTheGiantsCavePart2.java

@@ -18,20 +18,16 @@
  */
 package quests.Q00377_ExplorationOfTheGiantsCavePart2;
 
-import com.l2jserver.gameserver.enums.QuestSound;
 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.network.serverpackets.RadarControl;
-import com.l2jserver.gameserver.util.Util;
 
 /**
  * Exploration of the Giants' Cave Part 2 (377)<br>
  * Original Jython script by Gnacik.
  * @author nonom
- * @version 2010-02-17 based on official Franz server
  */
 public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 {
@@ -44,8 +40,6 @@ public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 	private static final int BOOK3 = 14844;
 	private static final int BOOK4 = 14845;
 	private static final int BOOK5 = 14846;
-	// Drop Chance
-	private static final int DROP_CHANCE = 50;
 	// Mobs
 	private static final int[] MOBS =
 	{
@@ -59,16 +53,10 @@ public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 		22668,
 		22669
 	};
-	// Rewards
-	private static final int OBLIVION = 9625;
-	private static final int DISCIPLINE = 9626;
-	private static final int LEONARD = 9628;
-	private static final int ADAMANTINE = 9629;
-	private static final int ORICHALCUM = 9630;
 	
-	public Q00377_ExplorationOfTheGiantsCavePart2(int id, String name, String descr)
+	private Q00377_ExplorationOfTheGiantsCavePart2()
 	{
-		super(id, name, descr);
+		super(377, Q00377_ExplorationOfTheGiantsCavePart2.class.getSimpleName(), "Exploration of the Giants' Cave - Part 2");
 		addStartNpc(SOBLING);
 		addTalkId(SOBLING);
 		addKillId(MOBS);
@@ -85,35 +73,18 @@ public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 			return htmltext;
 		}
 		
-		if (event.equalsIgnoreCase("31147-02.htm"))
+		switch (event)
 		{
-			st.startQuest();
-			player.sendPacket(new RadarControl(0, 2, -113360, -244676, -15536));
-		}
-		else if (event.equalsIgnoreCase("31147-quit.html"))
-		{
-			st.exitQuest(true, true);
-		}
-		else if (Util.isDigit(event))
-		{
-			final int val = Integer.parseInt(event);
-			switch (val)
+			case "31147-02.htm":
 			{
-				case OBLIVION:
-					htmltext = exchangeRequest(st, val, 1, 5); // Giant's Codex - Oblivion
-					break;
-				case DISCIPLINE:
-					htmltext = exchangeRequest(st, val, 1, 5); // Giant's Codex - Discipline
-					break;
-				case LEONARD:
-					htmltext = exchangeRequest(st, val, 6, 1); // Leonard
-					break;
-				case ADAMANTINE:
-					htmltext = exchangeRequest(st, val, 3, 1); // Adamantine
-					break;
-				case ORICHALCUM:
-					htmltext = exchangeRequest(st, val, 4, 1); // Orichalcum
-					break;
+				st.startQuest();
+				player.sendPacket(new RadarControl(0, 2, -113360, -244676, -15536));
+				break;
+			}
+			case "31147-quit.html":
+			{
+				st.exitQuest(true, true);
+				break;
 			}
 		}
 		return htmltext;
@@ -122,16 +93,10 @@ public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
 	{
-		final QuestState st = player.getQuestState(getName());
-		if (st == null)
-		{
-			return null;
-		}
-		
-		if ((st.isCond(1)) && (getRandom(100) < DROP_CHANCE))
+		final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
+		if (st != null)
 		{
-			st.giveItems(TITAN_ANCIENT_BOOK, 1);
-			st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			giveItemRandomly(player, npc, TITAN_ANCIENT_BOOK, 1, 0, 0.5, true);
 		}
 		return super.onKill(npc, player, isSummon);
 	}
@@ -146,40 +111,19 @@ public class Q00377_ExplorationOfTheGiantsCavePart2 extends Quest
 			return htmltext;
 		}
 		
-		if (npc.getId() == SOBLING)
+		if (st.isCreated())
 		{
-			switch (st.getState())
-			{
-				case State.CREATED:
-					htmltext = (player.getLevel() >= 79) ? "31147-01.htm" : "31147-00.html";
-					break;
-				case State.STARTED:
-					htmltext = (st.hasQuestItems(BOOK1) && st.hasQuestItems(BOOK2) && st.hasQuestItems(BOOK3) && st.hasQuestItems(BOOK4) && st.hasQuestItems(BOOK5)) ? "31147-03.html" : "31147-02a.html";
-					break;
-			}
-			
+			htmltext = (player.getLevel() >= 79 ? "31147-01.htm" : "31147-00.html");
 		}
-		return htmltext;
-	}
-	
-	private static String exchangeRequest(QuestState st, int giveid, int qty, int rem)
-	{
-		if ((st.getQuestItemsCount(BOOK1) >= rem) && (st.getQuestItemsCount(BOOK2) >= rem) && (st.getQuestItemsCount(BOOK3) >= rem) && (st.getQuestItemsCount(BOOK4) >= rem) && (st.getQuestItemsCount(BOOK5) >= rem))
+		else if (st.isStarted())
 		{
-			st.takeItems(BOOK1, rem);
-			st.takeItems(BOOK2, rem);
-			st.takeItems(BOOK3, rem);
-			st.takeItems(BOOK4, rem);
-			st.takeItems(BOOK5, rem);
-			st.giveItems(giveid, qty);
-			st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH);
-			return "31147-ok.html";
+			htmltext = (st.hasQuestItems(BOOK1, BOOK2, BOOK3, BOOK4, BOOK5) ? "31147-03.html" : "31147-02a.html");
 		}
-		return "31147-no.html";
+		return htmltext;
 	}
 	
 	public static void main(String[] args)
 	{
-		new Q00377_ExplorationOfTheGiantsCavePart2(377, Q00377_ExplorationOfTheGiantsCavePart2.class.getSimpleName(), "Exploration of the Giants' Cave - Part 2");
+		new Q00377_ExplorationOfTheGiantsCavePart2();
 	}
 }