Browse Source

HTM,JYTHON: Agathions in Luxury by Charus (thx Sandro for correct item IDs) Still missing materials return when craft fail like as retail

Aikimaniac 17 years ago
parent
commit
f032909c6e

+ 2 - 1
datapack_development/data/html/merchant/30098.htm

@@ -3,6 +3,7 @@ Welcome! thank you for visiting our luxury shop today. We're pleased to offer a
 Oh, one thing more . . . I hope it's not an inconvenience, but we don't accept cash anymore. If you see something you absolutely must have, we ask that you pay for it in<font color="LEVEL"> crystals</font>.<br>
 If you're in the market for some excellent weapons, my husband here will be happy to help you.<br>
 <a action="bypass -h npc_%objectId%_multisell 300984001">Buy armor.</a><br>
-<a action="bypass -h npc_%objectId%_multisell 300984002">Buy miscellaneous goods.</a><br>
+<a action="bypass -h npc_%objectId%_multisell 300984002">Buy groceries.</a><br>
+<a action="bypass -h npc_%objectId%_Quest 8004_PurchaseBracelet">Examine a bracelet with an intricate engraved pattern.</a><br>
 <a action="bypass -h npc_%objectId%_Quest">Quest</a>
 </body></html>

+ 3 - 2
datapack_development/data/scripts.cfg

@@ -475,8 +475,9 @@ quests/999_T1Tutorial/__init__.py
 custom/3995_echo/__init__.py
 custom/4000_ShadowWeapons/__init__.py
 custom/5000_MissQueen/__init__.py
+custom/6050_KetraOrcSupport/__init__.py
+custom/6051_VarkaSilenosSupport/__init__.py
 custom/7000_HeroItems/__init__.py
 custom/8000_RaidbossInfo/__init__.py
 custom/8001_NpcLocationInfo/__init__.py
-custom/6050_KetraOrcSupport/__init__.py
-custom/6051_VarkaSilenosSupport/__init__.py
+custom/8004_PurchaseBracelet/__init__.py

+ 3 - 0
datapack_development/data/scripts/custom/8004_PurchaseBracelet/30098-no.htm

@@ -0,0 +1,3 @@
+<html><body>Trader Alexandria:<br>
+Oh, you don't have the items required to buy either the Angel's Bracelet or the Devil's Bracelet. In order to obtain one, you must first bring me <font color="LEVEL">20 Big Red Nimble Fish</font>, <font color="LEVEL">50 Great Codrans</font>, and <font color="LEVEL">4 Memento Moris, 5 Earth Eggs, 5 Nonliving Nuclei, 3 Dragon Hearts</font>, and <font color="LEVEL">7,500,000 Adena</font>.
+</body></html>

+ 8 - 0
datapack_development/data/scripts/custom/8004_PurchaseBracelet/30098.htm

@@ -0,0 +1,8 @@
+<html><body>Trader Alexandria:<br>
+Ah, you have excellent taste! This bracelet is truly unique. In fact, it is said that it contains an <font color="LEVEL">Agathion</font>. Quite a find, eh? Wondering if it for sale? Of course it is -- that's why I'm here!<br>
+Both this <font color="LEVEL">Little Angel Agathion Bracelet</font> and this <font color="LEVEL">Little Devil Agathion Bracelet</font> were discovered by another group of adventurers while exploring some ancient ruins. I am positive that they contain Agathions! Of course, no one knows for sure the power an Agathion possesses or how long it lasts. I have been reluctant to experiment on them because it's clear that some of the bracelets possess only limited magic power.<br>
+Other have more, however. What you get will depend on your luck, I'm afraid.<br>
+If you wish to buy either the Little Angel bracelet or the Little Devil Bracelet, bring me <font color="LEVEL">25 Big Red Nimble Fish, 50 Great Codrans, 4 Messengers' Skeletons in Crystal of Life, 5 Earth Eggs and 5 Nonliving Nuclei, 3 Dragon Hearts</font>, and <font color="LEVEL">7,500,000 Adena</font>. I wish I could part with them in exchange for crystals as normally would, but the adventurers who delivered the bracelets here insisted on these other items for payment. Even so, I still believe this is a reasonable price. After all, an Agathion isn't something you run across every day, eh? So, would you like to buy one?<br>
+<a action="bypass -h Quest 8004_PurchaseBracelet Little_Angel">Purchase the Little Angel Agathion Bracelet.</a><br>
+<a action="bypass -h Quest 8004_PurchaseBracelet Little_Devil">Purchace the Little Devil Agathion Bracelet.</a>
+</body></html>

+ 60 - 0
datapack_development/data/scripts/custom/8004_PurchaseBracelet/__init__.py

@@ -0,0 +1,60 @@
+# Created by L2Emu Team
+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 = "8004_PurchaseBracelet"
+
+Angel_Bracelet = 10320
+Devil_Bracelet = 10326
+
+class Quest (JQuest) :
+
+ def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
+
+ def onEvent(self,event,st):
+    htmltext = event
+    if event == "Little_Angel" :
+      if st.getQuestItemsCount(6471) >= 20 and st.getQuestItemsCount(5094) >= 50 and st.getQuestItemsCount(9814) >= 4 and st.getQuestItemsCount(9816) >= 5 and st.getQuestItemsCount(9817) >= 5 and st.getQuestItemsCount(9815) >= 3 and st.getQuestItemsCount(57) >= 7500000 :
+        st.takeItems(6471,25)
+        st.takeItems(5094,50)
+        st.takeItems(9814,4)
+        st.takeItems(9816,5)
+        st.takeItems(9817,5)
+        st.takeItems(9815,3)
+        st.takeItems(57,7500000)
+        st.giveItems(Angel_Bracelet,1)
+        st.exitQuest(1)
+      else :
+        htmltext = "30098-no.htm"
+        st.exitQuest(1)
+    if event == "Little_Devil" :
+      if st.getQuestItemsCount(6471) >= 20 and st.getQuestItemsCount(5094) >= 50 and st.getQuestItemsCount(9814) >= 4 and st.getQuestItemsCount(9816) >= 5 and st.getQuestItemsCount(9817) >= 5 and st.getQuestItemsCount(9815) >= 3 and st.getQuestItemsCount(57) >= 7500000 :
+        st.takeItems(6471,25)
+        st.takeItems(5094,50)
+        st.takeItems(9814,4)
+        st.takeItems(9816,5)
+        st.takeItems(9817,5)
+        st.takeItems(9815,3)
+        st.takeItems(57,7500000)
+        st.giveItems(Devil_Bracelet,1)
+        st.exitQuest(1)
+      else :
+        htmltext = "30098-no.htm"
+        st.exitQuest(1)
+    return htmltext
+
+ def onTalk(self,npc,player):
+    htmltext = ""
+    st = player.getQuestState(qn)
+    if not st :
+      st = self.newQuestState(player)
+    htmltext = "30098.htm"
+    return htmltext
+
+QUEST = Quest(8004,qn,"custom")
+
+QUEST.addStartNpc(30098)
+
+QUEST.addTalkId(30098)