diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java index d78c9d9b39..0f9561a6c1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/AbstractNpcAI.java @@ -108,7 +108,6 @@ public abstract class AbstractNpcAI extends Quest final int x = npcAround.getLocation().getX() + (int) (Math.cos(Math.PI + radian + course) * nRadius); final int y = npcAround.getLocation().getY() + (int) (Math.sin(Math.PI + radian + course) * nRadius); final int z = npcAround.getLocation().getZ(); - npc.getAI().moveTo(new Location(x, y, z)); }); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/AncientArcanCity.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/AncientArcanCity.java index 7adfc8e3e8..c23948e231 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/AncientArcanCity.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/AncientArcanCity.java @@ -72,12 +72,10 @@ public class AncientArcanCity extends AbstractNpcAI if (event.equals("CHANGE_STATE")) { isCeremonyRunning = !isCeremonyRunning; - for (PlayerInstance temp : BROADCAST_ZONE.getPlayersInside()) { temp.sendPacket(new OnEventTrigger(262001, !isCeremonyRunning)); temp.sendPacket(new OnEventTrigger(262003, isCeremonyRunning)); - if (isCeremonyRunning) { showOnScreenMsg(temp, NpcStringId.THE_INCREASED_GRASP_OF_DARK_ENERGY_CAUSES_THE_GROUND_TO_SHAKE, ExShowScreenMessage.TOP_CENTER, 5000, true); @@ -108,7 +106,6 @@ public class AncientArcanCity extends AbstractNpcAI if (creature.isPlayer()) { final PlayerInstance player = creature.getActingPlayer(); - if (zone.getId() == TELEPORT_ZONE.getId()) { final QuestState qs = creature.getActingPlayer().getQuestState(Q10301_ShadowOfTerrorBlackishRedFog.class.getSimpleName()); @@ -129,7 +126,6 @@ public class AncientArcanCity extends AbstractNpcAI { player.sendPacket(new OnEventTrigger(262001, !isCeremonyRunning)); player.sendPacket(new OnEventTrigger(262003, isCeremonyRunning)); - if (player.getVariables().getBoolean("ANCIENT_ARCAN_CITY_SCENE", true)) { player.getVariables().set("ANCIENT_ARCAN_CITY_SCENE", false); @@ -151,7 +147,6 @@ public class AncientArcanCity extends AbstractNpcAI // { // _templates.remove(template); // } - @Override public void onSpawnNpc(SpawnTemplate template, SpawnGroup group, Npc npc) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/Lykus/Lykus.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/Lykus/Lykus.java index 38f672e583..cf25b9c401 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/Lykus/Lykus.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/AncientCityArcan/Lykus/Lykus.java @@ -45,7 +45,6 @@ public class Lykus extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "33521-01.html": @@ -65,7 +64,6 @@ public class Lykus extends AbstractNpcAI if (event.startsWith("trade")) { final int count = (int) (event.equals("trade1") ? 1 : getQuestItemsCount(player, OLD_SHIELD)); - if (!hasAtLeastOneQuestItem(player, OLD_SHIELD)) { htmltext = "33521-11.html"; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BabyPets.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BabyPets.java index 6bea830e5f..bf179729fc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BabyPets.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BabyPets.java @@ -61,7 +61,6 @@ public class BabyPets extends AbstractNpcAI if (event.equals("HEAL") && (player != null)) { final Summon summon = player.getPet(); - if (summon != null) { if (getRandom(100) <= 25) @@ -105,12 +104,10 @@ public class BabyPets extends AbstractNpcAI { final boolean previousFollowStatus = summon.getFollowStatus(); final PlayerInstance owner = summon.getOwner(); - if (!owner.isDead() && (((owner.getCurrentHp() / owner.getMaxHp()) * 100) < maxHpPer) && !summon.isHungry() && SkillCaster.checkUseConditions(summon, skill.getSkill())) { summon.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, skill.getSkill(), owner); summon.sendPacket(new SystemMessage(SystemMessageId.YOUR_PET_USES_S1).addSkillName(skill.getSkill())); - if (previousFollowStatus != summon.getFollowStatus()) { summon.setFollowStatus(previousFollowStatus); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BeastFarm.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BeastFarm.java index dda4189ed7..a00db9b6f8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BeastFarm.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/BeastFarm.java @@ -243,7 +243,6 @@ public class BeastFarm extends AbstractNpcAI if (CommonUtil.contains(TAMED_BEASTS, nextNpcId)) { final TamedBeastInstance nextNpc = new TamedBeastInstance(nextNpcId, player, food, npc.getX(), npc.getY(), npc.getZ(), true); - final TamedBeast beast = getRandomEntry(TAMED_BEAST_DATA); String name = beast.getName(); switch (nextNpcId) @@ -292,7 +291,6 @@ public class BeastFarm extends AbstractNpcAI nextNpc.setRunning(); nextNpc.addDamageHate(player, 0, 99999); nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player); - player.setTarget(nextNpc); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/FeedableBeasts.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/FeedableBeasts.java index 34cf3cb810..be1e94f9c4 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/FeedableBeasts.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/FeedableBeasts.java @@ -187,7 +187,6 @@ public class FeedableBeasts extends AbstractNpcAI final int[][] Kookabura_1_Crystal_2 = {{ 21465, 21467 }}; final int[][] Kookabura_2_1 = {{ 21468, 21824}, { TRAINED_KOOKABURRA1, TRAINED_KOOKABURRA2 }}; final int[][] Kookabura_2_2 = {{ 21469, 21825}, { TRAINED_KOOKABURRA1, TRAINED_KOOKABURRA2 }}; - final int[][] Buffalo_0_Gold = {{ 21471, 21472, 21473, 21474 }}; final int[][] Buffalo_0_Crystal = {{ 21475, 21476, 21477, 21478 }}; final int[][] Buffalo_1_Gold_1 = {{ 21479, 21481 }}; @@ -196,7 +195,6 @@ public class FeedableBeasts extends AbstractNpcAI final int[][] Buffalo_1_Crystal_2 = {{ 21484, 21486 }}; final int[][] Buffalo_2_1 = {{ 21487, 21826}, {TRAINED_BUFFALO1, TRAINED_BUFFALO2 }}; final int[][] Buffalo_2_2 = {{ 21488, 21827}, {TRAINED_BUFFALO1, TRAINED_BUFFALO2 }}; - final int[][] Cougar_0_Gold = {{ 21490, 21491, 21492, 21493 }}; final int[][] Cougar_0_Crystal = {{ 21494, 21495, 21496, 21497 }}; final int[][] Cougar_1_Gold_1 = {{ 21498, 21500 }}; @@ -451,7 +449,6 @@ public class FeedableBeasts extends AbstractNpcAI // if not trained, the newly spawned mob will automatically be aggro against its feeder // (what happened to "never bite the hand that feeds you" anyway?!) final Attackable nextNpc = (Attackable) addSpawn(nextNpcId, npc); - if (MAD_COW_POLYMORPH.containsKey(nextNpcId)) { startQuestTimer("polymorph Mad Cow", 10000, nextNpc, player); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/ImprovedBabyPets.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/ImprovedBabyPets.java index 640a448fcf..57a7d102e5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/ImprovedBabyPets.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/ImprovedBabyPets.java @@ -61,7 +61,6 @@ public class ImprovedBabyPets extends AbstractNpcAI if (player != null) { final Summon summon = player.getPet(); - if (summon == null) { cancelQuestTimer("HEAL", null, player); @@ -73,11 +72,9 @@ public class ImprovedBabyPets extends AbstractNpcAI final double mpPer = (player.getCurrentMp() / player.getMaxMp()) * 100; final int healType = summon.getTemplate().getParameters().getInt("heal_type", 0); final int skillLv = (int) Math.floor((summon.getLevel() / 5) - 11); - if (healType == 1) { final int stepLv = CommonUtil.constrain(skillLv, 0, 3); - if ((hpPer >= 30) && (hpPer < 70)) { castHeal(summon, stepLv, 1); @@ -102,7 +99,6 @@ public class ImprovedBabyPets extends AbstractNpcAI else if (event.equals("BUFF") && !summon.isAffectedBySkill(PET_CONTROL) && !summon.isHungry()) { final int buffStep = (int) CommonUtil.constrain(Math.floor((summon.getLevel() / 5) - 11), 0, 3); - for (int i = 1; i <= (2 * (1 + buffStep)); i++) { if (castBuff(summon, buffStep, i)) @@ -135,13 +131,11 @@ public class ImprovedBabyPets extends AbstractNpcAI final PlayerInstance owner = summon.getOwner(); final StatSet parameters = summon.getTemplate().getParameters(); final SkillHolder skill = parameters.getObject("step" + stepNumber + "_buff0" + buffNumber, SkillHolder.class); - if ((skill != null) && (owner != null)) { final boolean previousFollowStatus = summon.getFollowStatus(); final SkillHolder mergedSkill = parameters.getObject("step" + stepNumber + "_merged_buff0" + buffNumber, SkillHolder.class); final int targetType = parameters.getInt("step" + stepNumber + "_buff_target0" + buffNumber, 0); - if (!owner.hasAbnormalType(skill.getSkill().getAbnormalType()) && SkillCaster.checkUseConditions(summon, skill.getSkill()) && !owner.isDead()) { if ((mergedSkill != null) && owner.hasAbnormalType(mergedSkill.getSkill().getAbnormalType())) @@ -158,7 +152,6 @@ public class ImprovedBabyPets extends AbstractNpcAI { summon.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, skill.getSkill(), (targetType == 1) ? summon : owner); summon.sendPacket(new SystemMessage(SystemMessageId.YOUR_PET_USES_S1).addSkillName(skill.getSkill())); - if (previousFollowStatus != summon.getFollowStatus()) { summon.setFollowStatus(previousFollowStatus); @@ -177,7 +170,6 @@ public class ImprovedBabyPets extends AbstractNpcAI final StatSet parameters = summon.getTemplate().getParameters(); final SkillHolder skill = parameters.getObject("step" + stepNumber + "_heal0" + healNumber, SkillHolder.class); final int targetType = parameters.getInt("step" + stepNumber + "_heal_target0" + healNumber, 0); - if ((skill != null) && (owner != null) && SkillCaster.checkUseConditions(summon, skill.getSkill()) && !owner.isDead()) { if (!previousFollowStatus && !summon.isInsideRadius3D(owner, skill.getSkill().getCastRange())) @@ -189,7 +181,6 @@ public class ImprovedBabyPets extends AbstractNpcAI { summon.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, skill.getSkill(), (targetType == 1) ? summon : owner); summon.sendPacket(new SystemMessage(SystemMessageId.YOUR_PET_USES_S1).addSkillName(skill.getSkill())); - if (previousFollowStatus != summon.getFollowStatus()) { summon.setFollowStatus(previousFollowStatus); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/Tunatun/Tunatun.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/Tunatun/Tunatun.java index 5add775cc0..9b8165ccbf 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/Tunatun/Tunatun.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/BeastFarm/Tunatun/Tunatun.java @@ -45,7 +45,6 @@ public class Tunatun extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = getNoQuestMsg(player); - switch (event) { case "31537-04.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/DragonVortex/DragonVortex.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/DragonVortex/DragonVortex.java index 89c1ec9e5a..3154382903 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/DragonVortex/DragonVortex.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/DragonVortex/DragonVortex.java @@ -69,7 +69,6 @@ public class DragonVortex extends AbstractNpcAI takeItems(player, LARGE_DRAGON_BONE, 1); final int random = getRandom(100); int raid = 0; - if (random < 3) { raid = RAIDS[6]; // Muscle Bomber diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FairySettlement/Wisp.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FairySettlement/Wisp.java index cf6dea3d9d..89294d0a6d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FairySettlement/Wisp.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FairySettlement/Wisp.java @@ -87,7 +87,6 @@ public class Wisp extends AbstractNpcAI { final Creature creature = event.getSeen(); final Npc npc = (Npc) event.getSeer(); - if (creature.isPlayer() || creature.isFakePlayer()) { npc.setTarget(creature); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/HandysBlockCheckerEvent.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/HandysBlockCheckerEvent.java index 940cdaa9c3..bab1d0dfc8 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/HandysBlockCheckerEvent.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/HandysBlockCheckerEvent.java @@ -79,7 +79,6 @@ public class HandysBlockCheckerEvent extends AbstractNpcAI final int countBlue = holder.getBlueTeamSize(); final int countRed = holder.getRedTeamSize(); final int minMembers = Config.MIN_BLOCK_CHECKER_TEAM_MEMBERS; - if ((countBlue >= minMembers) && (countRed >= minMembers)) { holder.updateEvent(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java index b54c051d9f..88b3ac1267 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FantasyIsle/Parade.java @@ -165,7 +165,6 @@ public class Parade extends AbstractNpcAI { dd += 86400; } - return (dd * 1000) / 6; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FrozenLabyrinth/FrozenLabyrinth.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FrozenLabyrinth/FrozenLabyrinth.java index 446ad81e65..c691b060c5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FrozenLabyrinth/FrozenLabyrinth.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/FrozenLabyrinth/FrozenLabyrinth.java @@ -50,7 +50,6 @@ public class FrozenLabyrinth extends AbstractNpcAI { final int x = diff < 60 ? npc.getX() + diff : npc.getX(); final int y = diff >= 60 ? npc.getY() + (diff - 40) : npc.getY(); - final Npc monster = addSpawn(spawnId, x, y, npc.getZ(), npc.getHeading(), false, 0); addAttackPlayerDesire(monster, attacker); diff += 20; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java index 8201571476..aefa3c1d14 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/HotSprings/HotSprings.java @@ -92,7 +92,6 @@ public class HotSprings extends AbstractNpcAI final BuffInfo info = creature.getEffectList().getBuffInfoBySkillId(diseaseId); final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 10) ? info.getSkill().getLevel() + 1 : 10; final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel); - if ((skill != null) && SkillCaster.checkUseConditions(npc, skill)) { npc.setTarget(creature); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ImperialTomb/FourSepulchers/FourSepulchers.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ImperialTomb/FourSepulchers/FourSepulchers.java index a23b67c335..a00d59028e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ImperialTomb/FourSepulchers/FourSepulchers.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/ImperialTomb/FourSepulchers/FourSepulchers.java @@ -478,7 +478,6 @@ public class FourSepulchers extends AbstractNpcAI implements IXmlReader private void tryEnter(Npc npc, PlayerInstance player) { final int npcId = npc.getId(); - if (!ZoneManager.getInstance().getZoneById(MANAGER_ZONES.get(npcId)).getPlayersInside().isEmpty()) { showHtmlFile(player, npcId + "-FULL.htm", npc, null); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/DarkWaterDragon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/DarkWaterDragon.java index 96815b9964..0332700d1c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/DarkWaterDragon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/DarkWaterDragon.java @@ -106,7 +106,6 @@ public class DarkWaterDragon extends AbstractNpcAI cancelQuestTimer("2", npc, null); cancelQuestTimer("3", npc, null); cancelQuestTimer("4", npc, null); - MY_TRACKING_SET.remove(npc.getObjectId()); player = ID_MAP.remove(npc.getObjectId()); if (player != null) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/Rignos/Rignos.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/Rignos/Rignos.java index 4ff76f5570..bca60fe3c6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/Rignos/Rignos.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IsleOfPrayer/Rignos/Rignos.java @@ -68,7 +68,6 @@ public class Rignos extends AbstractNpcAI TIMER.getSkill().applyEffects(pet, pet); } player.getServitors().values().forEach(s -> TIMER.getSkill().applyEffects(s, s)); - if (hasQuestItems(player, STAMP)) { takeItems(player, STAMP, -1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IvoryTower/AvantGarde/AvantGarde.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IvoryTower/AvantGarde/AvantGarde.java index 9ef4271793..31a51451c1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IvoryTower/AvantGarde/AvantGarde.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/IvoryTower/AvantGarde/AvantGarde.java @@ -125,7 +125,6 @@ public class AvantGarde extends AbstractNpcAI public static void showTransformSkillList(PlayerInstance player) { final List skills = SkillTreeData.getInstance().getAvailableTransformSkills(player); - if (skills.isEmpty()) { final int minlevel = SkillTreeData.getInstance().getMinLevelForNewSkill(player, SkillTreeData.getInstance().getTransformSkillTree()); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/KeucereusAllianceBase/LindviorScene.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/KeucereusAllianceBase/LindviorScene.java index 2b0d35d192..3054f4df1c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/KeucereusAllianceBase/LindviorScene.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/KeucereusAllianceBase/LindviorScene.java @@ -89,7 +89,6 @@ public class LindviorScene extends AbstractNpcAI _lindviorCamera = SpawnTable.getInstance().getAnySpawn(LINDVIOR_CAMERA).getLastSpawn(); _tomaris = SpawnTable.getInstance().getAnySpawn(TOMARIS).getLastSpawn(); _artius = SpawnTable.getInstance().getAnySpawn(ARTIUS).getLastSpawn(); - startQuestTimer("tomaris_shout1", 1000, _tomaris, null); startQuestTimer("artius_shout", 60000, _artius, null); startQuestTimer("tomaris_shout2", 90000, _tomaris, null); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Parnassus/EntrancePortalToCrystalCaverns/EntrancePortalToCrystalCaverns.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Parnassus/EntrancePortalToCrystalCaverns/EntrancePortalToCrystalCaverns.java index b52be69c96..9333b42c4e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Parnassus/EntrancePortalToCrystalCaverns/EntrancePortalToCrystalCaverns.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Parnassus/EntrancePortalToCrystalCaverns/EntrancePortalToCrystalCaverns.java @@ -112,7 +112,6 @@ public class EntrancePortalToCrystalCaverns extends AbstractNpcAI if (event.equals("LOOP_TIMER")) { final int currentTemplateId = getCurrentInstanceTemplateId(); - World.getInstance().forEachVisibleObjectInRange(npc, PlayerInstance.class, 500, p -> updateTriggersForPlayer(player, currentTemplateId)); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java index 1e6e5aedb2..0978953019 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Rune/AltarOfSacrifice/AltarOfSacrifice.java @@ -65,7 +65,6 @@ public class AltarOfSacrifice extends AbstractNpcAI sendMessage(_giggle, NpcStringId.IT_JUST_GOES_TO_SHOW_HOW_IMPORTANT_AND_DIFFICULT_IT_IS_TO_ACTIVATE_THE_SEAL_DEVICE, 109000); // It just goes to show how important and difficult it is to activate the Seal Device! sendMessage(_immerial, NpcStringId.THIS_HAS_BEEN_TOO_TAXING_ON_US_ALL, 119000); // This has been too taxing on us all. sendMessage(_immerial, NpcStringId.WE_NEED_A_NEW_SOUL_THAT_CAN_MAINTAIN_THE_SEAL, 126000); // We need a new soul that can maintain the seal. - startQuestTimer("msg_text", 135000, npc, null); _jenas_guard.setScriptValue(0); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java index 611d87e7d2..19fbee8cf2 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/Maguen.java @@ -172,11 +172,9 @@ public class Maguen extends AbstractNpcAI final BuffInfo bInfo = player.getEffectList().getFirstBuffInfoByAbnormalType(B_PLASMA1.getSkill().getAbnormalType()); final BuffInfo cInfo = player.getEffectList().getFirstBuffInfoByAbnormalType(C_PLASMA1.getSkill().getAbnormalType()); final BuffInfo rInfo = player.getEffectList().getFirstBuffInfoByAbnormalType(R_PLASMA1.getSkill().getAbnormalType()); - final int b = bInfo == null ? 0 : bInfo.getSkill().getAbnormalLvl(); final int c = cInfo == null ? 0 : cInfo.getSkill().getAbnormalLvl(); final int r = rInfo == null ? 0 : rInfo.getSkill().getAbnormalLvl(); - if ((b == 3) && (c == 0) && (r == 0)) { showOnScreenMsg(player, NpcStringId.ENOUGH_MAGUEN_PLASMA_BISTAKON_HAVE_GATHERED, 2, 4000); @@ -264,11 +262,9 @@ public class Maguen extends AbstractNpcAI final BuffInfo i1Info = caster.getEffectList().getFirstBuffInfoByAbnormalType(B_PLASMA1.getSkill().getAbnormalType()); final BuffInfo i2Info = caster.getEffectList().getFirstBuffInfoByAbnormalType(C_PLASMA1.getSkill().getAbnormalType()); final BuffInfo i3Info = caster.getEffectList().getFirstBuffInfoByAbnormalType(R_PLASMA1.getSkill().getAbnormalType()); - final int i1 = i1Info == null ? 0 : i1Info.getSkill().getAbnormalLvl(); final int i2 = i2Info == null ? 0 : i2Info.getSkill().getAbnormalLvl(); final int i3 = i3Info == null ? 0 : i3Info.getSkill().getAbnormalLvl(); - caster.getEffectList().stopEffects(B_PLASMA1.getSkill().getAbnormalType()); caster.getEffectList().stopEffects(C_PLASMA1.getSkill().getAbnormalType()); caster.getEffectList().stopEffects(R_PLASMA1.getSkill().getAbnormalType()); @@ -277,7 +273,6 @@ public class Maguen extends AbstractNpcAI cancelQuestTimer("THIRD_TIMER", npc, caster); cancelQuestTimer("FORTH_TIMER", npc, caster); npc.getVariables().set("BLOCKED_SKILLSEE", 1); - SkillHolder skillToCast = null; switch (npc.getVariables().getInt("NPC_EFFECT")) { @@ -365,7 +360,6 @@ public class Maguen extends AbstractNpcAI { final PlayerInstance partyMember = getRandomPartyMember(killer); final int i0 = 10 + (10 * killer.getParty().getMemberCount()); - if ((getRandom(1000) < i0) && (npc.calculateDistance3D(killer) < 2000) && (npc.calculateDistance3D(partyMember) < 2000)) { notifyEvent("SPAWN_MAGUEN", npc, partyMember); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/SeedOfAnnihilation.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/SeedOfAnnihilation.java index 0e728308fe..1ec8bcbe9b 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/SeedOfAnnihilation.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SeedOfAnnihilation/SeedOfAnnihilation.java @@ -308,7 +308,6 @@ public class SeedOfAnnihilation extends AbstractNpcAI for (int i = 0; i < _regionsData.length; i++) { _regionsData[i].activeBuff = ZONE_BUFFS_LIST[buffsNow][i]; - for (Npc af : _regionsData[i].af_npcs) { af.setDisplayEffect(_regionsData[i].activeBuff); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SelMahumTrainingGrounds/SelMahumDrill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SelMahumTrainingGrounds/SelMahumDrill.java index 5a08308603..eb62709f20 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SelMahumTrainingGrounds/SelMahumDrill.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/SelMahumTrainingGrounds/SelMahumDrill.java @@ -285,7 +285,6 @@ public class SelMahumDrill extends AbstractNpcAI } final int socialActionId = (npc.getVariables().getInt("SOCIAL_ACTION_ALT_BEHAVIOR") == 0) ? action.getSocialActionId() : action.getAltSocialActionId(); - if (socialActionId < 0) { return; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNest.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNest.java index a60143e420..addeb93ae1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNest.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNest.java @@ -98,7 +98,6 @@ public class StakatoNest extends AbstractNpcAI if (follower != null) { final double _hp = follower.getCurrentHp(); - if (_hp > (follower.getMaxHp() * 0.3)) { mob.abortAttack(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNestTeleporter/StakatoNestTeleporter.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNestTeleporter/StakatoNestTeleporter.java index b15984f409..62b9db4281 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNestTeleporter/StakatoNestTeleporter.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/StakatoNest/StakatoNestTeleporter/StakatoNestTeleporter.java @@ -52,11 +52,9 @@ public class StakatoNestTeleporter extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { final int index = Integer.parseInt(event) - 1; - if (LOCS.length > index) { final Location loc = LOCS[index]; - if (player.getParty() != null) { for (PlayerInstance partyMember : player.getParty().getMembers()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/AwakeningMaster/AwakeningMaster.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/AwakeningMaster/AwakeningMaster.java index 6912f56842..44208cfc2a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/AwakeningMaster/AwakeningMaster.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/AwakeningMaster/AwakeningMaster.java @@ -262,7 +262,6 @@ public class AwakeningMaster extends AbstractNpcAI public void OnPlayerChangeToAwakenedClass(OnPlayerChangeToAwakenedClass event) { final PlayerInstance player = event.getPlayer(); - if (player.isSubClassActive() && !player.isDualClassActive()) { return; @@ -339,7 +338,6 @@ public class AwakeningMaster extends AbstractNpcAI } } giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 2); - SkillTreeData.getInstance().cleanSkillUponAwakening(player); for (SkillLearn skill : SkillTreeData.getInstance().getRaceSkillTree(player.getRace())) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Galad.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Galad.java index abc02ca8c6..a1f3bc301a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Galad.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Galad.java @@ -44,7 +44,6 @@ public class Galad extends AbstractNpcAI { npc.broadcastSocialAction(3); npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.OCCASIONALLY_RARE_JEWELS_OF_GIANTS_ARE_DISCOVERED_IN_THE_BEACH, 1000); - } return super.onAdvEvent(event, npc, player); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GiantSoldiers/GiantSoldiers.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GiantSoldiers/GiantSoldiers.java index 8b054d3c78..b52626dac6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GiantSoldiers/GiantSoldiers.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GiantSoldiers/GiantSoldiers.java @@ -60,7 +60,6 @@ public class GiantSoldiers extends AbstractNpcAI } String htmltext = null; - switch (event) { case "CHAT_MESSAGE_1A": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GuardSoldier.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GuardSoldier.java index e2f2bb8fb7..c19b075534 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GuardSoldier.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/GuardSoldier.java @@ -44,7 +44,6 @@ public class GuardSoldier extends AbstractNpcAI { npc.broadcastSocialAction(3); npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LADY_YOU_MUST_GO_IN, 1000); - } else if (event.equals("SOCIAL_ACTION") && (npc != null)) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hadel/Hadel.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hadel/Hadel.java index 2875974e95..5ee5968064 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hadel/Hadel.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Hadel/Hadel.java @@ -46,7 +46,6 @@ public class Hadel extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "33344.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/MonkOfChaos/MonkOfChaos.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/MonkOfChaos/MonkOfChaos.java index 2295e13269..5f1108addb 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/MonkOfChaos/MonkOfChaos.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/MonkOfChaos/MonkOfChaos.java @@ -67,7 +67,6 @@ public class MonkOfChaos extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "33880-1.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java index e0ba288aae..de6fc65155 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java @@ -198,7 +198,6 @@ public class Raina extends AbstractNpcAI final Set availSubs = getAvailableSubClasses(player); final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "subclassList.html"); - if ((availSubs == null) || availSubs.isEmpty()) { break; @@ -244,7 +243,6 @@ public class Raina extends AbstractNpcAI { final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "subclassRemoveList.html"); - for (SubClass subClass : player.getSubClasses().values()) { if (subClass != null) @@ -320,7 +318,6 @@ public class Raina extends AbstractNpcAI } final CategoryType cType = CategoryType.valueOf(event.replace("addDualClass_", "")); - if (cType == null) { LOGGER.warning(getClass().getSimpleName() + ": Cannot parse CategoryType, event: " + event); @@ -328,7 +325,6 @@ public class Raina extends AbstractNpcAI final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addDualClassErtheiaList.html"); - for (ClassId dualClasses : getDualClasses(player, cType)) { if (dualClasses != null) @@ -405,7 +401,6 @@ public class Raina extends AbstractNpcAI case "reawaken_SIXTH_EOLH_GROUP": { final CategoryType cType = CategoryType.valueOf(event.replace("reawaken_", "")); - if (cType == null) { LOGGER.warning(getClass().getSimpleName() + ": Cannot parse CategoryType, event: " + event); @@ -413,7 +408,6 @@ public class Raina extends AbstractNpcAI final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "reawakenClassList.html"); - for (ClassId dualClasses : getDualClasses(player, cType)) { if (dualClasses != null) @@ -484,7 +478,6 @@ public class Raina extends AbstractNpcAI final int classId = event.getReply(); final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "addConfirm.html"); - if (!isValidNewSubClass(player, classId)) { return; @@ -521,7 +514,6 @@ public class Raina extends AbstractNpcAI final Set availSubs = getAvailableSubClasses(player); final StringBuilder sb = new StringBuilder(); final NpcHtmlMessage html = getNpcHtmlMessage(player, npc, "removeSubclassList.html"); - if ((availSubs == null) || availSubs.isEmpty()) { return; @@ -673,9 +665,7 @@ public class Raina extends AbstractNpcAI final int currentBaseId = player.getBaseClass(); final ClassId baseCID = ClassId.getClassId(currentBaseId); final int baseClassId = (CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, baseCID.getId()) || CategoryData.getInstance().isInCategory(CategoryType.FIFTH_CLASS_GROUP, baseCID.getId()) || CategoryData.getInstance().isInCategory(CategoryType.SIXTH_CLASS_GROUP, baseCID.getId())) ? baseCID.getParent().getId() : currentBaseId; - final Set availSubs = getSubclasses(player, baseClassId); - if ((availSubs != null) && !availSubs.isEmpty()) { for (ClassId pclass : availSubs) @@ -683,11 +673,9 @@ public class Raina extends AbstractNpcAI // scan for already used subclasses final int availClassId = pclass.getId(); final ClassId cid = ClassId.getClassId(availClassId); - for (SubClass subList : player.getSubClasses().values()) { final ClassId subId = ClassId.getClassId(subList.getClassId()); - if (subId.equalsOrChildOf(cid)) { availSubs.remove(cid); @@ -718,7 +706,6 @@ public class Raina extends AbstractNpcAI for (SubClass subList : player.getSubClasses().values()) { subClassId = ClassId.getClassId(subList.getClassId()); - if (subClassId.equalsOrChildOf(cid)) { return false; @@ -732,7 +719,6 @@ public class Raina extends AbstractNpcAI // we need 2nd occupation ID final int baseClassId = (CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, baseCID.getId()) || CategoryData.getInstance().isInCategory(CategoryType.FIFTH_CLASS_GROUP, baseCID.getId()) || CategoryData.getInstance().isInCategory(CategoryType.SIXTH_CLASS_GROUP, baseCID.getId())) ? baseCID.getParent().getId() : currentBaseId; final Set availSubs = getSubclasses(player, baseClassId); - if ((availSubs == null) || availSubs.isEmpty()) { return false; @@ -753,7 +739,6 @@ public class Raina extends AbstractNpcAI private boolean hasAllSubclassLeveled(PlayerInstance player) { boolean leveled = true; - for (SubClass sub : player.getSubClasses().values()) { if ((sub != null) && (sub.getLevel() < 75)) @@ -767,7 +752,6 @@ public class Raina extends AbstractNpcAI public List getAvailableDualclasses(PlayerInstance player) { final List dualClasses = new ArrayList<>(); - for (ClassId ClassId : ClassId.values()) { if ((ClassId.getRace() != Race.ERTHEIA) && CategoryData.getInstance().isInCategory(CategoryType.SIXTH_CLASS_GROUP, ClassId.getId()) && (ClassId.getId() != player.getClassId().getId())) @@ -783,7 +767,6 @@ public class Raina extends AbstractNpcAI final List tempList = new ArrayList<>(); final int baseClassId = player.getBaseClass(); final int dualClassId = player.getClassId().getId(); - for (ClassId temp : dualClassList) { if ((temp.getId() != baseClassId) && (temp.getId() != dualClassId) && ((cType == null) || CategoryData.getInstance().isInCategory(cType, temp.getId()))) @@ -798,7 +781,6 @@ public class Raina extends AbstractNpcAI { Set subclasses = null; final ClassId pClass = ClassId.getClassId(classId); - if (CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, classId) || (CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, classId))) { subclasses = EnumSet.copyOf(mainSubclassSet); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/TomaJunior.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/TomaJunior.java index c0928d1155..3b40d11e0a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/TomaJunior.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/TomaJunior.java @@ -44,7 +44,6 @@ public class TomaJunior extends AbstractNpcAI { npc.broadcastSocialAction(3); npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_BEACH_WHERE_RELICS_OF_GIANTS_HAD_FALLEN_HAS_NOW_BECOME_CLEAN, 1000); - } else if (event.equals("SOCIAL_ACTION") && (npc != null)) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/YeSegiraTeleportDevice/YeSegiraTeleportDevice.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/YeSegiraTeleportDevice/YeSegiraTeleportDevice.java index a313ae6377..3c0322017d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/YeSegiraTeleportDevice/YeSegiraTeleportDevice.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TalkingIsland/YeSegiraTeleportDevice/YeSegiraTeleportDevice.java @@ -93,7 +93,6 @@ public class YeSegiraTeleportDevice extends AbstractNpcAI if (LOCATIONS.containsKey(event)) { player.teleToLocation(LOCATIONS.get(event), true); - if (event.equals("observatory") && player.getVariables().getBoolean(MOVIE_VAR, false)) { playMovie(player, Movie.SI_ILLUSION_03_QUE); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java index fb7acb6737..58ba60027a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGiran/Alexandria/Alexandria.java @@ -103,7 +103,6 @@ public class Alexandria extends AbstractNpcAI { giveItems(player, agathion); htmltext = "30098-03.html"; - if (agathion instanceof AdditionalQuestItemHolder) { giveItems(player, ((AdditionalQuestItemHolder) agathion).getAdditionalId(), 1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGoddard/Cerenas/Cerenas.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGoddard/Cerenas/Cerenas.java index 8cccc75d06..f29f108cc0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGoddard/Cerenas/Cerenas.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/TownOfGoddard/Cerenas/Cerenas.java @@ -45,7 +45,6 @@ public class Cerenas extends AbstractNpcAI { final QuestState qs = player.getQuestState(Q10369_NoblesseSoulTesting.class.getSimpleName()); String htmltext = null; - if (event.equals("tiara")) { if ((qs != null) && qs.isCompleted()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/WallOfArgos/ElmoredenServantsGhost/ElmoredenServantsGhost.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/WallOfArgos/ElmoredenServantsGhost/ElmoredenServantsGhost.java index 1d08617c59..37d0a6d08c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/WallOfArgos/ElmoredenServantsGhost/ElmoredenServantsGhost.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/WallOfArgos/ElmoredenServantsGhost/ElmoredenServantsGhost.java @@ -46,7 +46,6 @@ public class ElmoredenServantsGhost extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - if (event.equals("teleport1") || event.equals("teleport2")) { if (!hasAtLeastOneQuestItem(player, USED_GRAVE_PASS, ANTIQUE_BROOCH)) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java index 61379ba16f..8047d6dd77 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java @@ -96,7 +96,6 @@ public class Wastelands extends AbstractNpcAI { npc.broadcastSocialAction(4); npc.broadcastSay(ChatType.NPC_GENERAL, GUARD_SHOUT[getRandom(2)], 1000); - World.getInstance().getVisibleObjectsInRange(npc, Npc.class, 500).stream().filter(n -> n.getId() == GUARD).forEach(guard -> startQuestTimer("SOCIAL_ACTION", getRandom(2500, 3500), guard, null)); break; } @@ -306,15 +305,12 @@ public class Wastelands extends AbstractNpcAI { sakum.getVariables().set("GUARD_COUNT", COMMANDO_CAPTAIN_SAKUM_LOC.length); sakum.getVariables().set("GUARD_CAPTAIN", false); - for (Location loc : COMMANDO_CAPTAIN_SAKUM_LOC) { final Attackable commander = (Attackable) addSpawn(COMMANDO_CAPTAIN, loc); commander.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_ATTACK); - commander.reduceCurrentHp(1, sakum, null); // TODO: Find better way for attack sakum.reduceCurrentHp(1, commander, null); - notifyEvent("START_ATTACK", commander, null); } } @@ -322,14 +318,11 @@ public class Wastelands extends AbstractNpcAI { sakum.getVariables().set("GUARD_COUNT", COMMANDO_SAKUM_LOC.length); sakum.getVariables().set("GUARD_CAPTAIN", true); - for (Location loc : COMMANDO_SAKUM_LOC) { final Attackable commander = (Attackable) addSpawn(COMMANDO, loc); - commander.reduceCurrentHp(1, sakum, null); // TODO: Find better way for attack sakum.reduceCurrentHp(1, commander, null); - notifyEvent("START_ATTACK", commander, null); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java index 70139c8dd6..36df25c3eb 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java @@ -615,7 +615,6 @@ public class Antharas extends AbstractNpcAI public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill) { _lastAttack = System.currentTimeMillis(); - if (npc.getId() == BOMBER) { if (npc.calculateDistance3D(attacker) < 230) @@ -878,7 +877,6 @@ public class Antharas extends AbstractNpcAI final double distance_c2 = npc.calculateDistance3D(c2); final double direction_c2 = npc.calculateDirectionTo(c2); - SkillHolder skillToCast = null; boolean castOnTarget = false; if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baium/Baium.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baium/Baium.java index b7a8e8bd69..b56fe41810 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baium/Baium.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baium/Baium.java @@ -134,7 +134,6 @@ public class Baium extends AbstractNpcAI final int loc_y = info.getInt("loc_y"); final int loc_z = info.getInt("loc_z"); final int heading = info.getInt("heading"); - _baium = (GrandBossInstance) addSpawn(BAIUM, loc_x, loc_y, loc_z, heading, false, 0); _baium.setCurrentHpMp(curr_hp, curr_mp); _lastAttack = System.currentTimeMillis(); @@ -319,7 +318,6 @@ public class Baium extends AbstractNpcAI { final Attackable mob = (Attackable) npc; final Creature mostHated = mob.getMostHated(); - if ((_baium == null) || _baium.isDead()) { mob.deleteMe(); @@ -485,7 +483,6 @@ public class Baium extends AbstractNpcAI public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill) { _lastAttack = System.currentTimeMillis(); - if (npc.getId() == BAIUM) { if ((attacker.getMountType() == MountType.STRIDER) && !attacker.isAffectedBySkill(ANTI_STRIDER.getSkillId()) && !npc.isSkillDisabled(ANTI_STRIDER.getSkill())) @@ -520,7 +517,6 @@ public class Baium extends AbstractNpcAI { final Attackable mob = (Attackable) npc; final Creature mostHated = mob.getMostHated(); - if ((getRandom(100) < 10) && SkillCaster.checkUseConditions(mob, SPEAR_ATTACK.getSkill())) { if ((mostHated != null) && (npc.calculateDistance3D(mostHated) < 1000) && zone.isCharacterInZone(mostHated)) @@ -605,7 +601,6 @@ public class Baium extends AbstractNpcAI public String onSpellFinished(Npc npc, PlayerInstance player, Skill skill) { startQuestTimer("MANAGE_SKILLS", 1000, npc, null); - if (!zone.isCharacterInZone(npc) && (_baium != null)) { _baium.teleToLocation(BAIUM_LOC); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Balok/BalokWarzone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Balok/BalokWarzone.java index e2fa444b81..2e1e672ea7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Balok/BalokWarzone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Balok/BalokWarzone.java @@ -258,7 +258,6 @@ public class BalokWarzone extends AbstractInstance public String onKill(Npc npc, PlayerInstance player, boolean isPet) { final Instance world = npc.getInstanceWorld(); - if (npc == _balok) { if (world.getAliveNpcs(BALOK).isEmpty()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java index 8d9bd0952a..cdef36270c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Baylor/BaylorWarzone.java @@ -291,7 +291,6 @@ public class BaylorWarzone extends AbstractInstance { final Npc npc = (Npc) event.getTarget(); final Instance world = npc.getInstanceWorld(); - if (isInInstance(world)) { if (world.getAliveNpcs(BAYLOR).isEmpty()) @@ -310,7 +309,6 @@ public class BaylorWarzone extends AbstractInstance final Creature creature = event.getSeen(); final Npc npc = (Npc) event.getSeer(); final Instance world = npc.getInstanceWorld(); - if (isInInstance(world) && creature.isPlayer() && npc.isScriptValue(0)) { npc.setScriptValue(1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Beleth/Beleth.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Beleth/Beleth.java index c560f27617..fa87ae2388 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Beleth/Beleth.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Beleth/Beleth.java @@ -158,39 +158,33 @@ public class Beleth extends AbstractNpcAI _camera2 = addSpawn(29121, new Location(16323, 210741, -9357)); _camera3 = addSpawn(29122, new Location(16323, 213170, -9357)); _camera4 = addSpawn(29123, new Location(16323, 214917, -9356)); - ZONE.broadcastPacket(new PlaySound(1, "BS07_A", 1, _camera1.getObjectId(), _camera1.getX(), _camera1.getY(), _camera1.getZ())); ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 75, -25, 0, 2500, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 75, -25, 0, 2500, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN2", 300, null, null); break; } case "SPAWN2": { ZONE.broadcastPacket(new SpecialCamera(_camera1, 1800, -45, -45, 5000, 5000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN3", 4900, null, null); break; } case "SPAWN3": { ZONE.broadcastPacket(new SpecialCamera(_camera1, 2500, -120, -45, 5000, 5000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN4", 4900, null, null); break; } case "SPAWN4": { ZONE.broadcastPacket(new SpecialCamera(_camera2, 2200, 130, 0, 0, 1500, -20, 15, 1, 0, 0)); - startQuestTimer("SPAWN5", 1400, null, null); break; } case "SPAWN5": { ZONE.broadcastPacket(new SpecialCamera(_camera2, 2300, 100, 0, 2000, 4500, 0, 10, 1, 0, 0)); - startQuestTimer("SPAWN6", 2500, null, null); break; } @@ -201,7 +195,6 @@ public class Beleth extends AbstractNpcAI ZONE.broadcastPacket(new StaticObject(door, false)); ZONE.broadcastPacket(new DoorStatusUpdate(door)); - startQuestTimer("SPAWN7", 1700, null, null); break; } @@ -209,23 +202,19 @@ public class Beleth extends AbstractNpcAI { ZONE.broadcastPacket(new SpecialCamera(_camera4, 1500, 210, 0, 0, 1500, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera4, 900, 255, 0, 5000, 6500, 0, 10, 1, 0, 0)); - startQuestTimer("SPAWN8", 6000, null, null); break; } case "SPAWN8": { _whirpool = addSpawn(WHIRPOOL, new Location(16323, 214917, -9356)); - ZONE.broadcastPacket(new SpecialCamera(_camera4, 900, 255, 0, 0, 1500, 0, 10, 1, 0, 0)); - startQuestTimer("SPAWN9", 1000, null, null); break; } case "SPAWN9": { ZONE.broadcastPacket(new SpecialCamera(_camera4, 1000, 255, 0, 7000, 17000, 0, 25, 1, 0, 0)); - startQuestTimer("SPAWN10", 3000, null, null); break; } @@ -242,7 +231,6 @@ public class Beleth extends AbstractNpcAI case "SPAWN11": { ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 1)); - for (int i = 0; i < 6; i++) { final int x = (int) ((150 * Math.cos(i * 1.046666667)) + 16323); @@ -260,14 +248,12 @@ public class Beleth extends AbstractNpcAI case "SPAWN12": { ZONE.broadcastPacket(new SpecialCamera(_beleth, 0, 270, -5, 0, 4000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN13", 3500, null, null); break; } case "SPAWN13": { ZONE.broadcastPacket(new SpecialCamera(_beleth, 800, 270, 10, 3000, 6000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN14", 5000, null, null); break; } @@ -275,14 +261,12 @@ public class Beleth extends AbstractNpcAI { ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 0, 5000, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 0, 5000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN15", 100, null, null); break; } case "SPAWN15": { ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 3000, 6000, 0, 5, 1, 0, 0)); - startQuestTimer("SPAWN16", 1400, null, null); break; } @@ -296,21 +280,18 @@ public class Beleth extends AbstractNpcAI case "SPAWN17": { ZONE.broadcastPacket(new MagicSkillUse(_beleth, _beleth, 5532, 1, 2000, 0)); - startQuestTimer("SPAWN18", 2000, null, null); break; } case "SPAWN18": { ZONE.broadcastPacket(new SpecialCamera(_camera3, 700, 270, 20, 1500, 8000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN19", 6900, null, null); break; } case "SPAWN19": { ZONE.broadcastPacket(new SpecialCamera(_camera3, 40, 260, 0, 0, 4000, 0, 0, 1, 0, 0)); - for (Npc fakeBeleth : _minions) { fakeBeleth.spawnMe(); @@ -325,28 +306,24 @@ public class Beleth extends AbstractNpcAI case "SPAWN20": { ZONE.broadcastPacket(new SpecialCamera(_camera3, 40, 280, 0, 0, 4000, 5, 0, 1, 0, 0)); - startQuestTimer("SPAWN21", 3000, null, null); break; } case "SPAWN21": { ZONE.broadcastPacket(new SpecialCamera(_camera3, 5, 250, 5, 0, 13000, 20, 15, 1, 0, 0)); - startQuestTimer("SPAWN22", 1000, null, null); break; } case "SPAWN22": { ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 3)); - startQuestTimer("SPAWN23", 4000, null, null); break; } case "SPAWN23": { ZONE.broadcastPacket(new MagicSkillUse(_beleth, _beleth, 5533, 1, 2000, 0)); - startQuestTimer("SPAWN24", 6800, null, null); break; } @@ -354,7 +331,6 @@ public class Beleth extends AbstractNpcAI { _beleth.deleteMe(); _beleth = null; - for (Npc fakeBeleth : _minions) { fakeBeleth.deleteMe(); @@ -374,9 +350,7 @@ public class Beleth extends AbstractNpcAI } _lastAttack = System.currentTimeMillis(); - startQuestTimer("CHECK_ATTACK", 60000, null, null); - startQuestTimer("SPAWN25", 60000, null, null); break; } @@ -391,7 +365,6 @@ public class Beleth extends AbstractNpcAI final int x = (int) ((650 * Math.cos(i * 0.39)) + 16323); final int y = (int) ((650 * Math.sin(i * 0.39)) + 213170); - npc = addSpawn(FAKE_BELETH, new Location(x, y, -9357, 49152)); _minions.add(npc); @@ -408,7 +381,6 @@ public class Beleth extends AbstractNpcAI { xm[i] = (int) ((1700 * Math.cos((i * 1.57) + 0.78)) + 16323); ym[i] = (int) ((1700 * Math.sin((i * 1.57) + 0.78)) + 213170); - npc = addSpawn(FAKE_BELETH, new Location(xm[i], ym[i], -9357, 49152)); npc.setImmobilized(true); @@ -460,7 +432,6 @@ public class Beleth extends AbstractNpcAI xm[15] = (xm[7] + xm[0]) / 2; ym[15] = (ym[7] + ym[0]) / 2; _minions.add(addSpawn(FAKE_BELETH, new Location(xm[15], ym[15], -9357, 49152))); - _allowedObjId = getRandomEntry(_minions).getObjectId(); break; } @@ -476,26 +447,22 @@ public class Beleth extends AbstractNpcAI _camera1 = addSpawn(29122, new Location(16323, 213170, -9357)); _camera1.broadcastPacket(new PlaySound(1, "BS07_D", 1, _camera1.getObjectId(), _camera1.getX(), _camera1.getY(), _camera1.getZ())); - ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 290, 25, 0, 10000, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 290, 25, 0, 10000, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 110, 25, 4000, 10000, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 5)); - startQuestTimer("SPAWN27", 4000, null, null); break; } case "SPAWN27": { ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 295, 25, 4000, 5000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN28", 4500, null, null); break; } case "SPAWN28": { ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 295, 10, 4000, 11000, 0, 25, 1, 0, 0)); - startQuestTimer("SPAWN29", 9000, null, null); break; } @@ -503,7 +470,6 @@ public class Beleth extends AbstractNpcAI { ZONE.broadcastPacket(new SpecialCamera(_camera1, 250, 90, 25, 0, 1000, 0, 0, 1, 0, 0)); ZONE.broadcastPacket(new SpecialCamera(_camera1, 250, 90, 25, 0, 10000, 0, 0, 1, 0, 0)); - startQuestTimer("SPAWN30", 2000, null, null); break; } @@ -513,7 +479,6 @@ public class Beleth extends AbstractNpcAI _beleth.deleteMe(); _camera2 = addSpawn(29121, new Location(14056, 213170, -9357)); - startQuestTimer("SPAWN31", 3500, null, null); break; } @@ -527,7 +492,6 @@ public class Beleth extends AbstractNpcAI ZONE.broadcastPacket(new StaticObject(door2, false)); ZONE.broadcastPacket(new DoorStatusUpdate(door2)); - DoorData.getInstance().getDoor(DOOR3).openMe(); _camera1.deleteMe(); @@ -602,7 +566,6 @@ public class Beleth extends AbstractNpcAI npc.setTarget(player); npc.doCast(HORN_OF_RISING.getSkill()); } - return null; } @@ -672,7 +635,6 @@ public class Beleth extends AbstractNpcAI { npc.getSpawn().setRespawnDelay(0); } - return null; } @@ -683,16 +645,13 @@ public class Beleth extends AbstractNpcAI if ((_killer != null) && (player.getObjectId() == _killer.getObjectId())) { _killer = null; - giveItems(player, RING); - html = "32470a.htm"; } else { html = "32470b.htm"; } - return HtmCache.getInstance().getHtm(player, "data/html/default/" + html); } @@ -746,7 +705,6 @@ public class Beleth extends AbstractNpcAI if (npc.getId() == REAL_BELETH) { cancelQuestTimer("CHECK_ATTACK", null, null); - setBelethKiller(killer); GrandBossManager.getInstance().setBossStatus(REAL_BELETH, DEAD); final long respawnTime = (Config.BELETH_SPAWN_INTERVAL + getRandom(-Config.BELETH_SPAWN_RANDOM, Config.BELETH_SPAWN_RANDOM)) * 3600000; @@ -754,7 +712,6 @@ public class Beleth extends AbstractNpcAI info.set("respawn_time", System.currentTimeMillis() + respawnTime); GrandBossManager.getInstance().setStatSet(REAL_BELETH, info); startQuestTimer("BELETH_UNLOCK", respawnTime, null, null); - deleteAll(); npc.deleteMe(); @@ -775,7 +732,6 @@ public class Beleth extends AbstractNpcAI _priest.decayMe(); _stone = addSpawn(STONE_COFFIN, new Location(12470, 215607, -9381, 49152)); - startQuestTimer("SPAWN26", 1000, null, null); } else if (npc.getObjectId() == _allowedObjId) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastle/IceQueensCastle.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastle/IceQueensCastle.java index 871d983b11..354de7c26a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastle/IceQueensCastle.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastle/IceQueensCastle.java @@ -146,7 +146,6 @@ public class IceQueensCastle extends AbstractInstance { npc.setScriptValue(1); npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_MAY_THE_PROTECTION_OF_THE_GODS_BE_UPON_YOU, creature.getName()); - World.getInstance().forEachVisibleObject(npc, Npc.class, mob -> { if ((mob.getId() == ARCHERY_KNIGHT) && !mob.isDead() && !mob.isDecayed()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java index 3da589ea93..27b786511e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/LastImperialTomb.java @@ -202,7 +202,6 @@ public class LastImperialTomb extends AbstractInstance case "FRINTEZZA_INTRO_2": { final Instance world = player.getInstanceWorld(); - final Npc frintezzaDummy = addSpawn(DUMMY, -87784, -155083, -9087, 16048, false, 0, false, world.getId()); world.setParameter("frintezzaDummy", frintezzaDummy); @@ -219,7 +218,6 @@ public class LastImperialTomb extends AbstractInstance final Npc scarletDummy = addSpawn(DUMMY2, -87784, -153298, -9175, 16384, false, 0, false, world.getId()); world.setParameter("scarletDummy", scarletDummy); - disablePlayers(world); // broadcastPacket(world, new SpecialCamera(overheadDummy, 0, 75, -89, 0, 100, 0, 0, 1, 0, 0)); @@ -241,7 +239,6 @@ public class LastImperialTomb extends AbstractInstance demons.add(demon); } world.setParameter("demons", demons); - startQuestTimer("FRINTEZZA_INTRO_3", 6500, null, player, false); break; } @@ -505,7 +502,6 @@ public class LastImperialTomb extends AbstractInstance broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4)); broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0)); broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0)); - startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false); break; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/ScarletVanHalisha.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/ScarletVanHalisha.java index 15679fe90f..d8421cc264 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/ScarletVanHalisha.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Frintezza/ScarletVanHalisha.java @@ -160,7 +160,6 @@ public class ScarletVanHalisha extends AbstractNpcAI } } } - return SkillData.getInstance().getSkill(FRINTEZZA_DAEMON_ATTACK, 1); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/IstinaCavern.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/IstinaCavern.java index 43c30ccc6b..cff1bcc5c5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/IstinaCavern.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/IstinaCavern.java @@ -169,7 +169,6 @@ public class IstinaCavern extends AbstractInstance { final SkillHolder death1 = npcParams.getSkillHolder("Istina_Death_Skill01"); final SkillHolder death2 = npcParams.getSkillHolder("Istina_Death_Skill02"); - if (mostHated.isInCategory(CategoryType.TANKER_GROUP)) { addSkillCastDesire(npc, mostHated, (mostHated.isAffectedBySkill(death1) ? death2 : death1), 23); @@ -187,7 +186,6 @@ public class IstinaCavern extends AbstractInstance final SkillHolder death1 = npcParams.getSkillHolder("Istina_Death_Skill01"); final SkillHolder death2 = npcParams.getSkillHolder("Istina_Death_Skill02"); final Creature mostHated = ((Attackable) npc).getMostHated(); - if ((mostHated != null) && npc.isInsideRadius2D(mostHated, 15000) && mostHated.isInCategory(CategoryType.TANKER_GROUP) && mostHated.isAffectedBySkill(death1)) { addSkillCastDesire(npc, mostHated, death2, 23); @@ -266,7 +264,6 @@ public class IstinaCavern extends AbstractInstance { final int countDown = npcVars.getInt("COUNT_DOWN", 30); final int charged = getChargedPercent(npcVars.getInt("SCORE_VAL", 0), isExtremeMode(instance)); - if (countDown == 0) { npcVars.set("COUNTING_ENABLED", false); @@ -370,7 +367,6 @@ public class IstinaCavern extends AbstractInstance if ((skill != null) && isInInstance(instance)) { final int skillId = skill.getId(); - if (npc.getId() == INVISIBLE_NPC) { if (skillId == ERUPTION_1.getSkillId()) @@ -381,7 +377,6 @@ public class IstinaCavern extends AbstractInstance else if (skillId == ERUPTION_2.getSkillId()) { getTimers().addTimer("NPC_DELETE", 2000, event -> npc.deleteMe()); - if (isExtremeMode(instance) && (getRandom(100) < 30)) { addAttackPlayerDesire(addSpawn(EXTREME_MINION, npc, false, 0, false, instance.getId()), npc.getVariables().getObject("ERUPTION_TARGET", PlayerInstance.class), 23); @@ -391,7 +386,6 @@ public class IstinaCavern extends AbstractInstance else { final StatSet npcParams = npc.getParameters(); - if (skillId == npcParams.getSkillHolder("Istina_Death_Skill01").getSkillId()) { showOnScreenMsg(player, NpcStringId.ISTINA_S_MARK_SHINES_ABOVE_THE_HEAD, ExShowScreenMessage.TOP_CENTER, 4000); @@ -441,17 +435,14 @@ public class IstinaCavern extends AbstractInstance { final StatSet npcVars = npc.getVariables(); final int stage = npcVars.getInt("ISTINA_STAGE", -1); - if (npc.getId() == BALLISTA) { if (npcVars.getBoolean("COUNTING_ENABLED", false)) { final int score = npcVars.getInt("SCORE_VAL", 0); - if (getChargedPercent(score, isExtremeMode(instance)) < 100) { int addScore = damage; - if (skill != null) { if (skill.getEffectPoint() < 0) @@ -660,7 +651,6 @@ public class IstinaCavern extends AbstractInstance PlayerInstance maxDealer = null; long maxDamage = 0; int totalDamage = 0; - for (AggroInfo info : ((Attackable) npc).getAggroList().values()) { if (info == null) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/Rumiese/Rumiese.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/Rumiese/Rumiese.java index c1d590880f..864e260bd5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/Rumiese/Rumiese.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Istina/Rumiese/Rumiese.java @@ -43,7 +43,6 @@ public class Rumiese extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "33151-01.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Octavis/OctavisWarzone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Octavis/OctavisWarzone.java index b85aad2397..8d031b257d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Octavis/OctavisWarzone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Octavis/OctavisWarzone.java @@ -209,7 +209,6 @@ public class OctavisWarzone extends AbstractInstance case "BEASTS_CHECK_HP": { final int hpPer = npc.getCurrentHpPercent(); - if ((hpPer < 50) && npc.isScriptValue(0)) { npc.getStat().addFixedValue(Stat.REGENERATE_HP_RATE, 100d); // On original script 95000d was added, making Octavis targetable for two seconds. @@ -283,7 +282,6 @@ public class OctavisWarzone extends AbstractInstance { final int moveX = npcParams.getInt("Move_to_X", 0); final int moveY = npcParams.getInt("Move_to_Y", 0); - if ((moveX != 0) && (moveY != 0)) { npc.setRunning(); @@ -348,7 +346,6 @@ public class OctavisWarzone extends AbstractInstance if (isInInstance(world)) { final int hpPer = npc.getCurrentHpPercent(); - if (CommonUtil.contains(OCTAVIS_STAGE_1, npc.getId())) { if (hpPer >= 90) @@ -379,7 +376,6 @@ public class OctavisWarzone extends AbstractInstance else if (CommonUtil.contains(OCTAVIS_STAGE_2, npc.getId())) { final StatSet npcVars = npc.getVariables(); - if (npcVars.getBoolean("START_TIMERS", true)) { npcVars.set("START_TIMERS", false); @@ -506,7 +502,6 @@ public class OctavisWarzone extends AbstractInstance final Creature creature = event.getSeen(); final Npc npc = (Npc) event.getSeer(); final Instance world = npc.getInstanceWorld(); - if (isInInstance(world) && creature.isPlayer() && npc.isScriptValue(0)) { world.openCloseDoor(MAIN_DOOR_1, true); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/QueenAnt/QueenAnt.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/QueenAnt/QueenAnt.java index 41797b8ce8..f2869a3fe9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/QueenAnt/QueenAnt.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/QueenAnt/QueenAnt.java @@ -279,7 +279,6 @@ public class QueenAnt extends AbstractNpcAI break; } } - return super.onSpawn(npc); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Sailren/Sailren.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Sailren/Sailren.java index fe542c6010..4d4eb8653a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Sailren/Sailren.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Sailren/Sailren.java @@ -152,7 +152,6 @@ public class Sailren extends AbstractNpcAI sailren.setInvul(true); sailren.setImmobilized(true); zone.broadcastPacket(new SpecialCamera(movieNpc, 60, 110, 30, 4000, 1500, 20000, 0, 65, 1, 0, 0)); - startQuestTimer("ATTACK", 24600, sailren, null); startQuestTimer("ANIMATION", 2000, movieNpc, null); startQuestTimer("CAMERA_1", 4100, movieNpc, null); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Spezion/Cannon/Cannon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Spezion/Cannon/Cannon.java index 99c3d172c7..1a0dbf6546 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Spezion/Cannon/Cannon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Spezion/Cannon/Cannon.java @@ -77,7 +77,6 @@ public class Cannon extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "useCannonBall": @@ -172,7 +171,6 @@ public class Cannon extends AbstractNpcAI if (skill.getId() == PRESENT_SKILL.getSkillId()) { final StatSet npcParams = npc.getParameters(); - npc.broadcastPacket(new Earthquake(npc, 10, 5)); npc.broadcastPacket(new OnEventTrigger(npcParams.getInt("TRIGGER_ID"), true)); final Npc light = addSpawn(INVISIBLE_NPC, npcParams.getInt("LIGHT_ZONE_POS_X"), npcParams.getInt("LIGHT_ZONE_POS_Y"), npcParams.getInt("LIGHT_ZONE_POS_Z"), 0, false, 10000); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Teredor/TeredorWarzone.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Teredor/TeredorWarzone.java index e480d12c28..58b0bda32c 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Teredor/TeredorWarzone.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Teredor/TeredorWarzone.java @@ -143,7 +143,6 @@ public class TeredorWarzone extends AbstractInstance case "TEREDOR_LAIR_CHECK": { final Location spawnLoc = npc.getSpawn(); - if (((spawnLoc.getX() - npc.getX()) > 1000) || ((spawnLoc.getX() - npc.getX()) < -2000)) { showOnScreenMsg(instance, NpcStringId.TEREDOR_SUMMONS_SUBORDINATE_BECAUSE_YOU_MOVED_OUT_OF_TEREDOR_S_AREA, ExShowScreenMessage.TOP_CENTER, 4000); @@ -188,7 +187,6 @@ public class TeredorWarzone extends AbstractInstance public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "enterInstance": @@ -200,7 +198,6 @@ public class TeredorWarzone extends AbstractInstance { final Instance playerInstance = getPlayerInstance(player); final Party playerParty = player.getParty(); - if ((playerInstance != null) && (playerInstance.getTemplateId() == TEMPLATE_ID)) { enterInstance(player, npc, TEMPLATE_ID); @@ -289,7 +286,6 @@ public class TeredorWarzone extends AbstractInstance final Creature creature = event.getSeen(); final Npc npc = (Npc) event.getSeer(); final Instance instance = npc.getInstanceWorld(); - if (isInInstance(instance)) { final StatSet npcParams = npc.getParameters(); @@ -475,7 +471,6 @@ public class TeredorWarzone extends AbstractInstance final StatSet npcVars = npc.getVariables(); final int hpPer = npc.getCurrentHpPercent(); int teredorStatus = npcVars.getInt("TEREDOR_STATUS", 1); - if ((npc.calculateDistance3D(attacker) > 450) && (getRandom(100) < 5)) { addSkillCastDesire(npc, attacker, TEREDOR_POISON_SKILL, 23); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java index d275895cad..cfbf0553a9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Tiat/Stage1.java @@ -227,7 +227,6 @@ public class Stage1 extends AbstractInstance implements IXmlReader NamedNodeMap attrs = e.getAttributes(); final int npcId = parseInteger(attrs, "npcId"); final int flag = parseInteger(attrs, "flag"); - if (!_spawnList.containsKey(flag)) { _spawnList.put(flag, new ArrayList<>()); @@ -246,7 +245,6 @@ public class Stage1 extends AbstractInstance implements IXmlReader spw.z = parseInteger(attrs, "z"); spw.h = parseInteger(attrs, "heading"); spw.isNeededNextFlag = parseBoolean(attrs, "mustKill", false); - if (spw.isNeededNextFlag) { killIds.add(npcId); @@ -263,7 +261,6 @@ public class Stage1 extends AbstractInstance implements IXmlReader spw.zone = parseInteger(attrs, "id"); spw.count = parseInteger(attrs, "count"); spw.isNeededNextFlag = parseBoolean(attrs, "mustKill", false); - if (spw.isNeededNextFlag) { killIds.add(npcId); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Zaken/CavernOfThePirateCaptain.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Zaken/CavernOfThePirateCaptain.java index 2d5b2e5240..c1de0b5431 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Zaken/CavernOfThePirateCaptain.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Zaken/CavernOfThePirateCaptain.java @@ -140,14 +140,12 @@ public class CavernOfThePirateCaptain extends AbstractInstance { final List candles = new ArrayList<>(); final int zakenRoom = getRandom(1, 15); - for (int i = 0; i < 36; i++) { final Npc candle = addSpawn(CANDLE, CANDLE_LOC[i], false, 0, false, instance.getId()); candle.getVariables().set("candleId", i + 1); candles.add(candle); } - for (int i = 3; i < 7; i++) { candles.get(ROOM_DATA[zakenRoom - 1][i] - 1).getVariables().set("isBlue", 1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java index 7ddc43d458..235df00680 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java @@ -65,7 +65,6 @@ public class AdventureGuildsman extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "AdventureGuildsman-Aden.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventurersGuide/AdventurersGuide.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventurersGuide/AdventurersGuide.java index 4af304ffb7..84a9943b9f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventurersGuide/AdventurersGuide.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AdventurersGuide/AdventurersGuide.java @@ -68,7 +68,6 @@ public class AdventurersGuide extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "guide-01.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AlchemistManager/AlchemistManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AlchemistManager/AlchemistManager.java index 6aef6c3b39..297ca2458b 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AlchemistManager/AlchemistManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/AlchemistManager/AlchemistManager.java @@ -75,7 +75,6 @@ public class AlchemistManager extends AbstractNpcAI if (player.getRace() == Race.ERTHEIA) { final List alchemySkills = SkillTreeData.getInstance().getAvailableAlchemySkills(player); - if (alchemySkills.isEmpty()) { player.sendPacket(SystemMessageId.THERE_ARE_NO_OTHER_SKILLS_TO_LEARN); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackJudge/BlackJudge.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackJudge/BlackJudge.java index f43d082e82..0f5f7f437e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackJudge/BlackJudge.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackJudge/BlackJudge.java @@ -41,7 +41,6 @@ public class BlackJudge extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - if (event.equals("weakenBreath")) { if (player.getShilensBreathDebuffLevel() >= 3) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java index ef3b9c76dc..38ae22a98d 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java @@ -52,7 +52,6 @@ public class BlackMarketeerOfMammon extends AbstractNpcAI { final StringTokenizer st = new StringTokenizer(event, " "); event = st.nextToken(); - if (!st.hasMoreElements()) { return "31092-02.html"; @@ -66,7 +65,6 @@ public class BlackMarketeerOfMammon extends AbstractNpcAI final long count = Integer.parseInt(value); final long AAcount = player.getAncientAdena(); - if (count < 1) { return "31092-02.html"; @@ -75,7 +73,6 @@ public class BlackMarketeerOfMammon extends AbstractNpcAI if (count > AAcount) { return "31092-03.html"; - } takeItems(player, Inventory.ANCIENT_ADENA_ID, count); giveAdena(player, count, false); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleChamberlain/CastleChamberlain.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleChamberlain/CastleChamberlain.java index dbb57ac149..c1c785b3e3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleChamberlain/CastleChamberlain.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleChamberlain/CastleChamberlain.java @@ -638,7 +638,6 @@ public class CastleChamberlain extends AbstractNpcAI final int level = Integer.parseInt(st.nextToken()); final int price = getTrapUpgradePrice(level); final int currentLevel = castle.getTrapUpgradeLevel(trapIndex); - if (currentLevel >= level) { final NpcHtmlMessage html = getHtmlPacket(player, npc, "chamberlain-19.html"); @@ -1140,7 +1139,6 @@ public class CastleChamberlain extends AbstractNpcAI else if (isMyLord) { final int cloakId = npc.getCastle().getSide() == CastleSide.DARK ? LORD_CLOAK_OF_DARK : LORD_CLOAK_OF_LIGHT; - if (hasQuestItems(player, cloakId)) { htmltext = "chamberlain-03.html"; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java index e53e6b348b..c83833a97a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleCourtMagician/CastleCourtMagician.java @@ -349,7 +349,6 @@ public class CastleCourtMagician extends AbstractNpcAI if (player.getClanId() == npc.getCastle().getOwnerId()) { final PlayerInstance clanLeader = player.getClan().getLeader().getPlayerInstance(); - if ((clanLeader != null) && clanLeader.isAffectedBySkill(CLAN_GATE)) { if (CallPc.checkSummonTargetStatus(player, clanLeader)) // TODO: Custom one, retail dont check it but for sure lets check same conditions like when summon player by skill. @@ -369,7 +368,6 @@ public class CastleCourtMagician extends AbstractNpcAI case "giveCloak": { final int cloakId = npc.getCastle().getSide() == CastleSide.DARK ? CLOAK_OF_DARK : CLOAK_OF_LIGHT; - if (hasQuestItems(player, cloakId)) { htmltext = "courtmagician-08.html"; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleDoorManager/CastleDoorManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleDoorManager/CastleDoorManager.java index eaab1cc009..6501fcc558 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleDoorManager/CastleDoorManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/CastleDoorManager/CastleDoorManager.java @@ -77,7 +77,6 @@ public class CastleDoorManager extends AbstractNpcAI final StringTokenizer st = new StringTokenizer(event, " "); final String action = st.nextToken(); String htmltext = null; - switch (action) { case "manageDoors": @@ -94,7 +93,6 @@ public class CastleDoorManager extends AbstractNpcAI final boolean open = st.nextToken().equals("1"); final String doorName1 = npc.getParameters().getString("DoorName1", null); final String doorName2 = npc.getParameters().getString("DoorName2", null); - castle.openCloseDoor(player, doorName1, open); castle.openCloseDoor(player, doorName2, open); } @@ -110,7 +108,6 @@ public class CastleDoorManager extends AbstractNpcAI if (isOwningClan(player, npc) && st.hasMoreTokens()) { final int param = Integer.parseInt(st.nextToken()); - if (param == 1) { final int x = npc.getParameters().getInt("pos_x01"); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallAuctioneer/ClanHallAuctioneer.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallAuctioneer/ClanHallAuctioneer.java index d696314458..f0cb99e9b7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallAuctioneer/ClanHallAuctioneer.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallAuctioneer/ClanHallAuctioneer.java @@ -67,7 +67,6 @@ public class ClanHallAuctioneer extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "ClanHallAuctioneer.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallDoorManager/ClanHallDoorManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallDoorManager/ClanHallDoorManager.java index 23025dee46..595f8c88a0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallDoorManager/ClanHallDoorManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallDoorManager/ClanHallDoorManager.java @@ -63,7 +63,6 @@ public class ClanHallDoorManager extends AbstractNpcAI final String action = st.nextToken(); final ClanHall clanHall = npc.getClanHall(); String htmltext = null; - if (clanHall != null) { switch (action) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallManager/ClanHallManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallManager/ClanHallManager.java index 3c6f2e4044..9440bd41c5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallManager/ClanHallManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClanHallManager/ClanHallManager.java @@ -112,7 +112,6 @@ public class ClanHallManager extends AbstractNpcAI final String action = st.nextToken(); final ClanHall clanHall = npc.getClanHall(); String htmltext = null; - if ((clanHall != null) && isOwningClan(player, npc)) { switch (action) @@ -325,7 +324,6 @@ public class ClanHallManager extends AbstractNpcAI { final int funcId = Integer.parseInt(st.nextToken()); final int funcLv = Integer.parseInt(st.nextToken()); - final ResidenceFunction oldFunc = clanHall.getFunction(funcId, funcLv); if (oldFunc != null) { @@ -378,7 +376,6 @@ public class ClanHallManager extends AbstractNpcAI if (st.countTokens() == 2) { final String act = st.nextToken(); - final ResidenceFunctionType funcType = ResidenceFunctionType.valueOf(st.nextToken()); if (funcType != null) { @@ -436,7 +433,6 @@ public class ClanHallManager extends AbstractNpcAI { String htmltext = null; final ClanHall clanHall = npc.getClanHall(); - if (isOwningClan(player, npc)) { if (clanHall.getCostFailDay() == 0) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java index cae28d940c..ea17f1859a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java @@ -124,7 +124,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader _spawnClassMasters = parseBoolean(attrs, "spawnClassMasters", true); _showPopupWindow = parseBoolean(attrs, "showPopupWindow", false); - for (Node c = cm.getFirstChild(); c != null; c = c.getNextSibling()) { attrs = c.getAttributes(); @@ -166,7 +165,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader { final int itemId = parseInteger(attrs, "id"); final int count = parseInteger(attrs, "count", 1); - rewardedItems.add(new ItemHolder(itemId, count)); } else if ("setNoble".equals(r.getNodeName())) @@ -188,7 +186,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader { final int itemId = parseInteger(attrs, "id"); final int count = parseInteger(attrs, "count", 1); - requiredItems.add(new ItemHolder(itemId, count)); } } @@ -894,7 +891,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader public void onPlayerPressTutorialMark(OnPlayerPressTutorialMark event) { final PlayerInstance player = event.getPlayer(); - if (!_showPopupWindow || (event.getMarkId() != 1001)) { return; @@ -961,7 +957,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader private String getClassChangeOptions(PlayerInstance player, int selectedClassId) { final StringBuilder sb = new StringBuilder(); - for (int i = 0; i < _classChangeData.size(); i++) { final ClassChangeData option = getClassChangeData(i); @@ -1004,7 +999,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader else { option.getItemsRewarded().forEach(ih -> sb.append("" + ih.getCount() + "" + ItemTable.getInstance().getTemplate(ih.getId()).getName() + "")); - if (option.isRewardNoblesse()) { sb.append("Noblesse status."); @@ -1059,7 +1053,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader } } } - return false; } @@ -1111,7 +1104,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader { showOptions = _classChangeData.stream().filter(ccd -> !ccd.getItemsRewarded().isEmpty()).filter(ccd -> ccd.isInCategory(player)).count() > 1; // Check if there is more than 1 reward to chose. } - return showOptions; } @@ -1121,7 +1113,6 @@ public class ClassMaster extends AbstractNpcAI implements IXmlReader { return _classChangeData.get(index); } - return null; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DimensionalMerchant/DimensionalMerchant.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DimensionalMerchant/DimensionalMerchant.java index 8aa4f6522e..3b5766cb64 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DimensionalMerchant/DimensionalMerchant.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DimensionalMerchant/DimensionalMerchant.java @@ -76,7 +76,6 @@ public class DimensionalMerchant extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "32478.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DivineBeast.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DivineBeast.java index 8c61eebf03..5741b87357 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DivineBeast.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/DivineBeast.java @@ -55,7 +55,6 @@ public class DivineBeast extends AbstractNpcAI cancelQuestTimer(event, npc, player); player.getServitors().values().forEach(summon -> summon.unSummon(player)); } - return super.onAdvEvent(event, npc, player); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FleeMonsters.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FleeMonsters.java index cbff5e41f4..9346aebc95 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FleeMonsters.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FleeMonsters.java @@ -68,7 +68,6 @@ public class FleeMonsters extends AbstractNpcAI final int posX = (int) (npc.getX() + (FLEE_DISTANCE * Math.cos(radians))); final int posY = (int) (npc.getY() + (FLEE_DISTANCE * Math.sin(radians))); final int posZ = npc.getZ(); - final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceWorld()); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination); return super.onAttack(npc, attacker, damage, isSummon); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java index 1165c46e0f..7b497c1b38 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/FortressSiegeManager/FortressSiegeManager.java @@ -93,7 +93,6 @@ public class FortressSiegeManager extends AbstractNpcAI final Clan clan = player.getClan(); final Fort fortress = npc.getFort(); final Castle castle = npc.getCastle(); - if (clan.getFortId() == fortress.getResidenceId()) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); @@ -163,7 +162,6 @@ public class FortressSiegeManager extends AbstractNpcAI { final Clan clan = player.getClan(); final Fort fortress = npc.getFort(); - if (clan.getFortId() == fortress.getResidenceId()) { final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GrandBossTeleporters/GrandBossTeleporters.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GrandBossTeleporters/GrandBossTeleporters.java index 24e0d9ca01..b4a03a13c9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GrandBossTeleporters/GrandBossTeleporters.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/GrandBossTeleporters/GrandBossTeleporters.java @@ -66,7 +66,6 @@ public class GrandBossTeleporters extends AbstractNpcAI { String htmltext = ""; final QuestState qs = getQuestState(player, false); - if (hasQuestItems(player, VACUALITE_FLOATING_STONE)) { player.teleToLocation(ENTER_HALL_OF_FLAMES); @@ -92,7 +91,6 @@ public class GrandBossTeleporters extends AbstractNpcAI if (valakasAI() != null) { final int status = GrandBossManager.getInstance().getBossStatus(29028); - if ((status == 0) || (status == 1)) { if (playerCount >= 200) @@ -103,7 +101,6 @@ public class GrandBossTeleporters extends AbstractNpcAI { qs.unset("allowEnter"); player.teleToLocation(TELEPORT_INTO_VALAKAS_LAIR.getX() + getRandom(600), TELEPORT_INTO_VALAKAS_LAIR.getY() + getRandom(600), TELEPORT_INTO_VALAKAS_LAIR.getZ()); - playerCount++; if (status == 0) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/HermuncusMinion/HermuncusMinion.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/HermuncusMinion/HermuncusMinion.java index c8f34ba36f..06d2fcb5e6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/HermuncusMinion/HermuncusMinion.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/HermuncusMinion/HermuncusMinion.java @@ -94,7 +94,6 @@ public class HermuncusMinion extends AbstractNpcAI String htmltext = null; final StringTokenizer st = new StringTokenizer(event, " "); event = st.nextToken(); - if (event.equals("teleportList")) { if (!player.isInCategory(CategoryType.SIXTH_CLASS_GROUP)) @@ -126,7 +125,6 @@ public class HermuncusMinion extends AbstractNpcAI else if (event.equals("teleport") && st.hasMoreTokens()) { final int locId = Integer.parseInt(st.nextToken()); - if (player.getAdena() < 150000) { player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java index 2a306082a7..92f5f478a9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/LaVieEnRose/LaVieEnRose.java @@ -142,7 +142,6 @@ public class LaVieEnRose extends AbstractNpcAI // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_AS_THE_NPC_SERVER_IS_CURRENTLY_NOT_IN_FUNCTION); // player.sendPacket(SystemMessageId.YOU_CANNOT_USE_THE_BEAUTY_SHOP_WHILE_USING_THE_AUTOMATIC_REPLACEMENT); - return true; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Mammons/Mammons.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Mammons/Mammons.java index fb03a9a81b..c5420d6f48 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Mammons/Mammons.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Mammons/Mammons.java @@ -87,7 +87,6 @@ public class Mammons extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "31126.html": @@ -114,11 +113,9 @@ public class Mammons extends AbstractNpcAI final Npc merchant = addSpawn(MAMMONS[1], MERCHANT_LOC[town]); final Npc priest = addSpawn(MAMMONS[2], PRIEST_LOC[town]); _mammons.addAll(Arrays.asList(blacksmith, merchant, priest)); - if (blacksmith != null) { blacksmith.broadcastSay(ChatType.NPC_GENERAL, getRandomEntry(RANDOM_SAY)); - if (Config.ANNOUNCE_MAMMON_SPAWN) { Broadcast.toAllOnlinePlayers("Mammon's has been spawned in Town of " + blacksmith.getCastle().getName() + ".", false); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java index 9ac34a15f8..86669cf7d3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MentorGuide/MentorGuide.java @@ -147,7 +147,6 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = event; - if (event.equalsIgnoreCase("exchange")) { if (hasQuestItems(player, MENTEE_CERT) && (player.getLevel() >= MAX_LEVEL) && player.isAwakenedClass()) @@ -227,7 +226,6 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader public void OnPlayerMenteeStatus(OnPlayerMenteeStatus event) { final PlayerInstance player = event.getMentee(); - if (event.isMenteeOnline()) { final Mentee mentor = MentorManager.getInstance().getMentor(player.getObjectId()); @@ -294,12 +292,10 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader public void OnPlayerMentorStatus(OnPlayerMentorStatus event) { final PlayerInstance player = event.getMentor(); - if (event.isMentorOnline()) { // stop buffs removal task cancelQuestTimer("REMOVE_BUFFS " + player.getObjectId(), null, null); - MentorManager.getInstance().getMentees(player.getObjectId()).stream().filter(Objects::nonNull).filter(Mentee::isOnline).forEach(mentee -> { //@formatter:off @@ -353,7 +349,6 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader public void onProfessionChange(OnPlayerProfessionChange event) { final PlayerInstance player = event.getPlayer(); - if (player.isMentor()) { // Give mentor's buffs only if he didn't had them. @@ -388,7 +383,6 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader } checkLevelForReward(player); // Checking level to send a mail if is necessary - if (player.getLevel() > MAX_LEVEL) { handleGraduateMentee(player); @@ -434,7 +428,6 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader final Mentee mentee = event.getMentee(); final PlayerInstance mentor = event.getMentor(); final PlayerInstance player = mentee.getPlayerInstance(); - if (player != null) { // Remove the mentee skills @@ -486,11 +479,9 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader { MentorManager.getInstance().setPenalty(mentor.getObjectId(), Config.MENTOR_PENALTY_FOR_MENTEE_COMPLETE); MentorManager.getInstance().deleteMentor(mentor.getObjectId(), player.getObjectId()); - if (mentor.isOnline()) { mentor.sendPacket(new SystemMessage(SystemMessageId.S1_HAS_AWAKENED_AND_THE_MENTOR_MENTEE_RELATIONSHIP_HAS_ENDED_THE_MENTOR_CANNOT_OBTAIN_ANOTHER_MENTEE_FOR_ONE_DAY_AFTER_THE_MENTEE_S_GRADUATION).addPcName(player)); - if (MentorManager.getInstance().isAllMenteesOffline(mentor.getObjectId(), player.getObjectId())) { MentorManager.getInstance().cancelAllMentoringBuffs(mentor.getPlayerInstance()); @@ -503,9 +494,7 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader // Clear mentee status player.sendPacket(new ExMentorList(player)); - player.sendPacket(new SystemMessage(SystemMessageId.YOUR_MENTOR_MENTEE_RELATIONSHIP_WITH_YOUR_MENTOR_S1_HAS_ENDED_AS_YOU_ARE_AN_AWAKENED_CHARACTER_OF_LV_85_OR_ABOVE_YOU_CAN_NO_LONGER_BE_PAIRED_WITH_A_MENTOR).addPcName(player)); - sendMail(player.getObjectId(), MENTEE_GRADUATE_TITLE, MENTEE_GRADUATE_BODY, MENTEE_CERT, 1); } } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Minigame/Minigame.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Minigame/Minigame.java index f22732e3c6..9d91ac9d01 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Minigame/Minigame.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Minigame/Minigame.java @@ -88,7 +88,6 @@ public class Minigame extends AbstractNpcAI takeItems(player, UNLIT_TORCHLIGHT, 1); giveItems(player, TORCHLIGHT, 1); npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_START_THE_FURNACE_MECHANISM_WATCH_FOR_THE_PATTERN); - room.getManager().setTarget(player); room.setParticipant(player); room.setStarted(true); @@ -99,7 +98,6 @@ public class Minigame extends AbstractNpcAI cancelQuestTimer("hurry_up", npc, null); cancelQuestTimer("hurry_up2", npc, null); cancelQuestTimer("expire", npc, null); - startQuestTimer("hurry_up", 120000, npc, null); startQuestTimer("expire", 190000, npc, null); startQuestTimer("start", 1000, npc, null); @@ -204,7 +202,6 @@ public class Minigame extends AbstractNpcAI String htmltext = null; final MinigameRoom room = getRoomByManager(npc); final boolean miniGameStarted = room.getStarted(); - if (npc.getTarget() == null) { htmltext = (miniGameStarted ? "32758-08.html" : "32758.html"); @@ -218,7 +215,6 @@ public class Minigame extends AbstractNpcAI else { final int attemptNumber = room.getAttemptNumber(); - if (attemptNumber == 2) { htmltext = "32758-02.html"; @@ -233,7 +229,6 @@ public class Minigame extends AbstractNpcAI { htmltext = "32758-04.html"; } - return htmltext; } @@ -323,7 +318,6 @@ public class Minigame extends AbstractNpcAI final Npc[] burners = new Npc[9]; Npc lastSpawn; int potNumber = 0; - for (Spawn spawn : SpawnTable.getInstance().getSpawns(BURNER)) { lastSpawn = spawn.getLastSpawn(); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MonumentOfHeroes/MonumentOfHeroes.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MonumentOfHeroes/MonumentOfHeroes.java index 891f665b6e..71682398fc 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MonumentOfHeroes/MonumentOfHeroes.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MonumentOfHeroes/MonumentOfHeroes.java @@ -78,7 +78,6 @@ public class MonumentOfHeroes extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "MonumentOfHeroes-reward.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MysteriousWizard/MysteriousWizard.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MysteriousWizard/MysteriousWizard.java index 9b989e89db..7db4509483 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MysteriousWizard/MysteriousWizard.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/MysteriousWizard/MysteriousWizard.java @@ -52,7 +52,6 @@ public class MysteriousWizard extends AbstractNpcAI String htmltext = null; final QuestState qs = player.getQuestState(Q10751_WindsOfFateEncounters.class.getSimpleName()); final Instance world = npc.getInstanceWorld(); - if (isFotDInstance(world)) { htmltext = "33980.html"; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java index cc1af0beeb..0a77719621 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/NpcBuffers/NpcBufferAI.java @@ -81,7 +81,6 @@ class NpcBufferAI implements Runnable } final PlayerInstance player = _npc.getSummoner().getActingPlayer(); - final Skill skill = getSkill(player); if (skill == null) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyBuffer/OlyBuffer.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyBuffer/OlyBuffer.java index a0db92939b..922fb46d30 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyBuffer/OlyBuffer.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyBuffer/OlyBuffer.java @@ -57,7 +57,6 @@ public class OlyBuffer extends AbstractNpcAI public String onFirstTalk(Npc npc, PlayerInstance player) { String htmltext = null; - if (npc.isScriptValue(0)) { htmltext = "olympiad_master001.htm"; @@ -69,7 +68,6 @@ public class OlyBuffer extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "guardian": @@ -91,7 +89,6 @@ public class OlyBuffer extends AbstractNpcAI npc.setScriptValue(1); htmltext = "olympiad_master003.htm"; getTimers().addTimer("DELETE_ME", 5000, evnt -> npc.deleteMe()); - return htmltext; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java index 7798092555..4e78da8a7f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java @@ -89,7 +89,6 @@ public class OlyManager extends AbstractNpcAI implements IBypassHandler public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "OlyManager-info.html": @@ -204,7 +203,6 @@ public class OlyManager extends AbstractNpcAI implements IBypassHandler case "showEquipmentReward": { int multisellId = -1; - if (player.getClassId() == ClassId.SAYHA_SEER) { multisellId = 926; @@ -271,7 +269,6 @@ public class OlyManager extends AbstractNpcAI implements IBypassHandler final int classId = Integer.parseInt(event.replace("rank_", "")); final List names = Olympiad.getInstance().getClassLeaderBoard(classId); htmltext = getHtm(player, "OlyManager-rankDetail.html"); - int index = 1; for (String name : names) { @@ -298,7 +295,6 @@ public class OlyManager extends AbstractNpcAI implements IBypassHandler public String onFirstTalk(Npc npc, PlayerInstance player) { String htmltext = null; - if (!player.isCursedWeaponEquipped()) { htmltext = player.isNoble() ? "OlyManager-noble.html" : "OlyManager-noNoble.html"; @@ -316,7 +312,6 @@ public class OlyManager extends AbstractNpcAI implements IBypassHandler try { final Npc olymanager = player.getLastFolkNPC(); - if (command.startsWith(BYPASSES[0])) // list { if (!Olympiad.getInstance().inCompPeriod()) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Servitors/SinEater.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Servitors/SinEater.java index 9017c45462..5833e7bbea 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Servitors/SinEater.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/Servitors/SinEater.java @@ -56,7 +56,6 @@ public class SinEater extends AbstractNpcAI { final int random = getRandom(100); final Summon summon = player.getPet(); - if (random < 20) { broadcastSummonSay(summon, NpcStringId.YAWWWWN_IT_S_SO_BORING_HERE_WE_SHOULD_GO_AND_FIND_SOME_ACTION); @@ -90,7 +89,6 @@ public class SinEater extends AbstractNpcAI { final int random = getRandom(100); final Summon summon = (Summon) event.getTarget(); - if (random < 30) { broadcastSummonSay(summon, NpcStringId.OH_THIS_IS_JUST_GREAT_WHAT_ARE_YOU_GOING_TO_DO_NOW); @@ -114,7 +112,6 @@ public class SinEater extends AbstractNpcAI { final int random = getRandom(100); final Summon summon = (Summon) event.getTarget(); - if (random < 35) { broadcastSummonSay(summon, NpcStringId.OH_THAT_SMARTS); @@ -143,7 +140,6 @@ public class SinEater extends AbstractNpcAI if (getRandom(100) < 10) { final int random = getRandom(100); - if (random < 25) { broadcastSummonSay(summon, NpcStringId.USING_A_SPECIAL_SKILL_HERE_COULD_TRIGGER_A_BLOODBATH); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TersisHerald/TersisHerald.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TersisHerald/TersisHerald.java index dac1d25f86..0c7a153bf9 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TersisHerald/TersisHerald.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TersisHerald/TersisHerald.java @@ -133,7 +133,6 @@ public class TersisHerald extends AbstractNpcAI } World.getInstance().getPlayers().stream().forEach(p -> showOnScreenMsg(p, npcStringId, 2, 10000, true)); - if (!SPAWNED_NPCS.isEmpty()) { getTimers().cancelTimers("DESPAWN_NPCS"); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TrainingCamp/TrainingCamp.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TrainingCamp/TrainingCamp.java index f12bacf72c..faf8cb8070 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TrainingCamp/TrainingCamp.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/TrainingCamp/TrainingCamp.java @@ -62,7 +62,6 @@ public class TrainingCamp extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - if (!Config.TRAINING_CAMP_ENABLE || !checkConditions(player)) { return htmltext; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/VillageMasters/ClassTransferTalk/ClassTransferTalk.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/VillageMasters/ClassTransferTalk/ClassTransferTalk.java index ee4720a195..0516549f48 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/VillageMasters/ClassTransferTalk/ClassTransferTalk.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/VillageMasters/ClassTransferTalk/ClassTransferTalk.java @@ -88,7 +88,6 @@ public class ClassTransferTalk extends AbstractNpcAI public String onAdvEvent(String event, Npc npc, PlayerInstance player) { String htmltext = null; - switch (event) { case "30565-02.html": diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/SellBuff/SellBuff.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/SellBuff/SellBuff.java index 06cba57757..449180437e 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/SellBuff/SellBuff.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/SellBuff/SellBuff.java @@ -75,7 +75,6 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler String cmd = ""; final StringBuilder params = new StringBuilder(); final StringTokenizer st = new StringTokenizer(command, " "); - if (st.hasMoreTokens()) { cmd = st.nextToken(); @@ -183,10 +182,8 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler if (!player.isSellingBuffs() && (params != null) && !params.isEmpty()) { final StringTokenizer st = new StringTokenizer(params, " "); - int skillId = -1; int price = -1; - if (st.hasMoreTokens()) { skillId = Integer.parseInt(st.nextToken()); @@ -231,9 +228,7 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler if (!player.isSellingBuffs() && (params != null) && !params.isEmpty()) { final StringTokenizer st = new StringTokenizer(params, " "); - int skillId = -1; - if (st.hasMoreTokens()) { skillId = Integer.parseInt(st.nextToken()); @@ -264,10 +259,8 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler if (!player.isSellingBuffs() && (params != null) && !params.isEmpty()) { final StringTokenizer st = new StringTokenizer(params, " "); - int skillId = -1; long price = -1; - if (st.hasMoreTokens()) { skillId = Integer.parseInt(st.nextToken()); @@ -325,7 +318,6 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler if ((params != null) && !params.isEmpty()) { final StringTokenizer st = new StringTokenizer(params, " "); - int objId = -1; int index = 0; if (st.hasMoreTokens()) @@ -359,7 +351,6 @@ public class SellBuff implements IVoicedCommandHandler, IBypassHandler int objId = -1; int skillId = -1; int index = 0; - if (st.hasMoreTokens()) { objId = Integer.parseInt(st.nextToken()); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java index c979a7943d..06b35114e6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java @@ -54,7 +54,6 @@ public class ShadowWeapons extends AbstractNpcAI String htmltext; final boolean hasD = hasQuestItems(player, 8869); // Shadow Item Exchange Coupon (D-Grade) final boolean hasC = hasQuestItems(player, 8870); // Shadow Item Exchange Coupon (C-Grade) - if (hasD || hasC) { if (!hasD) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Elpies/Elpies.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Elpies/Elpies.java index 86d6d5f332..d0cb651ffa 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Elpies/Elpies.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Elpies/Elpies.java @@ -96,10 +96,8 @@ public class Elpies extends Event EVENT_ACTIVE = true; final EventLocation randomLoc = getRandomEntry(EventLocation.values()); - CURRENT_ELPY_COUNT = 0; final long despawnDelay = EVENT_DURATION_MINUTES * 60000; - for (int i = 0; i < ELPY_AMOUNT; i++) { addSpawn(ELPY, randomLoc.getRandomX(), randomLoc.getRandomY(), randomLoc.getZ(), 0, true, despawnDelay); @@ -110,7 +108,6 @@ public class Elpies extends Event Broadcast.toAllOnlinePlayers("Elpy invasion in " + randomLoc.getName()); Broadcast.toAllOnlinePlayers("Help us exterminate them!"); Broadcast.toAllOnlinePlayers("You have " + EVENT_DURATION_MINUTES + " minutes!"); - _eventTask = ThreadPool.schedule(() -> { Broadcast.toAllOnlinePlayers("Time is up!"); @@ -128,7 +125,6 @@ public class Elpies extends Event } EVENT_ACTIVE = false; - if (_eventTask != null) { _eventTask.cancel(true); @@ -164,7 +160,6 @@ public class Elpies extends Event eventStop(); } } - return super.onKill(npc, killer, isSummon); } @@ -225,7 +220,6 @@ public class Elpies extends Event private void dropItem(Npc mob, PlayerInstance player, int[][] droplist) { final int chance = getRandom(100); - for (int[] drop : droplist) { if (chance >= drop[1]) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Rabbits/Rabbits.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Rabbits/Rabbits.java index 51ded8bd5e..1049594fd3 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Rabbits/Rabbits.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Rabbits/Rabbits.java @@ -158,7 +158,6 @@ public class Rabbits extends Event // Announce event end Broadcast.toAllOnlinePlayers("Rabbits Event: Event has finished."); - return true; } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Race/Race.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Race/Race.java index 69168f96cd..8941b8dc74 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Race/Race.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/Race/Race.java @@ -140,9 +140,7 @@ public class Race extends Event // Schedule Event end _eventTask = ThreadPool.schedule(this::StartRace, REGISTER_TIME * 60 * 1000); - return true; - } protected void StartRace() @@ -226,7 +224,6 @@ public class Race extends Event _players.clear(); // Announce event end Broadcast.toAllOnlinePlayers("* Race Event finished *"); - return true; } @@ -329,7 +326,6 @@ public class Race extends Event public String onFirstTalk(Npc npc, PlayerInstance player) { getQuestState(player, true); - if (npc.getId() == START_NPC) { if (_isRaceStarted) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/package-info.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/package-info.java index 1a1a2be8da..25383bc347 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/package-info.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/package-info.java @@ -22,4 +22,4 @@ * The mechanics and syntax of custom scripts are the same as all quest scripts. * @author Zoey76 */ -package custom; +package custom; \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java index 858fdaaca9..1af01195f7 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/FreyaCelebration/FreyaCelebration.java @@ -81,7 +81,6 @@ public class FreyaCelebration extends LongTimeEvent final long currTime = System.currentTimeMillis(); final String value = player.getVariables().getString("FreyaCelebration"); final long reuseTime = value.equals("") ? 0 : Long.parseLong(value); - if (currTime > reuseTime) { takeItems(player, Inventory.ADENA_ID, 1); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java index ab249a5591..4e103d8547 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java @@ -63,7 +63,6 @@ public class HeavyMedal extends LongTimeEvent { String htmltext = event; int level = checkLevel(player); - if (event.equalsIgnoreCase("game")) { htmltext = getQuestItemsCount(player, GLITTERING_MEDAL) < MEDALS[level] ? "31229-no.htm" : "31229-game.htm"; @@ -77,7 +76,6 @@ public class HeavyMedal extends LongTimeEvent else { takeItems(player, GLITTERING_MEDAL, MEDALS[level]); - if (getRandom(100) > WIN_CHANCE) { level = 0; diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/actionhandlers/PetInstanceAction.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/actionhandlers/PetInstanceAction.java index e15d3a3562..c538ae5ba1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/actionhandlers/PetInstanceAction.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/actionhandlers/PetInstanceAction.java @@ -43,7 +43,6 @@ public class PetInstanceAction implements IActionHandler } final boolean isOwner = player.getObjectId() == ((PetInstance) target).getOwner().getObjectId(); - if (isOwner && (player != ((PetInstance) target).getOwner())) { ((PetInstance) target).updateRefOwner(player); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminAdmin.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminAdmin.java index 07192a0f68..ea73fa17a1 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminAdmin.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminAdmin.java @@ -446,7 +446,6 @@ public class AdminAdmin implements IAdminCommandHandler replyMSG.append("Rate SP = " + Config.RATE_SP + "