From e57c672035f149010591743084248f9e5c3604a3 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 7 Jan 2020 18:22:37 +0000 Subject: [PATCH] Updated Plains of the Lizardmen area. Contributed by Edoo. --- .../PlainsOfLizardman/PlainsOfLizardman.java | 243 --------- .../data/spawns/Oren/PlainsOfLizardman.xml | 243 +++++++++ .../dist/game/data/spawns/old/22_20.xml | 494 +----------------- .../dist/game/data/stats/npcs/24300-24399.xml | 285 ++++++---- .../data/zones/plains_of_the_lizardmen.xml | 327 ------------ 5 files changed, 435 insertions(+), 1157 deletions(-) delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/PlainsOfLizardman/PlainsOfLizardman.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/Oren/PlainsOfLizardman.xml delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/zones/plains_of_the_lizardmen.xml diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/PlainsOfLizardman/PlainsOfLizardman.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/PlainsOfLizardman/PlainsOfLizardman.java deleted file mode 100644 index 9da51ac63f..0000000000 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/areas/PlainsOfLizardman/PlainsOfLizardman.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program 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. - * - * This program 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 . - */ -package ai.areas.PlainsOfLizardman; - -import org.l2jmobius.gameserver.ai.CtrlIntention; -import org.l2jmobius.gameserver.model.Location; -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Attackable; -import org.l2jmobius.gameserver.model.actor.Npc; -import org.l2jmobius.gameserver.model.actor.Playable; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.holders.SkillHolder; - -import ai.AbstractNpcAI; - -/** - * Plains of Lizardmen AI. - * @author Gnacik, malyelfik - */ -public class PlainsOfLizardman extends AbstractNpcAI -{ - // NPCs - private static final int INVISIBLE_NPC = 18919; - private static final int TANTA_GUARD = 18862; - private static final int FANTASY_MUSHROOM = 18864; - private static final int STICKY_MUSHROOM = 18865; - private static final int RAINBOW_FROG = 18866; - private static final int ENERGY_PLANT = 18868; - private static final int TANTA_SCOUT = 22768; - private static final int TANTA_MAGICIAN = 22773; - private static final int TANTA_SUMMONER = 22774; - private static final int[] TANTA_LIZARDMEN = - { - 22768, // Tanta Lizardman Scout - 22769, // Tanta Lizardman Warrior - 22770, // Tanta Lizardman Soldier - 22771, // Tanta Lizardman Berserker - 22772, // Tanta Lizardman Archer - 22773, // Tanta Lizardman Magician - 22774, // Tanta Lizardman Summoner - }; - // Skills - private static final SkillHolder STUN_EFFECT = new SkillHolder(6622, 1); - private static final SkillHolder DEMOTIVATION_HEX = new SkillHolder(6425, 1); - private static final SkillHolder FANTASY_MUSHROOM_SKILL = new SkillHolder(6427, 1); - private static final SkillHolder RAINBOW_FROG_SKILL = new SkillHolder(6429, 1); - private static final SkillHolder STICKY_MUSHROOM_SKILL = new SkillHolder(6428, 1); - private static final SkillHolder ENERGY_PLANT_SKILL = new SkillHolder(6430, 1); - // Buffs - private static final SkillHolder[] BUFFS = - { - new SkillHolder(6625, 1), // Energy of Life - new SkillHolder(6626, 1), // Energy of Life's Power - new SkillHolder(6627, 1), // Energy of Life's Highest Power - new SkillHolder(6628, 1), // Energy of Mana - new SkillHolder(6629, 1), // Energy of Mana's Power - new SkillHolder(6630, 1), // Energy of Mana's Highest Power - new SkillHolder(6631, 1), // Energy of Power - new SkillHolder(6633, 1), // Energy of Attack Speed - new SkillHolder(6635, 1), // Energy of Crt Rate - new SkillHolder(6636, 1), // Energy of Moving Speed - new SkillHolder(6638, 1), // Aura of Mystery - new SkillHolder(6639, 1), // Bane of Auras - Damage - new SkillHolder(6640, 1), // Energizing Aura - new SkillHolder(6674, 1), // Energy of Range Increment - }; - // Misc - // @formatter:off - private static final int[] BUFF_LIST = - { - 6, 7, 8, 11, 13 - }; - // @formatter:on - - private PlainsOfLizardman() - { - addAttackId(FANTASY_MUSHROOM, RAINBOW_FROG, STICKY_MUSHROOM, ENERGY_PLANT, TANTA_SUMMONER); - addKillId(TANTA_LIZARDMEN); - } - - @Override - public String onAdvEvent(String event, Npc npc, PlayerInstance player) - { - if (event.equals("fantasy_mushroom") && (npc != null) && (player != null)) - { - npc.doCast(FANTASY_MUSHROOM_SKILL.getSkill()); - World.getInstance().forEachVisibleObjectInRange(npc, Attackable.class, 200, monster -> - { - npc.setTarget(monster); - npc.doCast(STUN_EFFECT.getSkill()); - addAttackPlayerDesire(monster, player); - }); - npc.doDie(player); - } - return null; - } - - @Override - public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon) - { - switch (npc.getId()) - { - case TANTA_SUMMONER: - { - if (!npc.isAffectedBySkill(DEMOTIVATION_HEX.getSkillId())) - { - npc.doCast(DEMOTIVATION_HEX.getSkill()); - } - break; - } - case RAINBOW_FROG: - { - castSkill(npc, attacker, RAINBOW_FROG_SKILL); - break; - } - case ENERGY_PLANT: - { - castSkill(npc, attacker, ENERGY_PLANT_SKILL); - break; - } - case STICKY_MUSHROOM: - { - castSkill(npc, attacker, STICKY_MUSHROOM_SKILL); - break; - } - case FANTASY_MUSHROOM: - { - if (npc.isScriptValue(0)) - { - npc.setScriptValue(1); - npc.setIsInvul(true); - World.getInstance().forEachVisibleObjectInRange(npc, Attackable.class, 1000, monster -> - { - if ((monster.getId() == TANTA_MAGICIAN) || (monster.getId() == TANTA_SCOUT)) - { - monster.setRunning(); - monster.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(npc.getX(), npc.getY(), npc.getZ(), 0)); - } - }); - startQuestTimer("fantasy_mushroom", 4000, npc, attacker); - } - break; - } - } - return super.onAttack(npc, attacker, damage, isSummon); - } - - @Override - public String onKill(Npc npc, PlayerInstance killer, boolean isSummon) - { - // Tanta Guard - if (getRandom(1000) == 0) - { - addAttackPlayerDesire(addSpawn(TANTA_GUARD, npc), killer); - } - - // Invisible buff npc - final int random = getRandom(100); - final Npc buffer = addSpawn(INVISIBLE_NPC, npc.getLocation(), false, 6000); - buffer.setTarget(killer); - - if (random <= 42) - { - castRandomBuff(buffer, 7, 45, BUFFS[0], BUFFS[1], BUFFS[2]); - } - if (random <= 11) - { - castRandomBuff(buffer, 8, 60, BUFFS[3], BUFFS[4], BUFFS[5]); - castRandomBuff(buffer, 3, 6, BUFFS[9], BUFFS[10], BUFFS[12]); - } - if (random <= 25) - { - buffer.doCast(BUFFS[getRandomEntry(BUFF_LIST)].getSkill()); - } - if (random <= 10) - { - buffer.doCast(BUFFS[13].getSkill()); - } - if (random <= 1) - { - final int i = getRandom(100); - if (i <= 34) - { - buffer.doCast(BUFFS[6].getSkill()); - buffer.doCast(BUFFS[7].getSkill()); - buffer.doCast(BUFFS[8].getSkill()); - } - else if (i < 67) - { - buffer.doCast(BUFFS[13].getSkill()); - } - else - { - buffer.doCast(BUFFS[2].getSkill()); - buffer.doCast(BUFFS[5].getSkill()); - } - } - return super.onKill(npc, killer, isSummon); - } - - private void castRandomBuff(Npc npc, int chance1, int chance2, SkillHolder... buffs) - { - final int rand = getRandom(100); - if (rand <= chance1) - { - npc.doCast(buffs[2].getSkill()); - } - else if (rand <= chance2) - { - npc.doCast(buffs[1].getSkill()); - } - else - { - npc.doCast(buffs[0].getSkill()); - } - } - - @Override - protected void castSkill(Npc npc, Playable target, SkillHolder skill) - { - npc.doDie(target); - super.castSkill(addSpawn(INVISIBLE_NPC, npc, false, 6000), target, skill); - } - - public static void main(String[] args) - { - new PlainsOfLizardman(); - } -} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/Oren/PlainsOfLizardman.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/Oren/PlainsOfLizardman.xml new file mode 100644 index 0000000000..ec65ad898c --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/Oren/PlainsOfLizardman.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/old/22_20.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/old/22_20.xml index b5115c8368..70c68a925d 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/old/22_20.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/spawns/old/22_20.xml @@ -76,498 +76,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -653,7 +162,6 @@ - - \ No newline at end of file + diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/24300-24399.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/24300-24399.xml index 037454f686..8085a204f8 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/24300-24399.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/npcs/24300-24399.xml @@ -1335,180 +1335,277 @@ - - - ETC - FEMALE - + + HUMANOID + MALE + + - - - - - - - - - - - - - - - - - ETC - FEMALE - - - + + + - - - + + + + + + + + + + + + + + + + + HUMANOID + MALE + + + + + + + + + + + + + + + + + + + + + - - - ETC - FEMALE + + HUMANOID + MALE + - + + + - - + + - - - + + + + + + + + + + - - - ETC - FEMALE + + HUMANOID + MALE + - + + + - - + + - - - + + + + + + + + + + - - - ETC - FEMALE + + HUMANOID + MALE + + - + + + - - - + + + + + + + + + + - - - ETC - FEMALE - + + HUMANOID + MALE + + - + + + - - - + + + + + + + + + + - - - ETC - FEMALE + + HUMANOID + MALE + - + + + - - + + - - - + + + + + + + + + + - - - ETC - FEMALE - + + HUMANOID + MALE + + - + + + - + - - - + + + + + + + + + + - - - ETC - FEMALE + + + + + + + + + + + + + + + + HUMANOID + MALE + - + + + - - - + + + + + + + + + + + diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/zones/plains_of_the_lizardmen.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/zones/plains_of_the_lizardmen.xml deleted file mode 100644 index c2103e89c3..0000000000 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/zones/plains_of_the_lizardmen.xml +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file