Просмотр исходного кода

BETA: Retail-like quests in Java.
* '''Bard's Mandolin''' (362)
* '''Sorrowful Sound of Flute''' (363)
* '''Jovial Accordion''' (364)

Adry_85 11 лет назад
Родитель
Сommit
5998aedd16
94 измененных файлов с 1085 добавлено и 322 удалено
  1. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_2.htm
  3. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_4.htm
  4. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_6.htm
  5. 0 74
      L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/__init__.py
  6. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30595_1.htm
  7. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_1.htm
  8. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_2.htm
  9. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_3.htm
  10. 0 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_4.htm
  11. 0 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_5.htm
  12. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30959_1.htm
  13. 0 74
      L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/__init__.py
  14. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-02.htm
  15. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-03.htm
  16. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30961-01.htm
  17. 0 91
      L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/__init__.py
  18. 1 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00116_BeyondTheHillsOfWinter/Q00116_BeyondTheHillsOfWinter.java
  19. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-01.html
  20. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-02.html
  21. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-03.html
  22. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30956-01.html
  23. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30956-02.html
  24. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-01.htm
  25. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-02.htm
  26. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-03.html
  27. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-04.html
  28. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-05.html
  29. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-06.html
  30. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-07.html
  31. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-08.html
  32. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30958-01.html
  33. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30958-02.html
  34. 198 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/Q00362_BardsMandolin.java
  35. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-01.html
  36. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-02.html
  37. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-03.html
  38. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-04.html
  39. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-01.html
  40. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-02.html
  41. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-03.html
  42. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-04.html
  43. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-01.html
  44. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-02.html
  45. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-03.html
  46. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-04.html
  47. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-01.html
  48. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-02.html
  49. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-03.html
  50. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-04.html
  51. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-01.html
  52. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-02.html
  53. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-03.html
  54. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-04.html
  55. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-01.htm
  56. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-02.htm
  57. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-03.htm
  58. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-04.html
  59. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-05.html
  60. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-06.html
  61. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-07.html
  62. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-08.html
  63. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-09.html
  64. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-10.html
  65. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-01.html
  66. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-02.html
  67. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-03.html
  68. 369 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/Q00363_SorrowfulSoundOfFlute.java
  69. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30060-01.html
  70. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30060-02.html
  71. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30075-01.html
  72. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30075-02.html
  73. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-01.html
  74. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-02.html
  75. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-03.html
  76. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-04.html
  77. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-05.html
  78. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-06.html
  79. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-07.html
  80. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-01.htm
  81. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-02.htm
  82. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-03.htm
  83. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-04.html
  84. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-05.html
  85. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-01.html
  86. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-02.html
  87. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-03.html
  88. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-04.html
  89. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-01.html
  90. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-02.html
  91. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-03.html
  92. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-04.html
  93. 295 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/Q00364_JovialAccordion.java
  94. 3 2
      L2J_DataPack_BETA/dist/sql/game/updates/20131215update.sql

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -498,9 +498,9 @@ quests/357_WarehouseKeepersAmbition/__init__.py
 quests/358_IllegitimateChildOfAGoddess/__init__.py
 quests/359_ForSleeplessDeadmen/__init__.py
 quests/Q00360_PlunderTheirSupplies/Q00360_PlunderTheirSupplies.java
-quests/362_BardsMandolin/__init__.py
-quests/363_SorrowfulSoundofFlute/__init__.py
-quests/364_JovialAccordion/__init__.py
+quests/Q00362_BardsMandolin/Q00362_BardsMandolin.java
+quests/Q00363_SorrowfulSoundOfFlute/Q00363_SorrowfulSoundOfFlute.java
+quests/Q00364_JovialAccordion/Q00364_JovialAccordion.java
 quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
 quests/366_SilverHairedShaman/__init__.py
 quests/367_ElectrifyingRecharge/__init__.py

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_2.htm

@@ -1,4 +0,0 @@
-<html><body>Bard Swan:<br>
-Oh, thank you so much! Actually, I have already ordered a flute for her from the<font color="LEVEL"> Trader Woodrow of Aden Castle Town</font>, an specialist in exotic musical instruments. Please check with him to see if the flute has arrived.<br>
-Mention my name and he will tell you the status of my order. Afterwards I will give you a musical score that is necessary to make an echo crystal.
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_4.htm

@@ -1,4 +0,0 @@
-<html><body>Bard Swan:<br>
-Did you deliver the flute and letter to Nanarin? What did she say? Please tell me!<br>
-<a action="bypass -h Quest 362_BardsMandolin 30957_5.htm">"She liked the flute but she doesn't like you."</a>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_6.htm

@@ -1,3 +0,0 @@
-<html><body>Bard Swan:<br>
-Please, take these items to Musician Nanarin! I must know what she says.
-</body></html>

+ 0 - 74
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/__init__.py

@@ -1,74 +0,0 @@
-# Bards Mandolin Written By MickyLee
-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 = "362_BardsMandolin"
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [4316, 4317]
-
- def onEvent (self,event,st) :
-    htmltext = event
-    if event == "30957_2.htm" :
-        st.set("cond","1")
-        st.setState(State.STARTED)
-        st.playSound("ItemSound.quest_accept")
-    elif event == "30957_5.htm" :
-        st.giveItems(57,10000)
-        st.giveItems(4410,1)
-        st.exitQuest(1)
-        st.playSound("ItemSound.quest_finish")
-    return htmltext
-
-
- def onTalk (self,npc,player):
-   htmltext = Quest.getNoQuestMsg(player)
-   st = player.getQuestState(qn)
-   if not st : return htmltext
-
-   npcId = npc.getId()
-   id = st.getState()
-   if npcId != 30957 and id != State.STARTED : return htmltext
-
-   if id == State.CREATED :
-     st.set("cond","0")
-   cond = st.getInt("cond")
-   if npcId == 30957 and cond == 0 :
-        htmltext = "30957_1.htm"
-   elif npcId == 30837 and cond == 1 :
-        st.set("cond","2")
-        htmltext = "30837_1.htm"
-   elif npcId == 30958 and cond == 2 :
-        st.set("cond","3")
-        st.giveItems(4316,1)
-        htmltext = "30958_1.htm"
-        st.playSound("ItemSound.quest_itemget")
-   elif npcId == 30957 and cond == 3 and st.getQuestItemsCount(4316) and not st.getQuestItemsCount(4317) :
-        st.set("cond","4")
-        st.giveItems(4317,1)
-        htmltext = "30957_3.htm"
-   elif npcId == 30957 and cond == 4 and st.getQuestItemsCount(4316) and st.getQuestItemsCount(4317) :
-        htmltext = "30957_6.htm"
-   elif npcId == 30956 and cond == 4 and st.getQuestItemsCount(4316) and st.getQuestItemsCount(4317) :
-        st.takeItems(4316,1)
-        st.takeItems(4317,1)
-        st.set("cond","5")
-        htmltext = "30956_1.htm"
-   elif npcId == 30957 and cond == 5 :
-        htmltext = "30957_4.htm"
-   return htmltext
-
-
-QUEST       = Quest(362,qn,"Bards Mandolin")
-
-QUEST.addStartNpc(30957)
-QUEST.addTalkId(30957)
-
-QUEST.addTalkId(30956)
-QUEST.addTalkId(30958)
-QUEST.addTalkId(30837)

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30595_1.htm

@@ -1,4 +0,0 @@
-<html><body>Opix:<br>
-Hmmm, I think that Barbado could really use a new flute. He's spoke many times of wanting a new one.<br>
-By the way who are you and why are you asking so many questions...
-</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_1.htm

@@ -1,6 +0,0 @@
-<html><body>Nanarin:<br>
-I'm not really sure I should tell you this but...<br>
-For the longest time I've had a romantic interest in Barbado.<br>
-My problem is that he never seems to notice me and I'm not really sure how I should approach him.<br>
-<a action="bypass -h Quest 363_SorrowfulSoundofFlute 1">"I will help you."</a>
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_2.htm

@@ -1,4 +0,0 @@
-<html><body>Nanarin:<br>
-Oh my please don't tell Barbado. I wish to tell him myself.<br>
-Don't go directly to Barbado but please visit his friend Blacksmith Opix and ask him some question for me. If you do this favor for me I'll reward you with some sheet music needed to create echo crystals. Please hurry!
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_3.htm

@@ -1,3 +0,0 @@
-<html><body>Nanarin:<br>
-So Opix says that Barbado would like to have a new flute. Well then please take this one to Barbado and give it to him but please don't tell him who its from.
-</body></html>

+ 0 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_4.htm

@@ -1,5 +0,0 @@
-<html><body>Nanarin:<br>
-He loved it and wants to know who its from? I should go speak with him and confess my love to him.<br>
-I know this isnt much but its what I promised you. Thank you again kind stranger!<br>
-<a action="bypass -h Quest 363_SorrowfulSoundofFlute 5">"Thank you and youre welcome"</a>
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30956_5.htm

@@ -1,2 +0,0 @@
-<html><body>Quest Complete
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/30959_1.htm

@@ -1,4 +0,0 @@
-<html><body>Barbado:<br>
-Oh my is that what I think it is? It sure is! How did you know I wanted a new flute and who is this fine gift from?<br>
-You can't tell me? A secret admirer? I really wonder who this is from...
-</body></html>

+ 0 - 74
L2J_DataPack_BETA/dist/game/data/scripts/quests/363_SorrowfulSoundofFlute/__init__.py

@@ -1,74 +0,0 @@
-# Jovial Accordian Written By Elektra
-# Fixed by mr
-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 = "363_SorrowfulSoundofFlute"
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [4319]
-
- def onEvent (self,event,st) :
-    htmltext = event
-    if event == "1" :
-        st.set("cond","1")
-        st.setState(State.STARTED)
-        st.playSound("ItemSound.quest_accept")
-        htmltext = "30956_2.htm"
-    elif event == "5" :
-        st.giveItems(4420,1)
-        st.playSound("ItemSound.quest_finish")
-        st.exitQuest(1)
-        htmltext = "30956_5.htm"
-    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()
-   if npcId != 30956 and id != State.STARTED : return htmltext
-
-   if id == State.CREATED :
-     st.set("cond","0")
-   if npcId == 30956 and st.getInt("cond") == 0 :
-        htmltext = "30956_1.htm"
-   elif npcId == 30956 and st.getInt("cond") == 1 :
-        htmltext = "<html><body>Find Blacksmith Opix..</body></html>"
-   elif npcId == 30595 and st.getInt("cond") == 1 :
-        st.set("cond","2")
-        htmltext = "30595_1.htm"
-   elif npcId == 30595 and st.getInt("cond") > 1 :
-        htmltext = "<html><body>Go back to Nanarin..</body></html>"
-   elif npcId == 30956 and st.getInt("cond") == 2 :
-        st.giveItems(4319,1)
-        st.set("cond","3")
-        htmltext = "30956_3.htm"
-   elif npcId == 30956 and st.getInt("cond") == 3 :
-        htmltext = "<html><body>Find Barbado..</body></html>"
-   elif npcId == 30959 and st.getInt("cond") == 3 :
-        st.takeItems(4319,1)
-        st.set("cond","4")
-        htmltext = "30959_1.htm"
-   elif npcId == 30959 and st.getInt("cond") == 4 :
-        htmltext = "<html><body>Go back to Nanarin..</body></html>"
-   elif npcId == 30956 and st.getInt("cond") == 4 :
-        htmltext = "30956_4.htm"
-   return htmltext
-
-
-QUEST       = Quest(363,qn,"Sorrowful Sounds of Flute")
-
-QUEST.addStartNpc(30956)
-QUEST.addTalkId(30956)
-
-QUEST.addTalkId(30595)
-QUEST.addTalkId(30959)

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-02.htm

@@ -1,4 +0,0 @@
-<html><body>Bard Swan:<br>
-Please get some black beer from Chef Jonas and take it to Trader Sabrin. Jonas keeps his beer in a<font color="LEVEL"> beer chest</font> and stores it in a warehouse... He becomes quite cross when asked for favors, so it would be best if you handle this without talking to him.<br>
-Also, go to the grocery store in the village and find a<font color="LEVEL"> clothes chest</font>. You will find it near Accessory Merchant Sonia. Take the contents of that chest to<font color="LEVEL"> Guard Xaber</font>. Here are the keys to the two chests. Good luck!
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-03.htm

@@ -1,3 +0,0 @@
-<html><body>Bard Swan:<br>
-Is this too complicated for you? Would you like for me to explain it again? Take the black beer from Jonas'<font color="LEVEL"> beer chest</font> located in the warehouse and take it to<font color="LEVEL"> Trader Sabrin</font>. Then go to the grocery store and take Sonia's event clothes from the<font color="LEVEL"> clothes chest </font> and take them to<font color="LEVEL"> Guard Xaber</font>.
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30961-01.htm

@@ -1,4 +0,0 @@
-<html><body>Clothes Chest:<br>
-This chest contains the clothing of Accessory Merchant Sonia.<br>
-<a action="bypass -h Quest 364_JovialAccordion 30961-03.htm">Open the chest.</a>
-</body></html>

+ 0 - 91
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/__init__.py

@@ -1,91 +0,0 @@
-# Made by Mr. Have fun! Version 0.2
-# fixed by Elektra and Rolarga Version 0.3
-# fixed by Mr and Drlecter
-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 = "364_JovialAccordion"
-
-KEY_1 = 4323
-KEY_2 = 4324
-BEER = 4321
-ECHO = 4421
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [KEY_1, KEY_2, BEER]
-
- def onEvent (self,event,st) :
-    htmltext = event
-    if event == "30959-02.htm" :
-        st.set("cond","1")
-        st.setState(State.STARTED)
-        st.playSound("ItemSound.quest_accept")
-    elif event == "30957-02.htm" :
-        st.set("cond","2")
-        st.giveItems(KEY_1,1)
-        st.giveItems(KEY_2,1)
-    elif event == "30961-03.htm" :
-      if st.getQuestItemsCount(KEY_1) :
-        st.takeItems(KEY_1,1)
-        htmltext = "30961-02.htm"
-    elif event == "30960-03.htm" :
-      if st.getQuestItemsCount(KEY_2) :
-        st.takeItems(KEY_2,1)
-        st.giveItems(BEER,1)
-        htmltext = "30960-02.htm"
-    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()
-   if npcId != 30959 and id != State.STARTED : return htmltext
-
-   if id == State.CREATED :
-     st.set("cond","0")
-     st.set("ok","0")
-   cond=st.getInt("cond")
-   if npcId == 30959 :
-     if cond == 0 :
-        htmltext = "30959-01.htm"
-     elif cond == 3 :
-        st.playSound("ItemSound.quest_finish")
-        st.giveItems(ECHO,1)
-        st.exitQuest(1)
-        htmltext = "30959-03.htm"
-     elif cond >= 1 :
-        htmltext = "30959-02.htm"
-   elif npcId == 30957 :
-     if cond == 1 :
-        htmltext = "30957-01.htm"
-     elif cond == 2 and not st.getQuestItemsCount(KEY_1) and st.getInt("ok"):
-        st.set("cond","3")
-        htmltext = "30957-04.htm"
-     elif cond == 3 :
-        htmltext = "30957-05.htm"
-     elif cond == 2 :
-        htmltext = "30957-03.htm"
-   elif npcId == 30960 and cond :
-        htmltext = "30960-01.htm"
-   elif npcId == 30961 and cond :
-        htmltext = "30961-01.htm"
-   elif npcId == 30060 and st.getQuestItemsCount(BEER) :
-        st.set("ok","1")
-        st.takeItems(BEER,1)
-        htmltext = "30060-01.htm"
-   return htmltext
-
-QUEST       = Quest(364,qn,"Ask What You Need to Do")
-
-QUEST.addStartNpc(30959)
-
-for npcId in [30959,30957,30060,30961,30960]:
-  QUEST.addTalkId(npcId)

+ 1 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00116_BeyondTheHillsOfWinter/Q00116_BeyondTheHillsOfWinter.java

@@ -119,13 +119,8 @@ public final class Q00116_BeyondTheHillsOfWinter extends Quest
 	@Override
 	public String onTalk(L2Npc npc, L2PcInstance player)
 	{
-		QuestState st = getQuestState(player, true);
+		final QuestState st = getQuestState(player, true);
 		String htmltext = getNoQuestMsg(player);
-		if (st == null)
-		{
-			return htmltext;
-		}
-		
 		switch (st.getState())
 		{
 			case State.COMPLETED:

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30837_1.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-01.html

@@ -1,4 +1,4 @@
 <html><body>Trader Woodrow:<br>
-Ah, you mean the flute that Swan ordered? It must have arrived at<font color="LEVEL"> Giran Harbor</font> by now...<br>
-If you're in a hurry, you can go directly to the harbor and pick it up. I'll give you the item number so you can pick it up from<font color="LEVEL"> Gallion</font> at the harbor.
-</body></html>
+Ah, you mean the flute that Swan ordered? It must have arrived at <font color="LEVEL">Giran Harbor</font> by now...<br>
+If you're in a hurry, you can go directly to the harbor and pick it up. I'll give you the item number so you can pick it up from <font color="LEVEL">Gallion</font> at the harbor.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-02.html

@@ -0,0 +1,3 @@
+<html><body>Trader Woodrow:<br>
+Didn't you say that you desperately need the flute? It will take a long time for it to be shipped here. Why don't you go directly to <font color="LEVEL">Giran Harbor</font> and pick it up? Give the item number I gave you to <font color="LEVEL">Gallion</font> at the harbor.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30837-03.html

@@ -0,0 +1,3 @@
+<html><body>Trader Woodrow:<br>
+So, we meet again! Please give my regards to Mr. Swan.
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30956_1.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30956-01.html

@@ -1,4 +1,4 @@
 <html><body>Musician Nanarin:<br>
-What, another package from<font color="LEVEL"> Bard Swan</font>? Oh, my, this is especially beautiful!<br>
+What, another package from <font color="LEVEL">Bard Swan</font>? Oh, my, this is especially beautiful!<br>
 Hey, you aren't waiting around for a reply, are you? I appreciate all the flutes, but the Bard really isn't my type! Please tell him that my knight in shining armor is someone else!
-</body></html>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30956-02.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+What am I to do about Bard Swan? I don't want to hurt his feelings but I am not attracted to him at all!
+</body></html>

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_1.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-01.htm

@@ -1,6 +1,6 @@
 <html><body>Bard Swan:<br>
-I am uncomfortable talking about my feelings, but she is so beautiful and pure... She is the perfect woman! No... she is a goddess! If only I could tell her of my feelings...<br>
+I am uncomfortable talking about my feelings, but she is so beautiful and pure... She is the perfect woman! No... she is a goddess! If only I could tell her of my feelings... <br>
 Her flute playing is sublime! She is renowned, even among the musicians of her own race, for her incredible talent. A while back I sent her a gift, a flute made of horn, but I haven't gotten any word back from her...<br>
 Please help me! I feel like I'm losing my mind!<br>
-<a action="bypass -h Quest 362_BardsMandolin 30957_2.htm">"I will help you."</a>
-</body></html>
+<a action="bypass -h Quest Q00362_BardsMandolin 30957-02.htm">"I will help you."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-02.htm

@@ -0,0 +1,4 @@
+<html><body>Bard Swan:<br>
+Oh, thank you so much! Actually, I have already ordered a flute for her from <font color="LEVEL">Trader Woodrow of the Town of Aden</font>, a specialist in exotic musical instruments. Please check with him to see if the flute has arrived.<br>
+Mention my name and he will tell you the status of my order. Afterwards I will give you a musical score that is necessary to make an Echo Crystal.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-03.html

@@ -0,0 +1,4 @@
+<html><body>Bard Swan:<br>
+I am uncomfortable talking about my feelings, but she is so beautiful and pure... She is the perfect woman! No... she is a goddess! You are not worthy to even speak her name!<br>
+(This quest may only be undertaken by a character of level 15 or above.)
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-04.html

@@ -0,0 +1,3 @@
+<html><body>Bard Swan:<br>
+My goddess... Oh, my dear goddess... I pray the flute makes her happy... What are you still doing here? Go and see <font color="LEVEL">Trader Woodrow of the Town of Aden</font> and find out whether the flute I ordered has arrived.
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_3.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-05.html

@@ -1,3 +1,3 @@
 <html><body>Bard Swan:<br>
-Oh, thank you! The flute is beautiful! Surely this will please my beloved<font color="LEVEL"> Nanarin</font>. Would you perhaps be willing to take the flute to her, along with my letter? Please say that you will do this one last thing for me.
-</body></html>
+Oh, thank you! The flute is beautiful! Surely this will please my beloved <font color="LEVEL">Nanarin</font>. Would you perhaps be willing to take the flute to her, along with my letter? Please say that you will do this one last thing for me.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-06.html

@@ -0,0 +1,5 @@
+<html><body>Bard Swan:<br>
+Did you deliver the flute and letter to Nanarin? What did she say? Please tell me!<br>
+<a action="bypass -h Quest Q00362_BardsMandolin 30957-07.html">"I think she likes you."</a><br>
+<a action="bypass -h Quest Q00362_BardsMandolin 30957-08.html">"She liked the flute but she doesn't like you."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-07.html

@@ -0,0 +1,4 @@
+<html><body>Bard Swan:<br>
+Oh, I knew it would work! Now, if I can only convince her of my devotion to her...<br>
+I am greatly indebted to you! Unfortunately, I have spent most of my money on the flute... I've managed to scrape together a bit of money for you. Take it, along with this musical score I composed myself.
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30957_5.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30957-08.html

@@ -2,4 +2,4 @@
 Oh, I wish I was dead!<br>
 Perhaps it was the wrong gift. I must have not been trying hard enough. I shall never give up! Somehow I will win the heart of my beloved!<br>
 Take this as a token of my gratitude for all your help.
-</body></html>
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/362_BardsMandolin/30958_1.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30958-01.html

@@ -1,4 +1,4 @@
-<html><body>Gallion:<br>
+<html><body>Galion:<br>
 A flute? Wait a moment, let me check...<br>
 Ah, yes, here it is! A flute made of horn, imported from Avella. It's quite expensive but has an exquisite tone!
-</body></html>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/30958-02.html

@@ -0,0 +1,3 @@
+<html><body>Galion:<br>
+How is my old friend Trader Woodrow? I feel I know him well although we have only spoken by letter...
+</body></html>

+ 198 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00362_BardsMandolin/Q00362_BardsMandolin.java

@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00362_BardsMandolin;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Bard's Mandolin (362)
+ * @author Adry_85
+ */
+public final class Q00362_BardsMandolin extends Quest
+{
+	// NPCs
+	private static final int WOODROW = 30837;
+	private static final int NANARIN = 30956;
+	private static final int SWAN = 30957;
+	private static final int GALION = 30958;
+	// Items
+	private static final int SWANS_FLUTE = 4316;
+	private static final int SWANS_LETTER = 4317;
+	private static final int THEME_OF_JOURNEY = 4410;
+	// Misc
+	private static final int MIN_LEVEL = 15;
+	
+	private Q00362_BardsMandolin()
+	{
+		super(362, Q00362_BardsMandolin.class.getSimpleName(), "Bard's Mandolin");
+		addStartNpc(SWAN);
+		addTalkId(SWAN, GALION, WOODROW, NANARIN);
+		registerQuestItems(SWANS_FLUTE, SWANS_LETTER);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, false);
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		switch (event)
+		{
+			case "30957-02.htm":
+			{
+				st.startQuest();
+				st.setMemoState(1);
+				htmltext = event;
+				break;
+			}
+			case "30957-07.html":
+			case "30957-08.html":
+			{
+				if (st.isMemoState(5))
+				{
+					st.giveAdena(10000, true);
+					st.rewardItems(THEME_OF_JOURNEY, 1);
+					st.exitQuest(true, true);
+					htmltext = event;
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				if (npc.getId() == SWAN)
+				{
+					htmltext = (player.getLevel() >= MIN_LEVEL) ? "30957-01.htm" : "30957-03.html";
+				}
+				break;
+			}
+			case State.STARTED:
+			{
+				switch (npc.getId())
+				{
+					case SWAN:
+					{
+						switch (st.getMemoState())
+						{
+							case 1:
+							case 2:
+							{
+								htmltext = "30957-04.html";
+								break;
+							}
+							case 3:
+							{
+								st.setCond(4, true);
+								st.setMemoState(4);
+								st.giveItems(SWANS_LETTER, 1);
+								htmltext = "30957-05.html";
+								break;
+							}
+							case 4:
+							{
+								htmltext = "30957-05.html";
+								break;
+							}
+							case 5:
+							{
+								htmltext = "30957-06.html";
+								break;
+							}
+						}
+						break;
+					}
+					case GALION:
+					{
+						if (st.isMemoState(2))
+						{
+							st.setMemoState(3);
+							st.setCond(3, true);
+							st.giveItems(SWANS_FLUTE, 1);
+							htmltext = "30958-01.html";
+						}
+						else if (st.getMemoState() >= 3)
+						{
+							htmltext = "30958-02.html";
+						}
+						break;
+					}
+					case WOODROW:
+					{
+						if (st.isMemoState(1))
+						{
+							st.setMemoState(2);
+							st.setCond(2, true);
+							htmltext = "30837-01.html";
+						}
+						else if (st.isMemoState(2))
+						{
+							htmltext = "30837-02.html";
+						}
+						else if (st.getMemoState() >= 3)
+						{
+							htmltext = "30837-03.html";
+						}
+						break;
+					}
+					case NANARIN:
+					{
+						if (st.isMemoState(4) && st.hasQuestItems(SWANS_FLUTE, SWANS_LETTER))
+						{
+							st.setMemoState(5);
+							st.setCond(5, true);
+							st.takeItems(SWANS_FLUTE, -1);
+							st.takeItems(SWANS_LETTER, -1);
+							htmltext = "30956-01.html";
+						}
+						else if (st.getMemoState() >= 5)
+						{
+							htmltext = "30956-02.html";
+						}
+						break;
+					}
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	public static void main(String args[])
+	{
+		new Q00362_BardsMandolin();
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-01.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Freightman Aldo:<br>
+Well, a while back he mentioned he didn't have anything to wear to an event... Maybe he would like a new outfit!<br>
+By the way, how do you know Barbado?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-02.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Freightman Aldo:<br>
+Well, Barbado has a fondness for music... He is quite an accordionist... He once mentioned that he wanted to learn another instrument... I believe it was the flute...<br>
+By the way, who are you? How do you know Barbado?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-03.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Freightman Aldo:<br>
+Ah, Barbado... Yes, he does enjoy a nice cold black beer after he finishes playing his music...<br>
+By the way, who are you? What is your relationship to Barbado?
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30057-04.html

@@ -0,0 +1,3 @@
+<html><body>Warehouse Freightman Aldo:<br>
+I am Aldo. What is your name?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-01.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Keeper Holvas:<br>
+What would Barbado like?<br>
+Well, recently he was complaining about not having anything to wear to an event... Maybe he would like a new outfit!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-02.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Keeper Holvas:<br>
+Hmmm, what would Barbado like to have?<br>
+Well, he is a musician and has expressed an interest in learning to play a new instrument... Yes, I believe he mentioned that he wanted to learn to play the flute!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-03.html

@@ -0,0 +1,3 @@
+<html><body>Warehouse Keeper Holvas:<br>
+I think Barbado would be happiest with a cold black beer after one of his musical performances!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30058-04.html

@@ -0,0 +1,3 @@
+<html><body>Warehouse Keeper Holvas:<br>
+You know, come to think of it, a beer sounds pretty good to me, too! If you have the time, could you bring me one? 
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-01.html

@@ -0,0 +1,4 @@
+<html><body>Blacksmith Poitan:<br>
+Oh, Barbado. What would he want?<br>
+Oh, I know! He mentioned recently that he didn't have anything to wear to a special event? Burp! Perhaps what he needs is a new outfit!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-02.html

@@ -0,0 +1,4 @@
+<html><body>Blacksmith Poitan:<br>
+Oh, Barbado. What would he want?<br>
+Oh, I know! He mentioned recently that he wanted to learn a new instrument! Burp! Perhaps what he wants is a flute!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-03.html

@@ -0,0 +1,4 @@
+<html><body>Blacksmith Poitan:<br>
+Oh, Barbado. What would he want?<br>
+Oh, I know! He likes nothing better than a cold glass of black beer after a performance!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30458-04.html

@@ -0,0 +1,4 @@
+<html><body>Blacksmith Poitan:<br>
+Ha ha ha.... <br>
+I can't stop laughing! Ha ha ha...
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-01.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Chief Ranspo:<br>
+What would Barbado want?<br>
+Well, he did mention something about needing a new set of clothes!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-02.html

@@ -0,0 +1,4 @@
+<html><body>Warehouse Chief Ranspo:<br>
+What does Barbado want?<br>
+Who knows? Well, he did say something once about wanting to pick up a new instrument... A flute, I think it was...
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-03.html

@@ -0,0 +1,3 @@
+<html><body>Warehouse Chief Ranspo:<br>
+What would Barbado like? Well, I don't know about him, but I could use a cold, black beer!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30594-04.html

@@ -0,0 +1,3 @@
+<html><body>Warehouse Chief Ranspo:<br>
+I have no ear for music whatsoever!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-01.html

@@ -0,0 +1,4 @@
+<html><body>Head Blacksmith Opix:<br>
+What would Barbado like?<br>
+Well, I did hear him mention not too long ago that he wished he had something nice to wear to an event. Perhaps he would like a new outfit?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-02.html

@@ -0,0 +1,4 @@
+<html><body>Head Blacksmith Opix:<br>
+What would Barbado like?<br>
+Well, he is a musician. I have often heard him say that he would like to learn a new instrument... What was it? Ah, yes! It was a flute!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-03.html

@@ -0,0 +1,4 @@
+<html><body>Head Blacksmith Opix:<br>
+What would Barbado like to have?<br>
+I happen to know that his favorite thing in the whole world is a cold black beer after one of his musical performances.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30595-04.html

@@ -0,0 +1,3 @@
+<html><body>Head Blacksmith Opix:<br>
+I'm extremely busy. Please stop bothering me.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-01.htm

@@ -0,0 +1,5 @@
+<html><body>Musician Nanarin:<br>
+I must admit that his broad shoulders take my breath away, and that lovely beard of his has captured my soul...<br>
+What can I do? I've never felt this way before... Could you please help me?<br>
+<a action="bypass -h Quest Q00363_SorrowfulSoundOfFlute START">"I will help you."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-02.htm

@@ -0,0 +1,4 @@
+<html><body>Musician Nanarin:<br>
+Could you perhaps find out what would make him happy? I love Barbado... Please ask his friends what he wants the most. Start with the Dwarves in this village, and don't you dare mention my name!<br>
+Will you please do this for me?
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-03.htm

@@ -0,0 +1,4 @@
+<html><body>Musician Nanarin:<br>
+You know, come to think of it, I don't think that you are the right person for this job.<br>
+(This quest can only be undertaken by a character of level 15 or higher.)
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-04.html

@@ -0,0 +1,6 @@
+<html><body>Musician Nanarin:<br>
+So? What does Barbado want?<br>
+<a action="bypass -h Quest Q00363_SorrowfulSoundOfFlute 30956-05.html">"He wants a new outfit."</a><br>
+<a action="bypass -h Quest Q00363_SorrowfulSoundOfFlute 30956-06.html">"He would like to have a flute."</a><br>
+<a action="bypass -h Quest Q00363_SorrowfulSoundOfFlute 30956-07.html">"He would like a black beer."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-05.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+Splendid! Please take him these clothes. If he asks, tell him they are from his secret admirer.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-06.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+Oh, marvelous! Please take him this flute. If he asks you who sent it, just say that it is from his secret admirer.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-07.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+Oh, great! Please take him this black beer. If he asks who sent it, tell him it is from his secret admirer.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-08.html

@@ -0,0 +1,4 @@
+<html><body>Musician Nanarin:<br>
+Oh, my sweet Barbado...<br>
+How I pray that my gift will make him happy...
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-09.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+Oh, yes, no need to tell me. I've already heard. Take this as a token of my appreciation. It's a score of some music that I enjoy playing on my flute. Take it to a <font color="LEVEL">Melody Maestro </font> and she will make an Echo Crystal for you.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30956-10.html

@@ -0,0 +1,3 @@
+<html><body>Musician Nanarin:<br>
+What a loser! I was a fool to trust you with such an important errand! Why are you standing there with your mouth hanging open? Get out of my sight, right now!!!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-01.html

@@ -0,0 +1,3 @@
+<html><body>Musician Barbado:<br>
+Just what I've always wanted! I wish I knew who sent me this! Whoever it is must know me well.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-02.html

@@ -0,0 +1,4 @@
+<html><body>Musician Barbado:<br>
+Thanks anyway, but I don't have any use for that.<br>
+If that is all, would you excuse me, please? I must practice my music. 
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/30959-03.html

@@ -0,0 +1,3 @@
+<html><body>Musician Barbado:<br>
+I am practicing my music. Please don't disturb me.
+</body></html>

+ 369 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00363_SorrowfulSoundOfFlute/Q00363_SorrowfulSoundOfFlute.java

@@ -0,0 +1,369 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00363_SorrowfulSoundOfFlute;
+
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Sorrowful Sound of Flute (363)
+ * @author Adry_85
+ */
+public final class Q00363_SorrowfulSoundOfFlute extends Quest
+{
+	// NPCs
+	private static final int ALDO = 30057;
+	private static final int HOLVAS = 30058;
+	private static final int POITAN = 30458;
+	private static final int RANSPO = 30594;
+	private static final int OPIX = 30595;
+	private static final int NANARIN = 30956;
+	private static final int BARBADO = 30959;
+	// Items
+	private static final int EVENT_CLOTHES = 4318;
+	private static final int NANARINS_FLUTE = 4319;
+	private static final int SABRINS_BLACK_BEER = 4320;
+	private static final int THEME_OF_SOLITUDE = 4420;
+	// Misc
+	private static final int MIN_LEVEL = 15;
+	
+	private Q00363_SorrowfulSoundOfFlute()
+	{
+		super(363, Q00363_SorrowfulSoundOfFlute.class.getSimpleName(), "Sorrowful Sound of Flute");
+		addStartNpc(NANARIN);
+		addTalkId(NANARIN, POITAN, RANSPO, ALDO, HOLVAS, OPIX, BARBADO);
+		registerQuestItems(EVENT_CLOTHES, NANARINS_FLUTE, SABRINS_BLACK_BEER);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, false);
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		switch (event)
+		{
+			case "START":
+			{
+				if (player.getLevel() >= MIN_LEVEL)
+				{
+					st.startQuest();
+					st.setMemoState(2);
+					htmltext = "30956-02.htm";
+				}
+				else
+				{
+					htmltext = "30956-03.htm";
+				}
+				break;
+			}
+			case "30956-05.html":
+			{
+				st.giveItems(EVENT_CLOTHES, 1);
+				st.setMemoState(4);
+				st.setCond(3, true);
+				htmltext = event;
+				break;
+			}
+			case "30956-06.html":
+			{
+				st.giveItems(NANARINS_FLUTE, 1);
+				st.setMemoState(4);
+				st.setCond(3, true);
+				htmltext = event;
+				break;
+			}
+			case "30956-07.html":
+			{
+				st.giveItems(SABRINS_BLACK_BEER, 1);
+				st.setMemoState(4);
+				st.setCond(3, true);
+				htmltext = event;
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				if (npc.getId() == NANARIN)
+				{
+					htmltext = "30956-01.htm";
+				}
+				break;
+			}
+			case State.STARTED:
+			{
+				switch (npc.getId())
+				{
+					case NANARIN:
+					{
+						switch (st.getMemoState())
+						{
+							case 2:
+							{
+								htmltext = "30956-04.html";
+								break;
+							}
+							case 4:
+							{
+								htmltext = "30956-08.html";
+								break;
+							}
+							case 5:
+							{
+								st.rewardItems(THEME_OF_SOLITUDE, 1);
+								st.exitQuest(true, true);
+								htmltext = "30956-09.html";
+								break;
+							}
+							case 6:
+							{
+								st.exitQuest(true, false);
+								st.playSound(QuestSound.ITEMSOUND_QUEST_GIVEUP);
+								htmltext = "30956-10.html";
+								break;
+							}
+						}
+						break;
+					}
+					case POITAN:
+					{
+						if (st.isMemoState(2) && ((st.getInt("ex") % 100) < 10))
+						{
+							int ex = st.getInt("ex");
+							st.set("ex", ex + 11);
+							switch (getRandom(3))
+							{
+								case 0:
+								{
+									htmltext = "30458-01.html";
+									break;
+								}
+								case 1:
+								{
+									htmltext = "30458-02.html";
+									break;
+								}
+								case 2:
+								{
+									htmltext = "30458-03.html";
+									break;
+								}
+							}
+							st.setCond(2, true);
+						}
+						else if ((st.getMemoState() >= 2) && ((st.getInt("ex") % 100) >= 10))
+						{
+							htmltext = "30458-04.html";
+						}
+						break;
+					}
+					case RANSPO:
+					{
+						if (st.isMemoState(2) && ((st.getInt("ex") % 10000) < 1000))
+						{
+							int ex = st.getInt("ex");
+							st.set("ex", ex + 1001);
+							switch (getRandom(3))
+							{
+								case 0:
+								{
+									htmltext = "30594-01.html";
+									break;
+								}
+								case 1:
+								{
+									htmltext = "30594-02.html";
+									break;
+								}
+								case 2:
+								{
+									htmltext = "30594-03.html";
+									break;
+								}
+							}
+							st.setCond(2, true);
+						}
+						else if ((st.getMemoState() >= 2) && ((st.getInt("ex") % 10000) >= 1000))
+						{
+							htmltext = "30594-04.html";
+						}
+						break;
+					}
+					case ALDO:
+					{
+						if (st.isMemoState(2) && ((st.getInt("ex") % 100000) < 10000))
+						{
+							int ex = st.getInt("ex");
+							st.set("ex", ex + 10001);
+							switch (getRandom(3))
+							{
+								case 0:
+								{
+									htmltext = "30057-01.html";
+									break;
+								}
+								case 1:
+								{
+									htmltext = "30057-02.html";
+									break;
+								}
+								case 2:
+								{
+									htmltext = "30057-03.html";
+									break;
+								}
+							}
+							st.setCond(2, true);
+						}
+						else if ((st.getMemoState() >= 2) && ((st.getInt("ex") % 100000) >= 10000))
+						{
+							htmltext = "30057-04.html";
+						}
+						break;
+					}
+					case HOLVAS:
+					{
+						if (st.isMemoState(2) && ((st.getInt("ex") % 1000) < 100))
+						{
+							int ex = st.getInt("ex");
+							st.set("ex", ex + 101);
+							switch (getRandom(3))
+							{
+								case 0:
+								{
+									htmltext = "30058-01.html";
+									break;
+								}
+								case 1:
+								{
+									htmltext = "30058-02.html";
+									break;
+								}
+								case 2:
+								{
+									htmltext = "30058-03.html";
+									break;
+								}
+							}
+							st.setCond(2, true);
+						}
+						else if ((st.getMemoState() >= 2) && ((st.getInt("ex") % 1000) >= 100))
+						{
+							htmltext = "30058-04.html";
+						}
+						break;
+					}
+					case OPIX:
+					{
+						if (st.isMemoState(2) && (st.getInt("ex") < 100000))
+						{
+							int ex = st.getInt("ex");
+							st.set("ex", ex + 100001);
+							switch (getRandom(3))
+							{
+								case 0:
+								{
+									htmltext = "30595-01.html";
+									break;
+								}
+								case 1:
+								{
+									htmltext = "30595-02.html";
+									break;
+								}
+								case 2:
+								{
+									htmltext = "30595-03.html";
+									break;
+								}
+							}
+							st.setCond(2, true);
+						}
+						else if ((st.getMemoState() >= 2) && (st.getInt("ex") >= 100000))
+						{
+							htmltext = "30595-04.html";
+						}
+						break;
+					}
+					case BARBADO:
+					{
+						if (st.isMemoState(4))
+						{
+							int ex = (st.getInt("ex") % 10) * 20;
+							if (getRandom(100) < ex)
+							{
+								if (st.hasQuestItems(EVENT_CLOTHES))
+								{
+									st.takeItems(EVENT_CLOTHES, -1);
+								}
+								else if (st.hasQuestItems(NANARINS_FLUTE))
+								{
+									st.takeItems(NANARINS_FLUTE, -1);
+								}
+								else if (st.hasQuestItems(SABRINS_BLACK_BEER))
+								{
+									st.takeItems(SABRINS_BLACK_BEER, -1);
+								}
+								st.setMemoState(5);
+								st.setCond(4, true);
+								htmltext = "30959-01.html";
+							}
+							else
+							{
+								st.setMemoState(6);
+								st.setCond(4, true);
+								htmltext = "30959-02.html";
+							}
+						}
+						else if (st.getMemoState() >= 5)
+						{
+							htmltext = "30959-03.html";
+						}
+						break;
+					}
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	public static void main(String args[])
+	{
+		new Q00363_SorrowfulSoundOfFlute();
+	}
+}

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30060-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30060-01.html


+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30060-02.html

@@ -0,0 +1,3 @@
+<html><body>Trader Sabrin:<br>
+You know, it would be much less trouble if we just stole the recipe for making black beer from Jonas...
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30075-01.html

@@ -0,0 +1,3 @@
+<html><body>Guard Xaber:<br>
+I received the item. Please tell Swan that I will send someone to him tomorrow.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30075-02.html

@@ -0,0 +1,3 @@
+<html><body>Guard Xaber:<br>
+Needless to say, the best kind of business is one that doesn't need any start-up capital!
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-01.html

@@ -2,5 +2,5 @@
 Barbado wants to play a duet with me? Hmmm, I don't know, my beloved seems to actually be attracted to that hairy ape!<br>
 I am practically broke from buying gifts for Nanarin.<br>
 Well, if you'll run an errand for me, I'll play a duet with Barbado. What do you say?<br>
-<a action="bypass -h Quest 364_JovialAccordion 30957-02.htm">"I will run an errand for you."</a>
+<a action="bypass -h Quest Q00364_JovialAccordion 30957-02.html">"I will run an errand for you."</a>
 </body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-02.html

@@ -0,0 +1,4 @@
+<html><body>Bard Swan:<br>
+Please get some black beer from Chef Jonas and take it to Trader Sabrin. Jonas keeps his beer in a <font color="LEVEL">beer chest</font> and stores it in a warehouse... He becomes quite cross when asked for favors, so it would be best if you handled this without talking to him.<br>
+Also, go to the grocery store in the village and find a <font color="LEVEL">clothes chest</font>. You will find it near Trader Sonia. Take the contents of that chest to <font color="LEVEL">Guard Xaber</font>. Here are the keys to the two chests. Good luck!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-03.html

@@ -0,0 +1,3 @@
+<html><body>Bard Swan:<br>
+Is this too complicated for you? Would you like for me to explain it again? Take the black beer from Jonas' <font color="LEVEL">beer chest</font> located in the warehouse and take it to <font color="LEVEL">Trader Sabrin</font>. Then go to the grocery store and take Sonia's Event Clothes from the <font color="LEVEL">clothes chest </font> and take them to <font color="LEVEL">Guard Xaber</font>.
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-04.html


+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-05.html

@@ -0,0 +1,4 @@
+<html><body>Bard Swan:<br>
+Good job! As I promised, I will <font color="LEVEL">play a duet </font>. But let him know, I only intend to do this once!<br>
+Here is your reward for running my errand.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-06.html

@@ -0,0 +1,3 @@
+<html><body>Bard Swan:<br>
+How could you have failed so easy a task? I shall never play a duet with Barbado!
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30957-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30957-07.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30959-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-01.htm

@@ -1,5 +1,5 @@
 <html><body>Musician Barbado:<br>
 Some time ago, I heard Bard Swan playing his mandolin. His skills are quite impressive. I wish he would play a duet with me, but for some reason, whenever he sees me he avoids me...<br>
 I hate to ask you to do this, but would you go see Swan and tell him that I want to play a duet with him? Of course you will be rewarded for your effort.<br>
-<a action="bypass -h Quest 364_JovialAccordion 30959-02.htm">"I will help you."</a> 
+<a action="bypass -h Quest Q00364_JovialAccordion START">"I will help you."</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30959-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-02.htm

@@ -1,3 +1,3 @@
 <html><body>Musician Barbado:<br>
-Thank you so much! You can find<font color="LEVEL"> Bard Swan</font> beneath the big tree in the center of the village. Please convince him to honor my request. I am sure you are capable of this. 
+Thank you so much! You can find <font color="LEVEL">Bard Swan</font> beneath the big tree in the center of the village. Please convince him to honor my request. I am sure you are capable of this.
 </body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-03.htm

@@ -0,0 +1,4 @@
+<html><body>Musician Barbado:<br>
+Thank you for offering, but I am afraid that you lack the necessary skills to undertake this task. It will be too much for you.<br>
+(This quest can be undertaken only by a character of level 15 or above.) 
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-04.html

@@ -0,0 +1,3 @@
+<html><body>Musician Barbado:<br>
+You must persuade <font color="LEVEL">Bard Swan</font> to play music with me. You will find him under the big tree in the center of the village. I am sure you are capable of this.
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30959-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30959-05.html

@@ -1,4 +1,4 @@
 <html><body>Musician Barbado:<br>
 Thank you so much! At last I get to play a duet with Bard Swan! My dream is coming true! You have made this possible.<br>
-Here! Take this priceless accordion music as a token of my appreciation! 
+Here! Take this priceless accordion music as a token of my appreciation!
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30960-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-01.html

@@ -1,4 +1,4 @@
 <html><body>Beer Chest:<br>
 This chest contains beer made by Jonas...<br>
-<a action="bypass -h Quest 364_JovialAccordion 30960-03.htm">Open the chest.</a>
+<a action="bypass -h Quest Q00364_JovialAccordion OPEN_CHEST">Open the chest.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30960-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-02.html

@@ -1,3 +1,3 @@
 <html><body>Beer Chest:<br>
 The chest contains black beer.
-</body></html>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-03.html

@@ -0,0 +1,3 @@
+<html><body>Beer Chest:<br>
+The key to the chest is broken.
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30960-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30960-04.html

@@ -1,3 +1,3 @@
 <html><body>Beer Chest:<br>
 The chest is locked.
-</body></html>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-01.html

@@ -0,0 +1,4 @@
+<html><body>Clothes Chest:<br>
+This chest contains the clothing of Trader Sonia.<br>
+<a action="bypass -h Quest Q00364_JovialAccordion OPEN_CLOTH_CHEST">Open the chest.</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-02.html

@@ -0,0 +1,3 @@
+<html><body>Clothes Chest:<br>
+Contains magnificent clothing.
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30961-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-03.html

@@ -1,3 +1,3 @@
 <html><body>Clothes Chest:<br>
 The key to the chest is broken.
-</body></html>
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/364_JovialAccordion/30961-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/30961-04.html

@@ -1,3 +1,3 @@
 <html><body>Clothes Chest:<br>
 The chest is locked.
-</body></html>
+</body></html>

+ 295 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00364_JovialAccordion/Q00364_JovialAccordion.java

@@ -0,0 +1,295 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ * 
+ * This file is part of L2J DataPack.
+ * 
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00364_JovialAccordion;
+
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Jovial Accordion (364)
+ * @author Adry_85
+ */
+public final class Q00364_JovialAccordion extends Quest
+{
+	// NPCs
+	private static final int SABRIN = 30060;
+	private static final int XABER = 30075;
+	private static final int SWAN = 30957;
+	private static final int BARBADO = 30959;
+	private static final int BEER_CHEST = 30960;
+	private static final int CLOTH_CHEST = 30961;
+	// Items
+	private static final int STOLEN_BLACK_BEER = 4321;
+	private static final int STOLEN_EVENT_CLOTHES = 4322;
+	private static final int CLOTHES_CHEST_KEY = 4323;
+	private static final int BEER_CHEST_KEY = 4324;
+	private static final int THEME_OF_THE_FEAST = 4421;
+	// Misc
+	private static final int MIN_LEVEL = 15;
+	
+	private Q00364_JovialAccordion()
+	{
+		super(364, Q00364_JovialAccordion.class.getSimpleName(), "Jovial Accordion");
+		addStartNpc(BARBADO);
+		addTalkId(BARBADO, BEER_CHEST, CLOTH_CHEST, SABRIN, XABER, SWAN);
+		registerQuestItems(STOLEN_BLACK_BEER, STOLEN_EVENT_CLOTHES, CLOTHES_CHEST_KEY, BEER_CHEST_KEY);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, false);
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		switch (event)
+		{
+			case "START":
+			{
+				if (player.getLevel() >= MIN_LEVEL)
+				{
+					st.startQuest();
+					st.setMemoState(1);
+					htmltext = "30959-02.htm";
+				}
+				else
+				{
+					htmltext = "30959-03.htm";
+				}
+				break;
+			}
+			case "OPEN_CHEST":
+			{
+				if (st.hasQuestItems(BEER_CHEST_KEY))
+				{
+					if (getRandomBoolean())
+					{
+						st.giveItems(STOLEN_BLACK_BEER, 1);
+						htmltext = "30960-02.html";
+					}
+					else
+					{
+						htmltext = "30960-03.html";
+					}
+					st.takeItems(BEER_CHEST_KEY, -1);
+				}
+				else
+				{
+					htmltext = "30960-04.html";
+				}
+				break;
+			}
+			case "OPEN_CLOTH_CHEST":
+			{
+				if (st.hasQuestItems(CLOTHES_CHEST_KEY))
+				{
+					if (getRandomBoolean())
+					{
+						st.giveItems(STOLEN_EVENT_CLOTHES, 1);
+						htmltext = "30961-02.html";
+					}
+					else
+					{
+						htmltext = "30961-03.html";
+					}
+					st.takeItems(CLOTHES_CHEST_KEY, -1);
+				}
+				else
+				{
+					htmltext = "30961-04.html";
+				}
+				break;
+			}
+			case "30957-02.html":
+			{
+				st.giveItems(CLOTHES_CHEST_KEY, 1);
+				st.giveItems(BEER_CHEST_KEY, 1);
+				st.setMemoState(2);
+				st.setCond(2, true);
+				htmltext = event;
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = getQuestState(player, true);
+		String htmltext = getNoQuestMsg(player);
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				if (npc.getId() == BARBADO)
+				{
+					htmltext = "30959-01.htm";
+				}
+				break;
+			}
+			case State.STARTED:
+			{
+				switch (npc.getId())
+				{
+					case BARBADO:
+					{
+						switch (st.getMemoState())
+						{
+							case 1:
+							case 2:
+							case 3:
+							case 4:
+							{
+								htmltext = "30959-04.html";
+								break;
+							}
+							case 5:
+							{
+								st.rewardItems(THEME_OF_THE_FEAST, 1);
+								st.exitQuest(true, true);
+								htmltext = "30959-05.html";
+								break;
+							}
+						}
+						break;
+					}
+					case BEER_CHEST:
+					{
+						htmltext = "30960-01.html";
+						break;
+					}
+					case CLOTH_CHEST:
+					{
+						htmltext = "30961-01.html";
+						break;
+					}
+					case SABRIN:
+					{
+						if (st.hasQuestItems(STOLEN_BLACK_BEER))
+						{
+							st.takeItems(STOLEN_BLACK_BEER, -1);
+							htmltext = "30060-01.html";
+							if (st.isMemoState(2))
+							{
+								st.setMemoState(3);
+							}
+							else if (st.isMemoState(3))
+							{
+								st.setMemoState(4);
+							}
+						}
+						else
+						{
+							htmltext = "30060-02.html";
+						}
+						break;
+					}
+					case XABER:
+					{
+						if (st.hasQuestItems(STOLEN_EVENT_CLOTHES))
+						{
+							st.takeItems(STOLEN_EVENT_CLOTHES, -1);
+							htmltext = "30075-01.html";
+							if (st.isMemoState(2))
+							{
+								st.setMemoState(3);
+							}
+							else if (st.isMemoState(3))
+							{
+								st.setMemoState(4);
+							}
+						}
+						else
+						{
+							htmltext = "30075-02.html";
+						}
+						break;
+					}
+					case SWAN:
+					{
+						switch (st.getMemoState())
+						{
+							case 1:
+							{
+								htmltext = "30957-01.html";
+								break;
+							}
+							case 2:
+							case 3:
+							{
+								if (hasAtLeastOneQuestItem(player, BEER_CHEST_KEY, CLOTHES_CHEST_KEY, STOLEN_BLACK_BEER, STOLEN_EVENT_CLOTHES))
+								{
+									htmltext = "30957-03.html";
+								}
+								else if (!st.hasQuestItems(BEER_CHEST_KEY, CLOTHES_CHEST_KEY, STOLEN_BLACK_BEER, STOLEN_EVENT_CLOTHES))
+								{
+									if (st.isMemoState(2))
+									{
+										st.playSound(QuestSound.ITEMSOUND_QUEST_GIVEUP);
+										st.exitQuest(true, true);
+										htmltext = "30957-06.html";
+									}
+									else
+									{
+										st.setMemoState(5);
+										st.setCond(3, true);
+										htmltext = "30957-04.html";
+									}
+								}
+								break;
+							}
+							case 4:
+							{
+								if (!st.hasQuestItems(BEER_CHEST_KEY, CLOTHES_CHEST_KEY, STOLEN_BLACK_BEER, STOLEN_EVENT_CLOTHES))
+								{
+									st.setMemoState(5);
+									st.setCond(3, true);
+									st.giveAdena(100, true);
+									htmltext = "30957-05.html";
+								}
+								break;
+							}
+							case 5:
+							{
+								htmltext = "30957-07.html";
+								break;
+							}
+						}
+						break;
+					}
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	public static void main(String args[])
+	{
+		new Q00364_JovialAccordion();
+	}
+}

+ 3 - 2
L2J_DataPack_BETA/dist/sql/game/updates/20131215update.sql

@@ -1,2 +1,3 @@
-ALTER TABLE `characters` ALTER `title_color` SET DEFAULT 0xECF9A2;
-UPDATE `characters` SET `title_color` = 0xECF9A2 WHERE `title_color` = 0xFFFFFF;
+UPDATE character_quests SET name='Q00362_BardsMandolin' WHERE name='362_BardsMandolin';
+UPDATE character_quests SET name='Q00363_SorrowfulSoundOfFlute' WHERE name='363_SorrowfulSoundofFlute';
+UPDATE character_quests SET name='Q00364_JovialAccordion' WHERE name='364_JovialAccordion';