Kaynağa Gözat

BETA: Few quests for Sel Mahum grounds:
- 251 No Secrets by '''Dumpster'''
- 252 It Semlls Delicious by '''Dumpster'''
- 289 No More Soup for You by '''kostantinos'''
- 290 Threat Removal by '''kostantinos'''
- 461 Rumble in the Base by '''malyelfik'''

Rumen Nikiforov 13 yıl önce
ebeveyn
işleme
4fe67ca1f7
43 değiştirilmiş dosya ile 1022 ekleme ve 0 silme
  1. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-00.htm
  3. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-01.htm
  4. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-02.htm
  5. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-03.htm
  6. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-04.htm
  7. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-05.htm
  8. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-06.htm
  9. 154 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/Q251_NoSecrets.java
  10. 11 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-01.htm
  11. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-02.htm
  12. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-03.htm
  13. 12 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-04.htm
  14. 13 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-05.htm
  15. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-06.htm
  16. 11 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-07.htm
  17. 13 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-08.htm
  18. 148 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/Q252_ItSmellsDelicious.java
  19. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-00.htm
  20. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-01.htm
  21. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-02.htm
  22. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-03.htm
  23. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-04.htm
  24. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-07.htm
  25. 139 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/Q289_NoMoreSoupForYou.java
  26. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-00.htm
  27. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-01.htm
  28. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-02.htm
  29. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-03.htm
  30. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-04.htm
  31. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-05.htm
  32. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-06.htm
  33. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-07.htm
  34. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-08.htm
  35. 180 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/Q290_ThreatRemoval.java
  36. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-01.htm
  37. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-02.htm
  38. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-03.htm
  39. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-04.htm
  40. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-05.htm
  41. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-06.html
  42. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-07.html
  43. 180 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/Q461_RumbleInTheBase.java

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

@@ -436,6 +436,8 @@ quests/246_PossessorOfAPreciousSoul_3/__init__.py
 quests/247_PossessorOfAPreciousSoul_4/__init__.py
 quests/Q249_PoisonedPlainsOfTheLizardmen/Q249_PoisonedPlainsOfTheLizardmen.java
 quests/Q250_WatchWhatYouEat/Q250_WatchWhatYouEat.java
+quests/Q251_NoSecrets/Q251_NoSecrets.java
+quests/Q252_ItSmellsDelicious/Q252_ItSmellsDelicious.java
 quests/255_Tutorial/__init__.py
 quests/257_GuardIsBusy1/__init__.py
 quests/258_BringWolfPelt1/__init__.py
@@ -465,6 +467,8 @@ quests/283_TheFewTheProudTheBrave/__init__.py
 quests/284_MuertosFeather/__init__.py
 quests/286_FabulousFeathers/__init__.py
 quests/Q287_FiguringItOut/Q287_FiguringItOut.java
+quests/Q289_NoMoreSoupForYou/Q289_NoMoreSoupForYou.java
+qiests/Q290_ThreatRemoval/Q290_ThreatRemoval.java
 quests/291_RedBonnetsRevenge/__init__.py
 quests/292_CrushBrigands/__init__.py
 quests/293_HiddenVein/__init__.py
@@ -574,6 +578,7 @@ quests/432_BirthdayPartySong/__init__.py
 quests/450_GraveRobberMemberRescue/__init__.py
 quests/451_LuciensAltar/__init__.py
 quests/Q452_FindingtheLostSoldiers/Q452_FindingtheLostSoldiers.java
+quests/Q461_RumbleInTheBase/Q461_RumbleInTheBase.java
 quests/Q463_IMustBeaGenius/Q463_IMustBeaGenius.java
 quests/501_ProofOfClanAlliance/__init__.py
 quests/503_PursuitClanAmbition/__init__.py

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-00.htm

@@ -0,0 +1,7 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+I require a more seasoned adventurer. When you see one in the mirror, come on back.<br>
+(Only character with level 82 or above can take on this quest.)
+</body>
+</html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-01.htm

@@ -0,0 +1,9 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+We've learned Sel Mahums have begun training for battle. 
+Their training grounds are near the Sel Mahum Training Grounds. This is no coincidence. 
+The Town of Oren's safety is at stake. I won't just wait and see. I've sworn an oath to defend.<br>
+<a action="bypass -h Quest 251_NoSecrets 30201-02.htm">Ask about the Sel Mahum Training Grounds.</a>
+</body>
+</html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-02.htm

@@ -0,0 +1,9 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+Ah, these lands were once called SkyPaint Grassland. 
+Then the Sel Mahums put their training camp here and dubbed it the Sel Mahum Training Grounds. 
+Anyway, what do you think? Want to give me a hand?<br>
+<a action="bypass -h Quest 251_NoSecrets 30201-03.htm">Say you would.</a>
+</body>
+</html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-03.htm

@@ -0,0 +1,9 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+The Sel Mahums are training for war, it's up to us to keep the peace. 
+But we need to know more about their training operation. I cannot leave my post, I'm duty bound. 
+I'll need your help. Get the <font color="LEVEL">Sel Mahum training schedule from the training instructor</font> and bring it here.<br>
+Then bring the <font color="LEVEL">Sel Mahum training log new privates and Sel Mahum soldiers carry</font>.
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-04.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+Excellent work! Now we know what kind of training the Sel Mahums are doing. Nicely done! Here, you've earned this!
+</body>
+</html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-05.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+Hey, lackey. While you're relaxing, Sel Mahums are training for war. That means get Ready!
+</body>
+</html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/30201-06.htm

@@ -0,0 +1,8 @@
+<html><head>
+<body>
+Guard Pinaps:<br>
+Ah, it has been awhile! Share a pint with me old friend! 
+We can catch up on old times!<br>
+(You have already performed this quest).
+</body>
+</html>

+ 154 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q251_NoSecrets/Q251_NoSecrets.java

@@ -0,0 +1,154 @@
+/*
+ * 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 quests.Q251_NoSecrets;
+
+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;
+import com.l2jserver.util.Rnd;
+
+public class Q251_NoSecrets extends Quest
+{
+	public static final int PINAPS		= 30201;
+	public static final int DIARY		= 15508; 
+	public static final int TABLE		= 15509;
+
+	public static final String qn = "251_NoSecrets";
+	
+	private static final int[] MOBS =
+	{22783, 22785, 22780, 22782, 22784};
+
+	private static final int[] MOBS2 =
+	{22775, 22776, 22778};
+	
+	public Q251_NoSecrets(int id, String name, String descr)
+	{
+		super(id,name,descr);
+		
+		addStartNpc(PINAPS);
+		addTalkId(PINAPS);
+
+		for (int i : MOBS)
+			addKillId(i);
+		for (int i : MOBS2)
+			addKillId(i);	
+	}
+	
+	@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() == PINAPS)
+		{
+			if (event.equalsIgnoreCase("30201-03.htm"))
+			{
+				st.set("cond","1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+			}
+		}
+		return htmltext;
+	}
+	
+	@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() == PINAPS)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					if (player.getLevel() >= 82)
+						htmltext = "30201-01.htm";
+					else
+						htmltext = "30201-00.htm";
+				break;
+				case State.STARTED:
+					if (st.getInt("cond") == 1)
+					{
+						htmltext = "30201-05.htm";
+					}
+					else if (st.getInt("cond") == 2)
+					{
+						if ((st.getQuestItemsCount(DIARY) >= 10) && (st.getQuestItemsCount(TABLE) >= 5))
+						{
+							htmltext = "30201-04.htm";
+							st.takeItems(DIARY, -1);
+							st.takeItems(TABLE, -1);
+							st.giveAdena(313355, true);
+							st.addExpAndSp(56787, 160578);
+							st.playSound("ItemSound.quest_finish");
+							st.exitQuest(false);
+							st.setState(State.COMPLETED);
+						}
+					}
+				break;
+				case State.COMPLETED:
+					htmltext = "30201-06.htm";
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) 
+	{
+		QuestState st = player.getQuestState(getName());
+		int npcId = npc.getNpcId();
+		if (st == null || st.getState() != State.STARTED)
+			return null;
+		if (st.getInt("cond") == 1)
+		{
+			if ((Util.contains(MOBS, npcId)) && (Rnd.get(100) < 10) && (st.getQuestItemsCount(DIARY) < 10))
+			{
+				st.giveItems(DIARY, 1);
+				st.playSound("ItemSound.quest_itemget");
+				if ((st.getQuestItemsCount(DIARY) >= 10) && (st.getQuestItemsCount(TABLE) >= 5))
+				{
+					st.set("cond", "2");
+					st.playSound("ItemSound.quest_itemget");
+				}
+			}
+			else if ((Util.contains(MOBS2, npcId)) && (Rnd.get(100) < 5) &&(st.getQuestItemsCount(TABLE) < 5))
+			{
+				st.giveItems(TABLE, 1);
+				st.playSound("ItemSound.quest_itemget");
+				if ((st.getQuestItemsCount(DIARY) >= 10) && (st.getQuestItemsCount(TABLE) >= 5))
+				{
+					st.set("cond", "2");
+					st.playSound("ItemSound.quest_itemget");
+				}
+			}
+		}
+		return super.onKill(npc, player, isPet);
+	}
+
+	public static void main(String[] args)
+	{
+		new Q251_NoSecrets(251, qn, "No Secrets");
+	}
+}

+ 11 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-01.htm

@@ -0,0 +1,11 @@
+<html><head>
+<body>
+Guard Stan:<br>
+Smell that? Sweet salvation, that's what it smells like to me. 
+Like a juicy slice of heaven, wrapped in honey by angels and turned into an aroma. Hm... I smell it every 
+Thursday. Sadly, I've never tasted it. A lesser man would have gone mad by now. MAD I say!!<br>
+I don't know what it is, but they cook it over at the Sel Mahum Training Grounds. When I close my eyes I 
+dream of this smell.<br>
+<a action="bypass -h Quest 252_ItSmellsDelicious 30200-04.htm">Ask about the Sel Mahum Training Grounds.</a>
+</body>
+</html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-02.htm

@@ -0,0 +1,7 @@
+<html><head>
+<body>
+Guard Stan:<br>
+Hmm… I don't think you have the nose to track down this delicious smell for me.<br>
+(Only characters level 82 or above can take this quest.)
+</body>
+</html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-03.htm

@@ -0,0 +1,7 @@
+<html><head>
+<body>
+Guard Stan:<br>
+My love affair with salmon soup is all because of you. And so is this incremental weight gain in my thighs and midsection. But still, thanks! <br>
+(You have already completed this quest.)
+</body>
+</html>

+ 12 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-04.htm

@@ -0,0 +1,12 @@
+<html><head>
+<body>
+Guard Stan:<br>
+What? Oh, sorry. It's just... Someone cooked something and it smells REALLY good. 
+But yes, we called it Skyshadow Meadow until the Sel Mahums started using it for battle training. 
+Gave it some goofy name… Sel Mahum Training Grounds I think. Should have named it 'What the hell is 
+that delicious smell??'.<br>
+Hey, good buddy of mine, how about a little adventure? Find what is making that 
+yummy smell and bring it to me? PLEASE?<br>
+<a action="bypass -h Quest 252_ItSmellsDelicious 30200-05.htm">Sure, I like smell games.</a>
+</body>
+</html>

+ 13 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-05.htm

@@ -0,0 +1,13 @@
+<html><head>
+<body>
+Guard Stan:<br>
+As I expected, they're cooking the dish over their campfires. The soup will 
+soon be mine!<br>
+Search their pockets for the recipe. I think the <font color="LEVEL">Sel Mahum Squad Leaders</font> 
+might keep it with them. They tend to hang around the campfires gobbling up soup. The <font color="LEVEL">
+Sel Mahum Chef</font> is another possibility. He carries around the soup and serves it to the squad leaders. 
+I can taste victory already... it will be ours and so will the soup!<br>
+Some of the Sel Mahum Squad 
+Leaders doze off around the fires, careful not to wake them. I'll wait right here. Be careful!
+</body>
+</html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-06.htm

@@ -0,0 +1,8 @@
+<html><head>
+<body>
+Guard Stan:<br>
+Did you find it?! But I'm starving!! Man, I am THIS close to abandoning my post 
+and gobbling whatever is making that smell. Just find it and bring it here, please!! I haven't eaten all day and 
+it smells Y-U-M-M-M-Y!!
+</body>
+</html>

+ 11 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-07.htm

@@ -0,0 +1,11 @@
+<html><head>
+<body>
+Guard Stan:<br>
+Well?! I'm dying here! Smells so good! I should've eaten breakfast but I slept in. 
+Let me see what you found.<br>
+Hm these recipe notes are torn, they're hard to read. Maybe if I hm AHA! Salmon soup?
+ That smell was from salmon soup? Hey, help me put these pieces together. I will learn this recipe or DIE TRYING!<br>
+Grr... wait. Soup like that would have to be... ah, you found some Diary entries too! Let's have a look.<br>
+<a action="bypass -h Quest 252_ItSmellsDelicious 30200-08.htm">Ask about the diary.</a>
+</body>
+</html>

+ 13 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/30200-08.htm

@@ -0,0 +1,13 @@
+<html><head>
+<body>
+Guard Stan:<br>
+<font color="LEVEL">'I LOVE SALMON SOUP!'<br1>' Man, warms you right up! 
+I need a napkin.. Nah I'll just lick my face!'<br>
+'Salmon soup.. Hmm... my newest favorite of everything...'<br>
+'Oohh, I don't feel so good. That campfire is making me nauseous...'</font><br>
+Well, it looks like Sel 
+Mahum Squad Leaders are so busy eating soup and resting that they're not training. Thought you should know. 
+Anyway, thank you. In a minute, I'll belch, and taste that salmon soup one more time. MM-mmm. Take this, it's 
+for the soup.
+</body>
+</html>

+ 148 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q252_ItSmellsDelicious/Q252_ItSmellsDelicious.java

@@ -0,0 +1,148 @@
+/*
+ * 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 quests.Q252_ItSmellsDelicious;
+
+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;
+import com.l2jserver.util.Rnd;
+
+public class Q252_ItSmellsDelicious extends Quest
+{
+	public static final int STAN		= 30200;
+	public static final int MAHUM_DIARY		= 15500; 
+	public static final int MAHUM_COOKBOOKP		= 15501; 
+
+	public static final String qn = "252_ItSmellsDelicious";
+	
+	private static final int[] MOBS =
+	{22786,22787,22788};
+
+	private static final int CHIEF = 18908;
+	
+	public Q252_ItSmellsDelicious(int id, String name, String descr)
+	{
+		super(id,name,descr);
+		
+		addStartNpc(STAN);
+		addTalkId(STAN);
+		addKillId(CHIEF);
+		for (int i : MOBS)
+			addKillId(i);
+	}
+	
+	@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() == STAN)
+		{
+			if (event.equalsIgnoreCase("30200-05.htm"))
+			{
+				st.set("cond","1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+			}
+			else if (event.equalsIgnoreCase("30200-08.htm"))
+			{
+				st.takeItems(MAHUM_DIARY, -1);
+				st.takeItems(MAHUM_COOKBOOKP, -1);
+				st.giveAdena(313355, true);
+				st.addExpAndSp(56787, 160578);
+				st.playSound("ItemSound.quest_finish");
+				st.exitQuest(false);
+				st.setState(State.COMPLETED);
+			}
+		}
+		return htmltext;
+	}
+	
+	@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() == STAN)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					if (player.getLevel() >= 82)
+						htmltext = "30200-01.htm";
+					else
+						htmltext = "30200-02.htm";
+				break;
+				case State.STARTED:
+					if (st.getInt("cond") == 1)
+						htmltext = "30200-06.htm";
+					else if (st.getInt("cond") == 2)
+						if ((st.getQuestItemsCount(MAHUM_DIARY) >= 10) && (st.getQuestItemsCount(MAHUM_COOKBOOKP) >= 5))
+							htmltext = "30200-07.htm";
+				break;
+				case State.COMPLETED:
+					htmltext = "30200-03.htm";
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) 
+	{
+		QuestState st = player.getQuestState(getName());
+		int npcId = npc.getNpcId();
+		if (st == null || st.getState() != State.STARTED)
+			return null;
+		if (st.getInt("cond") == 1)
+		{
+			if ((Util.contains(MOBS, npcId)) && (Rnd.get(100) < 10) && (st.getQuestItemsCount(MAHUM_DIARY) < 10))
+			{
+					st.giveItems(MAHUM_DIARY, 1);
+					st.playSound("ItemSound.quest_itemget");
+					if ((st.getQuestItemsCount(MAHUM_DIARY) >= 10) && (st.getQuestItemsCount(MAHUM_COOKBOOKP) >= 5))
+					{
+						st.set("cond", "2");
+						st.playSound("ItemSound.quest_itemget");
+					}
+			}
+			else if ((npcId == CHIEF) && (Rnd.get(100) < 5) && (st.getQuestItemsCount(MAHUM_COOKBOOKP) < 5))
+			{
+				st.giveItems(MAHUM_COOKBOOKP, 1);
+				st.playSound("ItemSound.quest_itemget");
+				if ((st.getQuestItemsCount(MAHUM_DIARY) >= 10) && (st.getQuestItemsCount(MAHUM_COOKBOOKP) >= 5))
+				{
+					st.set("cond", "2");
+					st.playSound("ItemSound.quest_itemget");
+				}
+			}
+		}
+		return super.onKill(npc, player, isPet);
+	}
+
+	public static void main(String[] args)
+	{
+		new Q252_ItSmellsDelicious(252, qn, "It Smells Delicious");
+	}
+}

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-00.htm

@@ -0,0 +1 @@
+<html><head><body>Guard Stan:<br>Hello, my friend. We go way back, it is true. We've laughed, we've cried. I told you about my wife, and how she has long toenails. But I can't ask you for any favors right now.<br>(Only characters level 82 or above who have completed It Smells Delicious can take this quest.)</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-01.htm

@@ -0,0 +1,3 @@
+<html><head><body>Guard Stan:<br>
+Hello my friend, we need you help right now. What do yuo think?<br>
+<a action="bypass -h Quest 289_NoMoreSoupForYou 30200-02.htm">Continue.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-02.htm

@@ -0,0 +1,3 @@
+<html><head><body>Guard Stan:<br>
+Pinaps thinks that Soup makes Sel Mahums more powerfull! You should steal their food!<br>
+<a action="bypass -h Quest 289_NoMoreSoupForYou 30200-03.htm">Agree to help.</a></body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-03.htm

@@ -0,0 +1,3 @@
+<html><head><body>Guard Stan:<br> 
+I'll need at least 100 of <font color="LEVEL">Full Barrels of Soup</font>. 
+But, if you bring more, I can offer more and greater rewards. The more, the better.</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-04.htm

@@ -0,0 +1,5 @@
+<html><head><body>Guard Stan:<br>
+Oh you returned? Choose what you want.<br>
+<a action="bypass -h Quest 289_NoMoreSoupForYou 30200-05.htm">Exchange 500 items for a weapon recipe/material.</a><br>
+<a action="bypass -h Quest 289_NoMoreSoupForYou 30200-06.htm">Exchange 100 items for a armor or jewelery recipe/material.</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/30200-07.htm

@@ -0,0 +1,3 @@
+<html><head><body>Guard Stan:<br>
+Not enough items.<br>
+</body></html>

+ 139 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q289_NoMoreSoupForYou/Q289_NoMoreSoupForYou.java

@@ -0,0 +1,139 @@
+package quests.Q289_NoMoreSoupForYou;
+
+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;
+
+public class Q289_NoMoreSoupForYou extends Quest
+{
+	public static final int STAN		= 30200;
+	public static final int RATE		= 5;
+	public static final int SOUP		= 15712;
+
+	public static final String qn = "289_NoMoreSoupForYou";
+	
+	private static final int[] MOBS =
+	{
+		18908, 22779, 22786, 22787, 22788
+	};
+
+	private static final int[][] WEAPONS =
+	{{10377, 1}, {10401, 1}, {10401, 2}, {10401, 3}, {10401, 4}, {10401, 5}, {10401, 6}};
+
+	private static final int[][] ARMORS =
+	{{15812, 1}, {15813, 1}, {15814, 1}, {15791, 1}, {15787, 1}, {15784, 1}, {15781, 1}, {15778, 1}, {15775, 1}, {15774, 5}, {15773, 5}, {15772, 5}, {15693, 5}, {15657, 5}, {15654, 5}, {15651, 5}, {15648, 5}, {15645, 5}};
+	
+	public Q289_NoMoreSoupForYou(int id, String name, String descr)
+	{
+		super(id,name,descr);
+		
+		addStartNpc(STAN);
+		addTalkId(STAN);
+
+		for (int i : MOBS)
+			addKillId(i);	
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q289_NoMoreSoupForYou(289, qn, "No More Soup For You");
+		_log.info("Loaded Quest: No More Soup For You");
+	}
+	
+	@Override
+	public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		if (st == null)
+			return htmltext;
+		int b = st.getRandom(18);
+		int c = st.getRandom(7);
+
+		if (npc.getNpcId() == STAN)
+		{
+			if (event.equalsIgnoreCase("30200-03.htm"))
+			{
+				st.set("cond","1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+			}
+			else if (event.equalsIgnoreCase("30200-05.htm"))
+			{
+				if (st.getQuestItemsCount(SOUP) >= 500)
+				{
+					st.giveItems(WEAPONS[c][0],WEAPONS[c][1]);
+					st.takeItems(SOUP, 500);
+					st.playSound("ItemSound.quest_accept");
+					htmltext = "30200-04.htm";
+				}
+				else
+					htmltext = "30200-07.htm";
+			}
+			else if (event.equalsIgnoreCase("30200-06.htm"))
+			{
+				if (st.getQuestItemsCount(SOUP) >= 100)
+				{
+					st.giveItems(ARMORS[b][0],ARMORS[b][1]);
+					st.takeItems(SOUP, 100);
+					st.playSound("ItemSound.quest_accept");
+					htmltext = "30200-04.htm";
+				}
+				else
+					htmltext = "30200-07.htm";
+			}
+		}
+		return htmltext;
+	}
+	
+	@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() == STAN)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					QuestState PREV = player.getQuestState("252_ItSmellsDelicious");
+					if ((PREV != null) && (PREV.getState() == State.COMPLETED) && (player.getLevel() >= 82))
+						htmltext = "30200-01.htm";
+					else
+						htmltext = "30200-00.htm";
+				break;
+				case State.STARTED:
+					if (st.getInt("cond") == 1)
+					{
+						if (st.getQuestItemsCount(SOUP) >= 100)
+							htmltext = "30200-04.htm";
+						else
+							htmltext = "30200-03.htm";
+					}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) 
+	{
+		QuestState st = player.getQuestState(getName());
+		int npcId = npc.getNpcId();
+		if (st == null || st.getState() != State.STARTED)
+			return null;
+		if (Util.contains(MOBS, npcId))
+		{
+			st.giveItems(SOUP, 1*RATE);
+			st.playSound("ItemSound.quest_itemget");
+		}
+		return super.onKill(npc, player, isPet);
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-00.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>Look recruit, I can't assign this mission to anyone who hasn't 
+survived enough storms, you get me? <br>
+(Only character with level 82 or above and who has performed the No Secret quest can take on this quest).
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-01.htm

@@ -0,0 +1,6 @@
+<html><head><body>Guard Pinaps:<br>I carefully inspected the Training Log and Schedule of the Sel Mahums, 
+which you brought it last time. It looks like they are getting trained more systematically than I expected.  
+I guess just finding out the information isn't enough...<br>If their power gets stronger through this training, 
+it will be a huge threat to this village. Wouldn't you want to help me to stop their training?<br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-02.htm">Say you would.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-02.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>The mission is simple: Kill them. The recruits, the instructors, every Sel 
+Mahum you find in the Sel Mahum Training Grounds. They cannot be allowed to continue their training. Gather 
+<font color="LEVEL">over 400 Sel Mahum tags</font> and bring them to me. I will reward you.., I know you fight 
+for more than honor.</body></html>

+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-03.htm

@@ -0,0 +1,2 @@
+<html><head><body>Guard Pinaps:<br>I'm not paying you by the hour! Let's go! You're not getting anything until 
+I get my 400 Sel Mahum ID Tags.</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-04.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>You've done my job, the Town of Orean is safe. Thank you, defender... 
+Please accept this gift for your help.<br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-05.htm">Take the reward.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-05.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>Like it or not, this is the best I can get right now. I may be able to 
+do better next time. What do you think? Still game?<br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-06.htm">Say you will continue to help.</a><br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-07.htm">Say you will stop helping.</a></body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-06.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>Thanks. I was really hoping you'd say that. 
+When this is over we may share a pint. For now, we carry out the mission. Get rid of those Sel Mahums 
+at the Sel Mahum Training Grounds, and bring <font color="LEVEL">more than 400 Sel Mahum tags</font> as evidence. 
+You will be rewarded.</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-07.htm

@@ -0,0 +1,4 @@
+<html><head><body>Guard Pinaps:<br>I need your help. But unlike me, you are not duty bound, mercenary. 
+Stay or leave. I will not grovel.<br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-06.htm">Say you will continue.</a><br>
+<a action="bypass -h Quest 290_ThreatRemoval 30201-08.htm">Say you will quit.</a></body></html>

+ 2 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/30201-08.htm

@@ -0,0 +1,2 @@
+<html><head><body>Guard Pinaps:<br>Oh, it is. So be it. I respect your skills. May we serve together again 
+someday.</body></html>

+ 180 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q290_ThreatRemoval/Q290_ThreatRemoval.java

@@ -0,0 +1,180 @@
+package quests.Q290_ThreatRemoval;
+
+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;
+import com.l2jserver.gameserver.util.Util;
+import com.l2jserver.util.Rnd;
+
+public class Q290_ThreatRemoval extends Quest
+{
+	public static final int PINAPS		= 30201;
+	public static final int TAGS		= 15714;
+
+	public static final String qn = "290_ThreatRemoval";
+	
+	private static final int[] MOBS1 =
+	{
+		22780, 22782, 22784
+	};
+	private static final int[] MOBS2 =
+	{
+		22781, 22783, 22785
+	};
+	private static final int[] MOBS3 =
+	{
+		22776, 22775, 22777, 22778
+	};
+
+	private static final int[][][] REWARD =
+	{
+		{{959, 1}}, 
+		{{960, 1}, {960, 2}, {960, 3}}, 
+		{{9552, 1}, {9552, 2}}
+	};
+	
+	public Q290_ThreatRemoval(int id, String name, String descr)
+	{
+		super(id,name,descr);
+		
+		addStartNpc(PINAPS);
+		addTalkId(PINAPS);
+
+		for (int i : MOBS1)
+			addKillId(i);	
+		for (int i : MOBS2)
+			addKillId(i);
+		for (int i : MOBS3)
+			addKillId(i);
+	}
+	
+	@Override
+	public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		if (st == null)
+			return htmltext;
+		int[][] i = REWARD[(int) Rnd.get(REWARD.length)];
+		int b = Rnd.get(i.length);
+
+		if (npc.getNpcId() == PINAPS)
+		{
+			if (event.equalsIgnoreCase("30201-02.htm"))
+			{
+				st.set("cond","1");
+				st.setState(State.STARTED);
+				st.playSound("ItemSound.quest_accept");
+			}
+			else if (event.equalsIgnoreCase("30201-05.htm"))
+			{
+				if (st.getQuestItemsCount(TAGS) >= 400)
+				{
+					st.giveItems(i[b][0],i[b][1]);
+					st.takeItems(TAGS, 400);
+					st.playSound("ItemSound.quest_finish");
+					htmltext = "30201-05.htm";
+				}
+				else
+					htmltext = "30201-03.htm";
+			}
+			else if (event.equalsIgnoreCase("30201-08.htm"))
+			{
+				st.unset("cond");
+				st.exitQuest(true);
+				st.playSound("ItemSound.quest_finish");
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc,L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		QuestState _prev = player.getQuestState("251_NoSecrets");
+		if (st == null)
+			return htmltext;
+		
+		if(npc.getNpcId() == PINAPS)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					if (player.getLevel() >= 82 && (_prev != null && _prev.getState() == State.COMPLETED))
+						htmltext = "30201-01.htm";
+					else
+						htmltext = "30201-00.htm";
+				break;
+				case State.STARTED:
+					if (st.getInt("cond") == 1)
+					{
+						if (st.getQuestItemsCount(TAGS) >= 400)
+							htmltext = "30201-04.htm";
+						else
+							htmltext = "30201-03.htm";
+					}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) 
+	{
+		QuestState st = player.getQuestState(getName());
+		int npcId = npc.getNpcId();
+		if (st == null || st.getState() != State.STARTED)
+			return null;
+		if (Util.contains(MOBS1, npcId))
+		{
+			int chance = (int) (25 * Config.RATE_QUEST_DROP);
+			int numItems = (int) (chance / 100);
+			chance = chance % 100;
+			if (st.getRandom(100) < chance)
+				numItems++;
+			if (numItems > 0)
+			{
+				st.playSound("ItemSound.quest_itemget");
+				st.giveItems(TAGS, numItems);
+			}
+		}
+		else if (Util.contains(MOBS2, npcId))
+		{
+			int chance = (int) (30 * Config.RATE_QUEST_DROP);
+			int numItems = (int) (chance / 100);
+			chance = chance % 100;
+			if (st.getRandom(100) < chance)
+				numItems++;
+			if (numItems > 0)
+			{
+				st.playSound("ItemSound.quest_itemget");
+				st.giveItems(TAGS, numItems);
+			}
+		}
+		else if (Util.contains(MOBS3, npcId))
+		{
+			int chance = (int) (50 * Config.RATE_QUEST_DROP);
+			int numItems = (int) (chance / 100);
+			chance = chance % 100;
+			if (st.getRandom(100) < chance)
+				numItems++;
+			if (numItems > 0)
+			{
+				st.playSound("ItemSound.quest_itemget");
+				st.giveItems(TAGS, numItems);
+			}
+		}
+		return super.onKill(npc, player, isPet);
+	}
+
+	public static void main(String[] args)
+	{
+		new Q290_ThreatRemoval(290, qn, "Threat Removal");
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-01.htm

@@ -0,0 +1,4 @@
+<html><body>Guard Stan:<br>
+You've seen Sel Mahums train? It's impressive, isn't it. Pinaps fears they are becoming too powerful. He doesn't know what to do. But I do... <br>
+<a action="bypass -h Quest Q461_RumbleInTheBase 30200-04.htm">Ask about his idea.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-02.htm

@@ -0,0 +1,4 @@
+<html><body>Guard Stan:<br>
+Have you talked to Pinaps? He's worried about all the training going on at the Sel Mahum's camp. If he'd only ask me, I'd tell him how to solve it. But the ideas and opinions of guards are often overlooked, such is life.<br>
+(Only character level 82 or above who have completed It Smells Delicious can take this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-03.htm

@@ -0,0 +1,4 @@
+<html><body>Guard Stan:<br>
+Thanks for your hard work. Today Pinaps doesn't have to worry anymore. Worrying just shaves time off your life, makes you wrinkly, and causes gas. A true friend will put up with all that to help take some of the stress away. True friends also bring salmon soup.<br>
+(You can take on this quest once per day, starting at 6:30 am.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-04.htm

@@ -0,0 +1,4 @@
+<html><body>Guard Stan:<br>
+Strength in battle comes from your stomach. Big swords, lots of training, all worthless compared to a belly fully of good food. Hey, can you tell Pinaps not to worry about me? That would be swell.<br>
+<a action="bypass -h Quest Q461_RumbleInTheBase 30200-05.htm">Say you will.</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-05.htm

@@ -0,0 +1,5 @@
+<html><body>Guard Stan:<br>
+I've pretty much established at this point that the Sel Mahum draw their fierce power in battle from their delicious Salmon Soup. I cannot allow this. Take <font color="LEVEL">salmon from the Sel Mahum Chefs</font>, so that Sel Mahums will know the suffering of life without tasty salmon soup!<br>
+Then remove the <font color="LEVEL">shoelaces from dazed Sel Mahums</font> because that is just fun. Teach them for tempting me with their tasty soup!<br>
+How about it? Scared? Keep your eye on the soup.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-06.html

@@ -0,0 +1,3 @@
+<html><body>Guard Stan:<br>
+What is it? Pinaps is over there. See the face he's making? That means he is thinking real hard, or he forgot what he was doing.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/30200-07.html

@@ -0,0 +1,4 @@
+<html><body>Guard Stan:<br>
+Thank you! I'll certainly tell Pinaps about you. That's what friends are for, right?<br>
+That was fun. We could stop Sel Mahums from training everyday! Okay, I'm getting hungry... time for soup.
+</body></html>

+ 180 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q461_RumbleInTheBase/Q461_RumbleInTheBase.java

@@ -0,0 +1,180 @@
+package quests.Q461_RumbleInTheBase;
+
+import java.util.Calendar;
+
+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.util.Rnd;
+
+/**
+ * Rumble in the Base
+ * @author malyelfik
+ */
+public class Q461_RumbleInTheBase extends Quest
+{
+	public static final String qn = "Q461_RumbleInTheBase";
+	
+	// NPC
+	public static final int Stan = 30200;
+	public static final int[] Monsters = {22780, 22781, 22782, 2278, 22784, 22785, 18908};
+	
+	// Item
+	public static final int ShinySalmon = 15503;
+	public static final int ShoesStringOfSelMahum = 16382;
+	
+	// Reset
+	private static final int ResetHour = 6;
+	private static final int ResetMin = 30;
+	
+	
+	@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("30200-05.htm"))
+		{
+			st.set("cond", "1");
+			st.setState(State.STARTED);
+			st.playSound("ItemSound.quest_accept");
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		QuestState prev = player.getQuestState("Q252_ItSmellsDelicious");
+		if (st == null)
+			return htmltext;
+		
+		switch (st.getState())
+		{
+			case State.CREATED:
+				if (player.getLevel() >= 82 && prev != null && prev.getState() == State.COMPLETED)
+					htmltext = "30200-01.htm";
+				else
+					htmltext = "30200-02.htm";
+				break;
+			case State.STARTED:
+				if (st.getInt("cond") == 1)
+					htmltext = "30200-06.html";
+				else 
+				{
+					st.takeItems(ShinySalmon, -1);
+					st.takeItems(ShoesStringOfSelMahum, -1);
+					st.addExpAndSp(224784, 342528);
+					st.playSound("ItemSound.quest_finish");
+					htmltext = "30200-07.html";
+					st.unset("cond");
+					st.exitQuest(false);
+					
+					Calendar time = Calendar.getInstance();
+					time.set(Calendar.MINUTE, ResetMin);
+					if (time.get(Calendar.HOUR_OF_DAY) >= ResetHour)
+						time.add(Calendar.DATE, 1);
+					time.set(Calendar.HOUR_OF_DAY, ResetHour);
+					st.set("time", String.valueOf(time.getTimeInMillis()));
+				}
+				break;
+			case State.COMPLETED:
+				Long time = Long.parseLong(st.get("time"));
+				if (time > System.currentTimeMillis())
+					htmltext = "30200-03.htm";
+				else
+				{
+					st.setState(State.CREATED);
+					if (player.getLevel() >= 82 && prev != null && prev.getState() == State.COMPLETED)
+						htmltext = "30200-01.htm";
+					else
+						htmltext = "30200-02.htm";
+				}
+				break;
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		L2PcInstance partyMember = getRandomPartyMember(player, "1");
+		if (partyMember == null)
+			return null;
+		final QuestState st = partyMember.getQuestState(qn);
+		
+		int chance = Rnd.get(1000);
+		boolean giveItem = false;
+		
+		switch (npc.getNpcId())
+		{
+			case 22780:
+				if (chance < 581)
+					giveItem = true;
+				break;
+			case 22781:
+				if (chance < 772)
+					giveItem = true;
+				break;
+			case 22782:
+				if (chance < 581)
+					giveItem = true;
+				break;
+			case 22783:
+				if (chance < 563)
+					giveItem = true;
+				break;
+			case 22784:
+				if (chance < 581)
+					giveItem = true;
+				break;
+			case 22785:
+				if (chance < 271)
+					giveItem = true;
+				break;
+			case 18908:
+				if (chance < 271 && st.getQuestItemsCount(ShinySalmon) < 5)
+				{
+					st.giveItems(ShinySalmon, 1);
+					st.playSound("ItemSound.quest_itemget");
+				}
+				break;
+		}
+		
+		if (giveItem && st.getQuestItemsCount(ShoesStringOfSelMahum) < 10)
+		{
+			st.giveItems(ShoesStringOfSelMahum, 1);
+			st.playSound("ItemSound.quest_itemget");
+		}
+		
+		if (st.getQuestItemsCount(ShinySalmon) == 5 && st.getQuestItemsCount(ShoesStringOfSelMahum) == 10)
+		{
+			st.set("cond", "2");
+			st.playSound("ItemSound.quest_middle");
+		}
+		return null;
+	}
+	
+	public Q461_RumbleInTheBase(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(Stan);
+		addTalkId(Stan);
+		addKillId(Monsters);
+		
+		questItemIds = new int[] {ShinySalmon, ShoesStringOfSelMahum};
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q461_RumbleInTheBase(461, qn, "Rumble in the Base");
+	}
+}