Ver Fonte

BETA: Quests 19, 278 & 702 by malyelfik.

MELERIX há 14 anos atrás
pai
commit
45fc6d6d86
62 ficheiros alterados com 910 adições e 93 exclusões
  1. 3 1
      L2J_DataPack_BETA/data/scripts.cfg
  2. 0 5
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-0.htm
  3. 0 5
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-1.htm
  4. 0 3
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-2.htm
  5. 0 6
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31537-0.htm
  6. 0 4
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31537-1.htm
  7. 0 69
      L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/__init__.py
  8. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-01.htm
  9. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-02.htm
  10. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-03.html
  11. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-04.html
  12. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-01.html
  13. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-02.html
  14. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-03.html
  15. 129 0
      L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/Q19_GoToThePastureland.java
  16. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-01.htm
  17. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-02.htm
  18. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-03.html
  19. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-04.htm
  20. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-05.html
  21. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-06.html
  22. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-07.html
  23. 190 0
      L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/Q278_HomeSecurity.java
  24. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-01.html
  25. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-02.html
  26. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-03.html
  27. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-04.html
  28. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-05.html
  29. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-06.html
  30. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-07.html
  31. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-08.html
  32. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-09.html
  33. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-10.html
  34. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-11.html
  35. 7 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-12.html
  36. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-13.html
  37. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-14.html
  38. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-15.html
  39. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-16.html
  40. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-17.html
  41. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-18.html
  42. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-01.html
  43. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-02.html
  44. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-03.html
  45. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-04.html
  46. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-05.html
  47. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-06.html
  48. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-01.htm
  49. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-02.htm
  50. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-03.htm
  51. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-04.htm
  52. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-05.html
  53. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-06.html
  54. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-07.html
  55. 5 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-08.html
  56. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-09.html
  57. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-10.html
  58. 4 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-11.html
  59. 6 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-12.html
  60. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-13.html
  61. 3 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-14.html
  62. 362 0
      L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/Q702_ATrapForRevenge.java

+ 3 - 1
L2J_DataPack_BETA/data/scripts.cfg

@@ -241,7 +241,7 @@ quests/15_SweetWhisper/__init__.py
 quests/16_TheComingDarkness/__init__.py
 quests/17_LightAndDarkness/__init__.py
 quests/18_MeetingWithTheGoldenRam/__init__.py
-quests/19_GoToThePastureland/__init__.py
+quests/Q19_GoToThePastureland/Q19_GoToThePastureland.java
 quests/Q20_BringUpWithLove/Q20_BringUpWithLove.java
 quests/21_HiddenTruth/__init__.py
 quests/22_TragedyInVonHellmannForest/__init__.py
@@ -424,6 +424,7 @@ quests/274_AgainstWolfMen/__init__.py
 quests/275_BlackWingedSpies/__init__.py
 quests/276_HestuiTotem/__init__.py
 quests/277_GatekeepersOffering/__init__.py
+quests/Q278_HomeSecurity/Q278_HomeSecurity.java
 quests/280_TheFoodChain/__init__.py
 quests/281_HeadForTheHills/__init__.py
 quests/283_TheFewTheProudTheBrave/__init__.py
@@ -607,6 +608,7 @@ quests/Q692_HowtoOpposeEvil/Q692_HowtoOpposeEvil.java
 quests/699_GuardianOfTheSkies/__init__.py
 quests/700_CursedLife/__init__.py
 quests/701_Proof_Of_Existence/__init__.py
+quests/Q702_ATrapForRevenge/Q702_ATrapForRevenge.java
 quests/998_FallenAngelSelect/__init__.py
 quests/999_T1Tutorial/__init__.py
 quests/10267_JourneyToGracia/__init__.py

+ 0 - 5
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-0.htm

@@ -1,5 +0,0 @@
-<html><body>Trader Vladimir:<br>
-Geez, is everyone deaf nowadays?<br>
-Excuse me. Can you help me for a little while? I ordered some meat, but they sent me low-quality meat instead of what I ordered! Would you go and return this for me?<br>
-<a action="bypass -h Quest 19_GoToThePastureland 31302-1.htm">Agree to do it</a>
-</body></html>

+ 0 - 5
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-1.htm

@@ -1,5 +0,0 @@
-<html><body>Trader Vladimir:<br>
-You? Fine! Here is the meat! This is the kind of meat that rotten<font color="LEVEL"> Pasture Manager Tunatun</font> sent me!<br>
-Man, the more I think about it, the angrier I get! No matter what he says, tell him that I don't care! I'm never going to do business with him again!<br>
-Even if he tries to give me money, I won't accept it! Take care of it!
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31302-2.htm

@@ -1,3 +0,0 @@
-<html><body>Trader Vladimir:<br>
-What are you doing? Did you see the pasture manager? Since I got angry because of the quality, you should dispose the meat before it rots!
-</body></html>

+ 0 - 6
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31537-0.htm

@@ -1,6 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-What? Vladimir said that? Grrrr...<br>
-Well, that's too bad! It's the best I could find! If only I had an adventurer to help me...<br>
-Very well... Tell Vlad I'll give him his money back this time... I hope he'll continue doing business with me... Let's see...<br>
-<a action="bypass -h Quest 19_GoToThePastureland 31537-1.htm">Vladimir doesn't want your crappy meat anymore.</a>
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/31537-1.htm

@@ -1,4 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-Wow, he must really be angry...!<br>
-Well, there's nothing I can do. I'll apologize to him later. For now, please take this money. At least he'll have gotten a refund when I go to talk to him later.<br>Now, I must find some high quality meet! I need an adventurer to help me...
-</body></html>

+ 0 - 69
L2J_DataPack_BETA/data/scripts/quests/19_GoToThePastureland/__init__.py

@@ -1,69 +0,0 @@
-# Made by disKret
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "19_GoToThePastureland"
-
-#NPC
-VLADIMIR = 31302
-TUNATUN = 31537
-
-#ITEMS
-BEAST_MEAT = 7547
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [BEAST_MEAT]
-
- def onAdvEvent (self,event,npc, player) :
-   htmltext = event
-   st = player.getQuestState(qn)
-   if not st : return
-   if event == "31302-1.htm" :
-     st.giveItems(BEAST_MEAT,1)
-     st.set("cond","1")
-     st.setState(State.STARTED)
-     st.playSound("ItemSound.quest_accept")
-   if event == "31537-1.htm" :
-     st.takeItems(BEAST_MEAT,1)
-     st.giveItems(57,147200)
-     st.addExpAndSp(385040,75250)
-     st.unset("cond")
-     st.exitQuest(False)
-     st.playSound("ItemSound.quest_finish")
-   return htmltext
-
- def onTalk (self,npc,player):
-   htmltext = Quest.getNoQuestMsg(player)
-   st = player.getQuestState(qn)
-   if not st : return htmltext
-
-   npcId = npc.getNpcId()
-   id = st.getState()
-   cond = st.getInt("cond")
-   if npcId == VLADIMIR :
-     if cond == 0 :
-       if id == State.COMPLETED :
-         htmltext = Quest.getAlreadyCompletedMsg(player)
-
-       elif player.getLevel() >= 63 :
-         htmltext = "31302-0.htm"
-       else:
-         htmltext = "<html><body>Quest for characters level 63 or above.</body></html>"
-         st.exitQuest(1)
-     else :
-       htmltext = "31302-2.htm"
-   elif id == State.STARTED :
-       htmltext = "31537-0.htm"
-   return htmltext
-
-QUEST       = Quest(19,qn,"Go To The Pastureland")
-
-QUEST.addStartNpc(VLADIMIR)
-
-QUEST.addTalkId(VLADIMIR)
-QUEST.addTalkId(TUNATUN)

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-01.htm

@@ -0,0 +1,5 @@
+<html><body>Trader Vladimir:<br>
+What.., is everyone here DEAF?!<br>
+Hey... you! Can you help me? I ordered meat from that farm..., look at the crap they gave me! I'm too mad to go myself, I wonder if you would return this for me? <br>
+<a action="bypass -h Quest 19_GoToThePastureland 31302-02.htm">Say you will.</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-02.htm

@@ -0,0 +1,5 @@
+<html><body>Trader Vladimir:<br>
+Is that you? Here. Take this meat! <font color="LEVEL">Farm Manager Tunatun</font> sent it to me, but it's disgusting.<br>
+I see red just thinking about it! I can't decide if he doesn't know any better, or if he's trying to slip one by me. Between you and me, I won't buy anything from him!<br>
+Not if he paid me! But you might like it... 
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-03.html

@@ -0,0 +1,5 @@
+<html><body>Trader Vladimir:<br>
+You? How could someone as inexperienced as you TRULY know how to deal with meat?<br>
+The answer is... you can't. Come back after you gain more experience.<br>
+(Only character with level 82 or above can take on this quest.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31302-04.html

@@ -0,0 +1,3 @@
+<html><body>Trader Vladimir:<br>
+Did you find the Farm manager? What are you doing? And can you get rid of this meat before it stinks? The quality isn't good enough.
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-01.html

@@ -0,0 +1,6 @@
+<html><body>Beast Herder Tunatun:<br>
+What? Vladimir said that? Hmm...<br>
+Actually, that is the best meat I can get. Unless an skilled adventurer shows up...<br>
+There is nothing else I can do. This is the only time I will accept a return. But I still look forward to doing business. Do I have any change?<br>
+<a action="bypass -h Quest 19_GoToThePastureland 31537-02.html">Say that he said he doesn't need it</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-02.html

@@ -0,0 +1,5 @@
+<html><body>Beast Herder Tunatun:<br>
+He's a cranky one, eh!<br>
+But I can't do that. I can apologize to him later. But you should take this money. I'll feel better that way when I pay a visit later.<br>
+Now, I'm in need of a skilled, feared, willing adventurer to help me acquire good meat, if ONLY there was one nearby...?
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/31537-03.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+I see. Then, first return the meat... What? You didn't bring the meat? How would I know if he sent you?
+</body></html>

+ 129 - 0
L2J_DataPack_BETA/data/scripts/quests/Q19_GoToThePastureland/Q19_GoToThePastureland.java

@@ -0,0 +1,129 @@
+/*
+ * 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.Q19_GoToThePastureland;
+
+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;
+
+/**
+ * Go to the Pastureland (19)
+ * @author disKret, malyelfik
+ */
+public class Q19_GoToThePastureland extends Quest
+{
+	private static final String qn = "19_GoToThePastureland";
+	// NPC
+	private static final int Vladimir = 31302;
+	private static final int Tunatun = 31537;
+	// Items
+	private static final int Veal = 15532;
+	private static final int YoungWildBeastMeat = 7547;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return getNoQuestMsg(player);
+		
+		if (event.equalsIgnoreCase("31302-02.htm"))
+		{
+			st.set("cond", "1");
+			st.setState(State.STARTED);
+			st.playSound("ItemSound.quest_accept");
+			st.giveItems(Veal, 1);
+		}
+		else if (event.equalsIgnoreCase("31537-02.html"))
+		{
+			if (st.getQuestItemsCount(YoungWildBeastMeat) >= 1)
+			{
+				st.takeItems(YoungWildBeastMeat, 1);
+				st.giveItems(57, 50000);
+				st.addExpAndSp(136766, 12688);
+				st.playSound("ItemSound.quest_finish");
+				st.exitQuest(false);
+				htmltext = "31537-02.html";
+			}
+			else if (st.getQuestItemsCount(Veal) >= 1)
+			{
+				st.takeItems(Veal, 1);
+				st.giveItems(57, 147200);
+				st.addExpAndSp(385040, 75250);
+				st.playSound("ItemSound.quest_finish");
+				st.exitQuest(false);
+				htmltext = "31537-02.html";
+			}
+			else
+			{
+				htmltext = "31537-03.html";
+			}
+		}
+		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() == Vladimir)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					if (player.getLevel() >= 82)
+						htmltext = "31302-01.htm";
+					else
+						htmltext = "31302-03.html";
+					break;
+				case State.STARTED:
+					htmltext = "31302-04.html";
+					break;
+				case State.COMPLETED:
+					htmltext = getAlreadyCompletedMsg(player);
+					break;
+			}
+		}
+		else if (npc.getNpcId() == Tunatun && st.getInt("cond") == 1)
+		{
+			htmltext = "31537-01.html";
+		}
+		return htmltext;
+	}
+	
+	public Q19_GoToThePastureland(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(Vladimir);
+		addTalkId(Vladimir);
+		addTalkId(Tunatun);
+		
+		questItemIds = new int[] { Veal, YoungWildBeastMeat };
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q19_GoToThePastureland(19, qn, "Go to the Pastureland");
+	}
+}

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-01.htm

@@ -0,0 +1,5 @@
+<html><body>Beast Herder Tunatun:<br>
+There's nothing like a hard day's work that puts a man fast asleep at night. That is what I used to say. But I haven't been sleeping to well these past weeks.<br>
+I worry about the future of this farm ever since those Sel Mahum started showing up.<br>
+<a action="bypass -h Quest 278_HomeSecurity 31537-02.htm">Listen to his concern.</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-02.htm

@@ -0,0 +1,5 @@
+<html><body>Beast Herder Tunatun:<br>
+Everyone knows that the best meat can only be found from the animals on this land. I've done all I can to keep them safe, but these Sel Mahum <font color="LEVEL">Farm Ravagers and Farm Bandits</font> are starting to be too much for me. In fact, I would be overwhelmed if they all attacked at once. There wouldn't be anything I could do to protect my life's work.<br>
+When everything a man knows is threatened... how can he find his peace?<br>
+<a action="bypass -h Quest 278_HomeSecurity 31537-04.htm">Offer to help.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-03.html

@@ -0,0 +1,4 @@
+<html><body>Beast Herder Tunatun:<br>
+No. Never mind. I need a strong adventurer.<br>
+(Only characters of level 82 and above are permitted to take on this quest.)
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-04.htm

@@ -0,0 +1,6 @@
+<html><body>Beast Herder Tunatun:<br>
+Mighty kind of you. Tell you what... I'll pay you for killing those Sel Mahum <font color="LEVEL">Farm Ravagers or Farm Bandits</font> on my farm.<br>
+I wish I could take your word for it, but I'm gonna need to see some proof before I pay you. Collect <font color="LEVEL">300</font> <font color="LEVEL">Sel Mahum Manes</font> and bring them back as proof.<br>
+A word of warning though... some Sel Mahum can't grow Manes, so it might take you some time before you find one that does.<br>
+Best of luck, stranger.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-05.html

@@ -0,0 +1,5 @@
+<html><body>Beast Herder Tunatun:<br>
+How goes it, stranger? Looks like you have a fine collection of Sel Mahum Manes going there.<br>
+I'm a man of my word and I'll pay you rightly for yer work.<br>
+<a action="bypass -h Quest 278_HomeSecurity 31537-07.html">Accept Reward</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-06.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+That's it? Uhm... I was hoping for more.. Can you do better?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/31537-07.html

@@ -0,0 +1,4 @@
+<html><body>Beast Herder Tunatun:<br>
+I thank ya, stranger. Your help has definitely made a difference in my life. I even got a good night's sleep while you were helping out.<br>
+If you are ever in need of some work, I am always willing pay until the very last one of those things are dead.
+</body></html>

+ 190 - 0
L2J_DataPack_BETA/data/scripts/quests/Q278_HomeSecurity/Q278_HomeSecurity.java

@@ -0,0 +1,190 @@
+package quests.Q278_HomeSecurity;
+
+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;
+
+/**
+ * Home Security (278)
+ * @author malyelfik
+ */
+public class Q278_HomeSecurity extends Quest
+{
+	private static final String qn = "278_HomeSecurity";
+	// NPC
+	private static final int Tunatun = 31537;
+	private static final int[] Monster = { 18905, 18906, 18907 };
+	// Item
+	private static final int SelMahumMane = 15531;
+	
+	@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("31537-02.htm"))
+		{
+			if (player.getLevel() >= 82)
+				htmltext = "31537-02.htm";
+			else
+				htmltext = "31537-03.html";
+		}
+		else if (event.equalsIgnoreCase("31537-04.htm"))
+		{
+			st.set("cond", "1");
+			st.playSound("ItemSound.quest_accept");
+			st.setState(State.STARTED);
+		}
+		else if (event.equalsIgnoreCase("31537-07.html"))
+		{
+			int i0 = Rnd.get(100);
+			
+			if (i0 < 10)
+				st.giveItems(960, 1);
+			else if (i0 < 19)
+				st.giveItems(960, 2);
+			else if (i0 < 27)
+				st.giveItems(960, 3);
+			else if (i0 < 34)
+				st.giveItems(960, 4);
+			else if (i0 < 40)
+				st.giveItems(960, 5);
+			else if (i0 < 45)
+				st.giveItems(960, 6);
+			else if (i0 < 49)
+				st.giveItems(960, 7);
+			else if (i0 < 52)
+				st.giveItems(960, 8);
+			else if (i0 < 54)
+				st.giveItems(960, 9);
+			else if (i0 < 55)
+				st.giveItems(960, 10);
+			else if (i0 < 75)
+				st.giveItems(9553, 1);
+			else if (i0 < 90)
+				st.giveItems(9553, 2);
+			else
+				st.giveItems(959, 1);
+			
+			st.takeItems(SelMahumMane, st.getQuestItemsCount(SelMahumMane));
+			st.unset("cond");
+			st.playSound("ItemSound.quest_finish");
+			st.exitQuest(true);
+			htmltext = "31537-07.html";
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return htmltext;
+		
+		switch (st.getState())
+		{
+			case State.CREATED:
+				htmltext = "31537-01.htm";
+				break;
+			case State.STARTED:
+				if (st.getInt("cond") == 1 || st.getQuestItemsCount(SelMahumMane) < 300)
+					htmltext = "31537-06.html";
+				else if (st.getInt("cond") == 2 && st.getQuestItemsCount(SelMahumMane) >= 300)
+					htmltext = "31537-05.html";
+				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, i1;
+		if (st.getInt("cond") == 1)
+		{
+			switch (npc.getNpcId())
+			{
+				case 18907: // Beast Devourer
+				case 18906: // Farm Bandit
+					chance = Rnd.get(1000);
+					if (chance < 85)
+					{
+						st.giveItems(SelMahumMane, 1);
+						if (st.getQuestItemsCount(SelMahumMane) >= 300)
+						{
+							st.set("cond", "2");
+							st.playSound("ItemSound.quest_middle");
+						}
+						else
+							st.playSound("ItemSound.quest_itemget");
+					}
+					break;
+				case 18905: // Farm Ravager (Crazy)
+					chance = Rnd.get(1000);
+					if (chance < 486)
+					{
+						i1 = Rnd.get(6) + 1;
+						if ((i1 + st.getQuestItemsCount(SelMahumMane)) >= 300)
+						{
+							st.set("cond", "2");
+							st.playSound("ItemSound.quest_middle");
+							st.giveItems(SelMahumMane, (300 - st.getQuestItemsCount(SelMahumMane)));
+						}
+						else
+						{
+							st.giveItems(SelMahumMane, i1);
+							st.playSound("ItemSound.quest_itemget");
+						}
+					}
+					else
+					{
+						i1 = (Rnd.get(5) + 1);
+						if ((i1 + st.getQuestItemsCount(SelMahumMane)) >= 300)
+						{
+							st.set("cond", "2");
+							st.playSound("ItemSound.quest_middle");
+							st.giveItems(SelMahumMane, (300 - st.getQuestItemsCount(SelMahumMane)));
+						}
+						else
+						{
+							st.giveItems(SelMahumMane, i1);
+							st.playSound("ItemSound.quest_itemget");
+						}
+					}
+					break;
+			}
+		}
+		return null;
+	}
+	
+	public Q278_HomeSecurity(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(Tunatun);
+		addTalkId(Tunatun);
+		for (int i : Monster)
+			addKillId(i);
+		
+		questItemIds = new int[] { SelMahumMane };
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q278_HomeSecurity(278, qn, "Home Security");
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-01.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+What brings you here?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-02.html">"I need information on how to defeat Dius, the Messenger of Destruction."</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-02.html

@@ -0,0 +1,5 @@
+<html><body>Soldier Tenis:<br
+>Did you just say you want to catch <font color="LEVEL">Dius, the Messenger of Destruction</font>? He is not your average monster, you know! You don't know what you're getting into!<br>
+Say, you're not joking, are you? All right. Well, since I'm wounded, I guess you're my only chance to get some payback. If not for that creature, I'd still be fighting with my buddies on the front lines instead of rotting away back here. If I can help you at all, I will.<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-03.html">"Tell we whatever I need to know."</a>
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-03.html

@@ -0,0 +1,6 @@
+<html><body>Soldier Dius:<br>
+First of all, Dius did not willingly succumb to the <font color="LEVEL">Seed of Destruction</font>. As a result, he becomes stronger whenever the Seed becomes weaker. <font color="LEVEL">Unless the Seed of Destruction becomes stable, therefore, you can't defeat him.</font><br>
+Even then, you can't you can't destroy <font color="LEVEL">Dius</font> by normal methods. He has an acute sense of smell and is very intelligent, so he rarely appears when there are a lot of people present. Instead he strikes isolated individuals when they least expect it.<br>
+But he can be defeated! You just have to lay a trap for him! When Admiral Keucereus ordered me to destroy Dius, I spent months perfecting a trap.<br>
+First, we need flesh from one of its subordinates: the <font color="LEVEL">Drak, Drake Wing or mutant Drake Wing</font>. Collect <font color="LEVEL">100 Drake's Flesh</font>. I need that much to prepare a single trap. Later I'll explain it more fully. 
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-04.html

@@ -0,0 +1,6 @@
+<html><body>Soldier Tenis:<br>
+What is it?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-05.html">"I want to quit."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-06.html">"I collected all the ingredients for the trap."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-10.html">"I defeated Dius."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-05.html

@@ -0,0 +1,3 @@
+<html><body>Soldier Tenis:<br>
+Really? That's too bad. Did you think defeating Dius would be easy? I failed too, remember. Well... I'm not trying to criticize you. I really didn't expect you to succeed. Good-bye.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-06.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+Are you trying to play games with me? I told you to bring 100! Without that many, we can't make the trap.<br>
+If all you want is to make a quick buck, go and see <font color="LEVEL">Plenos</font>. Or are you satisfied earning peanuts? Hmph!
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-07.html

@@ -0,0 +1,6 @@
+<html><body>Soldier Tenis:<br>
+Very good! Now I can prepare one of the <font color="LEVEL">trap ingredients</font>. I will give you one key ingredient per 100 Drake's Flesh. I will exchange it one at a time. With my injury, I'm afraid I can't do any more. But I'm your only option here. No one else has my depth of knowledge about this creature.<br>
+Do you want to continue?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-08.html">Exchange Drake's Flesh.</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-09.html">"I've changed my mind."</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-08.html

@@ -0,0 +1,5 @@
+<html><body>Solider Tenis:<br>
+Here you go. What's this? Heh heh... I squeezed the flesh you gave me. Out of it came this <font color="LEVEL">rotten blood</font>. Then I enhanced the blood smell using my secret method. Heh -- the bloody of smell of revenge seems to be spreading even up here.<br>
+You want to know why I didn't just have you collect the blood? Well, the key is how the blood is extracted. Think about it! Blood from its own kind is used to lure it into the trap... What a sweet <font color="LEVEL">trap for revenge</font>? <br>
+Now take this to <font color="LEVEL">Engineer Lekon</font>. He has made many traps for me. He'll know how to make this one for Dius.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-09.html

@@ -0,0 +1,3 @@
+<html><body>Solider Tenis:<br>
+Fine -- if you don't want to exchange it, don't. Just don't forget that I'm the only one who can make the trap you need.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-10.html

@@ -0,0 +1,3 @@
+<html><body>Soldier Tenis:<br>
+Ha! You say you defeated Dius? You claim to have succeeded where I failed? Where's the proof?
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-11.html

@@ -0,0 +1,5 @@
+<html><body>Soldier Tenis:<br>
+You really defeated him? Hee hee... Is this his horn? Ah, revenge is sweet.<br>
+It's almost as good as if I did the deed myself. Wonderful! Just looking at the horn does my heart good. Thinking about it makes me feel all warm. Hey! I'd like the horn as a souvenir, to comfort me while I recover. Would you give it to me?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-12.html">"What will you give me in return?"</a>
+</body></html>

+ 7 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-12.html

@@ -0,0 +1,7 @@
+<html><body>Soldier Tenis:<br>
+What can a poor injured soldier like me offer?<br>
+Well... Come to think of it, there is a box I hid long ago. I found it while exploring the Seed of Destruction. Funny, I haven't thought about it until now. <br>
+But I don't know what's inside it. I think it's something heavy and precious, though. If you hand over the horn, I will give you whatever is in the box. Maybe it's something worth more than what Plenos can offer, eh? Or maybe it's something worthless. Care to gamble? What's life without a little risk, eh?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-14.html">"Sure, sounds like a deal."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-13.html">"No way!"</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-13.html

@@ -0,0 +1,3 @@
+<html><body>Soldier Tenis:<br>
+Hey, no need to get angry! If you don't like my offer, no problem. Just take the horn to Plenos. You'll get what's coming to you there...
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-14.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+What? Really? Promise you won't change your mind later? Then give me that horn. Shall we open the box?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32555-15.html">(Hand over the horn.) "Why don't you open this box?"</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-15.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+Oh ho, this is quite a good reward....both Adena and several expensive materials. It's certainly better than anything you would get from Plenos. I think we'd both benefit. Frankly, you're lucky to have gotten that box, too.<br>
+There are more, you know... Bring me another horn and I we can do another deal.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-16.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+Huh! That seems like a lot of money... Other than that there isn't anything special. Trust me, you're getting a good deal here. But what's done is done.<br>
+Of course, there are more boxes; bring me another horn and we can do another trade.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-17.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+Huh! Not a lot of money in it. But it is full of expensive-looking materials. It was sure heavy... I'm guessing that if you sell these, you could probably make a lot of money. You could also use them yourself. Satisfied? Either way, what's done is done.<br>
+Of course, there are more boxes; bring me another horn and we can do another trade.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32555-18.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Tenis:<br>
+Hey, this box is full of rocks! What the...? Oh, here are some Adena and other materials as well. Whew! Well, a trade is trade. I have nothing to say. You're just unlucky, my friend.<br>
+Of course, there are more boxes; bring me another horn and we can do another trade.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-01.html

@@ -0,0 +1,3 @@
+<html><body>Engineer Lekon:<br>
+Can't you see I'm busy! What business do you have with me? C'mon, speak up. Time is money, you know.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-02.html

@@ -0,0 +1,4 @@
+<html><body>Engineer Lekon:<br>
+I think I know what you're talking about. Tenius mentioned it... It's not beautiful, but I'll do it. But I need <font color="LEVEL">100 Red Star Stone Extraction Stones</font> to make it. Just let me know when you have them ready.<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32557-03.html">"Everything is prepared."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-03.html

@@ -0,0 +1,3 @@
+<html><body>Engineer Lekon:<br>
+Where are the materials? What I am supposed to work with? There's nothing here! 
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-04.html

@@ -0,0 +1,3 @@
+<html><body>Engineer Lekon:<br>
+I told you that I need<font color="LEVEL">100 Red Star Stone Extraction Stones</font>. You don't have enough here.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-05.html

@@ -0,0 +1,3 @@
+<html><body>Engineer Lekon:<br>
+I think there is an item you need to get from Tenius.
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32557-06.html

@@ -0,0 +1,6 @@
+<html><body>Engineer Lekon:<br>
+Here! It's finished. It radiates intense energy now that the blood energy has been added to the original energy of the Red Star Stone Extraction Stones. You should be able to use it to lure out Dius, the Messenger of Destruction.<br>
+Do you know how to use it? Find some <font color="LEVEL">Baby Drake Wings</font> and cover them with it. Hopefully that will make Dius believe that his young are being attacked and he will become enraged. Be careful -- he will be very dangerous at that point. But this tactic should exploit the Dragonkins' instinct to protect their own kind.<br>
+I'm sure Tenis already told you that <font color="LEVEL">Dius will appear only when the Seed of Destruction becomes stable</font>. This bait will be useless if you use it at any other time.<br>
+Good luck!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-01.htm

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+This is a special mission that can only be undertaken by capable adventurers. Do you want to prove your worth? Then accept this mission! <br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-03.htm">Say yes.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-02.htm

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+This mission is too difficult for someone with your limited experience.<br> 
+(Only characters who are level 78 or higher and who have completed the "Good Day to Fly" Quest may undertake this quest.)
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-03.htm

@@ -0,0 +1,6 @@
+<html><body>Soldier Plenos:<br>
+I hoped that you would accept this challenge! You won't find a better opportunity to enhance your reputation and make a tidy pile of money.<br>
+Let's cut to the chase. Hunt the <font color="LEVEL">Deadman of Destruction, Dius</font> that appears in the sky above the <font color="LEVEL">Seed of Destruction</font>. It is a type of mutant Drake that has proven resistant to the power of the Seed. In fact, when the Seed is <font color="LEVEL">stabilized</font>, it and its Drake followers have been attacking our supply and transport ships. It has become a real problem for us.<br>
+What do you say? Will you accept the mission? <br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-04.htm">"Sure."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-04.htm

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+Good! But don't expect this to be easy. Its spirit is so strong that it doesn't succumb to the power of the Seed. Many have promised to hunt them, but few have succeeded. Most are killed or seriously wounded in the attempt.<br>
+But you look like the type who likes a challenge, eh? I'd recommend that you go see <font color="LEVEL">Soldier Tenius</font> near the center of <font color="LEVEL">Keucereus Alliance Base</font> before leaving. He was injured while hunting <font color="LEVEL">Dius</font>. Nobody knows more about this monster than he does.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-05.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+You haven't forgotten about the mission, have you?<br> 
+Go see <font color="LEVEL">Soldier Tenius</font> in the center of <font color="LEVEL">Keucereus Alliance Base</font>. He can tell you what you need to know to successfully hunt <font color="LEVEL">Dius, the Deadman of Destruction</font>.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-06.html

@@ -0,0 +1,5 @@
+<html><body>Soldier Plenos:<br>
+What did you do?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-07.html">"I defeated the subordinates of Dius, the Deadman of Destruction."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-11.html">"I defeated Dius, the Deadman of Destruction."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-07.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+Really? Show me the evidence.<br>
+No proof, eh? What are you trying to pull? Unless you bring proof, I can't just accept your word for it.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-08.html

@@ -0,0 +1,5 @@
+<html><body>Soldier Plenos:<br>
+Hmm...These are definitely the creatures who follow Dius... Of course, these aren't the real problem, so I can't give you much of a reward. Will you still accept it?<br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-09.html">"Give it to me."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-10.html">"No, I'll think it over."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-09.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+Here it is. It's not much, but I hope it brings you luck.<br>
+And I pray that you have better luck hunting <font color="LEVEL">Dius, the Lion of Destruction</font>. 
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-10.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+Fine. That's what I want too.<br>
+Before you go, I heard <font color="LEVEL">Tenius</font> mention something about using this to make some kind of bait... It might be a good idea for you to talk to him about it. 
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-11.html

@@ -0,0 +1,4 @@
+<html><body>Soldier Plenos:<br>
+Really? Show me the evidence.<br>
+No proof, eh? What are you trying to pull? Unless you bring proof, I can't just accept your word for it.
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-12.html

@@ -0,0 +1,6 @@
+<html><body>Soldier Plenos:<br>
+Ah, a horn from Dius, the Lion of Destruction! What a fight that must have been! Marvelous! Your skill is very impressive.<br>
+Here is the reward I promised. I only wish it could be more. Could I persuade you to continue hunting? <br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-13.html">"Sure."</a><br>
+<a action="bypass -h Quest 702_ATrapForRevenge 32563-14.html">"No, I'm ready to quit."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-13.html

@@ -0,0 +1,3 @@
+<html><body>Soldier Plenos:<br>
+Thank you! Then go hunt <font color="LEVEL">Dius, the Lion of Destruction</font> in the sky above the the Seed of Destruction and bring back its horn as proof.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/32563-14.html

@@ -0,0 +1,3 @@
+<html><body>Soldier Plenos:<br>
+Are you sure you want to quit? I guess there's nothing I can say to change your mind, eh? I haven't met anyone else as skilled in hunting Dius as you are. What a waste...
+</body></html>

+ 362 - 0
L2J_DataPack_BETA/data/scripts/quests/Q702_ATrapForRevenge/Q702_ATrapForRevenge.java

@@ -0,0 +1,362 @@
+/*
+ * 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.Q702_ATrapForRevenge;
+
+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;
+
+/**
+ * A Trap for Revenge (702)
+ * @author malyelfik
+ */
+public class Q702_ATrapForRevenge extends Quest
+{
+	private static final String qn = "702_ATrapForRevenge";
+	// NPC
+	private static final int Plenos = 32563;
+	private static final int Lekon = 32557;
+	private static final int Tenius = 32555;
+	private static final int[] Monsters = { 22612, 22613, 25632, 22610, 22611, 25631, 25626 };
+	// Items
+	private static final int DrakeFlesh = 13877;
+	private static final int RottenBlood = 13878;
+	private static final int BaitForDrakes = 13879;
+	private static final int VariantDrakeWingHorns = 13880;
+	private static final int ExtractedRedStarStone = 14009;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		QuestState st = player.getQuestState(qn);
+		
+		if (st == null)
+			return getNoQuestMsg(player);
+		
+		if (event.equalsIgnoreCase("32563-04.htm"))
+		{
+			st.set("cond", "1");
+			st.setState(State.STARTED);
+			st.playSound("ItemSound.quest_middle");
+		}
+		else if (event.equalsIgnoreCase("32563-07.html"))
+		{
+			if (st.getQuestItemsCount(DrakeFlesh) < 1)
+				htmltext = "32563-07.html";
+			else
+				htmltext = "32563-08.html";
+		}
+		else if (event.equalsIgnoreCase("32563-09.html"))
+		{
+			long count = st.getQuestItemsCount(DrakeFlesh);
+			st.giveItems(57, count * 100);
+			st.takeItems(DrakeFlesh, count);
+		}
+		else if (event.equalsIgnoreCase("32563-11.html"))
+		{
+			if (st.getQuestItemsCount(VariantDrakeWingHorns) < 1)
+				htmltext = "32563-11.html";
+			else
+			{
+				long count = st.getQuestItemsCount(VariantDrakeWingHorns);
+				st.giveItems(57, count * 200000);
+				st.takeItems(VariantDrakeWingHorns, count);
+				htmltext = "32563-12.html";
+			}
+		}
+		else if (event.equalsIgnoreCase("32563-14.html"))
+		{
+			st.playSound("ItemSound.quest_finish");
+			st.exitQuest(true);
+		}
+		else if (event.equalsIgnoreCase("32557-03.html"))
+		{
+			if (st.getQuestItemsCount(RottenBlood) < 1 && st.getQuestItemsCount(ExtractedRedStarStone) < 100)
+				htmltext = "32557-03.html";
+			else if (st.getQuestItemsCount(RottenBlood) >= 1 && st.getQuestItemsCount(ExtractedRedStarStone) < 100)
+				htmltext = "32557-04.html";
+			else if (st.getQuestItemsCount(RottenBlood) < 1 && st.getQuestItemsCount(ExtractedRedStarStone) >= 100)
+				htmltext = "32557-05.html";
+			else if (st.getQuestItemsCount(RottenBlood) >= 1 && st.getQuestItemsCount(ExtractedRedStarStone) >= 100)
+			{
+				st.giveItems(BaitForDrakes, 1);
+				st.takeItems(RottenBlood, 1);
+				st.takeItems(ExtractedRedStarStone, 100);
+				htmltext = "32557-06.html";
+			}
+		}
+		else if (event.equalsIgnoreCase("32555-03.html"))
+		{
+			st.set("cond", "2");
+			st.playSound("ItemSound.quest_middle");
+		}
+		else if (event.equalsIgnoreCase("32555-05.html"))
+		{
+			st.exitQuest(true);
+			st.playSound("ItemSound.quest_finish");
+		}
+		else if (event.equalsIgnoreCase("32555-06.html"))
+		{
+			if (st.getQuestItemsCount(DrakeFlesh) < 100)
+				htmltext = "32555-06.html";
+			else
+				htmltext = "32555-07.html";
+		}
+		else if (event.equalsIgnoreCase("32555-08.html"))
+		{
+			st.giveItems(RottenBlood, 1);
+			st.takeItems(DrakeFlesh, 100);
+		}
+		else if (event.equalsIgnoreCase("32555-10.html"))
+		{
+			if (st.getQuestItemsCount(VariantDrakeWingHorns) < 1)
+				htmltext = "32555-10.html";
+			else
+				htmltext = "32555-11.html";
+		}
+		else if (event.equalsIgnoreCase("32555-15.html"))
+		{
+			int i0 = Rnd.get(1000);
+			int i1 = Rnd.get(1000);
+			
+			if (i0 >= 500 && i1 >= 600)
+			{
+				st.giveItems(57, Rnd.get(49917) + 125000);
+				if (i1 < 720)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9629, Rnd.get(3) + 1);
+				}
+				else if (i1 < 840)
+				{
+					st.giveItems(9629, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				else if (i1 < 960)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				else if (i1 < 1000)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9629, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				htmltext = "32555-15.html";
+			}
+			else if (i0 >= 500 && i1 < 600)
+			{
+				st.giveItems(57, Rnd.get(49917) + 125000);
+				if (i1 < 210)
+				{
+				}
+				else if (i1 < 340)
+					st.giveItems(9628, Rnd.get(3) + 1);
+				else if (i1 < 470)
+					st.giveItems(9629, Rnd.get(3) + 1);
+				else if (i1 < 600)
+					st.giveItems(9630, Rnd.get(3) + 1);
+				
+				htmltext = "32555-16.html";
+			}
+			else if (i0 < 500 && i1 >= 600)
+			{
+				st.giveItems(57, Rnd.get(49917) + 25000);
+				if (i1 < 720)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9629, Rnd.get(3) + 1);
+				}
+				else if (i1 < 840)
+				{
+					st.giveItems(9629, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				else if (i1 < 960)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				else if (i1 < 1000)
+				{
+					st.giveItems(9628, Rnd.get(3) + 1);
+					st.giveItems(9629, Rnd.get(3) + 1);
+					st.giveItems(9630, Rnd.get(3) + 1);
+				}
+				htmltext = "32555-17.html";
+			}
+			else if (i0 < 500 && i1 < 600)
+			{
+				st.giveItems(57, Rnd.get(49917) + 25000);
+				if (i1 < 210)
+				{
+				}
+				else if (i1 < 340)
+					st.giveItems(9628, Rnd.get(3) + 1);
+				else if (i1 < 470)
+					st.giveItems(9629, Rnd.get(3) + 1);
+				else if (i1 < 600)
+					st.giveItems(9630, Rnd.get(3) + 1);
+				
+				htmltext = "32555-18.html";
+			}
+			st.takeItems(VariantDrakeWingHorns, 1);
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		QuestState st = player.getQuestState(qn);
+		QuestState prev = player.getQuestState("10273_GoodDayToFly");
+		
+		if (st == null)
+			return htmltext;
+		
+		if (npc.getNpcId() == Plenos)
+		{
+			switch (st.getState())
+			{
+				case State.CREATED:
+					if (prev != null && prev.getState() == State.COMPLETED && player.getLevel() >= 78)
+						htmltext = "32563-01.htm";
+					else
+						htmltext = "32563-02.htm";
+					break;
+				case State.STARTED:
+					if (st.getInt("cond") == 1)
+						htmltext = "32563-05.html";
+					else
+						htmltext = "32563-06.html";
+					break;
+			}
+		}
+		if (st.getState() == State.STARTED)
+		{
+			if (npc.getNpcId() == Lekon)
+			{
+				switch (st.getInt("cond"))
+				{
+					case 1:
+						htmltext = "32557-01.html";
+						break;
+					case 2:
+						htmltext = "32557-02.html";
+						break;
+				}
+			}
+			else if (npc.getNpcId() == Tenius)
+			{
+				switch (st.getInt("cond"))
+				{
+					case 1:
+						htmltext = "32555-01.html";
+						break;
+					case 2:
+						htmltext = "32555-04.html";
+						break;
+				}
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		L2PcInstance partyMember = getRandomPartyMember(player, "2");
+		if (partyMember == null)
+			return null;
+		final QuestState st = partyMember.getQuestState(qn);
+		int chance = Rnd.get(1000);
+		
+		switch (npc.getNpcId())
+		{
+			case 22612:
+				if (chance < 413)
+					st.giveItems(DrakeFlesh, 2);
+				else
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 22613:
+				if (chance < 440)
+					st.giveItems(DrakeFlesh, 2);
+				else
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 25632:
+				if (chance < 996)
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 22610:
+				if (chance < 485)
+					st.giveItems(DrakeFlesh, 2);
+				else
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 22611:
+				if (chance < 451)
+					st.giveItems(DrakeFlesh, 2);
+				else
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 25631:
+				if (chance < 485)
+					st.giveItems(DrakeFlesh, 2);
+				else
+					st.giveItems(DrakeFlesh, 1);
+				break;
+			case 25626:
+				if (chance < 708)
+					st.giveItems(VariantDrakeWingHorns, Rnd.get(2) + 1);
+				else if (chance < 978)
+					st.giveItems(VariantDrakeWingHorns, Rnd.get(3) + 3);
+				else if (chance < 994)
+					st.giveItems(VariantDrakeWingHorns, Rnd.get(4) + 6);
+				else if (chance < 998)
+					st.giveItems(VariantDrakeWingHorns, Rnd.get(4) + 10);
+				else if (chance < 1000)
+					st.giveItems(VariantDrakeWingHorns, Rnd.get(5) + 14);
+				break;
+		}
+		st.playSound("ItemSound.quest_itemget");
+		return null;
+	}
+	
+	public Q702_ATrapForRevenge(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(Plenos);
+		addTalkId(Plenos);
+		addTalkId(Lekon);
+		addTalkId(Tenius);
+		for (int i : Monsters)
+		{
+			addKillId(i);
+		}
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q702_ATrapForRevenge(702, qn, "A Trap for Revenge");
+	}
+}