浏览代码

BETA: Added Tunatun AI and quest Bring Up With Love (20) retail like.

Adry_85 12 年之前
父节点
当前提交
8c4e0fc6a0
共有 32 个文件被更改,包括 177 次插入124 次删除
  1. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-01.html
  3. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-02.html
  4. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-03.html
  5. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-04.html
  6. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-05.html
  7. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-06.html
  8. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537.html
  9. 77 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/Tunatun.java
  10. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-00.htm
  11. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-01.htm
  12. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-02.htm
  13. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-03.htm
  14. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-03a.htm
  15. 4 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-04.htm
  16. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-05.htm
  17. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-06.htm
  18. 4 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-07.htm
  19. 3 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-08.htm
  20. 3 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-09.htm
  21. 3 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-10.htm
  22. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-11.htm
  23. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-11.html
  24. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-12.htm
  25. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-13.htm
  26. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-13.html
  27. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-14.html
  28. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-15.htm
  29. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-15.html
  30. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-16.html
  31. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-20.html
  32. 46 44
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/Q00020_BringUpWithLove.java

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

@@ -49,6 +49,7 @@ ai/npc/Teleports/TeleportWithCharm/TeleportWithCharm.java
 ai/npc/Teleports/ToIVortex/ToIVortex.java
 ai/npc/Teleports/Warpgate/Warpgate.java
 ai/npc/TerritoryManagers/TerritoryManagers.java
+ai/npc/Tunatun/Tunatun.java
 ai/npc/VarkaSilenosSupport/VarkaSilenosSupport.java
 ai/npc/WeaverOlf/WeaverOlf.java
 ai/npc/ZealotOfShilen/ZealotOfShilen.java

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-22.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-01.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-23.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-02.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-21.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-03.html

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
 If you're interested in handling the beasts, I can give you this Bull Whip. If you've forgotten how to use it, I can tell you again.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-24.html">Listen to the explanation about how to handle.</a>
+<a action="bypass -h Quest Tunatun 31537-04.html">Listen to the explanation about how to handle.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-24.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-04.html

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
 In order to give orders to the beasts, you need this Bull Whip. On the old Beast Farm, you used to be able to command only one beast, but with this improved whip, you can now give orders to many tamed beasts at the same time.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-25.html">Continue to listen to the story</a>
+<a action="bypass -h Quest Tunatun 31537-05.html">Continue to listen to the story</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-25.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-05.html

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
 Being able to give orders to many cubs you train can be incredibly helpful. Each type of cub can cast supplemental magic to help buff your skills in combat, and the more cubs you tame, the more types of buffs you can have cast on yourself.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-26.html">Continue to listen to the story</a>
+<a action="bypass -h Quest Tunatun 31537-06.html">Continue to listen to the story</a>
 </body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-26.html → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537-06.html

@@ -1,4 +1,3 @@
-<html><body>Beaster Herder Tunatun:<br>
-Look for Feed Sellers in this area like the one standing next to me. The feed you buy from them can be given to <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, and Alpine Buffalo</font>. The more feed you give each beast, the more they'll grow.<br>
-Remember though, tamed beasts will run away if you run out of feed to give them. So be careful.
+<html><body>Beast Herder Tunatun:<br>
+Look for Feed Sellers in this area like the one standing next to me. The feed you buy from them can be given to <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, and Alpine Buffalo</font>. The more feed you give each beast, the more they'll grow.<br>Remember though, tamed beasts will run away if you run out of feed to give them. So be careful.
 </body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/31537.html

@@ -0,0 +1,5 @@
+<html><body>Beast Herder Tunatun:<br>
+Hi! Welcome to the Beast Farm. My name is Tunatun and I'm the one in charge here. I got this job because I thought I'd be able to commune with the beasts. After all, my pet kitty back home absolutely loved me. On this farm though, it's not so easy.<br>As a matter of fact, I'm having a lot of trouble with these beasts. They tend to fight back if you try to feed or tame them, so I've hired a Feed Seller and various adventurers to help me manage and protect the farm. At this point, there's not much else I can do.<br>
+<a action="bypass -h Quest Tunatun Whip">Take the Beast Handler's Whip.</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest</a>
+</body></html>

+ 77 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Tunatun/Tunatun.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack 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.
+ * 
+ * L2J DataPack 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 ai.npc.Tunatun;
+
+import quests.Q00020_BringUpWithLove.Q00020_BringUpWithLove;
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.QuestState;
+
+/**
+ * Beast Herder Tunatun AI.
+ * @author Adry_85
+ */
+public class Tunatun extends AbstractNpcAI
+{
+	// NPC
+	private static final int TUNATUN = 31537;
+	// Item
+	private static final int BEAST_HANDLERS_WHIP = 15473;
+	// Misc
+	private static final int MIN_LEVEL = 82;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		if ("Whip".equals(event))
+		{
+			if (hasQuestItems(player, BEAST_HANDLERS_WHIP))
+			{
+				return "31537-01.html";
+			}
+			
+			QuestState st = player.getQuestState(Q00020_BringUpWithLove.class.getSimpleName());
+			if ((st == null) && (player.getLevel() < MIN_LEVEL))
+			{
+				return "31537-02.html";
+			}
+			else if ((st != null) || (player.getLevel() >= MIN_LEVEL))
+			{
+				giveItems(player, BEAST_HANDLERS_WHIP, 1);
+				return "31537-03.html";
+			}
+		}
+		return event;
+	}
+	
+	public Tunatun(String name, String descr)
+	{
+		super(name, descr);
+		addStartNpc(TUNATUN);
+		addFirstTalkId(TUNATUN);
+		addTalkId(TUNATUN);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Tunatun(Tunatun.class.getSimpleName(), "ai/npc");
+	}
+}

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-00.htm

@@ -1,6 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-Ahh... I love the farm, but I wonder what they will become when they mature.<br>
-It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>
-Feral beasts are too dangerous for pretenders and beginners....<br>
-(Only characters of level 82 and above are permitted to take on this quest.)
-</body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-01.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-Ahh... I love the farm, but I wonder what they will become when they mature.<br>
-It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>
+Ahh... I love the farm, but I wonder what they will become when they mature.<br>It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-02.htm">Say that you will help</a>
-</body></html>
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-02.htm

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
 You...? I agree you look the part, but know that these beasts won't care how you look. You must stay in control. The young are docile, it's the adults to watch out for. Are you sure you are ready?<br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-03.htm">Say that you are ready</a>
-</body></html>
+</body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-03.htm

@@ -1,6 +1,5 @@
 <html><body>Beast Herder Tunatun:<br>
-If you say so...<br>
-First, take this <font color="LEVEL">Beast Handler's Whip</font>. Do I need to show you how this works?<br>
+If you say so...<br>First, take this <font color="LEVEL">Beast Handler's Whip</font>. Do I need to show you how this works?<br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-04.htm">Say that you know</a><br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-05.htm">Say that you don't know</a>
-</body></html>
+</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-03a.htm

@@ -1,6 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-If you say so...<br>
-As i see you already have <font color="LEVEL">Beast Handler's Whip</font>. Do I need to show you how this works?<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-04.htm">Say that you know</a><br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-05.htm">Say that you don't know</a>
-</body></html>

+ 4 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-04.htm

@@ -1,5 +1,5 @@
 <html><body>Beast Herder Tunatun:<br>
-The next step is simple. The cubs need proper positive attention. They only recognize you as their master if you raise them right.<br>
-But, if you ignore them and leave them to their own mischief... Well let's just say you won't be bringing one home for the kids!<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-07.htm">"And then?"</a>
-</body></html>
+Well, the lesson is almost over.<br> If you feel ready, there's only one way to know for sure.<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Say that you know</a><br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-12.htm">Say that you don't know</a>
+</body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-05.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-The Beast Handler's Whip is a necessity on this farm.<br>
-One beast used to be our limit, but thanks to the Beast Handler's Whip it isn't a problem controlling more.<br>
+The Beast Handler's Whip is a necessity on this farm.<br>One beast used to be our limit, but thanks to the Beast Handler's Whip it isn't a problem controlling more.<br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-06.htm">Continue to listen to the story</a>
-</body></html>
+</body></html>

+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-06.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-That's not the only reason. When you use this Beast Handler's Whip, you can use a variety supplemental magic on the cubs you train.<br>
-The more kinds of beasts you train, the greater the magic you can use!<br>
+That's not the only reason. When you use this Beast Handler's Whip, you can use a variety supplemental magic on the cubs you train.<br>The more kinds of beasts you train, the greater the magic you can use!<br>
 <a action="bypass -h Quest Q00020_BringUpWithLove 31537-07.htm">Continue to listen to the story</a>
-</body></html>
+</body></html>

+ 4 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-07.htm

@@ -1,6 +1,5 @@
 <html><body>Beast Herder Tunatun:<br>
-Well, the lesson is almost over.<br>
-If you feel ready, there's only one way to know for sure.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-09.htm">Say that you know</a><br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Say that you don't know</a>
-</body></html>
+If somehow you lose the Beast Handler's Whip, let me know. I'll give you another one.<br>Before we begin.. Do you need a few tips?<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Say that you know</a><br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-12.htm">Say that you don't know</a>
+</body></html>

+ 3 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-08.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-Pay attention. You see those Feed Sellers?<br>
-Purchase the Feed from them, and let <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, Alpine Cougar</font> eat the Feed to make them grow.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-09.htm">Listen to the next story</a>
-</body></html>
+The next step is simple. The cubs need proper positive attention. They only recognize you as their master if you raise them right.<br>But, if you ignore them and leave them to their own mischief... Well let's just say you won't be bringing one home for the kids!<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-09.htm">"And then?"</a>
+</body></html>

+ 3 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-09.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-The next step is simple. The cubs need proper positive attention. They only recognize you as their master if you raise them right.<br>
-But, if you ignore them and leave them to their own mischief... Well let's just say you won't be bringing one home for the kids!<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-10.htm">"And then?"</a>
-</body></html>
+Now sometimes, and I do mean rarely, a cub remains purely innocent and good, without any trace of evil. Again, this is rare. But when it does happen, that cub will produce a white jewel.<br>We call this jewel a <font color="LEVEL">Jewel of Innocence</font>. It's a product of the cub's pure love for its master.<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-10.htm">"So, what you really want to say is...?"</a>
+</body></html>

+ 3 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-10.htm

@@ -1,5 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-Now sometimes, and I do mean rarely, a cub remains purely innocent and good, without any trace of evil. Again, this is rare. But when it does happen, that cub will produce a white jewel.<br>
-We call this jewel a <font color="LEVEL">Jewel of Innocence</font>. It's a product of the cub's pure love for its master.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-11.htm">"So, what you really want to say is...?"</a>
-</body></html>
+You've guessed it, I want that Jewel of Innocence! Beasts crave them, but only the person who raised the cub can retrieve the Jewel of Innocence.<br>Also, and I don't know why, but you only get one chance to acquire that jewel. I've only seen it once, truly unforgettable to say the least... <br>Get this jewel for me and the reward will be great. What do you say?<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-11.html">Say that you will</a>
+</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-11.htm

@@ -1,6 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-You've guessed it, I want that Jewel of Innocence! Beasts crave them, but only the person who raised the cub can retrieve the Jewel of Innocence.<br>
-Also, and I don't know why, but you only get one chance to acquire that jewel. I've only seen it once, truly unforgettable to say the least... <br>
-Get this jewel for me and the reward will be great. What do you say?<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-12.htm">Say that you will</a>
-</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-11.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+I hope you aren't all talk! Feed them, diligently, with Feed from the Feed Sellers, and fortune may shine on you... with a jewel!<br>However, a beast with any evil in it can be dangerous. So be careful! I'll be waiting for that jewel.
+</body></html>

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-12.htm

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
-I hope you aren't all talk! Feed them, diligently, with Feed from the Feed Sellers, and fortune may shine on you... with a jewel!<br>
-However, a beast with any evil in it can be dangerous. So be careful! I'll be waiting for that jewel.
-</body></html>
+Pay attention. You see those Feed Sellers?<br>Purchase the Feed from them, and let <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, Alpine Cougar</font> eat the Feed to make them grow.<br>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Listen to the next story</a>
+</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-13.htm

@@ -1,4 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-Buy food from the Feed Sellers. Without food the beasts turn feral. If that happens you've wasted everyone's time. So do us both a favor, have enough food ready.<br>
-The cubs you can raise are <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, and Alpine Cougar</font>. So raise em' right. And when you do... bring me a Jewel of Innocence!
-</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-13.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+Ahh... I love the farm, but I wonder what they will become when they mature.<br>It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>Feral beasts are too dangerous for pretenders and beginners....<br>(Only characters of level 82 and above are permitted to take on this quest.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-14.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+Buy food from the Feed Sellers. Without food the beasts turn feral. If that happens you've wasted everyone's time. So do us both a favor, have enough food ready.<br>The cubs you can raise are <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, and Alpine Cougar</font>. So raise em' right. And when you do... bring me a Jewel of Innocence!
+</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-15.htm

@@ -1,7 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-Ahh, it has been too long...! The way light catches it, the color, the texture, the...<br>
-Oh... I, I'm crying. Don't mind me...<br>
-This Jewel... when I hold it I remember the innocence of my youth. I remember a dream... <br>
-I dreamed about making the world a better place. Yes, I was young. But I realize now I still dream this.<br>
-I have to do something, I have to act.
-</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-14.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-15.html

@@ -1,4 +1,4 @@
 <html><body>Beast Herder Tunatun:<br>
 The Jewel of Innocence! You aren't thinking of keeping it, are you? I'll pay you now..<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-15.htm">Give it to him</a>
-</body></html>
+<a action="bypass -h Quest Q00020_BringUpWithLove 31537-16.html">Give it to him</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-16.html

@@ -0,0 +1,3 @@
+<html><body>Beast Herder Tunatun:<br>
+Ahh, it has been too long...! The way light catches it, the color, the texture, the...<br>Oh... I, I'm crying. Don't mind me...<br>This Jewel... when I hold it I remember the innocence of my youth. I remember a dream... <br>I dreamed about making the world a better place. Yes, I was young. But I realize now I still dream this.<br>I have to do something, I have to act.
+</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/31537-20.html

@@ -1,6 +0,0 @@
-<html><body>Beast Herder Tunatun:<br>
-Hi! Welcome to the Beast Farm. My name is Tunatun and I'm the one in charge here. I got this job because I thought I'd be able to commune with the beasts. After all, my pet kitty back home absolutely loved me. On this farm though, it's not so easy.<br>
-As a matter of fact, I'm having a lot of trouble with these beasts. They tend to fight back if you try to feed or tame them, so I've hired a Feed Seller and various adventurers to help me manage and protect the farm. At this point, there's not much else I can do.<br>
-<a action="bypass -h Quest Q00020_BringUpWithLove 31537-21.html">Take the Beast Handler's Whip.</a><br>
-<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
-</body></html>

+ 46 - 44
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00020_BringUpWithLove/Q00020_BringUpWithLove.java

@@ -26,16 +26,17 @@ import com.l2jserver.gameserver.model.quest.State;
 
 /**
  * Bring Up With Love (20)
- * @author Gnacik, jurchiks
+ * @author Adry_85
  */
 public class Q00020_BringUpWithLove extends Quest
 {
 	// NPC
 	private static final int TUNATUN = 31537;
 	// Items
-	private static final int BEAST_HANDLERS_WHIP = 15473;
 	private static final int WATER_CRYSTAL = 9553;
-	private static final int JEWEL_OF_INNOCENCE = 7185;
+	private static final int INNOCENCE_JEWEL = 15533;
+	// Misc
+	private static final int MIN_LEVEL = 82;
 	
 	public Q00020_BringUpWithLove(int questId, String name, String descr)
 	{
@@ -51,60 +52,52 @@ public class Q00020_BringUpWithLove extends Quest
 		final QuestState st = player.getQuestState(getName());
 		if (st == null)
 		{
-			return getNoQuestMsg(player);
+			return null;
 		}
 		
-		String htmltext = event;
-		
+		String htmltext = null;
 		switch (event)
 		{
-			case "31537-12.htm":
-				st.startQuest();
-				break;
+			case "31537-02.htm":
 			case "31537-03.htm":
-				if (hasQuestItems(player, BEAST_HANDLERS_WHIP))
-				{
-					return "31537-03a.htm";
-				}
-				giveItems(player, BEAST_HANDLERS_WHIP, 1);
+			case "31537-04.htm":
+			case "31537-05.htm":
+			case "31537-06.htm":
+			case "31537-07.htm":
+			case "31537-08.htm":
+			case "31537-09.htm":
+			case "31537-10.htm":
+			case "31537-12.htm":
+			{
+				htmltext = event;
 				break;
-			
-			case "31537-15.htm":
-				takeItems(player, JEWEL_OF_INNOCENCE, -1);
-				giveItems(player, WATER_CRYSTAL, 1);
-				st.exitQuest(false, true);
+			}
+			case "31537-11.html":
+			{
+				st.startQuest();
+				htmltext = event;
 				break;
-			case "31537-21.html":
-				if (player.getLevel() < 82)
+			}
+			case "31537-16.html":
+			{
+				if (st.isCond(2) && st.hasQuestItems(INNOCENCE_JEWEL))
 				{
-					return "31537-23.html";
+					st.giveItems(WATER_CRYSTAL, 1);
+					st.takeItems(INNOCENCE_JEWEL, -1);
+					st.exitQuest(false, true);
+					htmltext = event;
 				}
-				if (hasQuestItems(player, BEAST_HANDLERS_WHIP))
-				{
-					return "31537-22.html";
-				}
-				giveItems(player, BEAST_HANDLERS_WHIP, 1);
 				break;
+			}
 		}
 		return htmltext;
 	}
 	
-	@Override
-	public String onFirstTalk(L2Npc npc, L2PcInstance player)
-	{
-		QuestState st = player.getQuestState(getName());
-		if (st == null)
-		{
-			newQuestState(player);
-		}
-		return "31537-20.html";
-	}
-	
 	@Override
 	public String onTalk(L2Npc npc, L2PcInstance player)
 	{
-		String htmltext = getNoQuestMsg(player);
 		QuestState st = player.getQuestState(getName());
+		String htmltext = getNoQuestMsg(player);
 		if (st == null)
 		{
 			return htmltext;
@@ -112,18 +105,27 @@ public class Q00020_BringUpWithLove extends Quest
 		
 		switch (st.getState())
 		{
+			case State.COMPLETED:
+			{
+				htmltext = getAlreadyCompletedMsg(player);
+				break;
+			}
 			case State.CREATED:
-				htmltext = ((player.getLevel() < 82) ? "31537-00.htm" : "31537-01.htm");
+				htmltext = player.getLevel() >= MIN_LEVEL ? "31537-01.htm" : "31537-13.html";
 				break;
 			case State.STARTED:
 				switch (st.getCond())
 				{
 					case 1:
-						htmltext = "31537-13.htm";
+					{
+						htmltext = "31537-14.html";
 						break;
+					}
 					case 2:
-						htmltext = "31537-14.htm";
+					{
+						htmltext = (!st.hasQuestItems(INNOCENCE_JEWEL)) ? "31537-14.html" : "31537-15.html";
 						break;
+					}
 				}
 				break;
 		}
@@ -133,9 +135,9 @@ public class Q00020_BringUpWithLove extends Quest
 	public static void checkJewelOfInnocence(L2PcInstance player)
 	{
 		final QuestState st = player.getQuestState(Q00020_BringUpWithLove.class.getSimpleName());
-		if ((st != null) && st.isCond(1) && !st.hasQuestItems(JEWEL_OF_INNOCENCE) && (getRandom(20) == 0))
+		if ((st != null) && st.isCond(1) && !st.hasQuestItems(INNOCENCE_JEWEL) && (getRandom(100) < 5))
 		{
-			st.giveItems(JEWEL_OF_INNOCENCE, 1);
+			st.giveItems(INNOCENCE_JEWEL, 1);
 			st.setCond(2, true);
 		}
 	}