Skip to content
Snippets Groups Projects
Commit fc8366e0 authored by Zoey76's avatar Zoey76
Browse files

BETA: Quests in Java:

	* Red-Eyed Invaders (39)
	* The Finest Food (623)

Patch by: janiko
Reviewed by: jurchiks, xban1x, Zoey76
parent f2dc3a85
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 300 deletions
......@@ -280,7 +280,7 @@ quests/Q00035_FindGlitteringJewelry/Q00035_FindGlitteringJewelry.java
quests/Q00036_MakeASewingKit/Q00036_MakeASewingKit.java
quests/Q00037_MakeFormalWear/Q00037_MakeFormalWear.java
quests/Q00038_DragonFangs/Q00038_DragonFangs.java
quests/39_RedEyedInvaders/__init__.py
quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java
quests/Q00040_ASpecialOrder/Q00040_ASpecialOrder.java
quests/Q00042_HelpTheUncle/Q00042_HelpTheUncle.java
quests/Q00043_HelpTheSister/Q00043_HelpTheSister.java
......@@ -607,7 +607,7 @@ quests/Q00619_RelicsOfTheOldEmpire/Q00619_RelicsOfTheOldEmpire.java
quests/620_FourGoblets/__init__.py
quests/Q00621_EggDelivery/Q00621_EggDelivery.java
quests/Q00622_SpecialtyLiquorDelivery/Q00622_SpecialtyLiquorDelivery.java
quests/623_TheFinestFood/__init__.py
quests/Q00623_TheFinestFood/Q00623_TheFinestFood.java
quests/Q00624_TheFinestIngredientsPart1/Q00624_TheFinestIngredientsPart1.java
quests/625_TheFinestIngredientsPart2/__init__.py
quests/Q00626_ADarkTwilight/Q00626_ADarkTwilight.java
......
<html><body>Captain Bathis:<br>
The mission is simple:<br>
Find the Maille Lizardmen on the plains west of the village and kill them!<br>
Their advance unit consists of<font color="LEVEL"> Maille Lizardmen, Maille Lizardmen Scouts and Maille Lizardmen Guards.</font> You must destroy them and stop their advance.<br>
All Maille Lizardmen wear a<font color="LEVEL"> Bone Totem Necklace</font> into battle. Bring me these Necklaces and I'll reward you based how many you bring back. You'll find<font color="LEVEL"> Black Bone Totem Necklaces</font> and<font color="LEVEL"> Red Bone Totem Necklaces</font>. Bring me<font color="LEVEL"> One-hundred</font> of each.<br>
Compared with other tribes, the Maille Lizardmen are physicaly weak. But this is more than made up for by their superior intelligence. When attacking them, you mustn't let them surround you! I've heard they have giant spiders fighting alongside them, so watch out for them!<br>
As I said, you'll find them on the<font color="LEVEL"> plains west of the village</font>. Good hunting!
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
Good job! We won't have to worry about them for a while!<br>
We were sucessful that time, but reports from the battlefield of giant, deadly arachnids are reason for concern... Would you help us get rid of these horrible spiders?<br>
<a action="bypass -h Quest 39_RedEyedInvaders 30332-3.htm">Well, I suppose I'll do it.</a>
</body></html>
\ No newline at end of file
<html><body>Guard Babenco:<br>
I just received a report that a large army of savage<font color="LEVEL"> Maille Lizardmen</font> is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains.<br>
<font color="LEVEL">Captain Bathis</font> is recruting militiamen in Gludio, and we need all the help we can get.<br>
You seem worthly. Would you join us?<br>
<a action="bypass -h Quest 39_RedEyedInvaders 30334-1.htm">I'll help!</a>
</body></html>
\ No newline at end of file
<html><body>Guard Babenco:<br>
I just received a report that a large army of savage<font color="LEVEL"> Maille Lizardmen</font> is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains.<br>
<font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need help, but this is too dangerous for beginners.<br>
(Only a character of level 20 or above can undertake this quest.)</body></html>
\ No newline at end of file
<html><body>Guard Babenco:<br>
Report to<font color="LEVEL"> Captain Bathis</font> for your orders. He's at the<font color="LEVEL"> northern entrance of Gludio Castle Town</font>.
</body></html>
\ No newline at end of file
# Made by disKret, as a part of the
# Official L2J Datapack Project, please visit
# http://www.l2jdp.com/forum/ to meet the community behind it, or
# http://l2jdp.com/trac if you need to report a bug.
import sys
from com.l2jserver import Config
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 = "39_RedEyedInvaders"
#NPC
BABENCO = 30334
BATHIS = 30332
#MOBS
M_LIZARDMAN = 20919
M_LIZARDMAN_SCOUT = 20920
M_LIZARDMAN_GUARD = 20921
ARANEID = 20925
#QUEST DROPS
BLACK_BONE_NECKLACE,RED_BONE_NECKLACE,INCENSE_POUCH,GEM_OF_MAILLE = range(7178,7182)
NECKLACE={M_LIZARDMAN_GUARD:[RED_BONE_NECKLACE,100,BLACK_BONE_NECKLACE,"3"],
M_LIZARDMAN:[BLACK_BONE_NECKLACE,100,RED_BONE_NECKLACE,"3"],
M_LIZARDMAN_SCOUT:[BLACK_BONE_NECKLACE,100,RED_BONE_NECKLACE,"3"]
}
DROPLIST={ARANEID:[GEM_OF_MAILLE,30,INCENSE_POUCH,"5"],
M_LIZARDMAN_GUARD:[INCENSE_POUCH,30,GEM_OF_MAILLE,"5"],
M_LIZARDMAN_SCOUT:[INCENSE_POUCH,30,GEM_OF_MAILLE,"5"]
}
#REWARDS
GREEN_COLORED_LURE_HG = 6521
BABY_DUCK_RODE = 6529
FISHING_SHOT_NG = 6535
def drop(partyMember,array) :
item,max,item2,condition = array
st = partyMember.getQuestState(qn)
count = st.getQuestItemsCount(item)
numItems,chance = divmod(100*Config.RATE_QUEST_DROP,100)
if st.getQuest().getRandom(100) < chance :
numItems = numItems + 1
if count+numItems > max :
numItems = max - count
st.giveItems(item,int(numItems))
if st.getQuestItemsCount(item) == max and st.getQuestItemsCount(item2) == max:
st.playSound("ItemSound.quest_middle")
st.set("cond",condition)
else:
st.playSound("ItemSound.quest_itemget")
return
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = range(7178,7182)
def onEvent (self,event,st) :
htmltext = event
cond = st.getInt("cond")
if st.getState() != State.COMPLETED :
if event == "30334-1.htm" and cond == 0 :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
elif event == "30332-1.htm" and cond == 1 :
st.set("cond","2")
elif event == "30332-3.htm" :
if st.getQuestItemsCount(BLACK_BONE_NECKLACE) == st.getQuestItemsCount(RED_BONE_NECKLACE) == 100 and cond == 3:
st.takeItems(BLACK_BONE_NECKLACE,100)
st.takeItems(RED_BONE_NECKLACE,100)
st.set("cond","4")
else :
htmltext = "You don't have required items"
elif event == "30332-5.htm" :
if st.getQuestItemsCount(INCENSE_POUCH) == st.getQuestItemsCount(GEM_OF_MAILLE) == 30 and cond == 5 :
st.takeItems(INCENSE_POUCH,30)
st.takeItems(GEM_OF_MAILLE,30)
st.giveItems(GREEN_COLORED_LURE_HG,60)
st.giveItems(BABY_DUCK_RODE,1)
st.giveItems(FISHING_SHOT_NG,500)
st.addExpAndSp(62366,2783)
st.unset("cond")
st.playSound("ItemSound.quest_finish")
st.exitQuest(False)
else :
htmltext = "You don't have required items"
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 id == State.COMPLETED :
htmltext = Quest.getAlreadyCompletedMsg(player)
elif npcId == BABENCO :
if id == State.CREATED :
if player.getLevel() >= 20 :
htmltext = "30334-0.htm"
else :
st.exitQuest(1)
htmltext = "30334-2.htm"
else :
htmltext = "30334-3.htm"
elif npcId == BATHIS and id == State.STARTED:
if cond == 1 :
htmltext = "30332-0.htm"
elif st.getQuestItemsCount(BLACK_BONE_NECKLACE) == st.getQuestItemsCount(RED_BONE_NECKLACE) == 100 :
htmltext = "30332-2.htm"
elif st.getQuestItemsCount(INCENSE_POUCH) == st.getQuestItemsCount(GEM_OF_MAILLE) == 30 :
htmltext = "30332-4.htm"
return htmltext
def onKill(self,npc,player,isPet):
npcId = npc.getId()
partyMember = self.getRandomPartyMember(player, 2)
if (partyMember and npcId != ARANEID) :
drop(partyMember,NECKLACE[npcId])
else:
partyMember = self.getRandomPartyMember(player, 4)
if (partyMember and npcId != M_LIZARDMAN) :
drop(partyMember,DROPLIST[npcId])
return
QUEST = Quest(39,qn,"Red Eyed Invaders")
QUEST.addStartNpc(BABENCO)
QUEST.addTalkId(BABENCO)
QUEST.addTalkId(BATHIS)
QUEST.addKillId(M_LIZARDMAN)
QUEST.addKillId(M_LIZARDMAN_SCOUT)
QUEST.addKillId(M_LIZARDMAN_GUARD)
QUEST.addKillId(ARANEID)
\ No newline at end of file
# The Finest Food - v0.1 by disKret & DrLecter
import sys
from com.l2jserver import Config
from com.l2jserver.util import Rnd
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 = "623_TheFinestFood"
#NPC
JEREMY = 31521
#ITEMS
LEAF_OF_FLAVA,BUFFALO_MEAT,ANTELOPE_HORN = range(7199,7202)
#MOBS, DROPS, CHANCES & REWARDS
BUFFALO,FLAVA,ANTELOPE = [ 21315,21316,21318 ]
DROPLIST = {BUFFALO:[BUFFALO_MEAT,99],FLAVA:[LEAF_OF_FLAVA,99],ANTELOPE:[ANTELOPE_HORN,99]}
REWARDS = [[6849,25000,0,11],[6847,65000,12,23],[6851,25000,24,33],[0,73000,34,100]]
#needed count
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = range(7199,7202)
def onEvent (self,event,st) :
cond = st.getInt("cond")
htmltext = event
leaf = st.getQuestItemsCount(LEAF_OF_FLAVA)
meat = st.getQuestItemsCount(BUFFALO_MEAT)
horn = st.getQuestItemsCount(ANTELOPE_HORN)
if event == "31521-03.htm" and cond == 0 :
if st.getPlayer().getLevel() >= 71 :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
else :
htmltext = "31521-02.htm"
st.exitQuest(1)
elif event == "31521-07.htm" :
if cond == 2 and leaf == meat == horn == 100 :
htmltext = "31521-06.htm"
st.playSound("ItemSound.quest_finish")
random = self.getRandom(100)
i = 0
while i < len(REWARDS) :
item,adena,chance,chance2=REWARDS[i]
if chance<=random<= chance2 :
break
i = i+1
st.giveItems(57,adena)
if item :
st.giveItems(item,1)
else :
st.addExpAndSp(230000,18250)
st.takeItems(LEAF_OF_FLAVA,-1)
st.takeItems(BUFFALO_MEAT,-1)
st.takeItems(ANTELOPE_HORN,-1)
st.exitQuest(1)
return htmltext
def onTalk (self,npc,player) :
htmltext = Quest.getNoQuestMsg(player)
st = player.getQuestState(qn)
if st :
cond = st.getInt("cond")
leaf = st.getQuestItemsCount(LEAF_OF_FLAVA)
meat = st.getQuestItemsCount(BUFFALO_MEAT)
horn = st.getQuestItemsCount(ANTELOPE_HORN)
if cond == 0 :
htmltext = "31521-01.htm"
elif st.getState() == State.STARTED :
if cond == 1 :
htmltext = "31521-05.htm"
elif cond == 2 and leaf == meat == horn == 100 :
htmltext = "31521-04.htm"
return htmltext
def onKill(self,npc,player,isPet):
partyMember1 = self.getRandomPartyMember(player, 1)
partyMember2 = self.getRandomPartyMemberState(player, State.COMPLETED)
if not partyMember1 and not partyMember2 : return
partyMember = partyMember1
item,chance = DROPLIST[npc.getId()]
dropchance = Rnd.get(100)
if dropchance < chance:
# player who has State.COMPLETED up to 2 out of 3 item collections may consume the party drop
if partyMember2 :
if Rnd.get(100) <= 66:
return
else :
partyMember = partyMember1
st = partyMember.getQuestState(qn)
if st :
if st.getState() == State.STARTED :
count = st.getQuestItemsCount(item)
if st.getInt("cond") == 1 and count < 100 :
numItems, chance = divmod(chance*Config.RATE_QUEST_DROP,100)
if dropchance < chance:
numItems += 1
if count + numItems >= 100 :
numItems = 100 - count
if numItems != 0 :
st.giveItems(item,int(numItems))
if st.getQuestItemsCount(LEAF_OF_FLAVA) == st.getQuestItemsCount(BUFFALO_MEAT) == st.getQuestItemsCount(ANTELOPE_HORN) == 100 :
st.set("cond","2")
st.playSound("ItemSound.quest_middle")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(623,qn,"The Finest Food")
QUEST.addStartNpc(JEREMY)
QUEST.addTalkId(JEREMY)
for mob in DROPLIST.keys() :
QUEST.addKillId(mob)
\ No newline at end of file
<html><body>Captain Bathis:<br>
Did Guard Babenco send you?<br>
Did Guard Babenco send you?<br>
Hmm... You don't have very good armor, do you? Oh well, I do have to commend you for your bravery!<br>
This is a critical and potentially very dangerous mission! You must listen carefully!<br>
<a action="bypass -h Quest 39_RedEyedInvaders 30332-1.htm">I'm listening.</a>
<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-02.html">"I'm listening."</a>
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
The mission is simple:<br>
Find the Maille Lizardmen on the plains west of the village and kill them!<br>
Their advance unit consists of <font color="LEVEL">Maille Lizardmen, Maille Lizardman Scouts, and Maille Lizardman Guards</font>. You must destroy them and stop their advance.<br>
All Maille Lizardman wear a <font color="LEVEL">Bone Totem Necklace</font> into battle. Bring me these Necklaces and I'll reward you based how many you bring back. You'll find <font color="LEVEL">Black Bone Totem Necklaces</font> and <font color="LEVEL">Red Bone Totem Necklaces</font>. Bring me <font color="LEVEL">One-hundred</font> of each.<br>
Compared with other tribes, the Maille Lizardmen are physically weak. But this is more than made up for by their superior intelligence. When attacking them, you mustn't let them surround you! I've heard they have giant spiders fighting alongside them, so watch out for them!<br>
As I said, you'll find them on the <font color="LEVEL">plains west of the village</font>. Good hunting!
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
The battle continues! The lizardmen may attack at any moment! Drop off your delivery and return to the battlefield immediately!<br>
Don't forget to bring back some war trophies! I need <font color="LEVEL">100 Red Totem Necklaces</font> and <font color="LEVEL">100 black Totem Necklaces</font>. The Maille Lizardmen can be found on the plains west of the village.
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
Good job! We won't have to worry about them for a while!<br>
We were successful that time, but reports from the battlefield of giant, deadly arachnids are reason for concern... Would you help us get rid of these horrible spiders?<br>
<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-05.html">"Well, I suppose I'll do it."</a>
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
I realize you just completed a difficult task, but we still need your help!<br>
We must discover the<font color="LEVEL"> connection between Maille Lizardmen and the Araneids</font>. They've been fighting alongside the lizardmen! This is unheard of!<br>
Return to the<font color="LEVEL"> Maille Lizardmen Barracks</font> and investigate this unholy alliance! You should be able to find out more if you kill<font color="LEVEL"> Maille Lizardmen Scouts and Guards</font> and the<font color="LEVEL"> Giant Araneids</font>.
We must discover the <font color="LEVEL">connection between Maille Lizardmen and the Araneids</font>. They've been fighting alongside the lizardmen! This is unheard of!<br>
Return to the <font color="LEVEL">Maille Lizardman Barracks</font> and investigate this unholy alliance! You should be able to find out more if you kill <font color="LEVEL">Maille Lizardman Scouts and Guards</font> and the <font color="LEVEL"> Giant Araneids</font>.
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
The battle continues! The lizardmen may attack at any moment! Drop off your delivery and return to the battlefield immediately!<br>
Don't forget to bring back some war trophies! I need <font color="LEVEL">100 Red Totem Necklaces</font> and <font color="LEVEL">100 black Totem Necklaces</font>. The Maille Lizardmen can be found on the plains west of the village.
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
Thank you for your hard work, but we still need more items to fully investigate this matter.<br>
I need <font color="LEVEL">30 mysterious Incense Pouches</font> and <font color="LEVEL">30 five-colored beads</font>. Don't let me down!
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
<html><body>Captain Bathis:<br>
You've proven the conspiracy between the Maille Lizardmen and the giant spiders! Magister Rohmer attributes it to the lizardmen's magic. This matter must be investigated further!<br>
We'll get to the bottom of this eventually!<br>
<a action="bypass -h Quest 39_RedEyedInvaders 30332-5.htm">Is my mission over?</a>
<a action="bypass -h Quest Q00039_RedEyedInvaders 30332-09.html">"Is my mission over?"</a>
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
<html><body>Captain Bathis:<br>
Thank you very much! Now we have enough ingredients for Magister Rohmer to determine the roots of this conspiracy! We couldn't have done it without you!<br>
The future of Gludio is secure in the hands of noble warriors like you. Please accept this humble reward as a token of our appreciation!
The future of Gludio is secure in the hands of noble warriors like you. Please accept this humble reward as a token of our appreciation!<br>
</body></html>
\ No newline at end of file
<html><body>Captain Bathis:<br>
Thank you for your hard work, but we still need some more items to fully investigate this matter.<br>
Bring me <font color="LEVEL">30 mysterious Incense Pouches</font> and <font color="LEVEL">30 five-colored beads</font>. I'm counting on you!
</body></html>
\ No newline at end of file
<html><body>Guard Babenco:<br>
I just received a report that a large army of savage <font color="LEVEL">Maille Lizardmen</font> is gathering in the western section of the Town of Gludio. They're not satisfied staying on the plains.<br><font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need all the help we can get.<br>
You seem worthy. Would you join us?<br>
<a action="bypass -h Quest Q00039_RedEyedInvaders 30334-03.htm">"I'll help!"</a>
</body></html>
\ No newline at end of file
<html><body>Guard Babenco:<br>
I just received a report that a large army of savage <font color="LEVEL">Maille Lizardmen</font> is gathering in the western section of the Town of Gludio. They're not satisfied staying on the plains.<br><font color="LEVEL">Captain Bathis</font> is recruiting militiamen in Gludio, and we need help, but this is too dangerous for beginners.<br>
(Only a character of level 20 or above can undertake this quest.)
</body></html>
\ No newline at end of file
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