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

BETA: Quest '''Trespassing into the Holy Ground''' (368) in Java.

parent 4588b3ed
No related branches found
No related tags found
No related merge requests found
Showing
with 175 additions and 89 deletions
......@@ -492,7 +492,7 @@ quests/364_JovialAccordion/__init__.py
quests/Q00365_DevilsLegacy/Q00365_DevilsLegacy.java
quests/366_SilverHairedShaman/__init__.py
quests/367_ElectrifyingRecharge/__init__.py
quests/368_TrespassingIntoTheSacredArea/__init__.py
quests/Q00368_TrespassingIntoTheHolyGround/Q00368_TrespassingIntoTheHolyGround.java
quests/369_CollectorOfJewels/__init__.py
quests/370_AWisemanSowsSeeds/__init__.py
quests/371_ShriekOfGhosts/__init__.py
......
<html><body>Priestess Restina:<br>
As I said, go to the<font color="LEVEL"> Garden of Eva</font> and slay the<font color="LEVEL"> blade stakato, the blade stakato worker, the blade stakato warrior, and the blade stakato drone</font>. As a proof of your victory bring me back their<font color="LEVEL"> fangs</font>. You'll be rewarded for your efforts.<br>
<a action="bypass -h Quest 368_TrespassingIntoTheSacredArea 30926-05.htm">"No, I quit."</a><br>
<a action="bypass -h npc_%objectId%_Chat">"I will continue to hunt the stakatos."</a>
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
Thank you for helping us. As promised, you shall recieve a reward<font color="LEVEL"> commensurate with your performance</font>.<br>Your brave efforts have spelled the doom of all who have invaded the Garden of Eva! Will you stay and help us finish them off?<br>
<a action="bypass -h Quest 368_TrespassingIntoTheSacredArea 30926-05.htm">"I must be going."</a><br>
<a action="bypass -h npc_%objectId%_Chat">"Death to the blade stakatos!"</a>
</body></html>
\ No newline at end of file
# Made by mtrix
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 = "368_TrespassingIntoTheSacredArea"
ADENA = 57
BLADE_STAKATO_FANG = 5881
CHANCE = 9
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [BLADE_STAKATO_FANG]
def onEvent (self,event,st) :
htmltext = event
if event == "30926-02.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
elif event == "30926-05.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()
level = player.getLevel()
cond = st.getInt("cond")
amount = st.getQuestItemsCount(BLADE_STAKATO_FANG)
if id == State.CREATED :
if level>=36 :
htmltext = "30926-01.htm"
else :
htmltext = "<html><body>(This is a quest that can only be performed by players of level 36 and above.)</body></html>"
elif cond and not amount :
htmltext = "30926-03.htm"
elif amount :
htmltext = "30926-04.htm"
st.giveItems(ADENA,amount*1250)
st.takeItems(BLADE_STAKATO_FANG,-1)
st.playSound("ItemSound.quest_middle")
return htmltext
def onKill(self,npc,player,isPet):
partyMember = self.getRandomPartyMemberState(player,State.STARTED)
if not partyMember : return
st = partyMember.getQuestState(qn)
chance = CHANCE + npc.getId() - 20794
numItems, chance = divmod(chance * Config.RATE_QUEST_DROP,100)
if self.getRandom(100) < chance :
numItems += 1
if numItems :
st.giveItems(BLADE_STAKATO_FANG,1)
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(368,qn,"Trespassing Into The Sacred Area")
QUEST.addStartNpc(30926)
QUEST.addTalkId(30926)
for i in range(20794,20798) :
QUEST.addKillId(i)
\ No newline at end of file
<html><body>Priestess Restina:<br>
Have you heard of the<font color="LEVEL"> Garden of Eva</font>? You may occasionally find goddess herself resting there.<br>
She doens't like to be disturbed, so her garden is in the deepest part of sea, with entry gained only through an elaborate labyrinth.<br>
Recently,<font color="LEVEL"> some who wish to harm her</font> have invaded her sanctuary. She's not there at the moment, and we, her priests and guards, are trying our best to drive out the invaders. However, this task is proving more than we can handle.<br>
Have you heard of the <font color="LEVEL">Garden of Eva</font>? You may occasionally find the goddess herself resting there.<br>
She doesn't like to be disturbed, so her garden is in the deepest part of the sea, with entry gained only through an elaborate labyrinth.<br>
Recently, <font color="LEVEL">some who wish to harm her</font> have invaded her sanctuary. She's not there at the moment, and we, her priests and guards, are trying our best to drive out the invaders. However, this task is proving more than we can handle.<br>
We're enlisting the help of outsiders to defeat them. Will you help us?<br>
<a action="bypass -h Quest 368_TrespassingIntoTheSacredArea 30926-02.htm">"I will help."</a>
<a action="bypass -h Quest Q00368_TrespassingIntoTheHolyGround 30926-02.html">"I will help."</a>
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
Thank you. You should know that it is forbidden for outsiders to enter the Garden of Eva. We are breaking the rules, but these are desperate times.<br>
Go to the<font color="LEVEL"> Garden of Eva</font> and slay the<font color="LEVEL"> blade stakato, the blade stakato worker, the blade stakato warrior, and the blade stakato drone</font>. As proof of your victory, bring back their<font color="LEVEL"> fangs</font>. You'll be rewarded for your efforts.
Go to the <font color="LEVEL">Garden of Eva</font> and slay the <font color="LEVEL">blade stakato, the blade stakato worker, the blade stakato warrior and the blade stakato drone</font>. As proof of your victory, bring back their <font color="LEVEL">fangs</font>. You'll be well rewarded for your efforts.
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
Have you heard of the <font color="LEVEL">Garden of Eva</font>? You may occasionally find the goddess herself resting there.<br>
She doesn't like to be disturbed, so her garden is in the deepest part of the sea, with entry gained only through an elaborate labyrinth.<br>
Recently, <font color="LEVEL">some who wish to harm her</font> have invaded her sanctuary. She's not there at the moment, and we, her priests and guards, are trying our best to drive out the invaders. However, this task is proving more than we can handle.<br>
We need help desperately, but I'm afraid you're not yet up to the task.<br>
(This quest may only be undertaken by a character of level 36 or above.)
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
Thank you for helping us. As promised, you shall receive a reward <font color="LEVEL">commensurate with your performance</font>.<br>
Your brave efforts have spelled the doom of all who have invaded the Garden of Eva! Will you stay and help us finish them off?<br>
<a action="bypass -h Quest Q00368_TrespassingIntoTheHolyGround 30926-05.html">"I must be going."</a><br>
<a action="bypass -h Quest Q00368_TrespassingIntoTheHolyGround 30926-06.html">"Death to the blade stakatos!"</a>
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
I'm sorry to hear that. I'm sure you have your own reasons. Thank you for your help.<br>
May the blessing of Eva be with you always...
I'm sorry to hear that. I'm sure you have your own reasons. Thank you for your help.<br>May the blessing of Eva be with you always...
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
I knew I could count on you!
</body></html>
\ No newline at end of file
<html><body>Priestess Restina:<br>
As I said, go to the <font color="LEVEL">Garden of Eva</font> and slay the <font color="LEVEL">blade stakato, the blade stakato worker, the blade stakato warrior and the blade stakato drone</font>. As proof of your victory bring back their <font color="LEVEL">fangs</font>. You'll be well rewarded for your efforts.<br>
<a action="bypass -h Quest Q00368_TrespassingIntoTheHolyGround 30926-05.html">"No, I quit."</a><br>
<a action="bypass -h Quest Q00368_TrespassingIntoTheHolyGround 30926-06.html">"I will continue to hunt the stakatos."</a>
</body></html>
\ No newline at end of file
/*
* Copyright (C) 2004-2013 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00368_TrespassingIntoTheHolyGround;
import java.util.HashMap;
import java.util.Map;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
/**
* Trespassing into the Holy Ground (368)
* @author Adry_85
*/
public final class Q00368_TrespassingIntoTheHolyGround extends Quest
{
// NPC
private static final int RESTINA = 30926;
// Item
private static final int BLADE_STAKATO_FANG = 5881;
// Misc
private static final int MIN_LEVEL = 36;
// Mobs
private static final Map<Integer, Double> MOBS = new HashMap<>();
static
{
MOBS.put(20794, 0.60); // blade_stakato
MOBS.put(20795, 0.57); // blade_stakato_worker
MOBS.put(20796, 0.61); // blade_stakato_soldier
MOBS.put(20797, 0.93); // blade_stakato_drone
}
private Q00368_TrespassingIntoTheHolyGround()
{
super(368, Q00368_TrespassingIntoTheHolyGround.class.getSimpleName(), "Trespassing into the Holy Ground");
addStartNpc(RESTINA);
addTalkId(RESTINA);
addKillId(MOBS.keySet());
registerQuestItems(BLADE_STAKATO_FANG);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = player.getQuestState(getName());
if (st == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "30926-02.html":
{
st.startQuest();
htmltext = event;
break;
}
case "30926-05.html":
{
st.exitQuest(true, true);
htmltext = event;
break;
}
case "30926-06.html":
{
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
if (st != null)
{
giveItemRandomly(player, npc, BLADE_STAKATO_FANG, 1, 0, MOBS.get(npc.getId()), true);
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
QuestState st = player.getQuestState(getName());
String htmltext = getNoQuestMsg(player);
if (st == null)
{
return htmltext;
}
if (st.isCreated())
{
htmltext = ((player.getLevel() >= MIN_LEVEL) ? "30926-01.htm" : "30926-03.html");
}
else if (st.isStarted())
{
if (hasQuestItems(player, BLADE_STAKATO_FANG))
{
final long count = getQuestItemsCount(player, BLADE_STAKATO_FANG);
final long bonus = (count >= 10 ? 9450 : 2000);
giveAdena(player, (count * 250) + bonus, true);
takeItems(player, BLADE_STAKATO_FANG, -1);
htmltext = "30926-04.html";
}
else
{
htmltext = "30926-07.html";
}
}
return htmltext;
}
public static void main(String args[])
{
new Q00368_TrespassingIntoTheHolyGround();
}
}
UPDATE character_quests SET name='Q00368_TrespassingIntoTheHolyGround' WHERE name='368_TrespassingIntoTheSacredArea';
\ 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