diff --git a/L2J_DataPack_BETA/dist/game/data/multisell/2010.xml b/L2J_DataPack_BETA/dist/game/data/multisell/2010.xml new file mode 100644 index 0000000000000000000000000000000000000000..80e3ecaefd9a47b98248f120d50a5478fb36eb23 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/multisell/2010.xml @@ -0,0 +1,99 @@ +<?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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 75993d5f30c7de47253c10583f017cf66cdca8a3..9e6544552be5eae52a41380174c1a2be00ccf594 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/DenOfEvil.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/DenOfEvil.java index f3baa70705e6bad2ca65730c4da1837d7ea163b8..8afc3d002acdbe5f9ebc5be3a89683c97b1eb8ea 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/DenOfEvil.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/DenOfEvil.java @@ -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; diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java index e1156a1a43939c027c22d386aa410ef806de79a0..33532636cc5aa095e3c35369b811d79d8bb09399 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java @@ -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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-02.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-02.htm deleted file mode 100644 index 492659d372df837871ad7269971258b4f232e0d3..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-02.htm +++ /dev/null @@ -1,5 +0,0 @@ -<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> -Will you help us?<br> -<a action="bypass -h Quest 311_ExpulsionOfEvilSpirits 32655-yes.htm">Say yes.</a> -</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-12.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-12.htm deleted file mode 100644 index dc8af943aa59564dde0f054013bce9859ddf548b..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-12.htm +++ /dev/null @@ -1,5 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13.htm deleted file mode 100644 index 242c52778650385385d1defe6380830eb917d76e..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13.htm +++ /dev/null @@ -1,6 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13a.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13a.htm deleted file mode 100644 index 306b8f3291ea8c869d107eb6659b759d4a5d8f1d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13a.htm +++ /dev/null @@ -1,14 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13b.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13b.htm deleted file mode 100644 index 476d51700ac3d8fa630399e807b5727895dd03fc..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13b.htm +++ /dev/null @@ -1,5 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13c.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13c.htm deleted file mode 100644 index e168e091b2284212a002519f326f728fe408c91a..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13c.htm +++ /dev/null @@ -1,6 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13no.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13no.htm deleted file mode 100644 index 2003836c93c95f1e7b5097da9ad0a0b1a911fa7a..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13no.htm +++ /dev/null @@ -1,6 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13ok.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13ok.htm deleted file mode 100644 index 354d1b75728ca7e89d7e0d8edb69ca4ad2f5e013..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-13ok.htm +++ /dev/null @@ -1,7 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14.htm deleted file mode 100644 index 4d2488b94698294d78d9e938865567d4ef9d0349..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14.htm +++ /dev/null @@ -1,9 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14no.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14no.htm deleted file mode 100644 index b23f28be70df418085fde93eee426795d6af5e1c..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-14no.htm +++ /dev/null @@ -1,7 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655.htm deleted file mode 100644 index 29591e07f06f46a9d3390351820b67e176a8fc6c..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655.htm +++ /dev/null @@ -1,4 +0,0 @@ -<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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/__init__.py b/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/__init__.py deleted file mode 100644 index 2438e82015711c43794c8181c0d1d14d8cb1c40d..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/__init__.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-01.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-01.htm similarity index 70% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-01.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-01.htm index 441be3dc31899f1a9ba5f87e0f12b29084a8b85c..c1d508072a69ccfaae378290b9dc92703cc0e150 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-01.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-01.htm @@ -1,4 +1,4 @@ <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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-lvl.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-02.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-lvl.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-02.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-03.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-03.htm new file mode 100644 index 0000000000000000000000000000000000000000..ea26124900d18f48d35464089e5aef2cf819d4ac --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-03.htm @@ -0,0 +1,6 @@ +<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> +Will you help us?<br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-04.htm">Say yes.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-yes.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-04.htm similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-yes.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-04.htm diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-10.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-05.html similarity index 78% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-10.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-05.html index e0d751e005453928bca0a217f8881e28376cdb91..ac7833e24c8d3099436b74bf16278426b4559d27 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-10.htm +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-05.html @@ -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 diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-06.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-06.html new file mode 100644 index 0000000000000000000000000000000000000000..7d24f8b71f27010603281f14eb24f3f66ce2f2ae --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-06.html @@ -0,0 +1,5 @@ +<html><body>Cheiren:<br> +How did you do? If you present proof of the courage that you displayed, I will give you a fitting reward.<br> +<a action="bypass -h npc_%objectId%_multisell 2010">Receive reward for the Ragna Orc's Amulet.</a><br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-11.html">Receive reward for 10 Soul Cores Containing Evil Spirits.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-11.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-11.html new file mode 100644 index 0000000000000000000000000000000000000000..06a02dc1d364f53e7315f1d0c27ae049fd8a691b --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-11.html @@ -0,0 +1,7 @@ +<html><body>Cheiren:<br> +You have brought back 10 Soul Cores! If I combine the power of these cores with this pendant... like... so. This is the <font color="LEVEL">Guardian Spirit's Pendant</font>! This item is absolutely necessary to stand against <font color="LEVEL">Varangka</font>, the chief of the Ragna Orcs. Without this item, you will not be able to endure his evil powers.<br> +Go west to Kasha's Altar and defeat him, and the power of the evil spirits in this place will be greatly decreased.<br> +<a action="bypass -h npc_%objectId%_multisell 2010">Settle other items.</a><br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say that you are quitting the mission.</a><br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Continue the mission.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-12.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-12.html new file mode 100644 index 0000000000000000000000000000000000000000..66eb801dc21bf6faf732bcb4eae6b0ae2632f722 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-12.html @@ -0,0 +1,7 @@ +<html><body>Cheiren:<br> +There must be at least 10 Soul Cores Containing Evil Spirits. You did not bring back 10.<br> +Is there anything else?<br> +<a action="bypass -h npc_%objectId%_multisell 2010">Settle other items.</a><br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-13.html">Say that you are quitting the mission.</a><br> +<a action="bypass -h Quest Q00311_ExpulsionOfEvilSpirits 32655-15.html">Continue the mission.</a> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-quit.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-13.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-quit.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-13.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-14.html b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-14.html new file mode 100644 index 0000000000000000000000000000000000000000..27026b421921e3dbcec507c9ad4c60695f1ad58d --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-14.html @@ -0,0 +1,3 @@ +<html><body>Cheiren:<br> +Are you sure you want to stop? You still have items you haven't traded yet. Why not do so first? +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-11.htm b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-15.html similarity index 100% rename from L2J_DataPack_BETA/dist/game/data/scripts/quests/311_ExpulsionOfEvilSpirits/32655-11.htm rename to L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/32655-15.html diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/Q00311_ExpulsionOfEvilSpirits.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/Q00311_ExpulsionOfEvilSpirits.java new file mode 100644 index 0000000000000000000000000000000000000000..8b5ce76b14f712c4f07acc2815024b958c4fee5d --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00311_ExpulsionOfEvilSpirits/Q00311_ExpulsionOfEvilSpirits.java @@ -0,0 +1,176 @@ +/* + * Copyright (C) 2004-2014 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.Q00311_ExpulsionOfEvilSpirits; + +import java.util.HashMap; +import java.util.Map; + +import com.l2jserver.gameserver.enums.QuestSound; +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; + +/** + * Expulsion of Evil Spirits (311) + * @author Zoey76 + */ +public final class Q00311_ExpulsionOfEvilSpirits extends Quest +{ + // NPC + private static final int CHAIREN = 32655; + // Items + private static final int PROTECTION_SOULS_PENDANT = 14848; + private static final int SOUL_CORE_CONTAINING_EVIL_SPIRIT = 14881; + private static final int RAGNA_ORCS_AMULET = 14882; + // Misc + private static final int MIN_LEVEL = 80; + private static final int SOUL_CORE_COUNT = 10; + private static final int RAGNA_ORCS_KILLS_COUNT = 100; + private static final int RAGNA_ORCS_AMULET_COUNT = 10; + // Monsters + private static final Map<Integer, Double> MONSTERS = new HashMap<>(); + static + { + MONSTERS.put(22691, 0.694); // Ragna Orc + MONSTERS.put(22692, 0.716); // Ragna Orc Warrior + MONSTERS.put(22693, 0.736); // Ragna Orc Hero + MONSTERS.put(22694, 0.712); // Ragna Orc Commander + MONSTERS.put(22695, 0.698); // Ragna Orc Healer + MONSTERS.put(22696, 0.692); // Ragna Orc Shaman + MONSTERS.put(22697, 0.640); // Ragna Orc Seer + MONSTERS.put(22698, 0.716); // Ragna Orc Archer + MONSTERS.put(22699, 0.752); // Ragna Orc Sniper + MONSTERS.put(22701, 0.716); // Varangka's Dre Vanul + MONSTERS.put(22702, 0.662); // Varangka's Destroyer + } + + public Q00311_ExpulsionOfEvilSpirits() + { + super(311, Q00311_ExpulsionOfEvilSpirits.class.getSimpleName(), "Expulsion of Evil Spirits"); + addStartNpc(CHAIREN); + addTalkId(CHAIREN); + addKillId(MONSTERS.keySet()); + registerQuestItems(SOUL_CORE_CONTAINING_EVIL_SPIRIT, RAGNA_ORCS_AMULET); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + if (player.getLevel() < MIN_LEVEL) + { + return null; + } + + switch (event) + { + case "32655-03.htm": + case "32655-15.html": + { + htmltext = event; + break; + } + case "32655-04.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32655-11.html": + { + if (getQuestItemsCount(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT) >= SOUL_CORE_COUNT) + { + takeItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT, SOUL_CORE_COUNT); + giveItems(player, PROTECTION_SOULS_PENDANT, 1); + htmltext = event; + } + else + { + htmltext = "32655-12.html"; + } + break; + } + case "32655-13.html": + { + if (!hasQuestItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT) && (getQuestItemsCount(player, RAGNA_ORCS_AMULET) >= RAGNA_ORCS_AMULET_COUNT)) + { + qs.exitQuest(true, true); + htmltext = event; + } + else + { + htmltext = "32655-14.html"; + } + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + final QuestState qs = getRandomPartyMemberState(killer, 1, 2, npc); + if (qs != null) + { + final int count = qs.getMemoStateEx(1) + 1; + if ((count >= RAGNA_ORCS_KILLS_COUNT) && (getRandom(20) < ((count % 100) + 1))) + { + qs.setMemoStateEx(1, 0); + qs.giveItems(SOUL_CORE_CONTAINING_EVIL_SPIRIT, 1); + qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + else + { + qs.setMemoStateEx(1, count); + } + + qs.giveItemRandomly(npc, RAGNA_ORCS_AMULET, 1, 0, MONSTERS.get(npc.getId()), true); + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + String htmltext = getNoQuestMsg(player); + if (qs == null) + { + return htmltext; + } + + if (qs.isCreated()) + { + htmltext = (player.getLevel() >= MIN_LEVEL) ? "32655-01.htm" : "32655-02.htm"; + } + else if (qs.isStarted()) + { + htmltext = !hasQuestItems(player, SOUL_CORE_CONTAINING_EVIL_SPIRIT, RAGNA_ORCS_AMULET) ? "32655-05.html" : "32655-06.html"; + } + return htmltext; + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java index 979d698eedd3341da2aedfbd394ce270e371bec8..16c900275c06da8f6a1ed022315cac20583aeae4 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -215,6 +215,7 @@ import quests.Q00307_ControlDeviceOfTheGiants.Q00307_ControlDeviceOfTheGiants; import quests.Q00308_ReedFieldMaintenance.Q00308_ReedFieldMaintenance; import quests.Q00309_ForAGoodCause.Q00309_ForAGoodCause; import quests.Q00310_OnlyWhatRemains.Q00310_OnlyWhatRemains; +import quests.Q00311_ExpulsionOfEvilSpirits.Q00311_ExpulsionOfEvilSpirits; import quests.Q00312_TakeAdvantageOfTheCrisis.Q00312_TakeAdvantageOfTheCrisis; import quests.Q00313_CollectSpores.Q00313_CollectSpores; import quests.Q00316_DestroyPlagueCarriers.Q00316_DestroyPlagueCarriers; @@ -590,6 +591,7 @@ public class QuestMasterHandler Q00308_ReedFieldMaintenance.class, Q00309_ForAGoodCause.class, Q00310_OnlyWhatRemains.class, + Q00311_ExpulsionOfEvilSpirits.class, Q00312_TakeAdvantageOfTheCrisis.class, Q00313_CollectSpores.class, Q00316_DestroyPlagueCarriers.class,