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

BETA: Quest Expulsion of Evil Spirits (311) in Java.

	* Solo boss AI will be added soon.

Note: High Five feature.
parent 023bb325
No related branches found
No related tags found
No related merge requests found
Showing
with 147 additions and 226 deletions
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="326" id="14882" />
<!-- Recipe: Sealed Dynasty Breast Plate (60%) -->
<production count="1" id="9482" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="204" id="14882" />
<!-- Recipe: Sealed Dynasty Gaiter (60%) -->
<production count="1" id="9483" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="122" id="14882" />
<!-- Recipe: Sealed Dynasty Helmet (60%) -->
<production count="1" id="9484" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="82" id="14882" />
<!-- Recipe: Sealed Dynasty Gauntlet (60%) -->
<production count="1" id="9485" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="82" id="14882" />
<!-- Recipe: Sealed Dynasty Boots (60%) -->
<production count="1" id="9486" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="244" id="14882" />
<!-- Recipe: Sealed Dynasty Leather Armor (60%) -->
<production count="1" id="9487" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="153" id="14882" />
<!-- Recipe: Sealed Dynasty Leather Leggings (60%) -->
<production count="1" id="9488" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="122" id="14882" />
<!-- Recipe: Sealed Dynasty Leather Helmet (60%) -->
<production count="1" id="9489" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="82" id="14882" />
<!-- Recipe: Sealed Dynasty Leather Gloves (60%) -->
<production count="1" id="9490" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="82" id="14882" />
<!-- Recipe: Sealed Dynasty Leather Boots (60%) -->
<production count="1" id="9491" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="86" id="14882" />
<!-- Recipe: Sealed Dynasty Shield (60%) -->
<production count="1" id="9497" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="24" id="14882" />
<!-- Leonard -->
<production count="1" id="9628" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="43" id="14882" />
<!-- Adamantine -->
<production count="1" id="9629" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="36" id="14882" />
<!-- Orichalcum -->
<production count="1" id="9630" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="667" id="14882" />
<!-- Giant's Codex - Oblivion -->
<production count="1" id="9625" />
</item>
<item>
<!-- Ragna Orc's Amulet -->
<ingredient count="1000" id="14882" />
<!-- Giant's Codex - Discipline -->
<production count="1" id="9626" />
</item>
</list>
\ No newline at end of file
......@@ -256,7 +256,6 @@ quests/234_FatesWhisper/__init__.py
quests/236_SeedsOfChaos/__init__.py
quests/255_Tutorial/__init__.py
quests/299_GatherIngredientsForPie/__init__.py
quests/311_ExpulsionOfEvilSpirits/__init__.py
quests/330_AdeptOfTaste/__init__.py
quests/333_BlackLionHunt/__init__.py
quests/334_TheWishingPotion/__init__.py
......
......@@ -101,7 +101,10 @@ public class DenOfEvil extends AbstractNpcAI
super(DenOfEvil.class.getSimpleName(), "ai/group_template");
addKillId(EYE_IDS);
addSpawnId(EYE_IDS);
spawnEyes();
for (Location loc : EYE_SPAWNS)
{
addSpawn(EYE_IDS[getRandom(EYE_IDS.length)], loc, false, 0);
}
}
private int getSkillIdByNpcId(int npcId)
......@@ -153,14 +156,6 @@ public class DenOfEvil extends AbstractNpcAI
return super.onKill(npc, killer, isSummon);
}
private void spawnEyes()
{
for (Location loc : EYE_SPAWNS)
{
addSpawn(EYE_IDS[getRandom(EYE_IDS.length)], loc, false, 0);
}
}
private class RespawnNewEye implements Runnable
{
private final Location _loc;
......
......@@ -26,6 +26,7 @@ import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
......@@ -38,7 +39,7 @@ import com.l2jserver.gameserver.util.Broadcast;
*/
public abstract class AbstractNpcAI extends Quest
{
public Logger _log = Logger.getLogger(getClass().getSimpleName());
public final Logger _log = Logger.getLogger(getClass().getSimpleName());
public AbstractNpcAI(String name, String descr)
{
......@@ -172,8 +173,39 @@ public abstract class AbstractNpcAI extends Quest
*/
protected void attackPlayer(L2Attackable npc, L2Playable playable)
{
attackPlayer(npc, playable, 999);
}
/**
* Monster is running and attacking the target.
* @param npc the NPC that performs the attack
* @param target the target of the attack
* @param desire the desire to perform the attack
*/
protected void attackPlayer(L2Npc npc, L2Playable target, int desire)
{
if (npc instanceof L2Attackable)
{
((L2Attackable) npc).addDamageHate(target, 0, desire);
}
npc.setIsRunning(true);
npc.addDamageHate(playable, 0, 999);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, playable);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
}
/**
* Monster cast an skill to the character.
* @param npc the NPC whom cast the skill
* @param target the skill target
* @param skill the skill to cast
* @param desire the desire to cast the skill
*/
protected void castSkill(L2Npc npc, L2Character target, SkillHolder skill, int desire)
{
if (npc instanceof L2Attackable)
{
((L2Attackable) npc).addDamageHate(target, 0, desire);
}
npc.setTarget(target);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, skill.getSkill(), target);
}
}
\ No newline at end of file
<html><body>Cheiren:<br>
How did you do? Let's see some proof of your efforts.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-13.htm">Receive reward for Ragna Orc Amulets.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-14.htm">Receive reward for 10 Soul Cores Containing Evil Spirits.</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Choose from one of the following reward items:<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-13a.htm">S80 Armor Recipe</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-13b.htm">Giant's Codex: Oblivion, Discipline</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-13c.htm">Premium Material</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Choose the recipe you wish to receive.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9482">Recipe: Sealed Dynasty Breast Plate (60%) (Ragna Orc's Amulet 488)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9483">Recipe: Sealed Dynasty Gaiters (60%) (Ragna Orc's Amulet 305)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9484">Recipe: Sealed Dynasty Helm (60%) (Ragna Orc's Amulet 183)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9485">Recipe: Sealed Dynasty Gauntlets (60%) (Ragna Orc's Amulet 122)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9486">Recipe: Sealed Dynasty Boots (60%) (Ragna Orc's Amulet 122)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9487">Recipe: Sealed Dynasty Leather Mail (60%) (Ragna Orc's Amulet 366)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9488">Recipe: Sealed Dynasty Leather Leggings (60%) (Ragna Orc's Amulet 229)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9489">Recipe: Sealed Dynasty Leather Helm(60%) (Ragna Orc's Amulet 183)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9490">Recipe: Sealed Dynasty Leather Gloves (60%) (Ragna Orc's Amulet 122)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9491">Recipe: Sealed Dynasty Leather Boots (60%) (Ragna Orc's Amulet 122)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9497">Recipe: Sealed Dynasty Shield (60%) (Ragna Orc's Amulet 129)</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Choose the codex you wish to receive.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9625">Giant's Codex: Obvilion (Ragna Orc's Amulet 667)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9626">Giant's Codex: Discipline (Ragna Orc's Amulet 1000)</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Ah, choose the material you wish to receive.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9628">Leonard (Ragna Orc's Amulet 24)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9629">Adamantium (Ragna Orc's Amulet 43)</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 9630">Orikalkum (Ragna Orc's Amulet 36)</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Before I can give you that item, you must bring more amulets as proof of your efforts.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-12.htm">Receive another item.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-quit.htm">Say you want to quit.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-11.htm">Keep hunting.</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Here is the reward I promised you.<br>
Will you continue your efforts on our behalf?<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-12.htm">Receive another item.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-quit.htm">Say you want to quit.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-11.htm">Keep hunting.</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
You have brought back 10 Soul Core Containing Evil Spirits.. If I combine the power of this core with this pendant... Well, these are the <font color="LEVEL">Protection Soul's Pendant</font>. These are essential to confront the head of Raguna Orc <font color="LEVEL">Baranka</font>. Without these items, one can never be able to endure the energy of the evil spirit.<br>
If you go to the altar of Kasha and kill it, it will be of a great help to weaken the evil spirit.<br>
Anything else?
<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-12.htm">Settle other items.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-quit.htm">Say that you quit your mission.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-11.htm">Continue with the mission.</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
You don't have enough here! If you didn't bring me at least 10 Soul Cores Containing Evil Spirits, I cannot exchange them for you.<br>
Is there anything else?<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-12.htm">Receive another item.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-quit.htm">Say you want to quit.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-11.htm">Keep hunting.</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
Foolish Baranka! You were exiled because of your mad obsession with evil, and now you have embraced the power of Kasha without hesitation or remorse. There can be no doubt of your fate...<br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>
\ No newline at end of file
# Created by Gnacik
# 2010-02-16 based on official Franz server
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 = "311_ExpulsionOfEvilSpirits"
CHAIREN = 32655
SOUL_CORE = 14881
SOUL_PENDANT = 14848
RAGNA_ORCS_AMULET = 14882
DROP_CHANCE = 20
MOBS = [22691,22692,22693,22694,22695,22696,22697,22698,22699,22700,22701,22702]
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [SOUL_CORE,RAGNA_ORCS_AMULET]
def onExchangeRequest (self,event,st,qty) :
st.rewardItems(int(event),1)
st.takeItems(RAGNA_ORCS_AMULET,qty)
st.playSound("ItemSound.quest_finish")
return "32655-13ok.htm"
def onAdvEvent (self,event,npc,player) :
htmltext = event
st = player.getQuestState(qn)
if not st : return
if event == "32655-yes.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
elif event.isdigit() :
f = st.getQuestItemsCount(RAGNA_ORCS_AMULET)
if int(event) == 9482 and f >= 488 : # Recipe: Sealed Dynasty Breast Plate (60%)
htmltext = self.onExchangeRequest(event,st,488)
elif int(event) == 9483 and f >= 305 : # Recipe: Sealed Dynasty Gaiter (60%)
htmltext = self.onExchangeRequest(event,st,305)
elif int(event) == 9484 and f >= 183 : # Recipe: Sealed Dynasty Helmet (60%)
htmltext = self.onExchangeRequest(event,st,183)
elif int(event) == 9485 and f >= 122 : # Recipe: Sealed Dynasty Gauntlet (60%)
htmltext = self.onExchangeRequest(event,st,122)
elif int(event) == 9486 and f >= 122 : # Recipe: Sealed Dynasty Boots (60%)
htmltext = self.onExchangeRequest(event,st,122)
elif int(event) == 9487 and f >= 366 : # Recipe: Sealed Dynasty Leather Armor (60%)
htmltext = self.onExchangeRequest(event,st,366)
elif int(event) == 9488 and f >= 229 : # Recipe: Sealed Dynasty Leather Leggings (60%)
htmltext = self.onExchangeRequest(event,st,229)
elif int(event) == 9489 and f >= 183 : # Recipe: Sealed Dynasty Leather Helmet (60%)
htmltext = self.onExchangeRequest(event,st,183)
elif int(event) == 9490 and f >= 122 : # Recipe: Sealed Dynasty Leather Gloves (60%)
htmltext = self.onExchangeRequest(event,st,122)
elif int(event) == 9491 and f >= 122 : # Recipe: Sealed Dynasty Leather Boots (60%)
htmltext = self.onExchangeRequest(event,st,122)
elif int(event) == 9497 and f >= 129 : # Recipe: Sealed Dynasty Shield (60%)
htmltext = self.onExchangeRequest(event,st,129)
elif int(event) == 9625 and f >= 667 : # Giant's Codex - Oblivion
htmltext = self.onExchangeRequest(event,st,667)
elif int(event) == 9626 and f >= 1000 : # Giant's Codex - Discipline
htmltext = self.onExchangeRequest(event,st,1000)
elif int(event) == 9628 and f >= 24 : # Leonard
htmltext = self.onExchangeRequest(event,st,24)
elif int(event) == 9629 and f >= 43 : # Leonard
htmltext = self.onExchangeRequest(event,st,43)
elif int(event) == 9630 and f >= 36 : # Adamantine
htmltext = self.onExchangeRequest(event,st,36)
else :
htmltext = "32655-13no.htm"
elif event == "32655-14.htm" :
if st.getQuestItemsCount(SOUL_CORE) >= 10 :
st.takeItems(SOUL_CORE,10)
st.giveItems(SOUL_PENDANT,1)
else:
htmltext = "32655-14no.htm"
elif event == "32655-quit.htm" :
st.unset("cond")
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()
cond = st.getInt("cond")
if npcId == CHAIREN:
if cond == 0:
if player.getLevel() >= 80 :
htmltext = "32655-01.htm"
else :
htmltext = "32655-lvl.htm"
st.exitQuest(1)
elif st.getState() == State.STARTED :
if st.getQuestItemsCount(SOUL_CORE) >= 1 or st.getQuestItemsCount(RAGNA_ORCS_AMULET) >= 1 :
htmltext = "32655-12.htm"
else :
htmltext = "32655-10.htm"
return htmltext
def onKill(self,npc,player,isPet) :
st = player.getQuestState(qn)
if not st : return
if st.getState() != State.STARTED : return
npcId = npc.getId()
cond = st.getInt("cond")
if cond == 1 and npcId in MOBS :
rand = self.getRandom(100)
if rand == 1 :
st.giveItems(SOUL_CORE,1)
st.playSound("ItemSound.quest_itemget")
else :
chance = DROP_CHANCE*Config.RATE_QUEST_DROP
numItems, chance = divmod(chance,100)
if rand < chance :
numItems += 1
if numItems :
st.giveItems(RAGNA_ORCS_AMULET,int(numItems))
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(311,qn,"Expulsion of Evil Spirits")
QUEST.addStartNpc(CHAIREN)
QUEST.addTalkId(CHAIREN)
for i in MOBS :
QUEST.addKillId(i)
\ No newline at end of file
<html><body>Cheiren:<br>
Us beacon watchers have been observing the Ragna Orcs for quite some time now. We've done all we can since the sparks of rebellion first erupted from their lands, but our efforts to control them have been fruitless so far.<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-02.htm">"Please tell me what happened."</a>
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-03.htm">"Please tell me what happened."</a>
</body></html>
\ No newline at end of file
<html><body>Cheiren:<br>
In their arrogance, the Ragna Orcs summoned the power of the evil spirit Kasha. Now Kasha has corrupted them, making them even more vicious and dangerous.<br>Unless we can stop them, all the Orc tribes will be in grave danger...<br>
In their arrogance, the Ragna Orcs summoned the power of the evil spirit Kasha. Now Kasha has corrupted them, making them even more vicious and dangerous.<br>
Unless we can stop them, all the Orc tribes will be in grave danger...<br>
Will you help us?<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-yes.htm">Say yes.</a>
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-04.htm">Say yes.</a>
</body></html>
\ No newline at end of file
......@@ -2,6 +2,6 @@
What's holding you back? If you're not up for this mission, you'd better let me know now...<br>
Otherwise, go hunt <font color="LEVEL">Ragna Orcs</font> and the <font color="LEVEL">Evil Spirit of Baranka, the Destroyer of Baranka</font>. Since they are possessed by evil spirits emanating from the <font color="LEVEL">Ragna Orc Amulets</font> they wear, you must retrieve those accursed pendants. The more you bring me, the higher your reward.<br>
Some Ragna Orcs carry the <font color="LEVEL">Soul Core Containing Evil Spirit</font> instead of an amulet. If you collect 10 of those, you may challenge the Leader of the Ragna Orcs to a duel. Do not do so lightly!<br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-quit.htm">Say you want to quit.</a><br>
<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-11.htm">Keep hunting.</a>
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say you want to quit.</a><br>
<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Keep hunting.</a>
</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