From 89c3cde8f2741531ef1c6d350f29e29f403888b2 Mon Sep 17 00:00:00 2001
From: xban1x <urban.lavbic@gmail.com>
Date: Tue, 18 Mar 2014 15:23:38 +0000
Subject: [PATCH] BETA: Quest Q00357_WarehouseKeepersAmbition 	* Reviewed by:
 xban1x, jurchiks 	* Patch by: Pandragon, janiko 	* Tested by: xban1x

---
 L2J_DataPack_BETA/dist/game/data/scripts.cfg  |   2 +-
 .../357_WarehouseKeepersAmbition/30686-0.htm  |   5 -
 .../357_WarehouseKeepersAmbition/30686-0a.htm |   5 -
 .../357_WarehouseKeepersAmbition/30686-1.htm  |   5 -
 .../357_WarehouseKeepersAmbition/30686-2.htm  |   6 -
 .../357_WarehouseKeepersAmbition/30686-3.htm  |   7 -
 .../357_WarehouseKeepersAmbition/30686-4.htm  |   6 -
 .../357_WarehouseKeepersAmbition/30686-5.htm  |   4 -
 .../357_WarehouseKeepersAmbition/30686-6.htm  |   8 -
 .../357_WarehouseKeepersAmbition/30686-7.htm  |   5 -
 .../357_WarehouseKeepersAmbition/30686-8.htm  |   5 -
 .../357_WarehouseKeepersAmbition/__init__.py  |  85 ----------
 .../30686-01.html                             |   4 +
 .../30686-02.htm                              |   5 +
 .../30686-03.htm                              |   5 +
 .../30686-04.htm                              |   6 +
 .../30686-05.htm                              |   7 +
 .../30686-06.html                             |   7 +
 .../30686-07.html                             |   8 +
 .../30686-08.html                             |   5 +
 .../30686-09.html                             |   5 +
 .../30686-10.html                             |   4 +
 .../30686-11.html                             |   4 +
 .../Q00357_WarehouseKeepersAmbition.java      | 154 ++++++++++++++++++
 .../dist/sql/game/updates/20140318update.sql  |   1 +
 25 files changed, 216 insertions(+), 142 deletions(-)
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0a.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-1.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-2.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-3.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-4.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-5.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-6.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-7.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-8.htm
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/__init__.py
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-01.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-02.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-03.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-04.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-05.htm
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-06.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-07.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-08.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-09.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-10.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-11.html
 create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/Q00357_WarehouseKeepersAmbition.java
 create mode 100644 L2J_DataPack_BETA/dist/sql/game/updates/20140318update.sql

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
index 31b8b79c16..42882dfb3c 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg
+++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg
@@ -513,7 +513,7 @@ quests/352_HelpRoodRaiseANewPet/__init__.py
 quests/Q00354_ConquestOfAlligatorIsland/Q00354_ConquestOfAlligatorIsland.java
 quests/355_FamilyHonor/__init__.py
 quests/356_DigUpTheSeaOfSpores/__init__.py
-quests/357_WarehouseKeepersAmbition/__init__.py
+quests/Q00357_WarehouseKeepersAmbition/Q00357_WarehouseKeepersAmbition.java
 quests/Q00358_IllegitimateChildOfTheGoddess/Q00358_IllegitimateChildOfTheGoddess.java
 quests/Q00359_ForASleeplessDeadman/Q00359_ForASleeplessDeadman.java
 quests/Q00360_PlunderTheirSupplies/Q00360_PlunderTheirSupplies.java
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0.htm
deleted file mode 100644
index 298e9bcfb9..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0.htm
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Are you an adventurer? Could I speak with you privately?<br>
-I want to tell you about a new layaway service that the Iron Gate Guild is offering... This is a great chance for you to get in on the ground floor!<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-1.htm">Tell me more.</a>
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0a.htm
deleted file mode 100644
index 0f0f72284d..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-0a.htm
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Are you an adventurer? Could I speak with you privately?<br>
-I want to tell you about a new layaway service that the Iron Gate Guild is offering... This is a great chance for you to get in on the ground floor!<br>
-<font color="LEVEL">(Quest for characters 47 and above)</font>
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-1.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-1.htm
deleted file mode 100644
index 5ad5a5da9e..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-1.htm
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-... Keep your voice down! If old man Sorint overhears us, I could lose my job!<br>
-Where to start? Never mind all that stuff about the layaway service... I just wanted to get you alone! I need to hire an adventurer... Someone to be my partner in a business I'm starting...<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-2.htm">What sort of business?</a>
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-2.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-2.htm
deleted file mode 100644
index 14fa49264c..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-2.htm
+++ /dev/null
@@ -1,6 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Ah, yes, I suppose you would want to know that, wouldn't you? No harm in that.<br>
-The truth is ... The Warehouse Chief over there just announced that he'll be retiring next year. He's narrowed the choice for his successor down to old man Sorint and myself. He says that whichever of us generates the most profit in the coming year will fill his position.<br>
-This is my big chance! No more working for the man! I've been in the warehouse business since I was 10 years old! I deserve this position!<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-3.htm">Hey, I think he heard you.</a>
-</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-3.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-3.htm
deleted file mode 100644
index a2216f753b..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-3.htm
+++ /dev/null
@@ -1,7 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Oops, oh yeah, him...<br>
-Ah! Mr. Sorint. It's nothing! Yes! Nothing unusual going here, sir! Just helping this customer.<br>
-Damn that idiotic old fool... Anyway, this should be easy for you. Just bring me some<font color="LEVEL"> Jade Crystals</font>. They are all the rage this year among the noblewomen of Aden! The more of them you bring me, the greater your reward shall be. Bring me<font color="LEVEL"> 100 or more at once</font> and I'll give you a bonus. Do we have a deal?<br>
-You'll find Jade Crystals in the<font color="LEVEL"> Enchanted Valley</font>. You may have some trouble with the<font color="LEVEL"> forest runners, the fline elders, the liele elders and the valley treant elders</font>. Are you taking notes?<br>
-Ah, one more thing. Enchanted Valley is too dangerous a place to walk around by yourself. So,<font color="LEVEL"> bring me a few of your friends who can keep a secret. Not too many though... Once we have enough people, you can go there with them. It's too dangerous to go there alone.</font>
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-4.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-4.htm
deleted file mode 100644
index 459258a8bf..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-4.htm
+++ /dev/null
@@ -1,6 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Wait here a moment, please... Mr. Sorint! Would you like a cup of tea? Do you need anything? Very well! Please come this way...<br>
-That doddering old fool! I'm surprised he hasn't fallen off a cliff by now...<br>
-Have you brought me any Jade Crystals? What's with the empty hands? Have you been to the<font color="LEVEL"> Enchanted Valley</font> and met any<font color="LEVEL"> forest runners, fline elders, liele elders or valley treant elders</font>?<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-5.htm">On my way, sir!</a><br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-8.htm">I quit.</a></body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-5.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-5.htm
deleted file mode 100644
index 7070f30a88..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-5.htm
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-You do remember about the bonus for bringing me 100 or more crystals, don't you? Keep up the good work!<br>
-Pardon me... Yes? What's that, Mr. Sorint? What did you say? Oh, you want a massage? Very well, sir, but there shall be no happy ending!
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-6.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-6.htm
deleted file mode 100644
index b5e3986150..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-6.htm
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Wait here a moment, please... Mr. Sorint! Would you like a cup of tea? Do you need anything? Very well! Please come this way...<br>
-... That doddering old fool! I'm surprised he hasn't fallen off a cliff by now...<br>
-Have you brought me any Jade Crystals? Do you remember my offer? Bring me 100 or more of them and you get a bonus!<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-7.htm">Here are your crystals.</a><br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-5.htm">I'll go for more crystals.</a><br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-8.htm">I quit.</a>
-</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-7.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-7.htm
deleted file mode 100644
index a06bf0cb04..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-7.htm
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-Ah, yes, very high-quality crystals. Great job! You shall have your reward. Here you go! It's a fair price, no?<br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-5.htm">I will bring you more Jade Crystals.</a><br>
-<a action="bypass -h Quest 357_WarehouseKeepersAmbition 30686-8.htm">I quit.</a>
-</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-8.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-8.htm
deleted file mode 100644
index 4407c70a6b..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/30686-8.htm
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>Warehouse Freightman Silva:<br>
-How can you quit such a great job? I don't understand! Oh, well, you guys are a dime a dozen...<br>
-Dammit! Old man Sorint is calling me again. I wonder what it is this time... If you change your mind, come back and see me! Okay?<br>
-Mr. Sorint, did you call me? I'm coming!
-</body></html>
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/__init__.py
deleted file mode 100644
index fc05a246a0..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/357_WarehouseKeepersAmbition/__init__.py
+++ /dev/null
@@ -1,85 +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 import Quest as JQuest
-
-qn = "357_WarehouseKeepersAmbition"
-
-#CUSTOM VALUES
-DROPRATE=50
-REWARD1=900  #This is paid per item
-REWARD2=10000  #Extra reward, if > 100
-
-#NPC
-SILVA = 30686
-
-#ITEMS
-JADE_CRYSTAL = 5867
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [JADE_CRYSTAL]
-
- def onEvent (self,event,st) :
-   htmltext = event
-   if event == "30686-2.htm" :
-     st.set("cond","1")
-     st.setState(State.STARTED)
-     st.playSound("ItemSound.quest_accept")
-   elif event == "30686-7.htm" :
-     count = st.getQuestItemsCount(JADE_CRYSTAL)
-     if count:
-       reward = count * REWARD1
-       if count >= 100 :
-         reward = reward + REWARD2
-       st.takeItems(JADE_CRYSTAL,-1)
-       st.giveItems(57,reward)
-     else:
-       htmltext="30686-4.htm"
-   if event == "30686-8.htm" :
-     st.playSound("ItemSound.quest_finish")
-     st.exitQuest(1)
-   return htmltext
-
- def onTalk (self,npc,player):
-   htmltext = Quest.getNoQuestMsg(player)
-   st = player.getQuestState(qn)
-   if not st : return htmltext
-
-   npcId = npc.getId()
-   id = st.getState()
-   cond=st.getInt("cond")
-   jade = st.getQuestItemsCount(JADE_CRYSTAL)
-   if cond == 0 :
-     if player.getLevel() >= 47 :
-       htmltext = "30686-0.htm"
-     else:
-       htmltext = "30686-0a.htm"
-       st.exitQuest(1)
-   elif not jade :
-       htmltext = "30686-4.htm"
-   elif jade :
-       htmltext = "30686-6.htm"
-   return htmltext
-
- def onKill(self,npc,player,isPet):
-   partyMember = self.getRandomPartyMemberState(player,State.STARTED)
-   if not partyMember: return
-   st = partyMember.getQuestState(qn)
-   
-   chance = self.getRandom(100) 
-   if chance < DROPRATE :
-     st.giveItems(JADE_CRYSTAL,1)
-     st.playSound("ItemSound.quest_itemget")
-   return
-
-QUEST       = Quest(357,qn,"Warehouse Keepers Ambition")
-
-QUEST.addStartNpc(SILVA)
-QUEST.addTalkId(SILVA)
-
-for MOBS in range(20594,20598) :
-  QUEST.addKillId(MOBS)
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-01.html
new file mode 100644
index 0000000000..cc3f74109e
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-01.html
@@ -0,0 +1,4 @@
+<html><body>Warehouse Keeper Silva:<br>
+I'm sorry, customer. I am so busy with the work Sorint tasked me with that I don't have any time to talk about a contract right now. Will you come see me again? (Hmph! I don't have time for lowly 2nd class adventurers!)<br>
+(Only characters who are level 47 or higher may undertake this quest.)
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-02.htm
new file mode 100644
index 0000000000..32a92d2d9c
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-02.htm
@@ -0,0 +1,5 @@
+<html><body>Warehouse Keeper Silva:<br>
+Hey, are you perhaps an adventurer? If so, would you come here for a minute?<br>
+Let me tell you about a new credit loan service introduced by the Iron Gate Guild. It's a great opportunity for you to receive various benefits. Come this way and I'll tell you more...<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-03.htm">Listen</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-03.htm
new file mode 100644
index 0000000000..91a00f6f04
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-03.htm
@@ -0,0 +1,5 @@
+<html><body>Warehouse Keeper Silva:<br>
+Shh! Keep your voice down! We don't want old man Sorint to hear this...<br>
+OK, let's talk. Sorry, that talk about a loan service wasn't true -- I needed to get you alone without anyone getting suspicious. The truth is that I need to hire an adventurer like you... I need a partner for a...private business...<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-04.htm">"What kind of business?"</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-04.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-04.htm
new file mode 100644
index 0000000000..6d8a98f4e4
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-04.htm
@@ -0,0 +1,6 @@
+<html><body>Warehouse Keeper Silva:<br>
+What kind of business? Eh... Well, I suppose there's no reason why I shouldn't talk to you about this.<br>
+The warehouse chief over there has announced that he plans to retire next year. Either old man Sorint or I will succeed him -- he will choose the one who makes the most profit running a side business between now and next year.<br>
+My chance has come at last! I'm tired of toiling away here when I should be in charge, and I'll be darned if I'm passed over for that incompetent fool Sorint.<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-05.htm">"Hey, be careful! Sorint might hear you..."</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-05.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-05.htm
new file mode 100644
index 0000000000..0db387e120
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-05.htm
@@ -0,0 +1,7 @@
+<html><body>Warehouse Keeper Silva:<br>
+Oh! Yes, I got a little too excited there!<br>
+Ah... Mr. Sorint, I was just speaking with this customer. Nothing to worry about, sir!<br>
+Oh! What a stupid old man... Anyway, what I need from you is very simple: <font color="LEVEL">Jade</font>. It's become very popular for jewelry among Aden noblewomen these days! I will reward you for any Jades you bring me. <font color="LEVEL">Bring more than 100 at once and I'll give you an additional bonus.</font> How about it? Simple, eh?<br>
+To find Jades, go to the <font color="LEVEL">Enchanted Valley</font> and hunt <font color="LEVEL">Forest Runners, Fline Elders, Liele Elders, and Valley Treant Elders</font>. Got it?<br>
+That's a dangerous place these days, so you should probably <font color="LEVEL">recruit a few trusted friends to help. Not too many! But don't try to go alone, OK?</font>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-06.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-06.html
new file mode 100644
index 0000000000..e37063fd13
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-06.html
@@ -0,0 +1,7 @@
+<html><body>Warehouse Keeper Silva:<br>
+Customer, please wait a minute! Yes, Mr. Sorint? Would you like a cup of tea? No? Then, customer, please come this way...<br>
+Oh, that stupid old man is always absorbed in his coin collection. That's why he's so slow...<br>
+Okay, did you bring some Jades? Wha...why are you here empty-handed? I already told you what to do! Go to the <font color="LEVEL">Enchanted Valley</font> and hunt <font color="LEVEL">Forest Runners, Fline Elders, Liele Elders, and Valley Treant Elders</font>.<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-10.html">Keep hunting.</a><br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-11.html">Say you want to quit.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-07.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-07.html
new file mode 100644
index 0000000000..5f0a41fd21
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-07.html
@@ -0,0 +1,8 @@
+<html><body>Warehouse Keeper Silva:<br>
+Customer, please wait a minute! Yes, Mr. Sorint? Would you like a cup of tea? No? Then, customer, please come this way...<br>
+Oh, that stupid old man is always absorbed in his coin collection. That's why he's so slow...<br>
+Did you bring some Jades? Of course, you remember there is a bonus if you bring over 100 at once, right?<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-09.html">Receive reward.</a><br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-10.html">Keep hunting.</a><br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-11.html">Say you want to quit.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-08.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-08.html
new file mode 100644
index 0000000000..d0838f6fa6
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-08.html
@@ -0,0 +1,5 @@
+<html><body>Warehouse Keeper Silva:<br>
+Ah...! These are excellent quality. Well done! As I promised, I will reward you for the number of jades you've brought. That's fair, right?<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-10.html">Keep hunting.</a><br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-11.html">Say you want to quit.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-09.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-09.html
new file mode 100644
index 0000000000..fabb5bc248
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-09.html
@@ -0,0 +1,5 @@
+<html><body>Warehouse Keeper Silva:<br>
+Oh..! You've brought so much! And the quality is excellent! Well done! Let me just calculate your payment based on the number of jades you brought -- since you brought more than 100, I will add the <font color="LEVEL">bonus</font> I promised as well.<br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-10.html">Keep hunting.</a><br>
+<a action="bypass -h Quest Q00357_WarehouseKeepersAmbition 30686-11.html">Say you want to quit.</a>
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-10.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-10.html
new file mode 100644
index 0000000000..032bf1865e
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-10.html
@@ -0,0 +1,4 @@
+<html><body>Warehouse Keeper Silva:<br>
+Of course, you remember there is a bonus for bringing in over 100 at once, right? OK, keep up the good work!<br>
+What? Mr. Sorint, what did you say? You want me to massage your shoulder? Of course, sir! I'll be right there...
+</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-11.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-11.html
new file mode 100644
index 0000000000..8cfe4ec4c7
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/30686-11.html
@@ -0,0 +1,4 @@
+<html><body>Warehouse Keeper Silva:<br>
+You want to quit? I can't believe it! You won't find a better opportunity than this, you know. Well, it doesn't matter. Adventurers like you are a dime a dozen.<br>
+Oh! Sorint is calling me again. I can't take much more of this! Hey, listen, come back if you change your mind! OK?<br>
+Mr. Sorint, did you call me? Yes, sir! I'll be right there...</body></html>
\ No newline at end of file
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/Q00357_WarehouseKeepersAmbition.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/Q00357_WarehouseKeepersAmbition.java
new file mode 100644
index 0000000000..8074797f35
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00357_WarehouseKeepersAmbition/Q00357_WarehouseKeepersAmbition.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2004-2014 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 quests.Q00357_WarehouseKeepersAmbition;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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;
+
+/**
+ * Warehouse Keeper's Ambition (357)
+ * @author Janiko, Pandragon
+ */
+public final class Q00357_WarehouseKeepersAmbition extends Quest
+{
+	// NPC
+	private static final int SILVA = 30686;
+	// Item
+	private static final int JADE_CRYSTAL = 5867;
+	// Monsters
+	private final Map<Integer, Double> DROP_DATA = new HashMap<>();
+	{
+		DROP_DATA.put(20594, 0.577); // Forest Runner
+		DROP_DATA.put(20595, 0.6); // Fline Elder
+		DROP_DATA.put(20596, 0.638); // Liele Elder
+		DROP_DATA.put(20597, 0.062); // Valley Treant Elder
+	}
+	// Misc
+	private static final int MIN_LVL = 47;
+
+	private Q00357_WarehouseKeepersAmbition()
+	{
+		super(357, Q00357_WarehouseKeepersAmbition.class.getSimpleName(), "Warehouse Keeper's Ambition");
+		addStartNpc(SILVA);
+		addTalkId(SILVA);
+		addKillId(DROP_DATA.keySet());
+		registerQuestItems(JADE_CRYSTAL);
+	}
+
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState qs = getQuestState(player, false);
+		String htmltext = null;
+		if (qs != null)
+		{
+			switch (event)
+			{
+				case "30686-01.htm":
+				case "30686-03.htm":
+				case "30686-04.htm":
+				case "30686-10.html":
+				{
+					htmltext = event;
+					break;
+				}
+				case "30686-05.htm":
+				{
+					if (qs.isCreated())
+					{
+						qs.startQuest();
+						htmltext = event;
+					}
+					break;
+				}
+				case "30686-09.html":
+				{
+					final long crystalCount = getQuestItemsCount(player, JADE_CRYSTAL);
+					if (crystalCount > 0)
+					{
+						long adenaReward = crystalCount * 425;
+						if (crystalCount < 100)
+						{
+							adenaReward += 13500;
+							htmltext = "30686-08.html";
+						}
+						else
+						{
+							adenaReward += 40500;
+							htmltext = event;
+						}
+						giveAdena(player, adenaReward, true);
+						takeItems(player, JADE_CRYSTAL, -1);
+					}
+					break;
+				}
+				case "30686-11.html":
+				{
+					final long crystalCount = getQuestItemsCount(player, JADE_CRYSTAL);
+					if (crystalCount > 0)
+					{
+						giveAdena(player, (crystalCount * 425) + ((crystalCount >= 100) ? 40500 : 0), true);
+						takeItems(player, JADE_CRYSTAL, -1);
+					}
+					qs.exitQuest(true, true);
+					htmltext = event;
+					break;
+				}
+			}
+		}
+		return htmltext;
+	}
+
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance talker)
+	{
+		final QuestState qs = getQuestState(talker, true);
+		String htmltext = getNoQuestMsg(talker);
+		if (qs.isCreated())
+		{
+			htmltext = ((talker.getLevel() < MIN_LVL) ? "30686-01.html" : "30686-02.htm");
+		}
+		else if (qs.isStarted())
+		{
+			htmltext = (hasQuestItems(talker, JADE_CRYSTAL)) ? "30686-07.html" : "30686-06.html";
+		}
+		return htmltext;
+	}
+
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
+		if (qs != null)
+		{
+			giveItemRandomly(qs.getPlayer(), npc, JADE_CRYSTAL, 1, 0, DROP_DATA.get(npc.getId()), true);
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+
+	public static void main(String[] args)
+	{
+		new Q00357_WarehouseKeepersAmbition();
+	}
+}
diff --git a/L2J_DataPack_BETA/dist/sql/game/updates/20140318update.sql b/L2J_DataPack_BETA/dist/sql/game/updates/20140318update.sql
new file mode 100644
index 0000000000..db1295811a
--- /dev/null
+++ b/L2J_DataPack_BETA/dist/sql/game/updates/20140318update.sql
@@ -0,0 +1 @@
+UPDATE character_quests SET name='Q00357_WarehouseKeepersAmbition' WHERE name='357_WarehouseKeepersAmbition';
\ No newline at end of file
-- 
GitLab