Skip to content
Snippets Groups Projects
Commit f6f6ef69 authored by Adry_85's avatar Adry_85
Browse files

BETA: Retail-like quests in Java.

	* '''Collector of Jewels''' (369)
	* ''' An Elder Sows Seeds''' (370)
Reviewed by: jurchiks
parent 5f263135
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 271 deletions
......@@ -506,8 +506,8 @@ quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
quests/Q00366_SilverHairedShaman/Q00366_SilverHairedShaman.java
quests/Q00367_ElectrifyingRecharge/Q00367_ElectrifyingRecharge.java
quests/Q00368_TrespassingIntoTheHolyGround/Q00368_TrespassingIntoTheHolyGround.java
quests/369_CollectorOfJewels/__init__.py
quests/370_AWisemanSowsSeeds/__init__.py
quests/Q00369_CollectorOfJewels/Q00369_CollectorOfJewels.java
quests/Q00370_AnElderSowsSeeds/Q00370_AnElderSowsSeeds.java
quests/371_ShriekOfGhosts/__init__.py
quests/372_LegacyOfInsolence/__init__.py
quests/373_SupplierOfReagents/__init__.py
......
<html><body>Magister Nell:<br>
Ah, the shiny black hair... eyes that sparkle like gemstones... If I could only hear the voice once more...<br>
Why are you still here? Please hurry and collect<font color="LEVEL"> 50 Flare Shards and 50 Freezing Shards for my</font><font color="LEVEL"> research</font>. You can find them by slaying Salamanders, Undines, Death Fires and Roxides in the Forgotten Temple.
</body></html>
\ No newline at end of file
<html><body>Magister Nell:<br>
Well, if I only needed them for my research, these would be enough. But a wiseman taught me all about these gemstones.<br>
He said that he needed them, and asked me to collect the fragments for him.<br>
At that time the trader Katerina of Talking Island was there. She is also collecting gemstones.<br>
When she gives the gemstones to the wiseman, I also want to give at least the same quantity to him. You see, I am a magister... I can't be outdone by a trader like Katerina. Do you understand?<br>
Please do this for me. Collect more gemstones so that I can give them to the wiseman.<br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-07.htm">"I will continue to do the work."</a><br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-08.htm">"I quit."</a>
</body></html>
\ No newline at end of file
<html><body>Magister Nell:<br>
Thank you! Go to the<font color="LEVEL"> Forgotten Temple</font> with your colleagues. Slay the<font color="LEVEL"> Roxide</font>, the<font color="LEVEL"> Lakin Undine</font>, and the<font color="LEVEL"> Rowin Undine</font> to obtain<font color="LEVEL"> Freezing Shards</font>. Slay the<font color="LEVEL"> Death Fire</font>, the<font color="LEVEL"> Lakin Salamander</font>, and the<font color="LEVEL"> Salamander Rowin</font> to obtain<font color="LEVEL"> Flare Shards</font>.<br>
I'd like to give you at least 5 restored Spirit Ores, so please bring me<font color="LEVEL"> 200</font> fragments of each kind. You will be well rewarded.<br>
</body></html>
\ No newline at end of file
# Collector of Jewels - Version 0.1 by 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 = "369_CollectorOfJewels"
#NPC
NELL=30376
#Items
FLARE_SHARD=5882
FREEZING_SHARD=5883
ADENA=57
#MOBS & DROP
DROPLIST_FREEZE={20747:[FREEZING_SHARD,85], #Roxide
20619:[FREEZING_SHARD,73], #Rowin Undine
20616:[FREEZING_SHARD,60], #Undine Lakin
}
DROPLIST_FLARE={20612:[FLARE_SHARD,77], #Salamander Rowin
20609:[FLARE_SHARD,77], #Salamander Lakin
20749:[FLARE_SHARD,85] #Death Fire
}
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [FLARE_SHARD, FREEZING_SHARD]
def onEvent (self,event,st) :
htmltext = event
cond = st.getInt("cond")
if event == "30376-03.htm" and cond == 0 :
st.set("cond","1")
st.setState(State.STARTED)
st.set("awaitsFreezing","1")
st.set("awaitsFlare","1")
st.playSound("ItemSound.quest_accept")
elif event == "30376-07.htm" :
st.playSound("ItemSound.quest_itemget")
elif event == "30376-08.htm" :
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()
cond=st.getInt("cond")
flare = st.getQuestItemsCount(FLARE_SHARD)
freezing = st.getQuestItemsCount(FREEZING_SHARD)
if cond == 0 :
if player.getLevel() >= 25 :
htmltext = "30376-02.htm"
else:
htmltext = "30376-01.htm"
st.exitQuest(1)
elif cond == 1 :
htmltext = "30376-04.htm"
elif cond == 2 and flare == freezing == 50 :
st.set("cond","3")
st.set("awaitsFreezing","1")
st.set("awaitsFlare","1")
st.giveItems(ADENA,12500)
st.takeItems(FLARE_SHARD,-1)
st.takeItems(FREEZING_SHARD,-1)
htmltext = "30376-05.htm"
elif cond == 3 :
htmltext = "30376-09.htm"
elif cond == 4 and flare == freezing == 200 :
htmltext = "30376-10.htm"
st.playSound("ItemSound.quest_finish")
st.giveItems(ADENA,63500)
st.takeItems(FLARE_SHARD,-1)
st.takeItems(FREEZING_SHARD,-1)
st.exitQuest(1)
return htmltext
def onKill(self,npc,player,isPet):
partyMember, st, item, chance = 0,0,0,0
npcId = npc.getId()
# get a random party member that still awaits drop from this NPC
if npcId in DROPLIST_FREEZE.keys() :
partyMember = self.getRandomPartyMember(player,"awaitsFreezing","1")
item,chance=DROPLIST_FREEZE[npc.getId()]
elif npcId in DROPLIST_FLARE.keys() :
partyMember = self.getRandomPartyMember(player,"awaitsFlare","1")
item,chance=DROPLIST_FLARE[npc.getId()]
if partyMember :
st = partyMember.getQuestState(qn)
if not st: return
if st.getState() != State.STARTED : return
cond = st.getInt("cond")
if cond in [1,3] :
if cond == 1 :
max = 50
elif cond == 3 :
max = 200
if self.getRandom(100) < chance and st.getQuestItemsCount(item) < max :
st.giveItems(item,1)
# if collection of this item is State.COMPLETED, mark it (so that this person
# no longer participate in the party-quest pool for this item)
if st.getQuestItemsCount(FLARE_SHARD) == max :
st.unset("awaitsFlare")
elif st.getQuestItemsCount(FREEZING_SHARD) == max :
st.unset("awaitsFreezing")
if st.getQuestItemsCount(FLARE_SHARD) == st.getQuestItemsCount(FREEZING_SHARD) == max :
st.set("cond",str(cond+1))
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(369,qn,"Collector of Jewels")
QUEST.addStartNpc(NELL)
QUEST.addTalkId(NELL)
for mob in DROPLIST_FREEZE.keys() :
QUEST.addKillId(mob)
for mob in DROPLIST_FLARE.keys() :
QUEST.addKillId(mob)
\ No newline at end of file
<html><body>Wiseman Casian:<br>
Did you know that at one time this barren wasteland was one of the most fertile places in Aden? For centuries farmers sowed their seeds and harvested abundant crops here. Ah, yes, those were the days...<br>
But then that devil Beleth and his minions arrived. We had to come up with a resolution quickly. We were compelled to at last open the forbidden spellbook...<br>
For two days and nights fire rained down on us and dark magic swept the land like a whirlwind... It wasn't at all what we'd anticipated...<br>
I couldn't bear to stay in this ruined place, so I wandered the world for many years. But now I find myself drawn back, hoping to somehow restore this land to its former beauty. I shan't be able to do this alone...<br>
<font color="LEVEL">(Quest for characters level 28 and above)</font>
</body></html>
\ No newline at end of file
<html><body>Wiseman Casian:<br>
How could you forget? You must slay<font color="LEVEL"> ant recruits, ant patrols, ant guards, the noble ant and the noble ant leader</font> in order to obtain the pieces of the spellbook.<br>
<font color="LEVEL">Examine any scrap of paper you come across carefully</font>. The pieces of "Kranvel's Spellbook" should be instantly recognizable.<br>
You must find all four chapters:<font color="LEVEL"> the Chapter of Fire, the Chapter of Water, the Chapter of Wind and the Chapter of Earth</font>.<br>
<a action="bypass -h Quest 370_AWisemanSowsSeeds 30612-4.htm">Back</a>
</body></html>
\ No newline at end of file
<html><body>Wiseman Casian:<br>
How could you have forgotten so quickly?<br>
"Kranvel's Spellbook" consist of four chapters:<font color="LEVEL"> the Chapter of Fire, the Chapter of Water, the Chapter of Wind and the Chapter of Earth</font>. The contents will not be discernible unless you find all four chapters. Please, you must help us! We're counting on you!
</body></html>
\ No newline at end of file
# Made by disKret
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 = "370_AWisemanSowsSeeds"
#NPC
CASIAN = 30612
#MOBS
MOBS = [20082,20084,20086,20089,20090]
#ITEMS
CHAPTER_OF_FIRE,CHAPTER_OF_WATER,CHAPTER_OF_WIND,CHAPTER_OF_EARTH = range(5917,5921)
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = range(5917,5921)
def onEvent (self,event,st) :
htmltext = event
if event == "30612-1.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.set("awaitsPartyDrop","1")
st.playSound("ItemSound.quest_accept")
elif event == "30612-6.htm" :
if st.getQuestItemsCount(CHAPTER_OF_FIRE) and \
st.getQuestItemsCount(CHAPTER_OF_WATER) and \
st.getQuestItemsCount(CHAPTER_OF_WIND) and \
st.getQuestItemsCount(CHAPTER_OF_EARTH) :
st.takeItems(CHAPTER_OF_FIRE,1)
st.takeItems(CHAPTER_OF_WATER,1)
st.takeItems(CHAPTER_OF_WIND,1)
st.takeItems(CHAPTER_OF_EARTH,1)
st.giveItems(57,3600)
htmltext = "30612-8.htm"
elif event == "30612-9.htm" :
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
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()
cond=st.getInt("cond")
if cond == 0 :
if player.getLevel() >= 28 :
htmltext = "30612-0.htm"
else:
htmltext = "30612-0a.htm"
st.exitQuest(1)
elif cond :
htmltext = "30612-4.htm"
return htmltext
def onKill(self,npc,player,isPet):
partyMember = self.getRandomPartyMember(player,"awaitsPartyDrop","1")
if not partyMember : return
st = partyMember.getQuestState(qn)
chance = self.getRandom(100)
if chance in range(1,15) and st.getQuestItemsCount(CHAPTER_OF_FIRE) == 0 :
st.giveItems(CHAPTER_OF_FIRE,1)
st.playSound("ItemSound.quest_itemget")
elif chance in range(25,40) and st.getQuestItemsCount(CHAPTER_OF_WATER) == 0 :
st.giveItems(CHAPTER_OF_WATER,1)
st.playSound("ItemSound.quest_itemget")
elif chance in range(50,65) and st.getQuestItemsCount(CHAPTER_OF_WIND) == 0 :
st.giveItems(CHAPTER_OF_WIND,1)
st.playSound("ItemSound.quest_itemget")
elif chance in range(75,90) and st.getQuestItemsCount(CHAPTER_OF_EARTH) == 0 :
st.giveItems(CHAPTER_OF_EARTH,1)
st.playSound("ItemSound.quest_itemget")
if st.getQuestItemsCount(CHAPTER_OF_FIRE) and st.getQuestItemsCount(CHAPTER_OF_WATER) and st.getQuestItemsCount(CHAPTER_OF_WIND) and st.getQuestItemsCount(CHAPTER_OF_EARTH) :
st.playSound("ItemSound.quest_middle")
st.unset("awaitsPartyDrop")
return
QUEST = Quest(370,qn,"A Wiseman Sows Seeds")
QUEST.addStartNpc(CASIAN)
QUEST.addTalkId(CASIAN)
for i in MOBS :
QUEST.addKillId(i)
\ No newline at end of file
<html><body>Magister Nell:<br>
Do you wish to hear my story? Sometime ago, I met a Wiseman. He told me that the Forgotten Temple is related to the Ruins on Talking Island.<br>
Do you wish to hear my story? Sometime ago, I met a Elder. He told me that the Forgotten Temple is related to the Ruins on Talking Island.<br>
More than anything else, this glittering Flare Shard and Freezing Shard are the proof! They are fragments of elemental stone found in the Ruins of Talking Island and the Forgotten Temple! Before they were broken, these two elemental stones must have had mutual resonance.<br>
Would you help me? Please go to the temple and bring me more of these gemstones.<br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-03.htm">"I'll do it!"</a>
</body></html>
\ No newline at end of file
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-02.htm">"I'll do it!"</a>
</body></html>
<html><body>Magister Nell:<br>
This won't be easy. The spirits that live in the Forgotten Temple are very strong. You will need help. You can get<br>
<font color="LEVEL">Flare Shards</font> from<font color="LEVEL"> Lakin salamanders, Salamander Rowins and Death Fires</font>.<font color="LEVEL"> Freezing Shards</font> can be obtained from<font color="LEVEL"> the Lakin Undine, the Rowin Undine and the Roxide</font>. Please bring me<font color="LEVEL"> 50 of each type</font>.
</body></html>
\ No newline at end of file
<font color="LEVEL">Flare Shards</font> from <font color="LEVEL">lakin salamanders, salamander rowins and death fires</font>. <font color="LEVEL">Freezing Shards</font> can be obtained from <font color="LEVEL">the lakin undine, the rowin undine and the roxide</font>. Please bring me <font color="LEVEL">50 of each type</font>.
</body></html>
<html><body>Magister Nell:<br>
Do you wish to hear my story? Once I met a Wiseman. He convinced me that the Forgotten Temple is related to the Ruins on Talking Island.<br>
Do you wish to hear my story? Once I met a Elder. He convinced me that the Forgotten Temple is related to the Ruins on Talking Island.<br>
This glittering Flare Shard and Freezing Shard are proof! They are fragments from the Ruins of Talking Island and the Forgotten Temple! Before they were broken, these two elemental stones had mutual resonance. I'm sure of it! I'm desperate to get my hands on more of these fragments... If you know anyone strong enough to enter the Forgotten Temple and bring me some of these stones, please ask them to come and see me at once!<br>
(This quest may only be undertaken by a character of level 25 or above.)
</body></html>
\ No newline at end of file
</body></html>
<html><body>Magister Nell:<br>
Ah, you have done as I asked. I feel the strong pull of their magic power. Here is your reward. Would you be interested in working with me some more? I still need many more of them... I'll pay you generously for your work...<br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-06.htm">"Why do you need so many of them?"</a><br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-07.htm">"I'll do it."</a><br>
<a action="bypass -h Quest 369_CollectorOfJewels 30376-08.htm">"I quit."</a>
</body></html>
\ No newline at end of file
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-05.html">"Why do you need so many of them?"</a><br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-06.html">"I'll do it."</a><br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-07.html">"I quit."</a>
</body></html>
<html><body>Magister Nell:<br>
Well, if I only needed them for my research, these would be enough. But a Elder taught me all about these gemstones.<br>
He said that he needed them, and asked me to collect the fragments for him.<br>At that time the trader Katerina of Talking Island was there. She is also collecting gemstones.<br>
When she gives the gemstones to the Elder, I also want to give at least the same quantity to him. You see, I am a magister... I can't be outdone by a trader like Katerina. Do you understand?<br>
Please do this for me. Collect more gemstones so that I can give them to the Elder.<br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-06.html">"I will continue to do the work."</a><br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-07.html">"I quit."</a>
</body></html>
<html><body>Magister Nell:<br>
Thank you! Go to the <font color="LEVEL">Forgotten Temple</font> with your colleagues. Slay the <font color="LEVEL">roxide</font>, the <font color="LEVEL">lakin undine</font>, and the <font color="LEVEL">rowin undine</font> to obtain <font color="LEVEL">Freezing Shards</font>. Slay the <font color="LEVEL">death fire</font>, the <font color="LEVEL">lakin salamander</font>, and the <font color="LEVEL">salamander rowin</font> to obtain <font color="LEVEL">Flare Shards</font>. <br>I'd like to give you at least 5 restored Spirit Ores, so please bring me <font color="LEVEL">200</font> fragments of each kind. You will be well rewarded.
</body></html>
<html><body>Magister Nell:<br>
Oh, too bad. Very well. I'll get someone else to help me. I appreciate your help up to now. I will take care of the remaining shards. Leave them here. If you change your mind, please come back and see me. Okay?
</body></html>
\ No newline at end of file
</body></html>
<html><body>Magister Nell:<br>
Ah, the shiny black hair... eyes that sparkle like gemstones... If I could only hear the voice once more...<br>Why are you still here? Please hurry and collect <font color="LEVEL">50 Flare Shards and 50 Freezing Shards for my </font><font color="LEVEL">research</font>. You can find them by slaying salamanders, undines, death fires and roxides in the Forgotten Temple.
</body></html>
<html><body>Magister Nell:<br>
Thank you for your help. Would you be interested in working some more? I still need many more of these... I'll give you a very generous reward!<br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-05.html">"Do you really need so many of them?"</a><br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-06.html">"I will try my best."</a><br>
<a action="bypass -h Quest Q00369_CollectorOfJewels 30376-07.html">"I quit."</a>
</body></html>
......@@ -2,4 +2,4 @@
Amazing! You've brought them! They must have been very heavy! Please put them down here. Be very, very careful!<br>
Thank you for your hard work. Here is your reward. These fragments are kind of small. Now, I can meet Les with confidence. He contacted me some time ago...<br>
Anyway, thank you for your help. If possible, please come and help me again sometime, and bring some friends to help you! Take care!
</body></html>
\ No newline at end of file
</body></html>
<html><body>Magister Nell:<br>
Ah, what a profile! Like a classic statue... And that voice! Like an arrow piercing my heart...Where is he now? I wonder what he's doing?<br>
I must give him some Spirit Ore! Please, bring me<font color="LEVEL"> 200 Flare Shards and 200 Freezing Shards</font>!<br>
You can get them from Salamanders, Undines, Death Fires and Roxides, deep within the Forgotten Temple! Please, hurry! Time is short!
</body></html>
\ No newline at end of file
I must give him some Spirit Ore! Please, bring me <font color="LEVEL">200 Flare Shards and 200 Freezing Shards</font>!<br>
You can get them from salamanders, undines, death fires and roxides, deep within the Forgotten Temple! Please, hurry! Time is short!
</body></html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment