Browse Source

new quest 510 A Clan's Reputation
and one small value fix in divine protection skill

Kerberos 17 years ago
parent
commit
50cda583f4

+ 1 - 0
datapack_development/data/scripts.cfg

@@ -379,6 +379,7 @@ quests/432_BirthdayPartySong/__init__.py
 quests/501_ProofOfClanAlliance/__init__.py
 quests/503_PursuitClanAmbition/__init__.py
 quests/508_TheClansReputation/__init__.py
+quests/510_AClansReputation/__init__.py
 quests/601_WatchingEyes/__init__.py
 quests/602_ShadowOfLight/__init__.py
 quests/603_DaimontheWhiteEyedPart1/__init__.py

+ 5 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-0.htm

@@ -0,0 +1,5 @@
+<html><body>Grand Magister Valdis:<br>
+The townspeople live in constant fear because of the Raid Bosses in this area. We must manufacture better arms and equipment for our guards to defeat this menace, but the materials are difficult to obtain...<br>
+If there were a strong clan nearby, I would ask its clan leader. Do you know of anyone in the area?<br>
+(Only clan leaders of clans level 5 and above can take on this quest.)
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-1.htm

@@ -0,0 +1,4 @@
+<html><body>Grand Magister Valdis:<br>
+I have heard of your clan's exploits. Would you and your members desire to come together and enhance <font color="LEVEL">your clan's prestige</font>? Any assistance you can provide us, be it large or small, would be greatly appreciated. <br>
+<a action="bypass -h Quest 510_AClansReputation 31331-2.htm">&quot;What kind of assistance do you need?&quot;</a>
+</body></html>

+ 5 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-2.htm

@@ -0,0 +1,5 @@
+<html><body>Grand Magister Valdis:<br>
+We lack sufficient weapons and armor to properly equip the guards who safeguard us here. The local blacksmiths have agreed to manufacture what we need, but lack the necessary raw materials to do so. We have been searching for those materials, but without much success. I recently heard that the claws of the ferocious <font color="LEVEL">Tyrannosaurus</font>, a creature that inhabits the Primeval Isle, would be ideal for our purposes. <br>
+Would you consider using the power of your clan to collect those materials for us? <br>If you help us, I will help you enhance your clan's prestige throughout this land by spreading word of the great feat you have accomplished for us. Well? What say you?<br>
+<a action="bypass -h Quest 510_AClansReputation 31331-3.htm">Say yes.</a>
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-3.htm

@@ -0,0 +1,4 @@
+<html><body>Grand Magister Valdis:<br>
+Thank you, thank you! Legend has it that these creatures are extremely vicious... Oh, but I'm sure they will pose no more trouble to such a powerful clan than a kitten with her claws! So, will you go to the Primeval Isle and slay a <font color="LEVEL">Tyrannosaurus</font>?  <br><font color="LEVEL">Naturally, we don't expect you personally to slay the creature.</font> There is no rule requiring a clan leader to brandish his own sword in these matters. <font color="LEVEL">Simply stay nearby and watch your clan members slay the Tyrannosaurus and return here with its claws.</font><font color="LEVEL">It's vital that the claw be undamaged, you understand, which means...uh, well, it's probably best that you capture the creature before slaying it. I hope that doesn't complicate the task for you!</font> <br>
+I'll be here anxiously awaiting your good news.
+</body></html>

+ 5 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-4.htm

@@ -0,0 +1,5 @@
+<html><body>Grand Magister Valdis:<br>
+Are you still here? Hurry to the Primeval Isle and bring back the <font color="LEVEL">Tyrannosaurus Claw</font> that I requested. Do you have any other business with me? <br>
+<a action="bypass -h Quest 510_AClansReputation 31331-5.htm">"No, nothing. I'll go get the material. "</a><br>
+<a action="bypass -h Quest 510_AClansReputation 31331-6.htm">"I wish to stop now."</a>
+</body></html>

+ 3 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-5.htm

@@ -0,0 +1,3 @@
+<html><body>Grand Magister Valdis:<br>
+Then I'll leave it to you. The <font color="LEVEL">Tyrannosaurus</font> of the Primeval Isle is ferocious, but I will trust in you and your clan and wait. Be sure to <font color="LEVEL">capture</font> it and bring back a usable claw. Well, you know the way out. Thank you!
+</body></html>

+ 3 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-6.htm

@@ -0,0 +1,3 @@
+<html><body>Grand Magister Valdis:<br>
+You wish to quit? That's too bad, but I suppose it cannot be helped. Your clan must have concerns of its own...
+</body></html>

+ 5 - 0
datapack_development/data/scripts/quests/510_AClansReputation/31331-7.htm

@@ -0,0 +1,5 @@
+<html><body>Sir Eric Rodemai:<br>
+Well done! I'll spread the news that your brave Clan hat defeated Tyrannosaurus!<br>
+<a action="bypass -h Quest 510_AClansReputation 31331-5.htm">"I want to continue killing Tyrannosaurus."</a><br>
+<a action="bypass -h Quest 510_AClansReputation 31331-6.htm">"I wish to stop now."</a>
+</body></html>

+ 98 - 0
datapack_development/data/scripts/quests/510_AClansReputation/__init__.py

@@ -0,0 +1,98 @@
+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
+from net.sf.l2j.gameserver.serverpackets      import PledgeShowInfoUpdate
+from net.sf.l2j.gameserver.serverpackets      import SystemMessage
+
+qn="510_AClansReputation"
+
+# Quest NPC
+Valdis = 31331
+
+# Quest Items
+Claw = 8767
+
+# Reward
+CLAN_POINTS_REWARD = 50 # Rep Points Per Tyrannosaurus Item - need to be confirmed
+
+class Quest (JQuest) :
+
+ def __init__(self,id,name,descr) :
+     JQuest.__init__(self,id,name,descr)
+     self.questItemIds = [Claw]
+
+ def onAdvEvent (self,event,npc,player) :
+  st = player.getQuestState(qn)
+  if not st: return
+  cond = st.getInt("cond")
+  htmltext=event
+  if event == "31331-3.htm" :
+    if cond == 0 :
+      st.set("cond","1")
+      st.setState(State.STARTED)
+  elif event == "31331-6.htm" :
+    st.playSound("ItemSound.quest_finish")
+    st.exitQuest(1)
+  return htmltext
+
+ def onTalk (self,npc,player) :
+  htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
+  st = player.getQuestState(qn)
+  if not st : return htmltext
+  clan = player.getClan()
+  npcId = npc.getNpcId()
+  if player.getClan() == None or player.isClanLeader() == 0 :
+     st.exitQuest(1)
+     htmltext = "31331-0.htm"
+  elif player.getClan().getLevel() < 5 :
+     st.exitQuest(1)
+     htmltext =  "31331-0.htm"
+  else :
+     cond = st.getInt("cond")
+     id = st.getState()
+     if id == State.CREATED and cond == 0 :
+        htmltext =  "31331-1.htm"
+     elif id == State.STARTED and cond == 1 :
+        count = st.getQuestItemsCount(Claw)
+        if not count :
+           htmltext = "31331-4.htm"
+        elif count >= 1 :
+           htmltext = "31331-7.htm" # custom html
+           st.takeItems(Claw,-1)
+           reward = int(CLAN_POINTS_REWARD * count)
+           clan.setReputationScore(clan.getReputationScore()+reward,True)
+           player.sendPacket(SystemMessage(1777).addNumber(CLAN_POINTS_REWARD))
+           clan.broadcastToOnlineMembers(PledgeShowInfoUpdate(clan))
+  return htmltext
+
+ def onKill(self,npc,player,isPet) :
+  st = 0
+  if player.isClanLeader() :
+   st = player.getQuestState(qn)
+  else:
+   clan = player.getClan()
+   if clan:
+    leader=clan.getLeader()
+    if leader :
+     pleader= leader.getPlayerInstance()
+     if pleader :
+      if player.isInsideRadius(pleader, 1600, 1, 0) :
+       st = pleader.getQuestState(qn)
+  if not st : return
+  if st.getState() == State.STARTED :
+   npcId=npc.getNpcId()
+   if npcId in range(22215,22218) :
+      st.giveItems(Claw,1)
+      st.playSound("ItemSound.quest_itemget")
+  return
+
+
+# Quest class and state definition
+QUEST       = Quest(510,qn,"A Clan's Reputation")
+
+QUEST.addStartNpc(Valdis)
+QUEST.addTalkId(Valdis)
+
+for npc in range(22215,22218):
+    QUEST.addKillId(npc)

+ 1 - 1
datapack_development/data/stats/skills/1300-1399.xml

@@ -1293,7 +1293,7 @@
   <for>
     <effect count="1" name="Buff" time="1200" val="0">
       <mul stat="darkVuln" val="0.7" order="0x30"/>
-      <mul stat="holyVuln" val="0.7" order="0x30"/>
+      <mul stat="holyVuln" val="0.8" order="0x30"/>
     </effect>
   </for>
 </skill>