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

BETA: Retail-like quests in Java.

	* '''Bard's Mandolin''' (362)
	* '''Sorrowful Sound of Flute''' (363)
	* '''Jovial Accordion''' (364)
parent 3dc02f58
No related branches found
No related tags found
No related merge requests found
Showing
with 15 additions and 295 deletions
......@@ -498,9 +498,9 @@ quests/357_WarehouseKeepersAmbition/__init__.py
quests/358_IllegitimateChildOfAGoddess/__init__.py
quests/359_ForSleeplessDeadmen/__init__.py
quests/Q00360_PlunderTheirSupplies/Q00360_PlunderTheirSupplies.java
quests/362_BardsMandolin/__init__.py
quests/363_SorrowfulSoundofFlute/__init__.py
quests/364_JovialAccordion/__init__.py
quests/Q00362_BardsMandolin/Q00362_BardsMandolin.java
quests/Q00363_SorrowfulSoundOfFlute/Q00363_SorrowfulSoundOfFlute.java
quests/Q00364_JovialAccordion/Q00364_JovialAccordion.java
quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
quests/366_SilverHairedShaman/__init__.py
quests/367_ElectrifyingRecharge/__init__.py
......
<html><body>Bard Swan:<br>
Please, take these items to Musician Nanarin! I must know what she says.
</body></html>
\ No newline at end of file
# Bards Mandolin Written By MickyLee
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 = "362_BardsMandolin"
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [4316, 4317]
def onEvent (self,event,st) :
htmltext = event
if event == "30957_2.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
elif event == "30957_5.htm" :
st.giveItems(57,10000)
st.giveItems(4410,1)
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()
if npcId != 30957 and id != State.STARTED : return htmltext
if id == State.CREATED :
st.set("cond","0")
cond = st.getInt("cond")
if npcId == 30957 and cond == 0 :
htmltext = "30957_1.htm"
elif npcId == 30837 and cond == 1 :
st.set("cond","2")
htmltext = "30837_1.htm"
elif npcId == 30958 and cond == 2 :
st.set("cond","3")
st.giveItems(4316,1)
htmltext = "30958_1.htm"
st.playSound("ItemSound.quest_itemget")
elif npcId == 30957 and cond == 3 and st.getQuestItemsCount(4316) and not st.getQuestItemsCount(4317) :
st.set("cond","4")
st.giveItems(4317,1)
htmltext = "30957_3.htm"
elif npcId == 30957 and cond == 4 and st.getQuestItemsCount(4316) and st.getQuestItemsCount(4317) :
htmltext = "30957_6.htm"
elif npcId == 30956 and cond == 4 and st.getQuestItemsCount(4316) and st.getQuestItemsCount(4317) :
st.takeItems(4316,1)
st.takeItems(4317,1)
st.set("cond","5")
htmltext = "30956_1.htm"
elif npcId == 30957 and cond == 5 :
htmltext = "30957_4.htm"
return htmltext
QUEST = Quest(362,qn,"Bards Mandolin")
QUEST.addStartNpc(30957)
QUEST.addTalkId(30957)
QUEST.addTalkId(30956)
QUEST.addTalkId(30958)
QUEST.addTalkId(30837)
\ No newline at end of file
<html><body>Opix:<br>
Hmmm, I think that Barbado could really use a new flute. He's spoke many times of wanting a new one.<br>
By the way who are you and why are you asking so many questions...
</body></html>
\ No newline at end of file
<html><body>Nanarin:<br>
I'm not really sure I should tell you this but...<br>
For the longest time I've had a romantic interest in Barbado.<br>
My problem is that he never seems to notice me and I'm not really sure how I should approach him.<br>
<a action="bypass -h Quest 363_SorrowfulSoundofFlute 1">"I will help you."</a>
</body></html>
\ No newline at end of file
<html><body>Nanarin:<br>
Oh my please don't tell Barbado. I wish to tell him myself.<br>
Don't go directly to Barbado but please visit his friend Blacksmith Opix and ask him some question for me. If you do this favor for me I'll reward you with some sheet music needed to create echo crystals. Please hurry!
</body></html>
\ No newline at end of file
<html><body>Nanarin:<br>
So Opix says that Barbado would like to have a new flute. Well then please take this one to Barbado and give it to him but please don't tell him who its from.
</body></html>
\ No newline at end of file
<html><body>Nanarin:<br>
He loved it and wants to know who its from? I should go speak with him and confess my love to him.<br>
I know this isnt much but its what I promised you. Thank you again kind stranger!<br>
<a action="bypass -h Quest 363_SorrowfulSoundofFlute 5">"Thank you and youre welcome"</a>
</body></html>
\ No newline at end of file
<html><body>Quest Complete
</body></html>
\ No newline at end of file
<html><body>Barbado:<br>
Oh my is that what I think it is? It sure is! How did you know I wanted a new flute and who is this fine gift from?<br>
You can't tell me? A secret admirer? I really wonder who this is from...
</body></html>
\ No newline at end of file
# Jovial Accordian Written By Elektra
# Fixed by mr
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 = "363_SorrowfulSoundofFlute"
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [4319]
def onEvent (self,event,st) :
htmltext = event
if event == "1" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
htmltext = "30956_2.htm"
elif event == "5" :
st.giveItems(4420,1)
st.playSound("ItemSound.quest_finish")
st.exitQuest(1)
htmltext = "30956_5.htm"
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()
if npcId != 30956 and id != State.STARTED : return htmltext
if id == State.CREATED :
st.set("cond","0")
if npcId == 30956 and st.getInt("cond") == 0 :
htmltext = "30956_1.htm"
elif npcId == 30956 and st.getInt("cond") == 1 :
htmltext = "<html><body>Find Blacksmith Opix..</body></html>"
elif npcId == 30595 and st.getInt("cond") == 1 :
st.set("cond","2")
htmltext = "30595_1.htm"
elif npcId == 30595 and st.getInt("cond") > 1 :
htmltext = "<html><body>Go back to Nanarin..</body></html>"
elif npcId == 30956 and st.getInt("cond") == 2 :
st.giveItems(4319,1)
st.set("cond","3")
htmltext = "30956_3.htm"
elif npcId == 30956 and st.getInt("cond") == 3 :
htmltext = "<html><body>Find Barbado..</body></html>"
elif npcId == 30959 and st.getInt("cond") == 3 :
st.takeItems(4319,1)
st.set("cond","4")
htmltext = "30959_1.htm"
elif npcId == 30959 and st.getInt("cond") == 4 :
htmltext = "<html><body>Go back to Nanarin..</body></html>"
elif npcId == 30956 and st.getInt("cond") == 4 :
htmltext = "30956_4.htm"
return htmltext
QUEST = Quest(363,qn,"Sorrowful Sounds of Flute")
QUEST.addStartNpc(30956)
QUEST.addTalkId(30956)
QUEST.addTalkId(30595)
QUEST.addTalkId(30959)
\ No newline at end of file
<html><body>Bard Swan:<br>
Please get some black beer from Chef Jonas and take it to Trader Sabrin. Jonas keeps his beer in a<font color="LEVEL"> beer chest</font> and stores it in a warehouse... He becomes quite cross when asked for favors, so it would be best if you handle this without talking to him.<br>
Also, go to the grocery store in the village and find a<font color="LEVEL"> clothes chest</font>. You will find it near Accessory Merchant Sonia. Take the contents of that chest to<font color="LEVEL"> Guard Xaber</font>. Here are the keys to the two chests. Good luck!
</body></html>
<html><body>Bard Swan:<br>
Is this too complicated for you? Would you like for me to explain it again? Take the black beer from Jonas'<font color="LEVEL"> beer chest</font> located in the warehouse and take it to<font color="LEVEL"> Trader Sabrin</font>. Then go to the grocery store and take Sonia's event clothes from the<font color="LEVEL"> clothes chest </font> and take them to<font color="LEVEL"> Guard Xaber</font>.
</body></html>
<html><body>Clothes Chest:<br>
This chest contains the clothing of Accessory Merchant Sonia.<br>
<a action="bypass -h Quest 364_JovialAccordion 30961-03.htm">Open the chest.</a>
</body></html>
\ No newline at end of file
# Made by Mr. Have fun! Version 0.2
# fixed by Elektra and Rolarga Version 0.3
# fixed by Mr and 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 = "364_JovialAccordion"
KEY_1 = 4323
KEY_2 = 4324
BEER = 4321
ECHO = 4421
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [KEY_1, KEY_2, BEER]
def onEvent (self,event,st) :
htmltext = event
if event == "30959-02.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
elif event == "30957-02.htm" :
st.set("cond","2")
st.giveItems(KEY_1,1)
st.giveItems(KEY_2,1)
elif event == "30961-03.htm" :
if st.getQuestItemsCount(KEY_1) :
st.takeItems(KEY_1,1)
htmltext = "30961-02.htm"
elif event == "30960-03.htm" :
if st.getQuestItemsCount(KEY_2) :
st.takeItems(KEY_2,1)
st.giveItems(BEER,1)
htmltext = "30960-02.htm"
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()
if npcId != 30959 and id != State.STARTED : return htmltext
if id == State.CREATED :
st.set("cond","0")
st.set("ok","0")
cond=st.getInt("cond")
if npcId == 30959 :
if cond == 0 :
htmltext = "30959-01.htm"
elif cond == 3 :
st.playSound("ItemSound.quest_finish")
st.giveItems(ECHO,1)
st.exitQuest(1)
htmltext = "30959-03.htm"
elif cond >= 1 :
htmltext = "30959-02.htm"
elif npcId == 30957 :
if cond == 1 :
htmltext = "30957-01.htm"
elif cond == 2 and not st.getQuestItemsCount(KEY_1) and st.getInt("ok"):
st.set("cond","3")
htmltext = "30957-04.htm"
elif cond == 3 :
htmltext = "30957-05.htm"
elif cond == 2 :
htmltext = "30957-03.htm"
elif npcId == 30960 and cond :
htmltext = "30960-01.htm"
elif npcId == 30961 and cond :
htmltext = "30961-01.htm"
elif npcId == 30060 and st.getQuestItemsCount(BEER) :
st.set("ok","1")
st.takeItems(BEER,1)
htmltext = "30060-01.htm"
return htmltext
QUEST = Quest(364,qn,"Ask What You Need to Do")
QUEST.addStartNpc(30959)
for npcId in [30959,30957,30060,30961,30960]:
QUEST.addTalkId(npcId)
\ No newline at end of file
......@@ -119,13 +119,8 @@ public final class Q00116_BeyondTheHillsOfWinter extends Quest
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
QuestState st = getQuestState(player, true);
final QuestState st = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (st == null)
{
return htmltext;
}
switch (st.getState())
{
case State.COMPLETED:
......
<html><body>Trader Woodrow:<br>
Ah, you mean the flute that Swan ordered? It must have arrived at<font color="LEVEL"> Giran Harbor</font> by now...<br>
If you're in a hurry, you can go directly to the harbor and pick it up. I'll give you the item number so you can pick it up from<font color="LEVEL"> Gallion</font> at the harbor.
</body></html>
\ No newline at end of file
Ah, you mean the flute that Swan ordered? It must have arrived at <font color="LEVEL">Giran Harbor</font> by now...<br>
If you're in a hurry, you can go directly to the harbor and pick it up. I'll give you the item number so you can pick it up from <font color="LEVEL">Gallion</font> at the harbor.
</body></html>
<html><body>Trader Woodrow:<br>
Didn't you say that you desperately need the flute? It will take a long time for it to be shipped here. Why don't you go directly to <font color="LEVEL">Giran Harbor</font> and pick it up? Give the item number I gave you to <font color="LEVEL">Gallion</font> at the harbor.
</body></html>
<html><body>Trader Woodrow:<br>
So, we meet again! Please give my regards to Mr. Swan.
</body></html>
<html><body>Musician Nanarin:<br>
What, another package from<font color="LEVEL"> Bard Swan</font>? Oh, my, this is especially beautiful!<br>
What, another package from <font color="LEVEL">Bard Swan</font>? Oh, my, this is especially beautiful!<br>
Hey, you aren't waiting around for a reply, are you? I appreciate all the flutes, but the Bard really isn't my type! Please tell him that my knight in shining armor is someone else!
</body></html>
\ No newline at end of file
</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