Browse Source

DP part for Transform Skilltrainer [L1954], Quest 136 and NPC Avant-Garde. thnx Gigii-kun.

slyce 17 years ago
parent
commit
42966ca5de
39 changed files with 890 additions and 447 deletions
  1. 6 0
      datapack_development/data/html/default/32323-1.htm
  2. 7 0
      datapack_development/data/html/default/32323-2.htm
  3. 5 0
      datapack_development/data/html/default/32323-3.htm
  4. 5 0
      datapack_development/data/html/default/32323-4.htm
  5. 4 0
      datapack_development/data/html/default/32323-5.htm
  6. 4 0
      datapack_development/data/html/default/32323-6.htm
  7. 9 0
      datapack_development/data/html/default/32323.htm
  8. 8 0
      datapack_development/data/multisell/32323001.xml
  9. 1 0
      datapack_development/data/scripts.cfg
  10. 4 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-01.htm
  11. 10 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-02.htm
  12. 6 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-03.htm
  13. 8 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-01.htm
  14. 9 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-02.htm
  15. 6 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-03.htm
  16. 4 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-00.htm
  17. 15 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-01.htm
  18. 6 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-02.htm
  19. 8 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-03.htm
  20. 4 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-04.htm
  21. 7 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-05.htm
  22. 9 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-06.htm
  23. 10 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-07.htm
  24. 7 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-08.htm
  25. 5 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-09.htm
  26. 3 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-10.htm
  27. 8 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-11.htm
  28. 8 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-12.htm
  29. 6 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-13.htm
  30. 8 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-14.htm
  31. 9 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/32323-00.htm
  32. 160 0
      datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/__init__.py
  33. 5 5
      datapack_development/sql/etcitem.sql
  34. 1 1
      datapack_development/sql/npc.sql
  35. 2 1
      datapack_development/sql/spawnlist.sql
  36. 70 0
      datapack_development/sql/transform_skill_trees.sql
  37. 1 0
      datapack_development/tools/database_installer.bat
  38. 441 440
      datapack_development/tools/database_installer.sh
  39. 1 0
      datapack_development/tools/full_install.sql

+ 6 - 0
datapack_development/data/html/default/32323-1.htm

@@ -0,0 +1,6 @@
+<html><body>Wizard of Transformation Avant-Garde:<br>
+What do you wish to know about transformation?<br>
+<a action="bypass -h npc_%objectId%_Chat 2">"What do I need to know about transformation?"</a><br>
+<a action="bypass -h npc_%objectId%_Chat 3">"What do I need to do to transform into another shape?"</a><br>
+<a action="bypass -h npc_%objectId%_Chat 4">"What do I need to know before transformation?"</a>
+</body></html>

+ 7 - 0
datapack_development/data/html/default/32323-2.htm

@@ -0,0 +1,7 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+To learn the magic of transformation, you will need to recieve special training.<br>
+Find the Wizard of Darkness, who lives at Hardin's Academy. He will open the path to transformation.<br>
+You must have reached at least <font color="LEVEL">level 50</font> to embark on this path.<br>
+You will also need a special seal. I do not know how you can obtain it, but without it transformation is impossible.<br>
+<a action="bypass -h npc_%objectId%_Chat 1">Back.</a>
+</body></html>

+ 5 - 0
datapack_development/data/html/default/32323-3.htm

@@ -0,0 +1,5 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+After you have been guided through the process of transformation by a wizard, you may transform yourself into another shape by bringing a transform sealbook to me.<br>
+Know that it is no easy task to earn one. I have heard, however, that you may find one through the Marketeer of Mammon or the Adventure Guild.<br>
+<a action="bypass -h npc_%objectId%_Chat 1">Back.</a>
+</body></html>

+ 5 - 0
datapack_development/data/html/default/32323-4.htm

@@ -0,0 +1,5 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+You must remember that once you have been transformed, you must not go into <font color="LEVEL">deep water</font>. Once you have reverted to your original form, your soul will need some time to recover -- you will not be able to transform again for some time. Understand?<br>
+Other than that... Each individual soul contains its own <font color="LEVEL">unique character</font>. If you transform into something that matches that character, you may earn some benefits. Think of it as wearing a suit of clothes that fit you perfectly. Every race has its own respective "figure", so I advise you to do a little research about what kind of transformation would fit you best.<br>
+<a action="bypass -h npc_%objectId%_Chat 1">Back.</a>
+</body></html>

+ 4 - 0
datapack_development/data/html/default/32323-5.htm

@@ -0,0 +1,4 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+This is not a path for every one. It is meaningless for me to even teach you Transformation until you have proven your ability.<br>
+Meet the great wizard who uses black magic, open the road of Transformation, and then return to me.
+</body></html>

+ 4 - 0
datapack_development/data/html/default/32323-6.htm

@@ -0,0 +1,4 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+You must be able to transform in order to buy transformation-related goods.<br>
+Find a great wizard who wields black magic and can open the path to transformation for you. Then you may return here.<br>
+</body></html>

+ 9 - 0
datapack_development/data/html/default/32323.htm

@@ -0,0 +1,9 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+I am Avant-Garde, Transformation Wizard. Long did I wander before settling here.<br>
+In fact, I am not a wizard of the Ivory Tower -- think of me as a wanderer who aquired a mysterious power during his travels. My magic does require special items, however.<br>
+If you aquire them for me from the den of th Wizard of Darkness, perhaps I can provide you with something valueable in return.<br>
+<a action="bypass -h npc_%objectId%_Chat 1">Ask about transformation.</a><br>
+<a action="bypass -h npc_%objectId%_Chat 5">Learn Transformation.</a><br>
+<a action="bypass -h npc_%objectId%_Chat 6">Buy items related to transformation.</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
+</body></html>

+ 8 - 0
datapack_development/data/multisell/32323001.xml

@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- Transformation Wizard Avant-Garde-->
+<list>
+  <item id="1">
+    <ingredient id="57" count="500000"/>
+    <production id="9648" count="1"/>
+  </item>
+</list>

+ 1 - 0
datapack_development/data/scripts.cfg

@@ -201,6 +201,7 @@ quests/121_PavelTheGiants/__init__.py
 quests/122_OminousNews/__init__.py
 quests/123_TheLeaderAndTheFollower/__init__.py
 quests/124_MeetingTheElroki/__init__.py
+quests/136_MoreThanMeetsTheEye/__init__.py
 quests/151_SaveMySister1/__init__.py
 quests/152_ShardsOfGolem/__init__.py
 quests/153_WharfOldtimersFavor/__init__.py

+ 4 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-01.htm

@@ -0,0 +1,4 @@
+<html><body>Magister Clayton:<br>
+What is it?<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30464-02.htm">Hand him Hardin's order form.</a>
+</body></html>

+ 10 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-02.htm

@@ -0,0 +1,10 @@
+<html><body>Magister Clayton:<br>
+Oh, this is... I do not know your purpose, but it lokks as though you are seeking a new type of spell medium...<br>
+And a very powerful one at that...<br>
+It will be difficult, but I believe I can create it according to these specifications.<br>
+Unfortunately, I am missing a key ingredient.<br>
+Apparently, in order to create it, I will require<font color="LEVEL"> 5 Mordeo Crystals.</font><br>
+Interesting... You see, I am also keenly interested in new magic.<br>
+<font color="LEVEL">I will make you a deal. If you bring back 5 Mordeo Crystals</font>, I will create an empty Book of Seal set for you at no cost.<br>
+In case you were unaware of it, Mordeo is a malignant spirit in the shape of a leopard that guards<font color="LEVEL"> Cruma Tower</font>.
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30464-03.htm

@@ -0,0 +1,6 @@
+<html><body>Magister Clayton:<br>
+You have brought back all the Mordeo Crystals? Good! Then I will create the Blank Book of Seal for you immediately...<br>
+(Clayton takes out some arcane ingredients and begins to create the tome.<br>
+He grinds up and liquifies the Mordeo Crystals, then uses the mixture to etch in complicated patterns in the margins of each page of the Blank book of Seal.)<br>
+Ah, finished! I must admit to being curious to know what manner of great magic it will carry. I suspect that you are experimenting with a new spell, so I bid you farewell...and good luck.
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-01.htm

@@ -0,0 +1,8 @@
+<html><body>Magister Errickin:<br>
+Wait...did you say that you have come for Stabilized Ectoplasm?<br>
+There are not many magicians these days who deal with ectoplasm, which is composed of filthy and unpleasant souls...<br>
+Fortunately for you, I am one of them.<br>
+Ah, you undoubtedly will not wish to divulge to me your purpose for this ectoplasm...<br>
+Well, I do not know what kind of necromantic magic you are experimenting with, but it must be a challenging task.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30701-02.htm">Can you get me Stabilized Ectoplasm? What will be the price?.</a>
+</body></html>

+ 9 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-02.htm

@@ -0,0 +1,9 @@
+<html><body>Magister Errickin:<br>
+How much are you willing to pay?<br>
+Hmm, you must be here on the orders of another...<br>
+No matter. In order to obtain Stabilized Ectoplasm, I first require plain ectoplasm, which is itself a rare item.<br>
+In fact, I have need of it as well...<br>
+You have the look of an adventurer, so I will strike a bargain with you.<br>
+Exterminate<font color="LEVEL"> the Mirror Ghost and the Mummy in the Forest of Mirrors</font> and you will be able to acquire<font color="LEVEL"> ectoplasms</font>.<br>
+Thirty ectoplasms will produce one Stabilized Ectoplasm. Bring back<font color="LEVEL"> 35</font> of them and give me 5. Then I will make you a Stabilized Ectoplasm using the remainder.
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30701-03.htm

@@ -0,0 +1,6 @@
+<html><body>Magister Errickin:<br>
+You're lucky! Securing ectoplasm requires several other rare materials, which I just happen to have.<br>
+No need to pay me for them -- I appreciate you sharing the ectoplasm. Now I can begin an experiment of my own... He he he!<br>
+Here is your secured ectoplasm; take it and go.<br>
+(Return to<font color="LEVEL"> Hardin's Academy</font>.)
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-00.htm

@@ -0,0 +1,4 @@
+<html><body>Hardin:<br>
+Adventurer, you may believe that you are skilled and strong, but your soul is not yet strong enough to endure this transformation experiment.<br>
+(Only characters level 50 or above may undertake this quest.)
+</body></html>

+ 15 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-01.htm

@@ -0,0 +1,15 @@
+<html><body>Hardin:<br>
+Among Shilen's creatures, there are those who are able to change their appearance to terrorize and attack people.<br>
+As a Necromancer, I am naturally very interested in such abilities. What if their power could be utilized as a kind of magic?<br>
+...<br>
+Why do I research transformation magic?<br>
+At the core, it is because I am curious about lifeforms and knowledge -- I want to understand all knowledge, power and magic under the sun.<br>
+Ha ha...<br>
+...<br>
+Hmm...<br>
+Actually, this<font color="LEVEL"> Transformation Magic</font> is almost complete.<br>
+...<br>
+But in order to transform, the soul must first be prepared.<br>
+I am still researching that final component... Frankly, I could use some assistance.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-02.htm">It sounds interesting. Say that you will help.</a>
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-02.htm

@@ -0,0 +1,6 @@
+<html><body>Hardin:<br>
+Thank you for agreeing to help me complete my experiment.<br>
+Now, listen carefully...<br>
+The transformations that I am researching are not like illusions or hypnosis or some other parlor tricks...<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-03.htm">Continue listening.</a>
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-03.htm

@@ -0,0 +1,8 @@
+<html><body>Hardin:<br>
+My process will physically change the subject's actual material form.<br>
+Understand that the body of living being is merely a vessel for the soul.<br>
+Outward appearance is an expression of that inner substance; put another way, the body is intimately connected to the soul.<br>
+By using powerful magic, I was successful in changing a subject's outward appearance by reconfiguring the molecular bonds that constitute the body.<br>
+However, I discovered that life functions soon came to a halt. Soon thereafter, the reconfigured bonds themselves disintegrated...<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-04.htm">Does that mean the soul has to be transformed as well?</a>
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-04.htm

@@ -0,0 +1,4 @@
+<html><body>Hardin:<br>
+Very good! You are a quick study, I see. Yes, in order to successfully transform a subject's physical appearance, the soul must also be transformed to some degree.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-05.htm">Is it even possible to transform the soul? Moreover, if the soul transforms, wouldn't there be a loss of identity?</a>
+</body></html>

+ 7 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-05.htm

@@ -0,0 +1,7 @@
+<html><body>Hardin:<br>
+Ha! An adventurer after my own heart... Don't try to satisfy your curiosity in one gulp, though.<br>
+If we make progress with these experiments, I'm sure all of your questions will be answered.<br>
+At this stage in my research, I absolutely require<font color="LEVEL"> Stabilized Ectoplasm</font>.<br>
+I have learned that it can be obtained from<font color="LEVEL"> Dark Elf Magister Errickin in Hunters Village</font>, but I cannot leave my experiment at the moment.<br>
+Will you go in my place obtain it and bring it back here?
+</body></html>

+ 9 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-06.htm

@@ -0,0 +1,9 @@
+<html><body>Hardin:<br>
+Ah, I see that you have brought me the Stabilized Ectoplasm. Excellent!<br>
+I see you are bursting with questions; let me satisfy at least a portion of your curiosity.<br>
+Through research and experiment, I have arrived at certain conclusions.<br>
+The energy that makes up the soul is like the water in a water balloon. Depending on the shape of the balloon, it can be shaped into different forms, but once the shape within the water ballon is fixed, it cannot endure another change in form.<br>
+Another example: melted plaster can be fashioned into any shape, but once it hardens it must be broken in order to change its form. The souls of gods are eternal and immortal, and therefore free form bodily constraints. As a result, the gods can come and go as they please, appearing in different forms at their whim.<br>
+This is why transformation magic was originally the province of the gods alone.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-07.htm">Keep listening.</a>
+</body></html>

+ 10 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-07.htm

@@ -0,0 +1,10 @@
+<html><body>Hardin:<br>
+The ability to change the soul and then restore it to its original state is an essential condition for transformation magic.<br>
+If the soul perishes after transformation, or if the subject cannot be returned to its original state, the power is worthless.<br>
+Needless to say, this posed an extremely difficult problem even for my intellect, but I was able to use Mimir's Elixir and principles of Necromancy to solve it.<br>
+Still, the process has not been perfected...<br>
+I am now experimenting with a method that I believe may provide that last key.<br>
+By using Mimir's Elixir and the Stabilized Ectoplasm that you brought me, I am reasonably certain that I can allow your soul to endure the transformation process.<br>
+Once in that state of transformation, you should be able to use the Seal of Transformation to further transform at will.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-08.htm">Seal of Transformation?</a>
+</body></html>

+ 7 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-08.htm

@@ -0,0 +1,7 @@
+<html><body>Hardin:<br>
+The soul's combination of information and energy that is necessary to preserve a living being's outward appearance can be magically stored in a Seal of Transformation...<br>
+Unfortunately, I cannot personally link this Seal of Transformation with your individual body. It is simply not my specialty...<br>
+However, the Wizard of Transformation, Avangard, can engrave the Seal of Transformation. You can find him in the Ivory Tower.<br>
+If you convey to him the meaning of the Seal, the detailed method of preparation, and the energy of the Transformation magic that I have designed, he will be able to give you the Seal.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-09.htm">"How do I do that?"</a>
+</body></html>

+ 5 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-09.htm

@@ -0,0 +1,5 @@
+<html><body>Hardin:<br>
+You must produce a Book of the Seal of Transformation, a specially made Book of Magic. In it will be described the meaning of the seal of Transformation and the detailed method of preparation. You must also use special arcane methods to write the transformation magic and store its power in the Book of Magic.<br>
+But first, we will need an empty Book of Seal.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-10.htm">How do I make this empty Book of Seal?</a>
+</body></html>

+ 3 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-10.htm

@@ -0,0 +1,3 @@
+<html><body>Hardin:<br>
+Take these detailed instructions to<font color="LEVEL"> Magister Clayton in Dion Village</font>. He will craft an empty Book of Seal for you.
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-11.htm

@@ -0,0 +1,8 @@
+<html><body>Hardin:<br>
+I see that you have nrought the empty Book of Seal. With this, all our preparations are completed!<br>
+While you were gone, I made an infusion using the Stabilized Ectoplasm and Mimir's Elixir.<br>
+Drink this and your soul should be able to endure the transformation process.<br>
+Not nervous, are you? I suppose that technically you are the first to attempt this, but I am entirely confident in my theory, and you seem a hardy, healthy specimen.<br>
+(Hardin holds out a bowl with a smoking, foul smelling liquid.)<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-12.htm">Drink the concoction.</a>
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-12.htm

@@ -0,0 +1,8 @@
+<html><body>Hardin:<br>
+(As soon as you drink the liquid, you feel stabbing pain inside your head. You can't seem to pull yourself together; you feel as though you are seeing the world from two perspectives, almost as through a mirror. Everything is spinning. Something fundamental in your soul feels like it is changing... You perceive Hardin as though at the end of a long tunnel. He is chanting an incantation... Time passes, and the world seems to steady as you come back to your senses.)<br>
+Success! Success!<br>
+You have done well, my young subject!<br>
+Now your soul is in a state in which you can endure transformations.<br>
+Excellent!<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-13.htm">Then can I transform now?</a>
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-13.htm

@@ -0,0 +1,6 @@
+<html><body>Hardin:<br>
+Such impatience! The experiment was intended to create a stable state for the soul prior to transformation. We have done so...<br>
+However, since you have incurred some risk -- however marginal -- to assist me, I will help you attain a simple transformation. That is why I asked you to bring the empty Book of Seal...<br>
+Wait a moment.<br>
+<a action="bypass -h Quest 136_MoreThanMeetsTheEye 30832-14.htm">Wait.</a>
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/30832-14.htm

@@ -0,0 +1,8 @@
+<html><body>Hardin:<br>
+(Hardin draws something and begins writing in the empty Book of Seal. Once finished, he casts some sort of spell on the Book of Seal, which flashes for a moment.)<br>
+Now take this Book of Seal to<font color="LEVEL"> Avangard, the Wizard of Transformation on the 2nd floor of the Ivory Tower</font> and you should be able to effect a transformation.<br>
+My thanks -- you are a valuable assistant!<br>
+Since I am as generous as I am brilliant, I also wish you to take this...<br>
+Now I can plunge myself into research for a more varied kind of transformation magic.<br>
+Farewell!
+</body></html>

+ 9 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/32323-00.htm

@@ -0,0 +1,9 @@
+<html><body>Transformation Wizard Avant-Garde:<br>
+I am Avant-Garde, Transformation Wizard. Long did I wander before settling here.<br>
+In fact, I am not a wizard of the Ivory Tower -- think of me as a wanderer who aquired a mysterious power during his travels. My magic does require special items, however.<br>
+If you aquire them for me from the den of th Wizard of Darkness, perhaps I can provide you with something valueable in return.<br>
+<a action="bypass -h npc_%objectId%_Chat 1">Ask about transformation.</a><br>
+<a action="bypass -h npc_%objectId%_TransformSkillList">Learn Transformation.</a><br>
+<a action="bypass -h npc_%objectId%_multisell 32323001">Buy items related to transformation.</a><br>
+<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
+</body></html>

+ 160 - 0
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/__init__.py

@@ -0,0 +1,160 @@
+# Created by Gigiikun
+# Quest: More Than Meets The Eye
+import sys
+from net.sf.l2j import Config
+from net.sf.l2j.gameserver.model import L2Multisell
+from net.sf.l2j.gameserver.model.quest import State
+from net.sf.l2j.gameserver.model.quest import QuestState
+from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
+
+qn = "136_MoreThanMeetsTheEye"
+
+# NPC
+HARDIN=30832
+ERRICKIN=30701
+CLAYTON=30464
+AVANTGARDE=32323
+
+# ITEM
+ECTOPLASM=9787
+STABILIZED_ECTOPLASM=9786
+ORDER=9788
+MORDEO_CRYSTAL=9789
+BOOK_OF_SEAL=9790
+ADENA=57
+TRANSFORM_BOOK=9648
+
+# mobId:[itemId,chance1,chance2]
+DROPLIST = {20636:[ECTOPLASM,45,0],20637:[ECTOPLASM,50,5],20638:[ECTOPLASM,55,10],20639:[ECTOPLASM,60,120],20215:[MORDEO_CRYSTAL,100,0]}
+# itemId:[max,cond]
+DROPCONFIG = {ECTOPLASM:[35,"4"],MORDEO_CRYSTAL:[5,"8"]}
+
+class Quest (JQuest) :
+
+ def __init__(self,id,name,descr):
+     JQuest.__init__(self,id,name,descr)
+     self.questItemIds = [ECTOPLASM,STABILIZED_ECTOPLASM,ORDER,MORDEO_CRYSTAL,BOOK_OF_SEAL]
+
+ def onEvent (self,event,st) :
+    htmltext = event
+    id = st.getState()
+    cond = st.getInt("cond")
+    if event == "30832-02.htm" :
+       st.set("cond","1")
+       st.setState(State.STARTED)
+       st.playSound("ItemSound.quest_accept")
+    elif event == "30832-05.htm" :
+       st.set("cond","2")
+       st.playSound("ItemSound.quest_middle")
+    elif event == "30832-10.htm" :
+       st.takeItems(STABILIZED_ECTOPLASM,1)
+       st.giveItems(ORDER,1)
+       st.set("cond","6")
+       st.playSound("ItemSound.quest_middle")
+    elif event == "30832-14.htm" :
+       st.takeItems(BOOK_OF_SEAL,1)
+       st.giveItems(ADENA,67550)
+       st.giveItems(TRANSFORM_BOOK,1)
+       st.playSound("ItemSound.quest_finish")
+       st.setState(State.COMPLETED)
+       st.exitQuest(0)
+    elif event == "30701-02.htm" :
+       st.set("cond","3")
+       st.playSound("ItemSound.quest_middle")
+    elif event == "30464-02.htm" :
+       st.takeItems(ORDER,1)
+       st.set("cond","7")
+       st.playSound("ItemSound.quest_middle")
+    return htmltext
+
+ def onTalk (self,npc,player):
+   htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
+   st = player.getQuestState(qn)
+   if not st : return htmltext
+
+   npcId = npc.getNpcId()
+   id = st.getState()
+   cond = st.getInt("cond")
+   if id == State.COMPLETED :
+      htmltext = "<html><body>This quest has already been completed.</body></html>"
+   elif npcId == HARDIN :
+      if cond == 0 :
+         if player.getLevel() >= 50 :
+            htmltext = "30832-01.htm"
+         else:
+            htmltext = "30832-00.htm"
+            st.exitQuest(1)
+      elif cond == 1 :
+         htmltext = "30832-02.htm"
+      elif cond == 5 :
+         htmltext = "30832-06.htm"
+      elif cond == 9 :
+         htmltext = "30832-11.htm"
+   elif npcId == ERRICKIN :
+      if cond == 2 :
+         htmltext = "30701-01.htm"
+      elif cond == 4 :
+         htmltext = "30701-03.htm"
+         st.takeItems(ECTOPLASM,35)
+         st.giveItems(STABILIZED_ECTOPLASM,1)
+         st.set("cond","5")
+         st.playSound("ItemSound.quest_middle")
+   elif npcId == CLAYTON :
+      if cond == 6 :
+         htmltext = "30464-01.htm"
+      elif cond == 8 :
+         htmltext = "30464-03.htm"
+         st.takeItems(MORDEO_CRYSTAL,5)
+         st.giveItems(BOOK_OF_SEAL,1)
+         st.set("cond","9")
+         st.playSound("ItemSound.quest_middle")
+   return htmltext
+
+ def onFirstTalk (self,npc,player):
+   st = player.getQuestState(qn)
+   npcId = npc.getNpcId()
+   if npcId == AVANTGARDE :
+     htmltext = ""
+     if not st : return htmltext
+     if st.getState() == State.COMPLETED :
+          htmltext = "32323-00.htm"
+   return htmltext
+
+ def onKill(self,npc,player,isPet):
+   st = player.getQuestState(qn)
+   if not st : return
+   if st.getState() != State.STARTED : return
+
+   if st.getInt("cond")==3 or st.getInt("cond")==7 :
+      itemId,chance1,chance2=DROPLIST[npc.getNpcId()]
+      count = st.getQuestItemsCount(itemId)
+      max,cond = DROPCONFIG[itemId]
+      drop1 = st.getRandom(100)
+      drop2 = st.getRandom(100)
+      qty1,chance1 = divmod(chance1*Config.RATE_DROP_QUEST,100)
+      if drop1 < chance1 : qty1 += 1
+      qty1 = int(qty1)
+      if qty1 :
+         qty2,chance2 = divmod(chance2*Config.RATE_DROP_QUEST,100)
+         if drop2 < chance2 : qty2 += 1
+         qty = qty1 + int(qty2)
+         if (qty + count) >= max :
+            qty = max - count
+            st.playSound("ItemSound.quest_middle")
+            st.set("cond",cond)
+         else :
+            st.playSound("ItemSound.quest_itemget")
+         st.giveItems(itemId,qty)
+   return
+
+QUEST       = Quest(136,qn,"More Than Meets The Eye")
+
+QUEST.addStartNpc(HARDIN)
+
+QUEST.addTalkId(HARDIN)
+QUEST.addTalkId(ERRICKIN)
+QUEST.addTalkId(CLAYTON)
+QUEST.addFirstTalkId(AVANTGARDE)
+
+for mob in DROPLIST.keys() :
+  QUEST.addKillId(mob)

+ 5 - 5
datapack_development/sql/etcitem.sql

@@ -7145,11 +7145,11 @@ INSERT INTO `etcitem` VALUES
 (9783,'Echo Crystal of Free Thought','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
 (9784,'Parme\'s Letter','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
 (9785,'Refined Crystal Sample','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
-(9786,'Stabilized Ectoplasm','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
-(9787,'Ectoplasm','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
-(9788,'ORDER','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
-(9789,'Mordeo Crystal','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
-(9790,'Blank Stationery','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
+(9786,'Stabilized Ectoplasm','false','quest',0,'stackable','wood','none',-1,0,NULL,'false','false','true','false','',''),
+(9787,'Ectoplasm','false','quest',0,'stackable','wood','none',-1,0,NULL,'false','false','true','false','',''),
+(9788,'ORDER','false','quest',0,'stackable','wood','none',-1,0,NULL,'false','false','true','false','',''),
+(9789,'Mordeo Crystal','false','quest',0,'stackable','wood','none',-1,0,NULL,'false','false','true','false','',''),
+(9790,'Blank Stationery','false','quest',0,'stackable','wood','none',-1,0,NULL,'false','false','true','false','',''),
 (9791,'Transform Sealbook - Onyx Beast','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
 (9792,'Warehouse Manifest','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),
 (9793,'Grocery Store Manifest','false','none',0,'stackable','wood','none',-1,0,NULL,'true','true','true','true','',''),

+ 1 - 1
datapack_development/sql/npc.sql

@@ -6645,7 +6645,7 @@ INSERT INTO `npc` VALUES
 (32320, 32320, "Item Broker", 0, "Adventure Guildsman", 0, "LineageNPC.a_traderC_Mhuman", 8, 23, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
 (32321, 32321, "Item Broker", 0, "Adventure Guildsman", 0, "LineageNPC.a_traderC_Mhuman", 8, 23, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
 (32322, 32322, "Item Broker", 0, "Adventure Guildsman", 0, "LineageNPC.a_traderC_Mhuman", 8, 23, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
-(32323, 32323, "Avant-Garde", 0, "Transformation Wizard", 0, "LineageNPC.a_traderB_FHuman", 8, 22, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
+(32323, 32323, "Avant-Garde", 0, "Transformation Wizard", 0, "LineageNPC.a_traderB_FHuman", 8, 22, 70, "male", "L2TransformManager", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
 (32324, 32324, "Black Stone Monolith", 0, "", 0, "LineageNpcEV.dark_clouds_stonehenge", 8, 22, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "balanced"),
 (32325, 32325, "Yin", 0, "Attribute Master", 0, "LineageNPC.a_mageguild_master_FHuman", 8, 23, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "mage"),
 (32326, 32326, "Yang", 0, "Attribute Master", 0, "LineageNPC.a_mageguild_master_MHuman", 8, 22, 70, "male", "L2Npc", 40, 2444, 2444, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 500, 500, 500, 500, 253, 0, 253, 0, 0, NULL, 80, 120, "", 0, 0, 0, "LAST_HIT", 0, 0, 0, "mage"),

+ 2 - 1
datapack_development/sql/spawnlist.sql

@@ -40462,7 +40462,8 @@ INSERT INTO spawnlist VALUES
 (54952,'Miss_Queen',1,31765,-84119,243254,-3730,0,0,8000,60,0,'0'),
 (54953,'Miss_Queen',1,31765,-84336,242156,-3730,0,0,24500,60,0,'0'),
 (54954,'Miss_Queen',1,31766,-82032,150160,-3127,0,0,16500,60,0,'0'),
-(54955,'Priest Kanis',1,32264,143478,191013,-3720,0,0,8087,60,0,0);
+(54955,'Priest Kanis',1,32264,143478,191013,-3720,0,0,8087,60,0,0),
+(54956,'IvoryTower2ndFloor',1,32323,85333,15779,-2809,0,0,19030,60,0,0);
 
 -- Fortress Suspicious Merchants
 INSERT INTO spawnlist VALUES

+ 70 - 0
datapack_development/sql/transform_skill_trees.sql

@@ -0,0 +1,70 @@
+#----------------------------
+# Table structure for transform_skill_trees
+#----------------------------
+DROP TABLE IF EXISTS transform_skill_trees;
+CREATE TABLE `transform_skill_trees` (
+  `race_id` int(10) NOT NULL default '0',
+  `skill_id` int(10) NOT NULL default '0',
+  `item_id` int(10) NOT NULL default '0',
+  `level` int(10) NOT NULL default '0',
+  `name` varchar(40) NOT NULL default '',
+  `sp` int(10) NOT NULL default '0',
+  `min_level` int(10) NOT NULL default '0',
+  PRIMARY KEY  (`race_id`,`skill_id`,`level`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+insert  into transform_skill_trees values 
+# Human
+(0, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(0, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(0, 541, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(0, 545, 9651, 1, 'Transform Unicorn', 0, 60), 
+(0, 548, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(0, 551, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(0, 554, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(0, 558, 9655, 1, 'Transform Dragon Bomber', 0, 60), 
+# Elf
+(1, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(1, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(1, 542, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(1, 544, 9651, 1, 'Transform Unicorn', 0, 60), 
+(1, 549, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(1, 551, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(1, 554, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(1, 557, 9655, 1, 'Transform Dragon Bomber', 0, 60),
+# Delf
+(2, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(2, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(2, 542, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(2, 546, 9651, 1, 'Transform Unicorn', 0, 60), 
+(2, 547, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(2, 551, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(2, 554, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(2, 557, 9655, 1, 'Transform Dragon Bomber', 0, 60),
+# Dwarf
+(4, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(4, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(4, 542, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(4, 545, 9651, 1, 'Transform Unicorn', 0, 60), 
+(4, 548, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(4, 550, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(4, 555, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(4, 557, 9655, 1, 'Transform Dragon Bomber', 0, 60),
+# Orc
+(3, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(3, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(3, 542, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(3, 545, 9651, 1, 'Transform Unicorn', 0, 60), 
+(3, 548, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(3, 552, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(3, 553, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(3, 557, 9655, 1, 'Transform Dragon Bomber', 0, 60),
+# Kamael
+(5, 617, 9648, 1, 'Transform Onyx Beast', 0, 50), 
+(5, 618, 9649, 1, 'Transform Death Blader', 0, 55), 
+(5, 543, 9650, 1, 'Transform Grail Apostle', 0, 60), 
+(5, 545, 9651, 1, 'Transform Unicorn', 0, 60), 
+(5, 548, 9652, 1, 'Transform Lilim Knight', 0, 60), 
+(5, 551, 9653, 1, 'Transform Golem Guardian', 0, 60), 
+(5, 554, 9654, 1, 'Transform Inferno Drake', 0, 60), 
+(5, 556, 9655, 1, 'Transform Dragon Bomber', 0, 60);

+ 1 - 0
datapack_development/tools/database_installer.bat

@@ -604,6 +604,7 @@ skill_trees.sql
 spawnlist.sql
 teleport.sql
 topic.sql
+transform_skill_trees.sql;
 walker_routes.sql
 weapon.sql
 zone_vertices.sql

+ 441 - 440
datapack_development/tools/database_installer.sh

@@ -1,441 +1,442 @@
-#!/bin/bash
-############################################
-## WARNING!  WARNING!  WARNING!  WARNING! ##
-##                                        ##
-## DON'T USE NOTEPAD TO CHANGE THIS FILE  ##
-## INSTEAD USE SOME DECENT TEXT EDITOR.   ##
-## NEWLINE CHARACTERS DIFFER BETWEEN DOS/ ##
-## WINDOWS AND UNIX.                      ##
-##                                        ##
-## USING NOTEPAD TO SAVE THIS FILE WILL   ##
-## LEAVE IT IN A BROKEN STATE!!!          ##
-############################################
-## Writen by DrLecter                     ##
-## License: GNU GPL                       ##
-## Based on Tiago Tagliaferri's script    ##
-## E-mail: tiago_tagliaferri@msn.com      ##
-## From "L2J-DataPack"                    ##
-## Bug reports: http://l2jdp.com/trac     ##
-############################################
-trap finish 2
-
-configure() {
-echo "#############################################"
-echo "# You entered script configuration area     #"
-echo "# No change will be performed in your DB    #"
-echo "# I will just ask you some questions about  #"
-echo "# your hosts and DB.                        #"
-echo "#############################################"
-MYSQLDUMPPATH=`which -a mysqldump 2>/dev/null`
-MYSQLPATH=`which -a mysql 2>/dev/null`
-if [ $? -ne 0 ]; then
-echo "We were unable to find MySQL binaries on your path"
-while :
- do
-  echo -ne "\nPlease enter MySQL binaries directory (no trailing slash): "
-  read MYSQLBINPATH
-    if [ -e "$MYSQLBINPATH" ] && [ -d "$MYSQLBINPATH" ] && \
-       [ -e "$MYSQLBINPATH/mysqldump" ] && [ -e "$MYSQLBINPATH/mysql" ]; then
-       MYSQLDUMPPATH="$MYSQLBINPATH/mysqldump"
-       MYSQLPATH="$MYSQLBINPATH/mysql"
-       break
-    else
-       echo "The data you entered is invalid. Please verify and try again."
-       exit 1
-    fi
- done
-fi
-#LS
-echo -ne "\nPlease enter MySQL Login Server hostname (default localhost): "
-read LSDBHOST
-if [ -z "$LSDBHOST" ]; then
-  LSDBHOST="localhost"
-fi
-echo -ne "\nPlease enter MySQL Login Server database name (default l2jdb): "
-read LSDB
-if [ -z "$LSDB" ]; then
-  LSDB="l2jdb"
-fi
-echo -ne "\nPlease enter MySQL Login Server user (default root): "
-read LSUSER
-if [ -z "$LSUSER" ]; then
-  LSUSER="root"
-fi
-echo -ne "\nPlease enter MySQL Login Server $LSUSER's password (won't be displayed) :"
-stty -echo
-read LSPASS
-stty echo
-echo ""
-if [ -z "$LSPASS" ]; then
-  echo "Hum.. I'll let it be but don't be stupid and avoid empty passwords"
-elif [ "$LSUSER" == "$LSPASS" ]; then
-  echo "You're not too brilliant choosing passwords huh?"
-fi
-#GS
-echo -ne "\nPlease enter MySQL Game Server hostname (default $LSDBHOST): "
-read GSDBHOST
-if [ -z "$GSDBHOST" ]; then
-  GSDBHOST="$LSDBHOST"
-fi
-echo -ne "\nPlease enter MySQL Game Server database name (default $LSDB): "
-read GSDB
-if [ -z "$GSDB" ]; then
-  GSDB="$LSDB"
-fi
-echo -ne "\nPlease enter MySQL Game Server user (default $LSUSER): "
-read GSUSER
-if [ -z "$GSUSER" ]; then
-  GSUSER="$LSUSER"
-fi
-echo -ne "\nPlease enter MySQL Game Server $GSUSER's password (won't be displayed): "
-stty -echo
-read GSPASS
-stty echo
-echo ""
-if [ -z "$GSPASS" ]; then
-  echo "Hum.. I'll let it be but don't be stupid and avoid empty passwords"
-elif [ "$GSUSER" == "$GSPASS" ]; then
-  echo "You're not too brilliant choosing passwords huh?"
-fi
-save_config $1
-}
-
-save_config() {
-if [ -n "$1" ]; then
-CONF="$1"
-else 
-CONF="database_installer.rc"
-fi
-echo ""
-echo "With these data I can generate a configuration file which can be read"
-echo "on future updates. WARNING: this file will contain clear text passwords!"
-echo -ne "Shall I generate config file $CONF? (Y/n):"
-read SAVE
-if [ "$SAVE" == "y" -o "$SAVE" == "Y" -o "$SAVE" == "" ];then 
-cat <<EOF>$CONF
-#Configuration settings for L2J-Datapack database installer script
-MYSQLDUMPPATH=$MYSQLDUMPPATH
-MYSQLPATH=$MYSQLPATH
-LSDBHOST=$LSDBHOST
-LSDB=$LSDB
-LSUSER=$LSUSER
-LSPASS=$LSPASS
-GSDBHOST=$GSDBHOST
-GSDB=$GSDB
-GSUSER=$GSUSER
-GSPASS=$GSPASS
-EOF
-chmod 600 $CONF
-echo "Configuration saved as $CONF"
-echo "Permissions changed to 600 (rw- --- ---)"
-elif [ "$SAVE" != "n" -a "$SAVE" != "N" ]; then
-  save_config
-fi
-}
-
-load_config() {
-if [ -n "$1" ]; then
-CONF="$1"
-else 
-CONF="database_installer.rc"
-fi
-if [ -e "$CONF" ] && [ -f "$CONF" ]; then
-. $CONF
-else
-echo "Settings file not found: $CONF"
-echo "You can specify an alternate settings filename:"
-echo $0 config_filename
-echo ""
-echo "If file doesn't exist it can be created"
-echo "If nothing is specified script will try to work with ./database_installer.rc"
-echo ""
-configure $CONF
-fi
-}
-
-asklogin(){
-echo "#############################################"
-echo "# WARNING: This section of the script CAN   #"
-echo "# destroy your characters and accounts      #"
-echo "# information. Read questions carefully     #"
-echo "# before you reply.                         #"
-echo "#############################################"
-echo ""
-echo "Choose full (f) if you don't have and 'accounts' table or would"
-echo "prefer to erase the existing accounts information."
-echo "Choose skip (s) to skip loginserver DB installation and go to"
-echo "gameserver DB installation/upgrade."
-echo -ne "LOGINSERVER DB install type: (f) full, (s) skip or (q) quit? "
-read LOGINPROMPT
-case "$LOGINPROMPT" in
-	"f"|"F") logininstall; loginupgrade; gsbackup; asktype;;
-	"s"|"S") gsbackup; asktype;;
-	"q"|"Q") finish;;
-	*) asklogin;;
-esac
-}
-
-logininstall(){
-echo "Deleting loginserver tables for new content."
-$MYL < login_install.sql &> /dev/null
-}
-
-loginupgrade(){
-echo "Installling new loginserver content."
-$MYL < ../sql/accounts.sql &> /dev/null
-$MYL < ../sql/gameservers.sql &> /dev/null
-}
-
-gsbackup(){
-while :
-  do
-   echo ""
-   echo -ne "Do you want to make a backup copy of your GSDB? (y/n): "
-   read LSB
-   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
-     echo "Making a backup of the original gameserver database."
-     $MYSQLDUMPPATH --add-drop-table -h $GSDBHOST -u $GSUSER --password=$GSPASS $GSDB > gameserver_backup.sql
-     if [ $? -ne 0 ];then
-     echo ""
-     echo "There was a problem accesing your GS database, either it wasnt created or authentication data is incorrect."
-     exit 1
-     fi
-     break
-   elif [ "$LSB" == "n" -o "$LSB" == "N" ]; then 
-     break
-   fi
-  done 
-}
-
-lsbackup(){
-while :
-  do
-   echo ""
-   echo -ne "Do you want to make a backup copy of your LSDB? (y/n): "
-   read LSB
-   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
-     echo "Making a backup of the original loginserver database."
-     $MYSQLDUMPPATH --add-drop-table -h $LSDBHOST -u $LSUSER --password=$LSPASS $LSDB > loginserver_backup.sql
-     if [ $? -ne 0 ];then
-        echo ""
-        echo "There was a problem accesing your LS database, either it wasnt created or authentication data is incorrect."
-        exit 1
-     fi
-     break
-   elif [ "$LSB" == "n" -o "$LSB" == "N" ]; then 
-     break
-   fi
-  done 
-}
-
-asktype(){
-echo ""
-echo ""
-echo "WARNING: A full install (f) will destroy all existing character data."
-echo -ne "GAMESERVER DB install type: (f) full install, (u) upgrade, (s) skip or (q) quit? "
-read INSTALLTYPE
-case "$INSTALLTYPE" in
-	"f"|"F") fullinstall; upgradeinstall I; custom;;
-	"u"|"U") upgradeinstall U; custom;;
-	"s"|"S") custom;;
-	"q"|"Q") finish;;
-	*) asktype;;
-esac
-}
-
-fullinstall(){
-echo "Deleting all gameserver tables for new content."
-$MYG < full_install.sql &> /dev/null
-}
-
-upgradeinstall(){
-if [ "$1" == "I" ]; then 
-echo "Installling new gameserver content."
-else
-echo "Upgrading gameserver content"
-fi
-$MYG < ../sql/account_data.sql &> /dev/null
-$MYG < ../sql/armor.sql &> /dev/null
-$MYG < ../sql/armorsets.sql &> /dev/null
-$MYG < ../sql/auction.sql &> /dev/null
-$MYG < ../sql/auction_bid.sql &> /dev/null
-$MYG < ../sql/auction_watch.sql &> /dev/null
-$MYG < ../sql/augmentations.sql &> /dev/null
-$MYG < ../sql/auto_chat.sql &> /dev/null
-$MYG < ../sql/auto_chat_text.sql &> /dev/null
-$MYG < ../sql/boxaccess.sql &> /dev/null
-$MYG < ../sql/boxes.sql &> /dev/null
-$MYG < ../sql/castle.sql &> /dev/null
-$MYG < ../sql/castle_door.sql &> /dev/null
-$MYG < ../sql/castle_doorupgrade.sql &> /dev/null
-$MYG < ../sql/castle_manor_procure.sql &> /dev/null
-$MYG < ../sql/castle_manor_production.sql &> /dev/null
-$MYG < ../sql/castle_siege_guards.sql &> /dev/null
-$MYG < ../sql/char_templates.sql &> /dev/null
-$MYG < ../sql/character_friends.sql &> /dev/null
-$MYG < ../sql/character_hennas.sql &> /dev/null
-$MYG < ../sql/character_macroses.sql &> /dev/null
-$MYG < ../sql/character_quests.sql &> /dev/null
-$MYG < ../sql/character_recipebook.sql &> /dev/null
-$MYG < ../sql/character_recommends.sql &> /dev/null
-$MYG < ../sql/character_shortcuts.sql &> /dev/null
-$MYG < ../sql/character_skills.sql &> /dev/null
-$MYG < ../sql/character_skills_save.sql &> /dev/null
-$MYG < ../sql/character_subclasses.sql &> /dev/null
-$MYG < ../sql/characters.sql &> /dev/null
-$MYG < ../sql/clan_data.sql &> /dev/null
-$MYG < ../sql/clan_privs.sql &> /dev/null
-$MYG < ../sql/clan_skills.sql &> /dev/null
-$MYG < ../sql/clan_subpledges.sql &> /dev/null
-$MYG < ../sql/clan_wars.sql &> /dev/null
-$MYG < ../sql/clanhall.sql &> /dev/null
-$MYG < ../sql/clanhall_functions.sql &> /dev/null
-$MYG < ../sql/class_list.sql &> /dev/null
-$MYG < ../sql/cursed_weapons.sql &> /dev/null
-$MYG < ../sql/dimensional_rift.sql &> /dev/null
-$MYG < ../sql/droplist.sql &> /dev/null
-$MYG < ../sql/enchant_skill_trees.sql &> /dev/null
-$MYG < ../sql/etcitem.sql &> /dev/null
-$MYG < ../sql/fish.sql &> /dev/null
-$MYG < ../sql/fishing_skill_trees.sql &> /dev/null
-$MYG < ../sql/forums.sql &> /dev/null
-$MYG < ../sql/fort_door.sql &> /dev/null
-$MYG < ../sql/fort_doorupgrade.sql &> /dev/null
-$MYG < ../sql/fort_siege_guards.sql &> /dev/null
-$MYG < ../sql/fort.sql &> /dev/null
-$MYG < ../sql/fortsiege_clans.sql &> /dev/null
-$MYG < ../sql/games.sql &> /dev/null
-$MYG < ../sql/global_tasks.sql &> /dev/null
-$MYG < ../sql/grandboss_data.sql &> /dev/null
-$MYG < ../sql/grandboss_list.sql &> /dev/null
-$MYG < ../sql/helper_buff_list.sql &> /dev/null
-$MYG < ../sql/henna.sql &> /dev/null
-$MYG < ../sql/henna_trees.sql &> /dev/null
-$MYG < ../sql/heroes.sql &> /dev/null
-$MYG < ../sql/items.sql &> /dev/null
-$MYG < ../sql/itemsonground.sql &> /dev/null
-$MYG < ../sql/locations.sql &> /dev/null
-$MYG < ../sql/lvlupgain.sql &> /dev/null
-$MYG < ../sql/mapregion.sql &> /dev/null
-$MYG < ../sql/merchant_areas_list.sql &> /dev/null
-$MYG < ../sql/merchant_buylists.sql &> /dev/null
-$MYG < ../sql/merchant_lease.sql &> /dev/null
-$MYG < ../sql/merchant_shopids.sql &> /dev/null
-$MYG < ../sql/merchants.sql &> /dev/null
-$MYG < ../sql/minions.sql &> /dev/null
-$MYG < ../sql/npc.sql &> /dev/null
-$MYG < ../sql/olympiad_nobles.sql&> /dev/null
-$MYG < ../sql/pets.sql &> /dev/null
-$MYG < ../sql/pets_stats.sql &> /dev/null
-$MYG < ../sql/pledge_skill_trees.sql &> /dev/null
-$MYG < ../sql/posts.sql &> /dev/null
-$MYG < ../sql/quest_global_data.sql &> /dev/null
-$MYG < ../sql/npcskills.sql &> /dev/null
-$MYG < ../sql/raidboss_spawnlist.sql &> /dev/null
-$MYG < ../sql/random_spawn.sql &> /dev/null
-$MYG < ../sql/random_spawn_loc.sql &> /dev/null
-$MYG < ../sql/seven_signs.sql &> /dev/null
-$MYG < ../sql/seven_signs_festival.sql &> /dev/null
-$MYG < ../sql/seven_signs_status.sql &> /dev/null
-$MYG < ../sql/siege_clans.sql &> /dev/null
-$MYG < ../sql/skill_learn.sql &> /dev/null
-$MYG < ../sql/skill_spellbooks.sql &> /dev/null
-$MYG < ../sql/skill_trees.sql &> /dev/null
-$MYG < ../sql/spawnlist.sql &> /dev/null
-$MYG < ../sql/teleport.sql &> /dev/null
-$MYG < ../sql/topic.sql &> /dev/null
-$MYG < ../sql/walker_routes.sql &> /dev/null
-$MYG < ../sql/weapon.sql &> /dev/null
-$MYG < ../sql/zone_vertices.sql &> /dev/null
-newbie_helper
-}
-
-custom(){
-echo ""
-echo ""
-echo -ne "Install custom gameserver DB tables: (y) yes or (n) no or (q) quit?"
-read ASKCS
-case "$ASKCS" in
-	"y"|"Y") cstinstall;;
-	"n"|"N") finish;;
-	"q"|"Q") finish;;
-	*) custom;;
-esac
-finish
-}
-
-cstinstall(){
-while :
-  do
-   echo ""
-   echo -ne "Do you want to make another backup of GSDB before applying custom contents? (y/N): "
-   read LSB
-   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
-     echo "Making a backup of the default gameserver tables."
-     $MYSQLDUMPPATH --add-drop-table -h $GSDBHOST -u $GSUSER --password=$GSPASS $GSDB > custom_backup.sql 2> /dev/null
-     if [ $? -ne 0 ];then
-     echo ""
-     echo "There was a problem accesing your GS database, server down?."
-     exit 1
-     fi
-     break
-   elif [ "$LSB" == "n" -o "$LSB" == "N" -o "$LSB" == "" ]; then 
-     break
-   fi
-  done 
-echo "Installing custom content."
-for custom in $(ls ../sql/custom/*.sql);do 
-$MYG < $custom &> /dev/null
-done
-# L2J mods that needed extra tables to work properly, should be 
-# listed here. To do so copy & paste the following 6 lines and
-# change them properly:
-# MOD: Wedding.
-  echo -ne "Install "Wedding Mod" tables? (y/N): "
-  read modprompt
-  if [ "$modprompt" == "Y" -o "$LSB" == "y" ]; then
-		$MYG < ../sql/mods/mods_wedding.sql &> /dev/null
-	fi
-
-finish
-}
-
-finish(){
-echo ""
-echo "Script execution finished."
-exit 0
-}
-
-newbie_helper(){
-while :
-  do
-   echo ""
-   echo -ne "If you're not that skilled applying changes within 'updates' folder, i can try to do it for you (y). If you wish to do it on your own, choose (n). Should i parse updates files? (Y/n)"
-   read NOB
-   if [ "$NOB" == "Y" -o "$NOB" == "y" -o "$NOB" == "" ]; then
-     echo ""
-     echo "There we go, it may take some time..."
-     echo "updates parser results. Last run: "`date` >database_installer.log
-     for file in $(ls ../sql/updates/*sql);do
-        echo $file|cut -d/ -f4 >> database_installer.log
-        $MYG < $file 2>> database_installer.log
-	if [ $? -eq 0 ];then
-	    echo "no errors">> database_installer.log
-	fi    
-	done
-     echo ""
-     echo "Log available at $(pwd)/database_installer.log"
-     echo ""
-     break
-   elif [ "$NOB" == "n" -o "$NOB" == "N" ]; then 
-     break
-   fi
-  done 
-}
-
-clear
-load_config $1
-MYL="$MYSQLPATH -h $LSDBHOST -u $LSUSER --password=$LSPASS -D $LSDB"
-MYG="$MYSQLPATH -h $GSDBHOST -u $GSUSER --password=$GSPASS -D $GSDB"
-lsbackup
+#!/bin/bash
+############################################
+## WARNING!  WARNING!  WARNING!  WARNING! ##
+##                                        ##
+## DON'T USE NOTEPAD TO CHANGE THIS FILE  ##
+## INSTEAD USE SOME DECENT TEXT EDITOR.   ##
+## NEWLINE CHARACTERS DIFFER BETWEEN DOS/ ##
+## WINDOWS AND UNIX.                      ##
+##                                        ##
+## USING NOTEPAD TO SAVE THIS FILE WILL   ##
+## LEAVE IT IN A BROKEN STATE!!!          ##
+############################################
+## Writen by DrLecter                     ##
+## License: GNU GPL                       ##
+## Based on Tiago Tagliaferri's script    ##
+## E-mail: tiago_tagliaferri@msn.com      ##
+## From "L2J-DataPack"                    ##
+## Bug reports: http://l2jdp.com/trac     ##
+############################################
+trap finish 2
+
+configure() {
+echo "#############################################"
+echo "# You entered script configuration area     #"
+echo "# No change will be performed in your DB    #"
+echo "# I will just ask you some questions about  #"
+echo "# your hosts and DB.                        #"
+echo "#############################################"
+MYSQLDUMPPATH=`which -a mysqldump 2>/dev/null`
+MYSQLPATH=`which -a mysql 2>/dev/null`
+if [ $? -ne 0 ]; then
+echo "We were unable to find MySQL binaries on your path"
+while :
+ do
+  echo -ne "\nPlease enter MySQL binaries directory (no trailing slash): "
+  read MYSQLBINPATH
+    if [ -e "$MYSQLBINPATH" ] && [ -d "$MYSQLBINPATH" ] && \
+       [ -e "$MYSQLBINPATH/mysqldump" ] && [ -e "$MYSQLBINPATH/mysql" ]; then
+       MYSQLDUMPPATH="$MYSQLBINPATH/mysqldump"
+       MYSQLPATH="$MYSQLBINPATH/mysql"
+       break
+    else
+       echo "The data you entered is invalid. Please verify and try again."
+       exit 1
+    fi
+ done
+fi
+#LS
+echo -ne "\nPlease enter MySQL Login Server hostname (default localhost): "
+read LSDBHOST
+if [ -z "$LSDBHOST" ]; then
+  LSDBHOST="localhost"
+fi
+echo -ne "\nPlease enter MySQL Login Server database name (default l2jdb): "
+read LSDB
+if [ -z "$LSDB" ]; then
+  LSDB="l2jdb"
+fi
+echo -ne "\nPlease enter MySQL Login Server user (default root): "
+read LSUSER
+if [ -z "$LSUSER" ]; then
+  LSUSER="root"
+fi
+echo -ne "\nPlease enter MySQL Login Server $LSUSER's password (won't be displayed) :"
+stty -echo
+read LSPASS
+stty echo
+echo ""
+if [ -z "$LSPASS" ]; then
+  echo "Hum.. I'll let it be but don't be stupid and avoid empty passwords"
+elif [ "$LSUSER" == "$LSPASS" ]; then
+  echo "You're not too brilliant choosing passwords huh?"
+fi
+#GS
+echo -ne "\nPlease enter MySQL Game Server hostname (default $LSDBHOST): "
+read GSDBHOST
+if [ -z "$GSDBHOST" ]; then
+  GSDBHOST="$LSDBHOST"
+fi
+echo -ne "\nPlease enter MySQL Game Server database name (default $LSDB): "
+read GSDB
+if [ -z "$GSDB" ]; then
+  GSDB="$LSDB"
+fi
+echo -ne "\nPlease enter MySQL Game Server user (default $LSUSER): "
+read GSUSER
+if [ -z "$GSUSER" ]; then
+  GSUSER="$LSUSER"
+fi
+echo -ne "\nPlease enter MySQL Game Server $GSUSER's password (won't be displayed): "
+stty -echo
+read GSPASS
+stty echo
+echo ""
+if [ -z "$GSPASS" ]; then
+  echo "Hum.. I'll let it be but don't be stupid and avoid empty passwords"
+elif [ "$GSUSER" == "$GSPASS" ]; then
+  echo "You're not too brilliant choosing passwords huh?"
+fi
+save_config $1
+}
+
+save_config() {
+if [ -n "$1" ]; then
+CONF="$1"
+else 
+CONF="database_installer.rc"
+fi
+echo ""
+echo "With these data I can generate a configuration file which can be read"
+echo "on future updates. WARNING: this file will contain clear text passwords!"
+echo -ne "Shall I generate config file $CONF? (Y/n):"
+read SAVE
+if [ "$SAVE" == "y" -o "$SAVE" == "Y" -o "$SAVE" == "" ];then 
+cat <<EOF>$CONF
+#Configuration settings for L2J-Datapack database installer script
+MYSQLDUMPPATH=$MYSQLDUMPPATH
+MYSQLPATH=$MYSQLPATH
+LSDBHOST=$LSDBHOST
+LSDB=$LSDB
+LSUSER=$LSUSER
+LSPASS=$LSPASS
+GSDBHOST=$GSDBHOST
+GSDB=$GSDB
+GSUSER=$GSUSER
+GSPASS=$GSPASS
+EOF
+chmod 600 $CONF
+echo "Configuration saved as $CONF"
+echo "Permissions changed to 600 (rw- --- ---)"
+elif [ "$SAVE" != "n" -a "$SAVE" != "N" ]; then
+  save_config
+fi
+}
+
+load_config() {
+if [ -n "$1" ]; then
+CONF="$1"
+else 
+CONF="database_installer.rc"
+fi
+if [ -e "$CONF" ] && [ -f "$CONF" ]; then
+. $CONF
+else
+echo "Settings file not found: $CONF"
+echo "You can specify an alternate settings filename:"
+echo $0 config_filename
+echo ""
+echo "If file doesn't exist it can be created"
+echo "If nothing is specified script will try to work with ./database_installer.rc"
+echo ""
+configure $CONF
+fi
+}
+
+asklogin(){
+echo "#############################################"
+echo "# WARNING: This section of the script CAN   #"
+echo "# destroy your characters and accounts      #"
+echo "# information. Read questions carefully     #"
+echo "# before you reply.                         #"
+echo "#############################################"
+echo ""
+echo "Choose full (f) if you don't have and 'accounts' table or would"
+echo "prefer to erase the existing accounts information."
+echo "Choose skip (s) to skip loginserver DB installation and go to"
+echo "gameserver DB installation/upgrade."
+echo -ne "LOGINSERVER DB install type: (f) full, (s) skip or (q) quit? "
+read LOGINPROMPT
+case "$LOGINPROMPT" in
+	"f"|"F") logininstall; loginupgrade; gsbackup; asktype;;
+	"s"|"S") gsbackup; asktype;;
+	"q"|"Q") finish;;
+	*) asklogin;;
+esac
+}
+
+logininstall(){
+echo "Deleting loginserver tables for new content."
+$MYL < login_install.sql &> /dev/null
+}
+
+loginupgrade(){
+echo "Installling new loginserver content."
+$MYL < ../sql/accounts.sql &> /dev/null
+$MYL < ../sql/gameservers.sql &> /dev/null
+}
+
+gsbackup(){
+while :
+  do
+   echo ""
+   echo -ne "Do you want to make a backup copy of your GSDB? (y/n): "
+   read LSB
+   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
+     echo "Making a backup of the original gameserver database."
+     $MYSQLDUMPPATH --add-drop-table -h $GSDBHOST -u $GSUSER --password=$GSPASS $GSDB > gameserver_backup.sql
+     if [ $? -ne 0 ];then
+     echo ""
+     echo "There was a problem accesing your GS database, either it wasnt created or authentication data is incorrect."
+     exit 1
+     fi
+     break
+   elif [ "$LSB" == "n" -o "$LSB" == "N" ]; then 
+     break
+   fi
+  done 
+}
+
+lsbackup(){
+while :
+  do
+   echo ""
+   echo -ne "Do you want to make a backup copy of your LSDB? (y/n): "
+   read LSB
+   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
+     echo "Making a backup of the original loginserver database."
+     $MYSQLDUMPPATH --add-drop-table -h $LSDBHOST -u $LSUSER --password=$LSPASS $LSDB > loginserver_backup.sql
+     if [ $? -ne 0 ];then
+        echo ""
+        echo "There was a problem accesing your LS database, either it wasnt created or authentication data is incorrect."
+        exit 1
+     fi
+     break
+   elif [ "$LSB" == "n" -o "$LSB" == "N" ]; then 
+     break
+   fi
+  done 
+}
+
+asktype(){
+echo ""
+echo ""
+echo "WARNING: A full install (f) will destroy all existing character data."
+echo -ne "GAMESERVER DB install type: (f) full install, (u) upgrade, (s) skip or (q) quit? "
+read INSTALLTYPE
+case "$INSTALLTYPE" in
+	"f"|"F") fullinstall; upgradeinstall I; custom;;
+	"u"|"U") upgradeinstall U; custom;;
+	"s"|"S") custom;;
+	"q"|"Q") finish;;
+	*) asktype;;
+esac
+}
+
+fullinstall(){
+echo "Deleting all gameserver tables for new content."
+$MYG < full_install.sql &> /dev/null
+}
+
+upgradeinstall(){
+if [ "$1" == "I" ]; then 
+echo "Installling new gameserver content."
+else
+echo "Upgrading gameserver content"
+fi
+$MYG < ../sql/account_data.sql &> /dev/null
+$MYG < ../sql/armor.sql &> /dev/null
+$MYG < ../sql/armorsets.sql &> /dev/null
+$MYG < ../sql/auction.sql &> /dev/null
+$MYG < ../sql/auction_bid.sql &> /dev/null
+$MYG < ../sql/auction_watch.sql &> /dev/null
+$MYG < ../sql/augmentations.sql &> /dev/null
+$MYG < ../sql/auto_chat.sql &> /dev/null
+$MYG < ../sql/auto_chat_text.sql &> /dev/null
+$MYG < ../sql/boxaccess.sql &> /dev/null
+$MYG < ../sql/boxes.sql &> /dev/null
+$MYG < ../sql/castle.sql &> /dev/null
+$MYG < ../sql/castle_door.sql &> /dev/null
+$MYG < ../sql/castle_doorupgrade.sql &> /dev/null
+$MYG < ../sql/castle_manor_procure.sql &> /dev/null
+$MYG < ../sql/castle_manor_production.sql &> /dev/null
+$MYG < ../sql/castle_siege_guards.sql &> /dev/null
+$MYG < ../sql/char_templates.sql &> /dev/null
+$MYG < ../sql/character_friends.sql &> /dev/null
+$MYG < ../sql/character_hennas.sql &> /dev/null
+$MYG < ../sql/character_macroses.sql &> /dev/null
+$MYG < ../sql/character_quests.sql &> /dev/null
+$MYG < ../sql/character_recipebook.sql &> /dev/null
+$MYG < ../sql/character_recommends.sql &> /dev/null
+$MYG < ../sql/character_shortcuts.sql &> /dev/null
+$MYG < ../sql/character_skills.sql &> /dev/null
+$MYG < ../sql/character_skills_save.sql &> /dev/null
+$MYG < ../sql/character_subclasses.sql &> /dev/null
+$MYG < ../sql/characters.sql &> /dev/null
+$MYG < ../sql/clan_data.sql &> /dev/null
+$MYG < ../sql/clan_privs.sql &> /dev/null
+$MYG < ../sql/clan_skills.sql &> /dev/null
+$MYG < ../sql/clan_subpledges.sql &> /dev/null
+$MYG < ../sql/clan_wars.sql &> /dev/null
+$MYG < ../sql/clanhall.sql &> /dev/null
+$MYG < ../sql/clanhall_functions.sql &> /dev/null
+$MYG < ../sql/class_list.sql &> /dev/null
+$MYG < ../sql/cursed_weapons.sql &> /dev/null
+$MYG < ../sql/dimensional_rift.sql &> /dev/null
+$MYG < ../sql/droplist.sql &> /dev/null
+$MYG < ../sql/enchant_skill_trees.sql &> /dev/null
+$MYG < ../sql/etcitem.sql &> /dev/null
+$MYG < ../sql/fish.sql &> /dev/null
+$MYG < ../sql/fishing_skill_trees.sql &> /dev/null
+$MYG < ../sql/forums.sql &> /dev/null
+$MYG < ../sql/fort_door.sql &> /dev/null
+$MYG < ../sql/fort_doorupgrade.sql &> /dev/null
+$MYG < ../sql/fort_siege_guards.sql &> /dev/null
+$MYG < ../sql/fort.sql &> /dev/null
+$MYG < ../sql/fortsiege_clans.sql &> /dev/null
+$MYG < ../sql/games.sql &> /dev/null
+$MYG < ../sql/global_tasks.sql &> /dev/null
+$MYG < ../sql/grandboss_data.sql &> /dev/null
+$MYG < ../sql/grandboss_list.sql &> /dev/null
+$MYG < ../sql/helper_buff_list.sql &> /dev/null
+$MYG < ../sql/henna.sql &> /dev/null
+$MYG < ../sql/henna_trees.sql &> /dev/null
+$MYG < ../sql/heroes.sql &> /dev/null
+$MYG < ../sql/items.sql &> /dev/null
+$MYG < ../sql/itemsonground.sql &> /dev/null
+$MYG < ../sql/locations.sql &> /dev/null
+$MYG < ../sql/lvlupgain.sql &> /dev/null
+$MYG < ../sql/mapregion.sql &> /dev/null
+$MYG < ../sql/merchant_areas_list.sql &> /dev/null
+$MYG < ../sql/merchant_buylists.sql &> /dev/null
+$MYG < ../sql/merchant_lease.sql &> /dev/null
+$MYG < ../sql/merchant_shopids.sql &> /dev/null
+$MYG < ../sql/merchants.sql &> /dev/null
+$MYG < ../sql/minions.sql &> /dev/null
+$MYG < ../sql/npc.sql &> /dev/null
+$MYG < ../sql/olympiad_nobles.sql&> /dev/null
+$MYG < ../sql/pets.sql &> /dev/null
+$MYG < ../sql/pets_stats.sql &> /dev/null
+$MYG < ../sql/pledge_skill_trees.sql &> /dev/null
+$MYG < ../sql/posts.sql &> /dev/null
+$MYG < ../sql/quest_global_data.sql &> /dev/null
+$MYG < ../sql/npcskills.sql &> /dev/null
+$MYG < ../sql/raidboss_spawnlist.sql &> /dev/null
+$MYG < ../sql/random_spawn.sql &> /dev/null
+$MYG < ../sql/random_spawn_loc.sql &> /dev/null
+$MYG < ../sql/seven_signs.sql &> /dev/null
+$MYG < ../sql/seven_signs_festival.sql &> /dev/null
+$MYG < ../sql/seven_signs_status.sql &> /dev/null
+$MYG < ../sql/siege_clans.sql &> /dev/null
+$MYG < ../sql/skill_learn.sql &> /dev/null
+$MYG < ../sql/skill_spellbooks.sql &> /dev/null
+$MYG < ../sql/skill_trees.sql &> /dev/null
+$MYG < ../sql/spawnlist.sql &> /dev/null
+$MYG < ../sql/teleport.sql &> /dev/null
+$MYG < ../sql/topic.sql &> /dev/null
+$MYG < ../sql/transform_skill_trees.sql &> /dev/null
+$MYG < ../sql/walker_routes.sql &> /dev/null
+$MYG < ../sql/weapon.sql &> /dev/null
+$MYG < ../sql/zone_vertices.sql &> /dev/null
+newbie_helper
+}
+
+custom(){
+echo ""
+echo ""
+echo -ne "Install custom gameserver DB tables: (y) yes or (n) no or (q) quit?"
+read ASKCS
+case "$ASKCS" in
+	"y"|"Y") cstinstall;;
+	"n"|"N") finish;;
+	"q"|"Q") finish;;
+	*) custom;;
+esac
+finish
+}
+
+cstinstall(){
+while :
+  do
+   echo ""
+   echo -ne "Do you want to make another backup of GSDB before applying custom contents? (y/N): "
+   read LSB
+   if [ "$LSB" == "Y" -o "$LSB" == "y" ]; then
+     echo "Making a backup of the default gameserver tables."
+     $MYSQLDUMPPATH --add-drop-table -h $GSDBHOST -u $GSUSER --password=$GSPASS $GSDB > custom_backup.sql 2> /dev/null
+     if [ $? -ne 0 ];then
+     echo ""
+     echo "There was a problem accesing your GS database, server down?."
+     exit 1
+     fi
+     break
+   elif [ "$LSB" == "n" -o "$LSB" == "N" -o "$LSB" == "" ]; then 
+     break
+   fi
+  done 
+echo "Installing custom content."
+for custom in $(ls ../sql/custom/*.sql);do 
+$MYG < $custom &> /dev/null
+done
+# L2J mods that needed extra tables to work properly, should be 
+# listed here. To do so copy & paste the following 6 lines and
+# change them properly:
+# MOD: Wedding.
+  echo -ne "Install "Wedding Mod" tables? (y/N): "
+  read modprompt
+  if [ "$modprompt" == "Y" -o "$LSB" == "y" ]; then
+		$MYG < ../sql/mods/mods_wedding.sql &> /dev/null
+	fi
+
+finish
+}
+
+finish(){
+echo ""
+echo "Script execution finished."
+exit 0
+}
+
+newbie_helper(){
+while :
+  do
+   echo ""
+   echo -ne "If you're not that skilled applying changes within 'updates' folder, i can try to do it for you (y). If you wish to do it on your own, choose (n). Should i parse updates files? (Y/n)"
+   read NOB
+   if [ "$NOB" == "Y" -o "$NOB" == "y" -o "$NOB" == "" ]; then
+     echo ""
+     echo "There we go, it may take some time..."
+     echo "updates parser results. Last run: "`date` >database_installer.log
+     for file in $(ls ../sql/updates/*sql);do
+        echo $file|cut -d/ -f4 >> database_installer.log
+        $MYG < $file 2>> database_installer.log
+	if [ $? -eq 0 ];then
+	    echo "no errors">> database_installer.log
+	fi    
+	done
+     echo ""
+     echo "Log available at $(pwd)/database_installer.log"
+     echo ""
+     break
+   elif [ "$NOB" == "n" -o "$NOB" == "N" ]; then 
+     break
+   fi
+  done 
+}
+
+clear
+load_config $1
+MYL="$MYSQLPATH -h $LSDBHOST -u $LSUSER --password=$LSPASS -D $LSDB"
+MYG="$MYSQLPATH -h $GSDBHOST -u $GSUSER --password=$GSPASS -D $GSDB"
+lsbackup
 asklogin

+ 1 - 0
datapack_development/tools/full_install.sql

@@ -86,6 +86,7 @@ DROP TABLE IF EXISTS skill_trees;
 DROP TABLE IF EXISTS spawnlist;
 DROP TABLE IF EXISTS teleport;
 DROP TABLE IF EXISTS topic;
+DROP TABLE IF EXISTS transform_skill_trees;
 DROP TABLE IF EXISTS walker_routes;
 DROP TABLE IF EXISTS weapon;
 DROP TABLE IF EXISTS zone_vertices;