浏览代码

primary support for upcomming 2 quests

Kerberos 17 年之前
父节点
当前提交
c084078db4

+ 1 - 0
datapack_development/data/scripts.cfg

@@ -463,6 +463,7 @@ quests/660_AidingtheFloranVillage/__init__.py
 quests/661_TheHarvestGroundsSafe/__init__.py
 quests/663_SeductiveWhispers/__init__.py
 quests/688_DefeatTheElrokianRaiders/__init__.py
+quests/998_FallenAngelSelect/__init__.py
 quests/999_T1Tutorial/__init__.py
 
 # Custom

+ 1 - 1
datapack_development/data/scripts/quests/141_ShadowFoxPart3/30894-18.htm

@@ -2,5 +2,5 @@
 Yes... Peace can be achieved through both centralized authority and the harmony of diversity...<br>
 However, history shows that words like "order" and "peace" can be used to justify tyranny.<br>
 On the other hand, words like "harmony" and "diversity" may only be ideals impossible to achieve in reality...<br>
-"I will make my decision now."
+<a action="bypass -h Quest 141_ShadowFoxPart3 AngelSelect">"I will make my decision now."</a>
 </body></html>

+ 22 - 1
datapack_development/data/scripts/quests/141_ShadowFoxPart3/__init__.py

@@ -2,6 +2,7 @@
 # this script is part of the Official L2J Datapack Project.
 # Visit http://forum.l2jdp.com for more details.
 import sys
+from net.sf.l2j.gameserver.instancemanager import QuestManager
 from net.sf.l2j.gameserver.model.quest import State
 from net.sf.l2j.gameserver.model.quest import QuestState
 from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
@@ -43,6 +44,11 @@ class Quest (JQuest) :
        st.giveItems(57, 88888)
        if player.getLevel() >= 37 and player.getLevel() <= 42:
           st.addExpAndSp(219975,13047)
+    elif event == "AngelSelect" :
+       qs = player.getQuestState("998_FallenAngelSelect")
+       if qs:
+          qs.getQuest().onEvent(qs.getQuest(), "30894-01.htm", qs)
+          return
     return htmltext
 
  def onTalk (self,npc,player):
@@ -95,11 +101,26 @@ class Quest (JQuest) :
    st = player.getQuestState(qn)
    if not st :
       st = self.newQuestState(player)
-   qs = st.getPlayer().getQuestState("140_ShadowFoxPart2")
+   qs = player.getQuestState("140_ShadowFoxPart2")
+   qs2 = player.getQuestState("998_FallenAngelSelect")
+   qs3 = player.getQuestState("142_FallenAngelRequestOfDawn")
+   qs4 = player.getQuestState("143_FallenAngelRequestOfDusk")
    if qs :
       if qs.getState() == State.COMPLETED :
          if st.getState() == State.CREATED :
             st.setState(State.STARTED)
+   if st.getState() == State.COMPLETED :
+      if not qs2 :
+         q = QuestManager.getInstance().getQuest("998_FallenAngelSelect")
+         if q :
+            qs2 = q.newQuestState(player)
+            qs2.setState(State.STARTED)
+      if qs2 :
+         if qs2.getState() == State.COMPLETED :
+            qs2.setState(State.CREATED)
+         if qs2.getState() == State.CREATED :
+            if not qs3 and not qs4:
+               qs2.setState(State.STARTED)
    npc.showChatWindow(player)
    return
 

+ 8 - 0
datapack_development/data/scripts/quests/998_FallenAngelSelect/30894-01.htm

@@ -0,0 +1,8 @@
+<html><body>Warehouse Chief Natools:<br>
+On behalf of Shadow Fox's organization, you must choose either the request of the Temple of Einhasad and the Rulers of Dawn or the request of the Preachers of the Wilderness and the Revolutionaries of Dusk.<br>
+Choose carefully -- there is no going back...<br><br>
+<a action="bypass -h Quest 998_FallenAngelSelect 30894-02.htm">"Tell me about the Temple and the Rulers of Dawn again."</a><br>
+<a action="bypass -h Quest 998_FallenAngelSelect 30894-03.htm">"Tell me about the Preachers of the Wilderness and the Revolutionaries of Dusk again."</a><br><br>
+"I will carry out the mission of the Temple and the Rulers of Dawn."<br>
+"I will carry out the mission of the Preachers of the Wilderness and the Revolutionaries of Dusk."
+</body></html>

+ 9 - 0
datapack_development/data/scripts/quests/998_FallenAngelSelect/30894-02.htm

@@ -0,0 +1,9 @@
+<html><body>Warehouse Chief Natools:<br>
+The Temple and the Rulers of Dawn believe that Einhasad created Humans, and that they are her rightful representatives in this world, with the power to issue commands in her name.<br>
+They believe that the other gods are inferior to Einhasad, and so their followers should submit to the Temple's leadership in the war against Shilen and the forces of chaos.<br>
+Unity and order are their chief concerns, and they take a dim view of diversity and individualism.<br>
+In fact, they believe that only through a unified society built on a rigid hierarchy can justice prevail and the weak be truly protected.<br>
+Certainly, their argument carries some weight: the weak are daily attacked and exploited, and justice seems but a dream to most...<br>
+Ultimately, the Temple and the Rulers of Dawn hope for some sort of reborn empire to bring peace and order to the land...<br>
+<a action="bypass -h Quest 998_FallenAngelSelect 30894-01.htm">"I will make my decision now."</a>
+</body></html>

+ 8 - 0
datapack_development/data/scripts/quests/998_FallenAngelSelect/30894-03.htm

@@ -0,0 +1,8 @@
+<html><body>Warehouse Chief Natools:<br>
+They argue that we should respect diversity...<br>
+They claim that all powers and creatures are equal, and that the Temple and the Rulers of Dawn are simply trying to accumulate power and wealth for their own benefit.<br>
+The Preachers and the Revolutionaries of Dusk say that their opponents are hypocrites and liars intent on using religion to exploit the people...<br>
+They believe that true peace can only be achieved by respecting diversity of race, culture and belief. The use of force, they say, will only create a tyrannical artificial peace.<br>
+As the evidence of the hypocrisy of the Temple, they claim that Einhasad did not actually create Humans -- that story was concocted solely by Emperor Schuneimann in order to consolidate his power. The Temple and the Rulers of Dawn have perpetuated that myth, they say, to maintain their hold on power.<br>Both the Preachers and the Revolutionaries of Dusk are intent on finding iron-clad evidence of the Temple's hypocrisy that will sway the people to their side.<br>
+<a action="bypass -h Quest 998_FallenAngelSelect 30894-01.htm">"I will make my decision now."</a>
+</body></html>

+ 31 - 0
datapack_development/data/scripts/quests/998_FallenAngelSelect/__init__.py

@@ -0,0 +1,31 @@
+# Made by Kerberos
+# this script is part of the Official L2J Datapack Project.
+# Visit http://forum.l2jdp.com for more details.
+import sys
+from net.sf.l2j.gameserver.model.quest import State
+from net.sf.l2j.gameserver.model.quest import QuestState
+from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
+
+qn = "998_FallenAngelSelect"
+
+NATOOLS = 30894
+
+class Quest (JQuest) :
+
+ def __init__(self,id,name,descr):    JQuest.__init__(self,id,name,descr)
+
+ def onEvent (self,event,st) :
+    return event
+
+ def onTalk (self,npc,player):
+    htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
+    st = player.getQuestState(qn)
+    if not st : return htmltext
+    id = st.getState()
+    if id == State.STARTED :
+       htmltext = "30894-01.htm"
+    return htmltext
+
+QUEST       = Quest(998,qn,"Fallen Angel - Select")
+
+QUEST.addTalkId(NATOOLS)