Переглянути джерело

BETA: Temple Champion Quests series from jython to Java.
* Added the new QuestState methods
* Fixed the HTML extensions

nonom 13 роки тому
батько
коміт
281bdc9487
56 змінених файлів з 474 додано та 332 видалено
  1. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-03.htm
  3. 0 9
      L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-05.htm
  4. 0 8
      L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-06.htm
  5. 0 109
      L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/__init__.py
  6. 0 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-08.htm
  7. 0 166
      L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/__init__.py
  8. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-00.html
  9. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-01.htm
  10. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-02.htm
  11. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-03.html
  12. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-04.html
  13. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-05.html
  14. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-06.html
  15. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-07.html
  16. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-08.html
  17. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-09.html
  18. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-10.html
  19. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-11.html
  20. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-12.html
  21. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-13.html
  22. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-14.html
  23. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-15.html
  24. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-16.html
  25. 170 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/Q137_TempleChampionPart1.java
  26. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-00.html
  27. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-01.htm
  28. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-02.htm
  29. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-03.html
  30. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-04.html
  31. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-05.html
  32. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-01.html
  33. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-02.html
  34. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-03.html
  35. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-04.html
  36. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-05.html
  37. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-06.html
  38. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-07.html
  39. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-08.html
  40. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-09.html
  41. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-10.html
  42. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-01.html
  43. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-02.html
  44. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-03.html
  45. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-04.html
  46. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-05.html
  47. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-01.html
  48. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-02.html
  49. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-03.html
  50. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-04.html
  51. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-05.html
  52. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-06.html
  53. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-07.html
  54. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-08.html
  55. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-09.html
  56. 247 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/Q138_TempleChampionPart2.java

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

@@ -350,8 +350,8 @@ quests/133_ThatsBloodyHot/__init__.py
 quests/134_TempleMissionary/__init__.py
 quests/135_TempleExecutor/__init__.py
 quests/136_MoreThanMeetsTheEye/__init__.py
-quests/137_TempleChampionPart1/__init__.py
-quests/138_TempleChampionPart2/__init__.py
+quests/Q137_TempleChampionPart1/Q137_TempleChampionPart1.java
+quests/Q138_TempleChampionPart2/Q138_TempleChampionPart2.java
 quests/139_ShadowFoxPart1/__init__.py
 quests/140_ShadowFoxPart2/__init__.py
 quests/141_ShadowFoxPart3/__init__.py

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-03.htm

@@ -1,7 +0,0 @@
-<html><body>High Priest Sylvain:<br>
-Who established the Temple after receiving the goddess' message, sent through an angel with three wings during the early years of the Elmoreden Empire?<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Baium.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-05.htm">Schuneimann.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Frintezza.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Beleth.</a>
-</body></html>

+ 0 - 9
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-05.htm

@@ -1,9 +0,0 @@
-<html><body>High Priest Sylvain:<br>
-Correct.<br>
-Let us move on to the next question.<br>
-Einhasad is the patron goddess of which race?<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Elves.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Orcs.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">Dwarves.</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-06.htm">Humans.</a>
-</body></html>

+ 0 - 8
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-06.htm

@@ -1,8 +0,0 @@
-<html><body>High Priest Sylvain:<br>
-Correct!<br>We will move on to the final question.<br>
-How should political and military power, currently fragmented throughout this chaotic continent, best be concentrated and used?<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">"The power should be in the hands of adventurers."</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">"The power should be balanced by distributing it among the various races."</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-07.htm">"The Temple of Einhasad should be the center of all power."</a><br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-04.htm">"The power should be used according to the will of all the people: peasants, rulers and adventurers."</a>
-</body></html>

+ 0 - 109
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/__init__.py

@@ -1,109 +0,0 @@
-# Made by Kerberos
-# this script is part of the Official L2J Datapack Project.
-# Visit http://www.l2jdp.com/forum/ for more details.
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "137_TempleChampionPart1"
-
-# NPCs
-SYLVAIN = 30070
-
-# ITEMs
-FRAGMENT = 10340
-
-# MONSTERs
-NPC=[20083,20144,20199,20200,20201,20202]
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-    JQuest.__init__(self,id,name,descr)
-    self.questItemIds = [FRAGMENT]
-
- def onAdvEvent (self,event,npc, player) :
-    htmltext = event
-    st = player.getQuestState(qn)
-    if not st : return
-    id = st.getState()
-    cond = st.getInt("cond")
-    if event == "30070-02.htm" :
-       st.set("cond","1")
-       st.setState(State.STARTED)
-       st.set("talk","0")
-       st.playSound("ItemSound.quest_accept")
-    elif event == "30070-05.htm" :
-       st.set("talk","1")
-    elif event == "30070-06.htm" :
-       st.set("talk","2")
-    elif event == "30070-08.htm" :
-       st.unset("talk")
-       st.set("cond","2")
-       st.playSound("ItemSound.quest_middle")
-    elif event == "30070-16.htm" :
-       st.takeItems(10334, -1)
-       st.takeItems(10339, -1)
-       st.giveItems(57, 69146)
-       st.playSound("ItemSound.quest_finish")
-       st.unset("talk")
-       st.exitQuest(False)
-       if st.getPlayer().getLevel() >= 35 and st.getPlayer().getLevel() <= 40:
-          st.addExpAndSp(219975,13047)
-    return htmltext
-
- def onTalk (self,npc,player):
-    htmltext = Quest.getNoQuestMsg(player)
-    st = player.getQuestState(qn)
-    if not st : return htmltext
-
-    npcId = npc.getNpcId()
-    id = st.getState()
-    cond = st.getInt("cond")
-    if id == State.COMPLETED :
-       htmltext = Quest.getAlreadyCompletedMsg(player)
-    elif npcId == SYLVAIN :
-       if cond == 0 :
-          if player.getLevel() >= 35 and st.getQuestItemsCount(10334) and st.getQuestItemsCount(10339):
-             htmltext = "30070-01.htm"
-          else:
-             htmltext = "30070-00.htm"
-             st.exitQuest(1)
-       elif cond == 1 :
-          if st.getInt("talk") == 0:
-             htmltext = "30070-03.htm"
-          elif st.getInt("talk") == 1:
-             htmltext = "30070-05.htm"
-          elif st.getInt("talk") == 2:
-             htmltext = "30070-06.htm"
-       elif cond == 2 :
-          htmltext = "30070-08.htm"
-       elif cond == 3 and st.getQuestItemsCount(FRAGMENT) >= 30:
-          htmltext = "30070-09.htm"
-          st.set("talk","1")
-          st.takeItems(FRAGMENT, -1)
-       elif cond == 3 and st.getInt("talk") == 1:
-          htmltext = "30070-10.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")==2 :
-       if st.getQuestItemsCount(FRAGMENT) < 30:
-          st.giveItems(FRAGMENT,1)
-          if st.getQuestItemsCount(FRAGMENT) >= 30:
-             st.set("cond","3")
-             st.playSound("ItemSound.quest_middle")
-          else :
-             st.playSound("ItemSound.quest_itemget")
-    return
-
-QUEST       = Quest(137,qn,"Temple Champion - 1")
-
-QUEST.addStartNpc(SYLVAIN)
-QUEST.addTalkId(SYLVAIN)
-for mob in NPC :
-   QUEST.addKillId(mob)

+ 0 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-08.htm

@@ -1,5 +0,0 @@
-<html><body>Priestess Pupina:<br>
-Ah, I see you have brought me a letter from Angus...<br>Let me see...<br>
-Hmm...according to this, you assisted in a ritual to Shilen, whom Einhasad imprisoned long ago. There can be no doubt that you have violated the rules of the Temple in this matter -- and gravely.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-09.htm">"Every race has its own rituals and customs. As an adventurer all too familiar with death, Angus' sorrow touched me, as did his desire to lay the trainee's soul to rest. What I did in no way helped Shilen, but it did give a measure of peace to the dead man's friends. I would hope they would do the same for me."</a>
-</body></html>

+ 0 - 166
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/__init__.py

@@ -1,166 +0,0 @@
-# Made by Kerberos
-# this script is part of the Official L2J Datapack Project.
-# Visit http://www.l2jdp.com/forum/ for more details.
-import sys
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
-
-qn = "138_TempleChampionPart2"
-
-# NPCs
-SYLVAIN = 30070
-PUPINA = 30118
-ANGUS = 30474
-SLA = 30666
-
-# ITEMs
-MANIFESTO = 10341
-RELIC = 10342
-ANGUS_REC = 10343
-PUPINA_REC = 10344
-
-# MONSTERs
-NPC=[20176,20550,20551,20552]
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-    JQuest.__init__(self,id,name,descr)
-    self.questItemIds = [MANIFESTO,RELIC,ANGUS_REC,PUPINA_REC]
-
- def onAdvEvent (self,event,npc, player) :
-    htmltext = event
-    st = player.getQuestState(qn)
-    if not st : return
-    id = st.getState()
-    cond = st.getInt("cond")
-    if event == "30070-02.htm" :
-       st.set("cond","1")
-       st.playSound("ItemSound.quest_accept")
-       st.giveItems(MANIFESTO, 1)
-    elif event == "30070-05.htm" :
-       st.giveItems(57, 84593)
-       st.playSound("ItemSound.quest_finish")
-       st.exitQuest(False)
-       if st.getPlayer().getLevel() >= 36 and st.getPlayer().getLevel() <= 41:
-          st.addExpAndSp(187062,11307)
-    elif event == "30070-03.htm" :
-       st.set("cond","2")
-       st.playSound("ItemSound.quest_middle")
-    elif event == "30118-06.htm" :
-       st.set("cond","3")
-       st.playSound("ItemSound.quest_middle")
-    elif event == "30118-09.htm" :
-       st.set("cond","6")
-       st.playSound("ItemSound.quest_middle")
-       st.set("talk","0")
-       st.giveItems(PUPINA_REC, 1)
-    elif event == "30474-02.htm" :
-       st.set("cond","4")
-       st.playSound("ItemSound.quest_middle")
-    elif event == "30666-02.htm" :
-       st.set("talk","1")
-       st.takeItems(PUPINA_REC, -1)
-    elif event == "30666-03.htm" :
-       st.set("talk","2")
-       st.takeItems(MANIFESTO, -1)
-    elif event == "30666-08.htm" :
-       st.set("cond","7")
-       st.playSound("ItemSound.quest_middle")
-       st.unset("talk")
-    return htmltext
-
- def onTalk (self,npc,player):
-    htmltext = Quest.getNoQuestMsg(player)
-    st = player.getQuestState(qn)
-    if not st : return htmltext
-
-    npcId = npc.getNpcId()
-    id = st.getState()
-    cond = st.getInt("cond")
-    if id == State.CREATED : return htmltext
-    if id == State.COMPLETED :
-       htmltext = Quest.getAlreadyCompletedMsg(player)
-    elif npcId == SYLVAIN :
-       if cond == 0 :
-          if player.getLevel() >= 36:
-             htmltext = "30070-01.htm"
-          else:
-             htmltext = "30070-00.htm"
-             st.exitQuest(1)
-       elif cond == 1 :
-          htmltext = "30070-02.htm"
-       elif cond in [2,3,4,5,6] :
-          htmltext = "30070-03.htm"
-       elif cond == 7 :
-          htmltext = "30070-04.htm"
-    elif npcId == PUPINA :
-       if cond == 2 :
-          htmltext = "30118-01.htm"
-       elif cond in [3,4] :
-          htmltext = "30118-07.htm"
-       elif cond == 5 :
-          htmltext = "30118-08.htm"
-          st.takeItems(ANGUS_REC, -1)
-       elif cond == 6 :
-          htmltext = "30118-10.htm"
-    elif npcId == ANGUS :
-       if cond == 3 :
-          htmltext = "30474-01.htm"
-       elif cond == 4 :
-          if st.getQuestItemsCount(RELIC) >= 10:
-             htmltext = "30474-04.htm"
-             st.takeItems(RELIC, -1)
-             st.giveItems(ANGUS_REC, 1)
-             st.set("cond","5")
-             st.playSound("ItemSound.quest_middle")
-          else:
-             htmltext = "30474-03.htm"
-       elif cond == 5 :
-          htmltext = "30474-05.htm"
-    elif npcId == SLA :
-       if cond == 6 :
-          if st.getInt("talk") == 0:
-             htmltext = "30666-01.htm"
-          elif st.getInt("talk") == 1:
-             htmltext = "30666-02.htm"
-          elif st.getInt("talk") == 2:
-             htmltext = "30666-03.htm"
-       elif cond == 7 :
-          htmltext = "30666-09.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")==4 :
-       if st.getQuestItemsCount(RELIC) < 10:
-          st.giveItems(RELIC,1)
-          if st.getQuestItemsCount(RELIC) >= 10:
-             st.playSound("ItemSound.quest_middle")
-          else :
-             st.playSound("ItemSound.quest_itemget")
-    return
-
- def onFirstTalk (self,npc,player):
-   st = player.getQuestState(qn)
-   if not st :
-      st = self.newQuestState(player)
-   qs = st.getPlayer().getQuestState("137_TempleChampionPart1")
-   if qs :
-      if qs.getState() == State.COMPLETED and st.getState() == State.CREATED :
-          st.setState(State.STARTED)
-   npc.showChatWindow(player)
-   return
-
-QUEST       = Quest(138,qn,"Temple Champion - 2")
-
-QUEST.addFirstTalkId(SYLVAIN) #this quest doesnt have starter npc, quest will appear in list only when u finish quest 137
-QUEST.addTalkId(SYLVAIN)
-QUEST.addTalkId(PUPINA)
-QUEST.addTalkId(ANGUS)
-QUEST.addTalkId(SLA)
-for mob in NPC :
-   QUEST.addKillId(mob)

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-00.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-01.htm

@@ -2,5 +2,5 @@
 You have now become both the Hands and the Feet of the Temple of Einhasad.<br>
 Before you can carry out even more important missions, however, you must achieve the title of the Limbs of the Temple.<br>
 To do so, you must pass a simple oral exam.<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-02.htm">Begin the oral exam.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-02.htm">Begin the oral exam.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-02.htm

@@ -1,5 +1,5 @@
 <html><body>High Priest Sylvain:<br>
 This oral exam will test your knowledge of certain basic principles that should be known to the Hands or the Feet of the Temple.<br>
 Are you ready to begin?<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-03.htm">"I am ready."</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-03.html">"I am ready."</a>
 </body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-03.html

@@ -0,0 +1,7 @@
+<html><body>High Priest Sylvain:<br>
+Who established the Temple after receiving the goddess' message, sent through an angel with three wings during the early years of the Elmoreden Empire?<br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Baium.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-05.html">Schuneimann.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Frintezza.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Beleth.</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-04.html


+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-05.html

@@ -0,0 +1,9 @@
+<html><body>High Priest Sylvain:<br>
+Correct.<br>
+Let us move on to the next question.<br>
+Einhasad is the patron goddess of which race?<br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Elves.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Orcs.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">Dwarves.</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-06.html">Humans.</a>
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-06.html

@@ -0,0 +1,8 @@
+<html><body>High Priest Sylvain:<br>
+Correct!<br>We will move on to the final question.<br>
+How should political and military power, currently fragmented throughout this chaotic continent, best be concentrated and used?<br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">"The power should be in the hands of adventurers."</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">"The power should be balanced by distributing it among the various races."</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-07.html">"The Temple of Einhasad should be the center of all power."</a><br>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-04.html">"The power should be used according to the will of all the people: peasants, rulers and adventurers."</a>
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-07.html

@@ -6,5 +6,5 @@ I now confer upon you the title of the Limbs of the Temple.<br>
 You have now entered the inner circle of our order and will report directy to me as High Priest.<br>
 I will assign you missions of vital importance to the preservation and success of our Temple...<br>
 I already have a mission in mind for you. Listen carefully...<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-08.htm">Listen.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-08.html">Listen.</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-08.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-09.html

@@ -2,5 +2,5 @@
 Ah...<br>
 You have recovered the remains of the inspector's report? Good.<br>
 We will piece it back together and analyze its contents.<br>This may take some time; please take some refreshment and make yourself comfortable.<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-10.htm">Wait.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-10.html">Wait.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-10.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-10.html

@@ -3,5 +3,5 @@ Hmm... This is unbelievable...<br>
 The signs reported by many of our brethren signify the advent of an angel!<br>
 Our man was investigating when and where the angel would come down to earth.<br>Apparently, he found an eyewitness who claims to have actually seen the angel...<br>
 If true, this means that Einhasad may be sending us another message, just as she did to Emperor Schuneimann long ago...<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-11.htm">Keep listening.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-11.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-11.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-11.html

@@ -1,5 +1,5 @@
 <html><body>High Priest Sylvain:<br>
 During the reign of Emperor Schuneimann, you remember, an angel appeared and gave the emperor some of the goddess' power so that he might destroy his enemies and establish Einhasad's Temple.<br>
 It can be no accident that another angel has appeared at this particular time.<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-12.htm">Keep listening.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-12.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-12.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-12.html

@@ -4,5 +4,5 @@ Some say that Einhasad is not the goddess of the people, and I am sad to say tha
 Others, many of whom were once members of this Temple, have forsaken us by claiming that truth cannot be found with us, but rather in the desert and among the people...<br>
 Some of our brethren have been misled, and we earnestly desire that they return to fellowship with us.<br>
 But those false prophets will be punished harshly by Einhasad, cast into the eternal dark...<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-13.htm">Keep listening.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-13.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-13.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-13.html

@@ -1,5 +1,5 @@
 <html><body>High Priest Sylvain:<br>
 These false prophets are planning to cause chaos by instigating the Revolutionaries of Dusk to rebel against the rightful Rulers of Dawn, who respect order and justice.<br>
 Many of their followers, however, are still faithful children of the goddess who have simply been misled. We must persuade them to repent and return to us before it is too late...<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-14.htm">Keep listening.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-14.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-14.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-14.html

@@ -2,5 +2,5 @@
 Even those who challenge the authority of the Temple must give heed to this momentous event, the advent of the angel...<br>
 It is obvious the angel has appeared at this time in order to confirm the legitimacy and authority of the Temple.<br>
 We must make contact with the angel and, as Schuneimann did long ago, receive power from the goddess in order to make our foes quake with fear!<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-15.htm">Keep listening.</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-15.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-15.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-15.html

@@ -4,5 +4,5 @@ In doing so, we will offer them a final chance to repent for forsaking us, and r
 None of this would be possible without the document you recovered.<br>
 Excellent work! You have already justified my faith in you.<br>
 I know your efforts will not go unrewarded, either in this life or the next.<br>
-<a action="bypass -h Quest 137_TempleChampionPart1 30070-16.htm">"I will."</a>
+<a action="bypass -h Quest Q137_TempleChampionPart1 30070-16.html">"I will."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/137_TempleChampionPart1/30070-16.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/30070-16.html


+ 170 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q137_TempleChampionPart1/Q137_TempleChampionPart1.java

@@ -0,0 +1,170 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q137_TempleChampionPart1;
+
+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;
+
+/**
+ * Temple Champion Part 1 (137)
+ * @author nonom
+ */
+public class Q137_TempleChampionPart1 extends Quest
+{
+	private static final String qn = "137_TempleChampionPart1";
+	
+	// NPCs
+	private static final int SYLVAIN = 30070;
+	
+	private static final int MOBS[] =
+	{
+		20083, // Granite Golem
+		20144, // Hangman Tree
+		20199, // Amber Basilisk
+		20200, // Strain
+		20201, // Ghoul
+		20202, // Dead Seeker
+	};
+	
+	// Items
+	private static final int FRAGMENT = 10340;
+	private static final int EXECUTOR = 10334;
+	private static final int MISSIONARY = 10339;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		switch (event)
+		{
+			case "30070-02.htm":
+				st.startQuest();
+				break;
+			case "30070-05.html":
+				st.set("talk", "1");
+				break;
+			case "30070-06.html":
+				st.set("talk", "2");
+				break;
+			case "30070-08.html":
+				st.unset("talk");
+				st.setCond(2, true);
+				break;
+			case "30070-16.html":
+				if (st.isCond(2) && (st.hasQuestItems(EXECUTOR) && st.hasQuestItems(MISSIONARY)))
+				{
+					st.takeItems(EXECUTOR, -1);
+					st.takeItems(MISSIONARY, -1);
+					st.giveAdena(69146, true);
+					if (player.getLevel() < 41)
+					{
+						st.addExpAndSp(219975, 13047);
+					}
+					st.exitQuest(false, true);
+				}
+				break;
+		}
+		return event;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		if (st.isCompleted())
+		{
+			return getAlreadyCompletedMsg(player);
+		}
+		switch (st.getInt("cond"))
+		{
+			case 1:
+				switch (st.getInt("talk"))
+				{
+					case 1:
+						htmltext = "30070-05.html";
+						break;
+					case 2:
+						htmltext = "30070-06.html";
+						break;
+					default:
+						htmltext = "30070-03.html";
+						break;
+				}
+				break;
+			case 2:
+				htmltext = "30070-08.html";
+				break;
+			case 3:
+				if (st.getInt("talk") == 1)
+				{
+					htmltext = "30070-10.html";
+				}
+				else if (st.getQuestItemsCount(FRAGMENT) >= 30)
+				{
+					st.set("talk", "1");
+					htmltext = "30070-09.html";
+					st.takeItems(FRAGMENT, -1);
+				}
+				break;
+			default:
+				htmltext = ((player.getLevel() >= 35) && st.hasQuestItems(EXECUTOR) && st.hasQuestItems(MISSIONARY)) ? "30070-01.htm" : "30070-00.html";
+				break;
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(qn);
+		if ((st != null) && st.isStarted() && st.isCond(2) && (st.getQuestItemsCount(FRAGMENT) < 30))
+		{
+			st.giveItems(FRAGMENT, 1);
+			if (st.getQuestItemsCount(FRAGMENT) >= 30)
+			{
+				st.setCond(3, true);
+			}
+			else
+			{
+				st.playSound("ItemSound.quest_itemget");
+			}
+		}
+		return super.onKill(npc, player, isPet);
+	}
+	
+	public Q137_TempleChampionPart1(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(SYLVAIN);
+		addTalkId(SYLVAIN);
+		addKillId(MOBS);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q137_TempleChampionPart1(137, qn, "Temple Champion Part 1");
+	}
+}

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-00.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-01.htm

@@ -6,5 +6,5 @@ This will give them a final chance to repent of their apostasy and return to our
 But it will be very difficult to disseminate the manifesto to each group -- many lie in dangerous areas and many more will suspect a trick and refuse to meet with any representative we send...<br>
 However, an experienced adventurer might be able to both reach these groups and convince them to hear him out.<br>
 Will you help us?<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30070-02.htm">"I will."</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30070-02.htm">"I will."</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-02.htm

@@ -4,5 +4,5 @@ Based on his findings, we have written a manifesto showing that the advent of th
 We wish to distribute this document to the groups who have broken ties with us.<br>
 If you give this to Preacher Sla, he will be able to disseminate it to those groups.<br>
 But...<br><br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30070-03.htm">"But?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30070-03.html">"But?"</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-03.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-04.html

@@ -5,5 +5,5 @@ Besides, the angel of Einhasad has obviously come down to empower us in our holy
 But even with this clear evidence, I see they will not accept the truth. I just do not understand them...<br>
 We are now attempting to determine the angel's exact whereabouts.<br>
 Once we contact the angel, surely even the apostates must accept our authority.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30070-05.htm">"Is the investigation under way?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30070-05.html">"Is the investigation under way?"</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30070-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30070-05.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-01.html

@@ -4,5 +4,5 @@ Do you wish to meet Preacher Sla?<br>
 As you know, the preachers' goals differ somewhat from the goals of the Temple priests.<br>
 Preachers believe that the Temple's rigid rules and ceremonies often serve as a barrier to a true understanding of and relationship with the goddess.<br>
 And given the Temple's close association with the aristocracy, many preachers are critical that the priests are more concerned with personal status and wealth than true service.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-02.htm">"I see."</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-02.html">"I see."</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-02.html

@@ -3,5 +3,5 @@ I believe that the Temple is a vital part of our religion, but that it also is i
 As you can guess, such a view has cast me into some disfavor with my superiors.<br>
 I also maintain friendly relations with many preachers, something else that is in practice frowned upon.<br>
 Since you occupy a high position in the service of the Temple, if you wish to speak with Preacher Sla you will need to prove that your views are not those of the conservative Temple hierarchy.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-03.htm">"Then what should I do?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-03.html">"Then what should I do?"</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-03.html

@@ -1,5 +1,5 @@
 <html><body>Priestess Pupina:<br>
 Those hypocrital Temple priests pray, study, heal and give money to charity, to be sure -- but they refuse to risk dirtying their robes by actual venturing out among the poor and downtrodden.<br>
 If you can show that you do not share their aloofness, I will write you a letter of recommendation that you may give to Preacher Sla.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-04.htm">"I will prove myself."</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-04.html">"I will prove myself."</a>
 </body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-04.html

@@ -3,6 +3,6 @@
 We have heard word that one of the Dark Elven trainees was involved in a serious accident.<br>
 I think Angus may need help to deal with it. I will ask him for more information, but I must warn you that in rendering him aid you will almost certainly be violating the rules of your order.<br>
 Angus knows Preacher Sla well, however, and if you help him I am sure that he will write a letter of recommendation on your behalf.<br>Knowing that you may be asked to break the Temple code, do you still want to undertake this task?<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-05.htm">"I cannot. I must abide by the rules of the Temple in all things."</a><br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30118-06.htm">"I believe that Einhasad prefers mercy to blind obedience. I will certainly help if I can."</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-05.html">"I cannot. I must abide by the rules of the Temple in all things."</a><br>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-06.html">"I believe that Einhasad prefers mercy to blind obedience. I will certainly help if I can."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-05.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-06.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-07.html


+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-08.html

@@ -0,0 +1,5 @@
+<html><body>Priestess Pupina:<br>
+Ah, I see you have brought me a letter from Angus...<br>Let me see...<br>
+Hmm...according to this, you assisted in a ritual to Shilen, whom Einhasad imprisoned long ago. There can be no doubt that you have violated the rules of the Temple in this matter -- and gravely.<br>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30118-09.html">"Every race has its own rituals and customs. As an adventurer all too familiar with death, Angus' sorrow touched me, as did his desire to lay the trainee's soul to rest. What I did in no way helped Shilen, but it did give a measure of peace to the dead man's friends. I would hope they would do the same for me."</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-09.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30118-10.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30118-10.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30474-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-01.html

@@ -8,5 +8,5 @@ I do this in accord with the customs of his people...<br>
 To perform the ritual, however, we will need his belongings, which were lost in Death Pass.<br>
 You belong to the Temple of Einhasad, do you not?<br>
 Are you sure that you wish to provide aid to a follower of Shilen?<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30474-02.htm">"Every race has its own customs. I have faced dangers and lost friends as well, and I am touched by your sorrow. I will help you if I can."</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30474-02.html">"Every race has its own customs. I have faced dangers and lost friends as well, and I am touched by your sorrow. I will help you if I can."</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30474-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-02.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30474-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-03.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30474-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-04.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30474-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30474-05.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-01.html

@@ -2,5 +2,5 @@
 Hmmph! By the look of you, you must be associated with the Temple of Einhasad.<br>
 I have nothing to say to such a person.<br>
 Even if we were to talk, I know how it would end...<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-02.htm">Show him Pupina's letter of recommendation.</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-02.html">Show him Pupina's letter of recommendation.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-02.html

@@ -2,5 +2,5 @@
 What's this, then? Hmm...<br>
 (Preacher Sla reads Pupina's letter of recommendation.)<br>
 Well, well. You might be a person I can civilly converse with after all. Tell me, stranger, why are you here?<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-03.htm">Give him the Temple Manifesto.</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-03.html">Give him the Temple Manifesto.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-03.html

@@ -1,5 +1,5 @@
 <html><body>Preacher Sla:<br>
 (Preacher Sla reads the manifesto.)<br>
 So...the angel of Einhasad has fallen to earth... Amazing...<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-04.htm">"Then do you admit that the Temple holds the truth in these matters?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-04.html">"Then do you admit that the Temple holds the truth in these matters?"</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-04.html

@@ -5,5 +5,5 @@ I have uncovered certain ancient sources that predate the Elmoreden period and s
 In my opinion, the Humans who conquered this continent needed a myth in order to dignify themselves and secure their control over the empire...<br>
 The Temple of Einhasad was accordingly formed chiefly for political reasons.<br>
 Think about it. It certainly explains why the Temple has fostered such an intimate relationship with the Rulers of Dawn, the ones with secular power.<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-05.htm">"But isn't it true that an angel with 3 pairs of wings delivered both a message and a measure of the goddess' power to Emperor Schuneimann?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-05.html">"But isn't it true that an angel with 3 pairs of wings delivered both a message and a measure of the goddess' power to Emperor Schuneimann?"</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-05.html

@@ -4,5 +4,5 @@ Much of Emperor Schuneimann's recorded actions and abilities cannot be explained
 But I think the deal went both ways. I have discovered that Einhasad possibly required some kind of assistance from this Human who had conquered the continent.<br>
 In his turn, Schuneimann needed legitimacy, which he gained through performing miracles.<br>
 I think the two of them concluded some sort of contract with each other...<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-06.htm">Keep listening.</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-06.html">Keep listening.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-06.html

@@ -4,5 +4,5 @@ Perhaps it has to do with the elimination of the followers of Shilen and the mon
 That makes sense, considering how harshly Emperor Schuneimann persecuted Dark Wizards, Shilen's disciples and the followers of Gran Kain. Interestingly, by the way, those persecutions began after his first miracle... Coincidence? I'm inclined to think not.<br>
 My research is still in progress, so there are still many questions.<br>
 But I was able to find some evidence that may show a linkage...<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-07.htm">"What does this have to do with the manifesto I showed you?"</a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-07.html">"What does this have to do with the manifesto I showed you?"</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-07.html

@@ -5,5 +5,5 @@ The possible presence of the angel here could either support their claims or be
 What if the angel offers a glimpse of the divine that is vastly different than what the Temple has maintained is the truth?<br>
 Its entire foundation will collapse...<br>
 The only way to be sure, of course, is to find this angel and learn why he has come...<br>
-<a action="bypass -h Quest 138_TempleChampionPart2 30666-08.htm">"I understand. I will deliver your message to my superiors." </a>
+<a action="bypass -h Quest Q138_TempleChampionPart2 30666-08.html">"I understand. I will deliver your message to my superiors." </a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-08.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/138_TempleChampionPart2/30666-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/30666-09.html


+ 247 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q138_TempleChampionPart2/Q138_TempleChampionPart2.java

@@ -0,0 +1,247 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q138_TempleChampionPart2;
+
+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;
+
+/**
+ * Temple Champion Part 2 (138)
+ * @author nonom
+ */
+public class Q138_TempleChampionPart2 extends Quest
+{
+	private static final String qn = "138_TempleChampionPart2";
+	
+	// NPCs
+	private static final int SYLVAIN = 30070;
+	private static final int PUPINA = 30118;
+	private static final int ANGUS = 30474;
+	private static final int SLA = 30666;
+	
+	private static final int MOBS[] =
+	{
+		20176, // Wyrm
+		20550, // Guardian Basilisk
+		20551, // Road Scavenger
+		20552, // Fettered Soul
+	};
+	
+	// Items
+	private static final int MANIFESTO = 10340;
+	private static final int RELIC = 10340;
+	private static final int ANGUS_REC = 10343;
+	private static final int PUPINA_REC = 10344;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		switch (event)
+		{
+			case "30070-02.htm":
+				st.startQuest();
+				st.giveItems(MANIFESTO, 1);
+				break;
+			case "30070-05.html":
+				st.giveAdena(84593, true);
+				if ((player.getLevel() < 42))
+				{
+					st.addExpAndSp(187062, 11307);
+				}
+				st.exitQuest(false, true);
+				break;
+			case "30070-03.html":
+				st.setCond(2, true);
+				break;
+			case "30118-06.html":
+				st.setCond(3, true);
+				break;
+			case "30118-09.html":
+				st.setCond(6, true);
+				st.giveItems(PUPINA_REC, 1);
+				break;
+			case "30474-02.html":
+				st.setCond(4, true);
+				break;
+			case "30666-02.html":
+				if (st.hasQuestItems(PUPINA_REC))
+				{
+					st.set("talk", "1");
+					st.takeItems(PUPINA_REC, -1);
+				}
+				break;
+			case "30666-03.html":
+				if (st.hasQuestItems(MANIFESTO))
+				{
+					st.set("talk", "2");
+					st.takeItems(MANIFESTO, -1);
+				}
+				break;
+			case "30666-08.html":
+				st.setCond(7, true);
+				st.unset("talk");
+				break;
+		}
+		return event;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(qn);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		final int cond = st.getInt("cond");
+		switch (npc.getNpcId())
+		{
+			case SYLVAIN:
+				switch (cond)
+				{
+					case 1:
+						htmltext = "30070-02.htm";
+						break;
+					case 2:
+					case 3:
+					case 4:
+					case 5:
+					case 6:
+						htmltext = "30070-03.html";
+						break;
+					case 7:
+						htmltext = "30070-04.html";
+						break;
+					default:
+						if (st.isCompleted())
+						{
+							return getAlreadyCompletedMsg(player);
+						}
+						htmltext = (player.getLevel() >= 36) ? "30070-01.htm" : "30070-00.html";
+						break;
+				}
+				break;
+			case PUPINA:
+				switch (cond)
+				{
+					case 2:
+						htmltext = "30118-01.html";
+						break;
+					case 3:
+					case 4:
+						htmltext = "30118-07.html";
+						break;
+					case 5:
+						htmltext = "30118-08.html";
+						if (st.hasQuestItems(ANGUS_REC))
+						{
+							st.takeItems(ANGUS_REC, -1);
+						}
+						break;
+					case 6:
+						htmltext = "30118-10.html";
+						break;
+				}
+				break;
+			case ANGUS:
+				switch (cond)
+				{
+					case 3:
+						htmltext = "30474-01.html";
+						break;
+					case 4:
+						if (st.getQuestItemsCount(RELIC) >= 10)
+						{
+							st.takeItems(RELIC, -1);
+							st.giveItems(ANGUS_REC, 1);
+							st.setCond(5, true);
+							htmltext = "30474-04.html";
+						}
+						else
+						{
+							htmltext = "30474-03.html";
+						}
+						break;
+					case 5:
+						htmltext = "30474-05.html";
+						break;
+				}
+				break;
+			case SLA:
+				switch (cond)
+				{
+					case 6:
+						switch (st.getInt("talk"))
+						{
+							case 1:
+								htmltext = "30666-02.html";
+								break;
+							case 2:
+								htmltext = "30666-03.html";
+								break;
+							default:
+								htmltext = "30666-01.html";
+								break;
+						}
+						break;
+					case 7:
+						htmltext = "30666-09.html";
+						break;
+				}
+				break;
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(qn);
+		if ((st != null) && st.isStarted() && st.isCond(4) && (st.getQuestItemsCount(RELIC) < 10))
+		{
+			st.giveItems(RELIC, 1);
+			if (st.getQuestItemsCount(RELIC) >= 10)
+			{
+				st.playSound("ItemSound.quest_middle");
+			}
+			else
+			{
+				st.playSound("ItemSound.quest_itemget");
+			}
+		}
+		return super.onKill(npc, player, isPet);
+	}
+	
+	public Q138_TempleChampionPart2(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(SYLVAIN);
+		addTalkId(SYLVAIN, PUPINA, ANGUS, SLA);
+		addKillId(MOBS);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q138_TempleChampionPart2(138, qn, "Temple Champion Part 2");
+	}
+}