From bc61b48a5689f54012944b1626632072bcfeadee Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Mon, 8 Apr 2019 10:30:59 +0000
Subject: [PATCH] Always use static modifier when adding values to static lists
and maps.
---
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 169 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../Q10790_AMercenaryHelper.java | 387 +--
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../Q10790_AMercenaryHelper.java | 387 +--
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../AdventureGuildsman.java | 978 ++++----
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../AdventureGuildsman.java | 12 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../AdventureGuildsman.java | 12 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../AdventureGuildsman.java | 12 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../DragonValley/LeopardDragonHachling.java | 228 +-
.../ai/areas/TalkingIsland/Raina/Raina.java | 6 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../AdventureGuildsman.java | 12 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../ai/others/OlyManager/OlyManager.java | 3 +-
.../handlers/effecthandlers/AirBind.java | 241 +-
.../handlers/effecthandlers/KnockBack.java | 3 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00032_AnObviousLie.java | 3 +-
.../Q00344_1000YearsTheEndOfLamentation.java | 2 +-
.../Q00420_LittleWing/Q00420_LittleWing.java | 3 +-
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../gameserver/util/exp4j/Operators.java | 1 -
.../game/data/scripts/ai/bosses/Core.java | 3 +-
.../custom/EchoCrystals/EchoCrystals.java | 244 +-
.../Q004_LongliveThePaagrioLord.java | 319 +--
.../Q038_DragonFangs/Q038_DragonFangs.java | 3 +-
.../Q039_RedEyedInvaders.java | 484 ++--
.../Q162_CurseOfTheUndergroundFortress.java | 353 +--
.../Q165_ShilensHunt/Q165_ShilensHunt.java | 3 +-
.../Q171_ActsOfEvil/Q171_ActsOfEvil.java | 763 +++---
.../Q219_TestimonyOfFate.java | 1289 +++++-----
.../Q234_FatesWhisper/Q234_FatesWhisper.java | 830 +++----
.../Q300_HuntingLetoLizardman.java | 309 +--
.../Q324_SweetestVenom.java | 249 +-
.../Q325_GrimCollector.java | 521 +++--
.../Q327_RecoverTheFarmland.java | 947 ++++----
.../Q328_SenseForBusiness.java | 305 +--
.../Q330_AdeptOfTaste/Q330_AdeptOfTaste.java | 1183 +++++-----
.../Q341_HuntingForWildBeasts.java | 245 +-
.../Q344_1000YearsTheEndOfLamentation.java | 629 ++---
.../Q354_ConquestOfAlligatorIsland.java | 481 ++--
.../Q355_FamilyHonor/Q355_FamilyHonor.java | 441 ++--
.../Q357_WarehouseKeepersAmbition.java | 283 +--
.../Q359_ForSleeplessDeadmen.java | 307 +--
.../Q366_SilverHairedShaman.java | 257 +-
.../Q368_TrespassingIntoTheSacredArea.java | 263 +--
.../Q369_CollectorOfJewels.java | 409 ++--
.../Q370_AnElderSowsSeeds.java | 273 +--
.../Q371_ShriekOfGhosts.java | 435 ++--
.../Q373_SupplierOfReagents.java | 3 +-
.../Q378_MagnificentFeast.java | 579 ++---
.../Q384_WarehouseKeepersPastime.java | 901 +++----
.../Q385_YokeOfThePast.java | 407 ++--
.../quests/Q419_GetAPet/Q419_GetAPet.java | 683 +++---
.../Q426_QuestForFishingShot.java | 928 ++++----
.../Q603_DaimonTheWhiteEyed_Part1.java | 541 ++---
.../Q605_AllianceWithKetraOrcs.java | 864 +++----
.../Q611_AllianceWithVarkaSilenos.java | 864 +++----
.../Q617_GatherTheFlames.java | 397 ++--
.../Q626_ADarkTwilight.java | 343 +--
.../Q627_HeartInSearchOfPower.java | 496 ++--
...Q628_HuntOfTheGoldenRamMercenaryForce.java | 421 ++--
.../Q629_CleanUpTheSwampOfScreams.java | 309 +--
.../Q631_DeliciousTopChoiceMeat.java | 439 ++--
.../Q633_InTheForgottenVillage.java | 398 ++--
.../Q639_GuardiansOfTheHolyGrail.java | 437 ++--
.../Q662_AGameOfCards/Q662_AGameOfCards.java | 1298 +++++-----
.../Q663_SeductiveWhispers.java | 1084 ++++-----
.../NewbieTravelToken/NewbieTravelToken.java | 249 +-
.../teleports/RaceTrack/RaceTrack.java | 161 +-
.../FirstClassChange/FirstClassChange.java | 1163 ++++-----
.../SecondClassChange/SecondClassChange.java | 1019 ++++----
.../model/holders/ScoreDataHolder.java | 56 +
.../gameserver/model/quest/Quest.java | 9 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 2083 +++++++++--------
.../data/scripts/ai/bosses/Core/Core.java | 473 ++--
.../DelusionTeleport/DelusionTeleport.java | 1 -
.../data/scripts/ai/others/Selina/Selina.java | 1 -
.../game/data/scripts/events/L2Day/L2Day.java | 513 ++--
.../Q00032_AnObviousLie.java | 581 ++---
.../Q00144_PailakaInjuredDragon.java | 1956 ++++++++--------
.../Q00255_Tutorial/Q00255_Tutorial.java | 1423 +++++------
.../Q00257_TheGuardIsBusy.java | 1 -
.../Q00262_TradeWithTheIvoryTower.java | 1 -
.../Q00276_TotemOfTheHestui.java | 1 -
.../Q00281_HeadForTheHills.java | 1 -
.../Q00287_FiguringItOut.java | 1 -
.../Q00290_ThreatRemoval.java | 1 -
.../Q00300_HuntingLetoLizardman.java | 1 -
.../Q00327_RecoverTheFarmland.java | 1 -
.../Q00344_1000YearsTheEndOfLamentation.java | 755 +++---
.../Q00360_PlunderTheirSupplies.java | 1 -
.../Q00372_LegacyOfInsolence.java | 1 -
.../Q00373_SupplierOfReagents.java | 1 -
...Q00380_BringOutTheFlavorOfIngredients.java | 403 ++--
.../Q00385_YokeOfThePast.java | 367 +--
.../quests/Q00419_GetAPet/Q00419_GetAPet.java | 1 -
.../Q00420_LittleWing/Q00420_LittleWing.java | 1767 +++++++-------
.../Q00461_RumbleInTheBase.java | 1 -
.../Q00463_IMustBeaGenius.java | 1 -
.../Q00601_WatchingEyes.java | 1 -
.../Q00628_HuntGoldenRam.java | 1 -
.../Q00629_CleanUpTheSwampOfScreams.java | 1 -
.../Q00644_GraveRobberAnnihilation.java | 1 -
.../Q00649_ALooterAndARailroadMan.java | 1 -
.../Q00716_PathToBecomingALordRune.java | 1 -
.../Q00727_HopeWithinTheDarkness.java | 1639 ++++++-------
.../commons/util/crypt/LoginCrypt.java | 1 -
.../instancemanager/TerritoryWarManager.java | 25 +-
.../gameserver/model/base/PlayerClass.java | 1 -
.../model/skills/MountEnabledSkillList.java | 73 +-
.../serverpackets/ExBasicActionList.java | 1 -
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../NpcLocationInfo/NpcLocationInfo.java | 6 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00255_Tutorial/Q00255_Tutorial.java | 888 ++++---
.../Q00257_TheGuardIsBusy.java | 1 -
.../Q00276_TotemOfTheHestui.java | 1 -
.../Q00327_RecoverTheFarmland.java | 1 -
.../Q00344_1000YearsTheEndOfLamentation.java | 755 +++---
.../Q00360_PlunderTheirSupplies.java | 1 -
.../Q00416_PathOfTheOrcShaman.java | 1 -
.../model/holders/QuestSoundHtmlHolder.java | 42 +
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../NpcLocationInfo/NpcLocationInfo.java | 6 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00255_Tutorial/Q00255_Tutorial.java | 888 ++++---
.../Q00257_TheGuardIsBusy.java | 1 -
.../Q00276_TotemOfTheHestui.java | 1 -
.../Q00327_RecoverTheFarmland.java | 1 -
.../Q00344_1000YearsTheEndOfLamentation.java | 755 +++---
.../Q00360_PlunderTheirSupplies.java | 1 -
.../Q00416_PathOfTheOrcShaman.java | 1 -
.../model/holders/QuestSoundHtmlHolder.java | 42 +
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../NpcLocationInfo/NpcLocationInfo.java | 6 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00255_Tutorial/Q00255_Tutorial.java | 888 ++++---
.../Q00257_TheGuardIsBusy.java | 1 -
.../Q00276_TotemOfTheHestui.java | 1 -
.../Q00327_RecoverTheFarmland.java | 1 -
.../Q00344_1000YearsTheEndOfLamentation.java | 755 +++---
.../Q00360_PlunderTheirSupplies.java | 1 -
.../Q00416_PathOfTheOrcShaman.java | 1 -
.../model/holders/QuestSoundHtmlHolder.java | 42 +
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
.../scripts/ai/bosses/Antharas/Antharas.java | 3 +-
.../data/scripts/ai/bosses/Core/Core.java | 3 +-
.../ai/others/ClassMaster/ClassMaster.java | 3 +-
.../NpcLocationInfo/NpcLocationInfo.java | 6 +-
.../itemhandlers/ChangeAttributeCrystal.java | 171 +-
.../Q00255_Tutorial/Q00255_Tutorial.java | 888 ++++---
.../Q00257_TheGuardIsBusy.java | 1 -
.../Q00276_TotemOfTheHestui.java | 1 -
.../Q00327_RecoverTheFarmland.java | 1 -
.../Q00344_1000YearsTheEndOfLamentation.java | 755 +++---
.../Q00360_PlunderTheirSupplies.java | 1 -
.../Q00416_PathOfTheOrcShaman.java | 1 -
.../model/holders/QuestSoundHtmlHolder.java | 42 +
.../model/skills/MountEnabledSkillList.java | 73 +-
.../ExChangeAttributeInfo.java | 135 +-
262 files changed, 27272 insertions(+), 26968 deletions(-)
create mode 100644 L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/holders/ScoreDataHolder.java
create mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/holders/QuestSoundHtmlHolder.java
create mode 100644 L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/holders/QuestSoundHtmlHolder.java
create mode 100644 L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/holders/QuestSoundHtmlHolder.java
create mode 100644 L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/holders/QuestSoundHtmlHolder.java
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
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 56d5e6f72b..6ee86b5890 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
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
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 637314495a..15d03c6c01 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
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
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 50cde6735a..5f00d31b76 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
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
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 43e4f39c22..cdf1faf2e5 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
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index 4adcae3410..843796d5fb 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,86 +1,87 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index d0eff540a6..de442f202a 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -106,7 +106,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
index 8bbe632111..2708f8af09 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
@@ -1,194 +1,195 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q10790_AMercenaryHelper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.holders.ItemHolder;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
-import com.l2jmobius.gameserver.util.Util;
-
-/**
- * A Mercenary Helper (10790)
- * @author Stayway
- */
-public class Q10790_AMercenaryHelper extends Quest
-{
- // NPC
- private static final int DOKARA = 33847;
- // Monsters
- private static final int SPLINTER_STAKATO = 21508;
- private static final int SPLINTER_STAKATO_WORKER = 21509;
- private static final int SPLINTER_STAKATO_SOLDIER = 21510;
- private static final int SPLINTER_STAKATO_DRONE = 21511;
- private static final int NEEDLE_STAKATO = 21513;
- private static final int NEEDLE_STAKATO_WORKER = 21514;
- private static final int NEEDLE_STAKATO_SOLDIER = 21515;
- private static final int NEEDLE_STAKATO_DRONE = 21516;
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q10790_AMercenaryHelper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.holders.ItemHolder;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.util.Util;
+
+/**
+ * A Mercenary Helper (10790)
+ * @author Stayway
+ */
+public class Q10790_AMercenaryHelper extends Quest
+{
+ // NPC
+ private static final int DOKARA = 33847;
+ // Monsters
+ private static final int SPLINTER_STAKATO = 21508;
+ private static final int SPLINTER_STAKATO_WORKER = 21509;
+ private static final int SPLINTER_STAKATO_SOLDIER = 21510;
+ private static final int SPLINTER_STAKATO_DRONE = 21511;
+ private static final int NEEDLE_STAKATO = 21513;
+ private static final int NEEDLE_STAKATO_WORKER = 21514;
+ private static final int NEEDLE_STAKATO_SOLDIER = 21515;
+ private static final int NEEDLE_STAKATO_DRONE = 21516;
private static final Map MOBS_REQUIRED = new HashMap<>();
- {
- MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
- }
- // Item
- private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
- private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
- // Rewards
- private static final int EXP_REWARD = 942690;
- private static final int SP_REWARD = 226;
- // Other
- private static final int MIN_LEVEL = 65;
- private static final int MAX_LEVEL = 70;
-
- public Q10790_AMercenaryHelper()
- {
- super(10790);
- addStartNpc(DOKARA);
- addTalkId(DOKARA);
- addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
- addCondMinLevel(MIN_LEVEL, "no_level.htm");
- addCondRace(Race.ERTHEIA, "no Ertheia.html");
- addCondClassId(ClassId.MARAUDER, "no_class.html");
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- final QuestState qs = getQuestState(player, false);
- if (qs == null)
- {
- return null;
- }
-
- String htmltext = null;
- switch (event)
- {
- case "33847-02.htm":
- case "33847-03.htm":
- {
- htmltext = event;
- break;
- }
- case "33847-04.htm": // start the quest
- {
- qs.startQuest();
- qs.set(Integer.toString(SPLINTER_STAKATO), 0);
- htmltext = event;
- break;
- }
- case "33847-07.html":
- {
- if (qs.isCond(2))
- {
- giveItems(player, GUILD_COIN);
- giveItems(player, ENCHANT_ARMOR_A);
- addExpAndSp(player, EXP_REWARD, SP_REWARD);
- qs.exitQuest(false, true);
- htmltext = event;
- }
- break;
- }
- }
- return htmltext;
- }
-
- @Override
- public String onTalk(Npc npc, PlayerInstance player)
- {
- final QuestState qs = getQuestState(player, true);
- String htmltext = null;
- switch (qs.getState())
- {
- case State.CREATED:
- {
- if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
- {
- htmltext = "no_level.html";
- }
- else
- {
- htmltext = "33847-01.htm";
- }
- break;
- }
- case State.STARTED:
- {
- if (qs.isCond(1))
- {
- htmltext = "33847-05.html"; // Need find proper html
- }
- else if (qs.isCond(2))
- {
- htmltext = "33847-06.html";
- }
- break;
- }
- case State.COMPLETED:
- {
- htmltext = getAlreadyCompletedMsg(player);
- break;
- }
- }
- return htmltext;
- }
-
- @Override
- public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
- {
- final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
- if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
- {
- int kills = 0;
- switch (npc.getId())
- {
- case SPLINTER_STAKATO:
- case SPLINTER_STAKATO_WORKER:
- case SPLINTER_STAKATO_SOLDIER:
- case SPLINTER_STAKATO_DRONE:
- case NEEDLE_STAKATO:
- case NEEDLE_STAKATO_WORKER:
- case NEEDLE_STAKATO_SOLDIER:
- case NEEDLE_STAKATO_DRONE:
- {
- kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
- kills++;
- qs.set(Integer.toString(SPLINTER_STAKATO), kills);
- break;
- }
- }
-
- final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
- log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
- log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
- killer.sendPacket(log);
-
- if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
- {
- qs.setCond(2);
- }
- }
- return super.onKill(npc, killer, isSummon);
- }
-}
+ static
+ {
+ MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
+ }
+ // Item
+ private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
+ private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
+ // Rewards
+ private static final int EXP_REWARD = 942690;
+ private static final int SP_REWARD = 226;
+ // Other
+ private static final int MIN_LEVEL = 65;
+ private static final int MAX_LEVEL = 70;
+
+ public Q10790_AMercenaryHelper()
+ {
+ super(10790);
+ addStartNpc(DOKARA);
+ addTalkId(DOKARA);
+ addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
+ addCondMinLevel(MIN_LEVEL, "no_level.htm");
+ addCondRace(Race.ERTHEIA, "no Ertheia.html");
+ addCondClassId(ClassId.MARAUDER, "no_class.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "33847-02.htm":
+ case "33847-03.htm":
+ {
+ htmltext = event;
+ break;
+ }
+ case "33847-04.htm": // start the quest
+ {
+ qs.startQuest();
+ qs.set(Integer.toString(SPLINTER_STAKATO), 0);
+ htmltext = event;
+ break;
+ }
+ case "33847-07.html":
+ {
+ if (qs.isCond(2))
+ {
+ giveItems(player, GUILD_COIN);
+ giveItems(player, ENCHANT_ARMOR_A);
+ addExpAndSp(player, EXP_REWARD, SP_REWARD);
+ qs.exitQuest(false, true);
+ htmltext = event;
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = null;
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
+ {
+ htmltext = "no_level.html";
+ }
+ else
+ {
+ htmltext = "33847-01.htm";
+ }
+ break;
+ }
+ case State.STARTED:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "33847-05.html"; // Need find proper html
+ }
+ else if (qs.isCond(2))
+ {
+ htmltext = "33847-06.html";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
+ {
+ final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
+ if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
+ {
+ int kills = 0;
+ switch (npc.getId())
+ {
+ case SPLINTER_STAKATO:
+ case SPLINTER_STAKATO_WORKER:
+ case SPLINTER_STAKATO_SOLDIER:
+ case SPLINTER_STAKATO_DRONE:
+ case NEEDLE_STAKATO:
+ case NEEDLE_STAKATO_WORKER:
+ case NEEDLE_STAKATO_SOLDIER:
+ case NEEDLE_STAKATO_DRONE:
+ {
+ kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
+ kills++;
+ qs.set(Integer.toString(SPLINTER_STAKATO), kills);
+ break;
+ }
+ }
+
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
+ log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
+ killer.sendPacket(log);
+
+ if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
+ {
+ qs.setCond(2);
+ }
+ }
+ return super.onKill(npc, killer, isSummon);
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index 5a1d30c11d..5d532b9704 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index f85993288a..206e585ab2 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index b5345ac8e9..90acf3183b 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -103,7 +103,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
index 8bbe632111..2708f8af09 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10790_AMercenaryHelper/Q10790_AMercenaryHelper.java
@@ -1,194 +1,195 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q10790_AMercenaryHelper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.holders.ItemHolder;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
-import com.l2jmobius.gameserver.util.Util;
-
-/**
- * A Mercenary Helper (10790)
- * @author Stayway
- */
-public class Q10790_AMercenaryHelper extends Quest
-{
- // NPC
- private static final int DOKARA = 33847;
- // Monsters
- private static final int SPLINTER_STAKATO = 21508;
- private static final int SPLINTER_STAKATO_WORKER = 21509;
- private static final int SPLINTER_STAKATO_SOLDIER = 21510;
- private static final int SPLINTER_STAKATO_DRONE = 21511;
- private static final int NEEDLE_STAKATO = 21513;
- private static final int NEEDLE_STAKATO_WORKER = 21514;
- private static final int NEEDLE_STAKATO_SOLDIER = 21515;
- private static final int NEEDLE_STAKATO_DRONE = 21516;
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q10790_AMercenaryHelper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.holders.ItemHolder;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
+import com.l2jmobius.gameserver.util.Util;
+
+/**
+ * A Mercenary Helper (10790)
+ * @author Stayway
+ */
+public class Q10790_AMercenaryHelper extends Quest
+{
+ // NPC
+ private static final int DOKARA = 33847;
+ // Monsters
+ private static final int SPLINTER_STAKATO = 21508;
+ private static final int SPLINTER_STAKATO_WORKER = 21509;
+ private static final int SPLINTER_STAKATO_SOLDIER = 21510;
+ private static final int SPLINTER_STAKATO_DRONE = 21511;
+ private static final int NEEDLE_STAKATO = 21513;
+ private static final int NEEDLE_STAKATO_WORKER = 21514;
+ private static final int NEEDLE_STAKATO_SOLDIER = 21515;
+ private static final int NEEDLE_STAKATO_DRONE = 21516;
private static final Map MOBS_REQUIRED = new HashMap<>();
- {
- MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
- }
- // Item
- private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
- private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
- // Rewards
- private static final int EXP_REWARD = 942690;
- private static final int SP_REWARD = 226;
- // Other
- private static final int MIN_LEVEL = 65;
- private static final int MAX_LEVEL = 70;
-
- public Q10790_AMercenaryHelper()
- {
- super(10790);
- addStartNpc(DOKARA);
- addTalkId(DOKARA);
- addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
- addCondMinLevel(MIN_LEVEL, "no_level.htm");
- addCondRace(Race.ERTHEIA, "no Ertheia.html");
- addCondClassId(ClassId.MARAUDER, "no_class.html");
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- final QuestState qs = getQuestState(player, false);
- if (qs == null)
- {
- return null;
- }
-
- String htmltext = null;
- switch (event)
- {
- case "33847-02.htm":
- case "33847-03.htm":
- {
- htmltext = event;
- break;
- }
- case "33847-04.htm": // start the quest
- {
- qs.startQuest();
- qs.set(Integer.toString(SPLINTER_STAKATO), 0);
- htmltext = event;
- break;
- }
- case "33847-07.html":
- {
- if (qs.isCond(2))
- {
- giveItems(player, GUILD_COIN);
- giveItems(player, ENCHANT_ARMOR_A);
- addExpAndSp(player, EXP_REWARD, SP_REWARD);
- qs.exitQuest(false, true);
- htmltext = event;
- }
- break;
- }
- }
- return htmltext;
- }
-
- @Override
- public String onTalk(Npc npc, PlayerInstance player)
- {
- final QuestState qs = getQuestState(player, true);
- String htmltext = null;
- switch (qs.getState())
- {
- case State.CREATED:
- {
- if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
- {
- htmltext = "no_level.html";
- }
- else
- {
- htmltext = "33847-01.htm";
- }
- break;
- }
- case State.STARTED:
- {
- if (qs.isCond(1))
- {
- htmltext = "33847-05.html"; // Need find proper html
- }
- else if (qs.isCond(2))
- {
- htmltext = "33847-06.html";
- }
- break;
- }
- case State.COMPLETED:
- {
- htmltext = getAlreadyCompletedMsg(player);
- break;
- }
- }
- return htmltext;
- }
-
- @Override
- public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
- {
- final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
- if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
- {
- int kills = 0;
- switch (npc.getId())
- {
- case SPLINTER_STAKATO:
- case SPLINTER_STAKATO_WORKER:
- case SPLINTER_STAKATO_SOLDIER:
- case SPLINTER_STAKATO_DRONE:
- case NEEDLE_STAKATO:
- case NEEDLE_STAKATO_WORKER:
- case NEEDLE_STAKATO_SOLDIER:
- case NEEDLE_STAKATO_DRONE:
- {
- kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
- kills++;
- qs.set(Integer.toString(SPLINTER_STAKATO), kills);
- break;
- }
- }
-
- final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
- log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
- log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
- killer.sendPacket(log);
-
- if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
- {
- qs.setCond(2);
- }
- }
- return super.onKill(npc, killer, isSummon);
- }
-}
+ static
+ {
+ MOBS_REQUIRED.put(SPLINTER_STAKATO, 50);
+ }
+ // Item
+ private static final ItemHolder GUILD_COIN = new ItemHolder(37045, 3);
+ private static final ItemHolder ENCHANT_ARMOR_A = new ItemHolder(26351, 3);
+ // Rewards
+ private static final int EXP_REWARD = 942690;
+ private static final int SP_REWARD = 226;
+ // Other
+ private static final int MIN_LEVEL = 65;
+ private static final int MAX_LEVEL = 70;
+
+ public Q10790_AMercenaryHelper()
+ {
+ super(10790);
+ addStartNpc(DOKARA);
+ addTalkId(DOKARA);
+ addKillId(SPLINTER_STAKATO, SPLINTER_STAKATO_WORKER, SPLINTER_STAKATO_SOLDIER, SPLINTER_STAKATO_DRONE, NEEDLE_STAKATO, NEEDLE_STAKATO_WORKER, NEEDLE_STAKATO_SOLDIER, NEEDLE_STAKATO_DRONE);
+ addCondMinLevel(MIN_LEVEL, "no_level.htm");
+ addCondRace(Race.ERTHEIA, "no Ertheia.html");
+ addCondClassId(ClassId.MARAUDER, "no_class.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "33847-02.htm":
+ case "33847-03.htm":
+ {
+ htmltext = event;
+ break;
+ }
+ case "33847-04.htm": // start the quest
+ {
+ qs.startQuest();
+ qs.set(Integer.toString(SPLINTER_STAKATO), 0);
+ htmltext = event;
+ break;
+ }
+ case "33847-07.html":
+ {
+ if (qs.isCond(2))
+ {
+ giveItems(player, GUILD_COIN);
+ giveItems(player, ENCHANT_ARMOR_A);
+ addExpAndSp(player, EXP_REWARD, SP_REWARD);
+ qs.exitQuest(false, true);
+ htmltext = event;
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(Npc npc, PlayerInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = null;
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ {
+ if ((player.getLevel() < MIN_LEVEL) || (player.getLevel() > MAX_LEVEL))
+ {
+ htmltext = "no_level.html";
+ }
+ else
+ {
+ htmltext = "33847-01.htm";
+ }
+ break;
+ }
+ case State.STARTED:
+ {
+ if (qs.isCond(1))
+ {
+ htmltext = "33847-05.html"; // Need find proper html
+ }
+ else if (qs.isCond(2))
+ {
+ htmltext = "33847-06.html";
+ }
+ break;
+ }
+ case State.COMPLETED:
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
+ {
+ final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
+ if ((qs != null) && qs.isStarted() && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
+ {
+ int kills = 0;
+ switch (npc.getId())
+ {
+ case SPLINTER_STAKATO:
+ case SPLINTER_STAKATO_WORKER:
+ case SPLINTER_STAKATO_SOLDIER:
+ case SPLINTER_STAKATO_DRONE:
+ case NEEDLE_STAKATO:
+ case NEEDLE_STAKATO_WORKER:
+ case NEEDLE_STAKATO_SOLDIER:
+ case NEEDLE_STAKATO_DRONE:
+ {
+ kills = qs.getInt(Integer.toString(SPLINTER_STAKATO));
+ kills++;
+ qs.set(Integer.toString(SPLINTER_STAKATO), kills);
+ break;
+ }
+ }
+
+ final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
+ log.addNpc(SPLINTER_STAKATO, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
+ log.addNpcString(NpcStringId.KILL_STAKATOS, qs.getInt(Integer.toString(SPLINTER_STAKATO)));
+ killer.sendPacket(log);
+
+ if ((qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)) && (qs.getInt(Integer.toString(SPLINTER_STAKATO)) >= MOBS_REQUIRED.get(SPLINTER_STAKATO)))
+ {
+ qs.setCond(2);
+ }
+ }
+ return super.onKill(npc, killer, isSummon);
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
index 9446ef4413..4f046f6532 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
@@ -1,491 +1,495 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.others.AdventureGuildsman;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.util.CommonUtil;
-import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.holders.SkillHolder;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.model.skills.SkillCaster;
-import com.l2jmobius.gameserver.network.serverpackets.ExShowQuestInfo;
-
-import ai.AbstractNpcAI;
-
-/**
- * Adventure Guildsman AI.
- * @author ChaosPaladin
- */
-public class AdventureGuildsman extends AbstractNpcAI
-{
- // NPC
- private static final int ADVENTURE_GUILDSMAN = 33946;
- // Items
- private static final int PCCAFE_LOTTERY_TICKET_30DAYS = 15358;
- private static final int PCCAFE_1ST_LOTTERY_TICKET_30DAYS = 15359;
- private static final int PCCAFE_2ND_LOTTERY_TICKET_30DAYS = 15360;
- private static final int PCCAFE_3RD_LOTTERY_TICKET_30DAYS = 15361;
- private static final int PCCAFE_4TH_LOTTERY_TICKET_30DAYS = 15362;
- private static final int PCCAFE_5TH_LOTTERY_TICKET_30DAYS = 15363;
- private static final int VOUCHER_LEV_85 = 17739;
- private static final int VOUCHER_LEV_90 = 17740;
- private static final int VOUCHER_LEV_95 = 17741;
- private static final int VOUCHER_LEV_97 = 17742;
- private static final int SEAL_LEV_85 = 17743;
- private static final int SEAL_LEV_90 = 17744;
- private static final int SEAL_LEV_95 = 17745;
- private static final int SEAL_LEV_97 = 17746;
- // Skills
- private static final SkillHolder KNIGHT = new SkillHolder(17294, 1); // Player Commendation - Knight's Harmony
- private static final SkillHolder WARRIOR = new SkillHolder(17295, 1); // Player Commendation - Warrior's Harmony
- private static final SkillHolder WIZARD = new SkillHolder(17296, 1); // Player Commendation - Wizard's Harmony
- private static final SkillHolder[] GROUP_MELODY =
- {
- new SkillHolder(9273, 1), // Player Commendation - Horn Melody
- new SkillHolder(9274, 1), // Player Commendation - Drum Melody
- new SkillHolder(9275, 1), // Player Commendation - Lute Melody
- new SkillHolder(9276, 1), // Player Commendation - Pipe Organ Melody
- new SkillHolder(9277, 1), // Player Commendation - Guitar Melody
- new SkillHolder(9278, 1), // Player Commendation - Harp Melody
- };
- private static final SkillHolder[] GROUP_SONATA =
- {
- new SkillHolder(17291, 1), // Player Commendation - Prevailing Sonata
- new SkillHolder(17292, 1), // Player Commendation - Daring Sonata
- new SkillHolder(17293, 1), // Player Commendation - Refreshing Sonata
- };
- // Misc
- //@formatter:off
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.others.AdventureGuildsman;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.util.CommonUtil;
+import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.holders.SkillHolder;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.model.skills.SkillCaster;
+import com.l2jmobius.gameserver.network.serverpackets.ExShowQuestInfo;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Adventure Guildsman AI.
+ * @author ChaosPaladin
+ */
+public class AdventureGuildsman extends AbstractNpcAI
+{
+ // NPC
+ private static final int ADVENTURE_GUILDSMAN = 33946;
+ // Items
+ private static final int PCCAFE_LOTTERY_TICKET_30DAYS = 15358;
+ private static final int PCCAFE_1ST_LOTTERY_TICKET_30DAYS = 15359;
+ private static final int PCCAFE_2ND_LOTTERY_TICKET_30DAYS = 15360;
+ private static final int PCCAFE_3RD_LOTTERY_TICKET_30DAYS = 15361;
+ private static final int PCCAFE_4TH_LOTTERY_TICKET_30DAYS = 15362;
+ private static final int PCCAFE_5TH_LOTTERY_TICKET_30DAYS = 15363;
+ private static final int VOUCHER_LEV_85 = 17739;
+ private static final int VOUCHER_LEV_90 = 17740;
+ private static final int VOUCHER_LEV_95 = 17741;
+ private static final int VOUCHER_LEV_97 = 17742;
+ private static final int SEAL_LEV_85 = 17743;
+ private static final int SEAL_LEV_90 = 17744;
+ private static final int SEAL_LEV_95 = 17745;
+ private static final int SEAL_LEV_97 = 17746;
+ // Skills
+ private static final SkillHolder KNIGHT = new SkillHolder(17294, 1); // Player Commendation - Knight's Harmony
+ private static final SkillHolder WARRIOR = new SkillHolder(17295, 1); // Player Commendation - Warrior's Harmony
+ private static final SkillHolder WIZARD = new SkillHolder(17296, 1); // Player Commendation - Wizard's Harmony
+ private static final SkillHolder[] GROUP_MELODY =
+ {
+ new SkillHolder(9273, 1), // Player Commendation - Horn Melody
+ new SkillHolder(9274, 1), // Player Commendation - Drum Melody
+ new SkillHolder(9275, 1), // Player Commendation - Lute Melody
+ new SkillHolder(9276, 1), // Player Commendation - Pipe Organ Melody
+ new SkillHolder(9277, 1), // Player Commendation - Guitar Melody
+ new SkillHolder(9278, 1), // Player Commendation - Harp Melody
+ };
+ private static final SkillHolder[] GROUP_SONATA =
+ {
+ new SkillHolder(17291, 1), // Player Commendation - Prevailing Sonata
+ new SkillHolder(17292, 1), // Player Commendation - Daring Sonata
+ new SkillHolder(17293, 1), // Player Commendation - Refreshing Sonata
+ };
+ // Misc
+ //@formatter:off
private static final Map R_CLASS_TALISMAN = new HashMap<>();
- {
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 737);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 738);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 739);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 740);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 741);
- R_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 742);
- R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
- R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
- }
+ static
+ {
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 737);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 738);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 739);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 740);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 741);
+ R_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 742);
+ R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
+ R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
+ }
private static final Map R90_CLASS_TALISMAN = new HashMap<>();
- {
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 745);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 746);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 747);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 748);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 749);
- R90_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 750);
- R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
- R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
- }
+ static
+ {
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 745);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 746);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 747);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 748);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 749);
+ R90_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 750);
+ R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
+ R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
+ }
private static final Map R95_CLASS_TALISMAN = new HashMap<>();
- {
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 753);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 754);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 755);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 756);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 757);
- R95_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 758);
- R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
- R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
- }
+ static
+ {
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 753);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 754);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 755);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 756);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 757);
+ R95_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 758);
+ R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
+ R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
+ }
private static final Map R99_CLASS_TALISMAN = new HashMap<>();
- {
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 761);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 762);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 763);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 764);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 765);
- R99_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 766);
- R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 760);
- R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 765);
- }
- //@formatter:on
- private static final String USED_PC_LOTTERY_TICKET = "USED_PC_LOTTERY_TICKET";
-
- private AdventureGuildsman()
- {
- addStartNpc(ADVENTURE_GUILDSMAN);
- addTalkId(ADVENTURE_GUILDSMAN);
- addFirstTalkId(ADVENTURE_GUILDSMAN);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- String htmltext = null;
-
- switch (event)
- {
- case "pccafe_list":
- {
- htmltext = "pccafe_list001.htm";
- break;
- }
- case "quest_list":
- {
- player.sendPacket(ExShowQuestInfo.STATIC_PACKET);
- break;
- }
- case "buff_list":
- {
- htmltext = "pccafe_buff_1001.htm";
- break;
- }
- case "item_list":
- {
- htmltext = "pccafe_item001.htm";
- break;
- }
- case "pccafe_help_inzone001.htm":
- case "pccafe_help_lottery001.htm":
- case "pccafe_help_lottery002.htm":
- case "adventurer_agent_town_voucher_change.htm":
- case "life_crystal_merge001.htm":
- case "life_crystal_merge002.htm":
- case "voucher_trader1001.htm":
- case "voucher_trader2001.htm":
- case "voucher_trader3001.htm":
- case "voucher_trader4001.htm":
- case "voucher_trader1004.htm":
- case "voucher_trader2004.htm":
- case "voucher_trader3004.htm":
- case "voucher_trader4004.htm":
- case "voucher_trader1005.htm":
- case "voucher_trader2005.htm":
- case "voucher_trader3005.htm":
- case "voucher_trader4005.htm":
- case "voucher_trader1006.htm":
- case "voucher_trader2006.htm":
- case "voucher_trader3006.htm":
- case "voucher_trader4006.htm":
- {
- htmltext = event;
- break;
- }
- case "index":
- {
- htmltext = player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
- break;
- }
- case "buff_setlist":
- {
- htmltext = "pccafe_newbuff_001.htm";
- break;
- }
- case "buff_group":
- {
- htmltext = player.getPcCafePoints() >= 120 ? applyBuffsGroup(npc, player, GROUP_MELODY.length) : "pccafe_buff_1001.htm";
- break;
- }
- case "knight":
- {
- htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, KNIGHT.getSkill()) : "pccafe_buff_1001.htm";
- break;
- }
- case "warrior":
- {
- htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WARRIOR.getSkill()) : "pccafe_buff_1001.htm";
- break;
- }
- case "wizard":
- {
- htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WIZARD.getSkill()) : "pccafe_buff_1001.htm";
- break;
- }
- case "give_lottery_ticket":
- {
- if (!player.getVariables().getBoolean(USED_PC_LOTTERY_TICKET, false))
- {
- player.getVariables().set(USED_PC_LOTTERY_TICKET, true);
- giveItems(player, PCCAFE_LOTTERY_TICKET_30DAYS, 1);
- }
- else
- {
- htmltext = "pccafe_help_lottery_notoneday.htm";
- }
- break;
- }
- case "trade_10":
- {
- htmltext = tradeItem(player, PCCAFE_5TH_LOTTERY_TICKET_30DAYS, 10);
- break;
- }
- case "trade_100":
- {
- htmltext = tradeItem(player, PCCAFE_4TH_LOTTERY_TICKET_30DAYS, 100);
- break;
- }
- case "trade_200":
- {
- htmltext = tradeItem(player, PCCAFE_3RD_LOTTERY_TICKET_30DAYS, 200);
- break;
- }
- case "trade_1000":
- {
- htmltext = tradeItem(player, PCCAFE_2ND_LOTTERY_TICKET_30DAYS, 1000);
- break;
- }
- case "trade_10000":
- {
- htmltext = tradeItem(player, PCCAFE_1ST_LOTTERY_TICKET_30DAYS, 10000);
- break;
- }
- case "trade_seal85":
- {
- if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
- {
- if (hasQuestItems(player, VOUCHER_LEV_85))
- {
- takeItems(player, VOUCHER_LEV_85, 1);
- giveItems(player, SEAL_LEV_85, 20);
- addExpAndSp(player, 60000000, 0);
- }
- else
- {
- htmltext = "voucher_trader1003b.htm";
- }
- }
- else
- {
- htmltext = "voucher_trader1007.htm";
- }
- break;
- }
- case "trade_seal90":
- {
- if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
- {
- if (hasQuestItems(player, VOUCHER_LEV_90))
- {
- takeItems(player, VOUCHER_LEV_90, 1);
- giveItems(player, SEAL_LEV_90, 20);
- addExpAndSp(player, 66000000, 0);
- }
- else
- {
- htmltext = "voucher_trader2003b.htm";
- }
- }
- else
- {
- htmltext = "voucher_trader1007.htm";
- }
- break;
- }
- case "trade_seal95":
- {
- if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
- {
- if (hasQuestItems(player, VOUCHER_LEV_95))
- {
- takeItems(player, VOUCHER_LEV_95, 1);
- giveItems(player, SEAL_LEV_95, 20);
- addExpAndSp(player, 68000000, 0);
- }
- else
- {
- htmltext = "voucher_trader3003b.htm";
- }
- }
- else
- {
- htmltext = "voucher_trader1007.htm";
- }
- break;
- }
- case "trade_seal97":
- {
- if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
- {
- if (hasQuestItems(player, VOUCHER_LEV_97))
- {
- takeItems(player, VOUCHER_LEV_97, 1);
- giveItems(player, SEAL_LEV_97, 20);
- addExpAndSp(player, 76000000, 0);
- }
- else
- {
- htmltext = "voucher_trader3003b.htm";
- }
- }
- else
- {
- htmltext = "voucher_trader1007.htm";
- }
- break;
- }
- case "give_talismanR_by_class":
- {
- int multisellId = -1;
-
- for (CategoryType type : R_CLASS_TALISMAN.keySet())
- {
- if (player.isInCategory(type))
- {
- multisellId = R_CLASS_TALISMAN.get(type);
- break;
- }
- }
-
- if (multisellId > 0)
- {
- MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
- }
- break;
- }
- case "give_talismanR90_by_class":
- {
- int multisellId = -1;
-
- for (CategoryType type : R90_CLASS_TALISMAN.keySet())
- {
- if (player.isInCategory(type))
- {
- multisellId = R90_CLASS_TALISMAN.get(type);
- break;
- }
- }
-
- if (multisellId > 0)
- {
- MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
- }
- break;
- }
- case "give_talismanR95_by_class":
- {
- int multisellId = -1;
- for (CategoryType type : R95_CLASS_TALISMAN.keySet())
- {
- if (player.isInCategory(type))
- {
- multisellId = R95_CLASS_TALISMAN.get(type);
- break;
- }
- }
-
- if (multisellId > 0)
- {
- MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
- }
- break;
- }
-
- case "give_talismanR99_by_class":
- {
- int multisellId = -1;
-
- for (CategoryType type : R99_CLASS_TALISMAN.keySet())
- {
- if (player.isInCategory(type))
- {
- multisellId = R99_CLASS_TALISMAN.get(type);
- break;
- }
- }
-
- if (multisellId > 0)
- {
- MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
- }
- break;
- }
- }
- if (event.startsWith("melody"))
- {
- final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, GROUP_MELODY.length);
- if (player.getPcCafePoints() >= 20)
- {
- npc.setTarget(player);
- npc.doCast(GROUP_MELODY[buffOffset].getSkill());
- player.setPcCafePoints(player.getPcCafePoints() - 20);
- htmltext = "pccafe_buff_1001.htm";
- }
- else
- {
- htmltext = "pccafe_notpoint001.htm";
- }
-
- }
- return htmltext;
- }
-
- private String applyBuffs(Npc npc, PlayerInstance player, Skill skill)
- {
- for (SkillHolder holder : GROUP_MELODY)
- {
- SkillCaster.triggerCast(npc, player, holder.getSkill());
- }
- for (SkillHolder holder : GROUP_SONATA)
- {
- SkillCaster.triggerCast(npc, player, holder.getSkill());
- }
- SkillCaster.triggerCast(npc, player, skill);
- player.setPcCafePoints(player.getPcCafePoints() - 200);
- return null;
- }
-
- private String applyBuffsGroup(Npc npc, PlayerInstance player, int length)
- {
- for (SkillHolder holder : GROUP_MELODY)
- {
- SkillCaster.triggerCast(npc, player, holder.getSkill());
- }
- player.setPcCafePoints(player.getPcCafePoints() - 120);
- return null;
- }
-
- private String tradeItem(PlayerInstance player, int itemId, int points)
- {
- if (player.getPcCafePoints() >= 200000)
- {
- return "pccafe_help_lottery_fail2.htm";
- }
-
- if (takeItems(player, itemId, 1))
- {
- player.setPcCafePoints(player.getPcCafePoints() + points);
- return "pccafe_help_lottery003.htm";
- }
- return "pccafe_help_lottery_fail.htm";
- }
-
- @Override
- public String onFirstTalk(Npc npc, PlayerInstance player)
- {
- return player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
- }
-
- public static void main(String[] args)
- {
- new AdventureGuildsman();
- }
-}
+ static
+ {
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_OTHEL_GROUP, 761);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_YR_GROUP, 762);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_WYNN_GROUP, 763);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_IS_GROUP, 764);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_FEOH_GROUP, 765);
+ R99_CLASS_TALISMAN.put(CategoryType.SIXTH_EOLH_GROUP, 766);
+ R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 760);
+ R99_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 765);
+ }
+ //@formatter:on
+ private static final String USED_PC_LOTTERY_TICKET = "USED_PC_LOTTERY_TICKET";
+
+ private AdventureGuildsman()
+ {
+ addStartNpc(ADVENTURE_GUILDSMAN);
+ addTalkId(ADVENTURE_GUILDSMAN);
+ addFirstTalkId(ADVENTURE_GUILDSMAN);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ String htmltext = null;
+
+ switch (event)
+ {
+ case "pccafe_list":
+ {
+ htmltext = "pccafe_list001.htm";
+ break;
+ }
+ case "quest_list":
+ {
+ player.sendPacket(ExShowQuestInfo.STATIC_PACKET);
+ break;
+ }
+ case "buff_list":
+ {
+ htmltext = "pccafe_buff_1001.htm";
+ break;
+ }
+ case "item_list":
+ {
+ htmltext = "pccafe_item001.htm";
+ break;
+ }
+ case "pccafe_help_inzone001.htm":
+ case "pccafe_help_lottery001.htm":
+ case "pccafe_help_lottery002.htm":
+ case "adventurer_agent_town_voucher_change.htm":
+ case "life_crystal_merge001.htm":
+ case "life_crystal_merge002.htm":
+ case "voucher_trader1001.htm":
+ case "voucher_trader2001.htm":
+ case "voucher_trader3001.htm":
+ case "voucher_trader4001.htm":
+ case "voucher_trader1004.htm":
+ case "voucher_trader2004.htm":
+ case "voucher_trader3004.htm":
+ case "voucher_trader4004.htm":
+ case "voucher_trader1005.htm":
+ case "voucher_trader2005.htm":
+ case "voucher_trader3005.htm":
+ case "voucher_trader4005.htm":
+ case "voucher_trader1006.htm":
+ case "voucher_trader2006.htm":
+ case "voucher_trader3006.htm":
+ case "voucher_trader4006.htm":
+ {
+ htmltext = event;
+ break;
+ }
+ case "index":
+ {
+ htmltext = player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
+ break;
+ }
+ case "buff_setlist":
+ {
+ htmltext = "pccafe_newbuff_001.htm";
+ break;
+ }
+ case "buff_group":
+ {
+ htmltext = player.getPcCafePoints() >= 120 ? applyBuffsGroup(npc, player, GROUP_MELODY.length) : "pccafe_buff_1001.htm";
+ break;
+ }
+ case "knight":
+ {
+ htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, KNIGHT.getSkill()) : "pccafe_buff_1001.htm";
+ break;
+ }
+ case "warrior":
+ {
+ htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WARRIOR.getSkill()) : "pccafe_buff_1001.htm";
+ break;
+ }
+ case "wizard":
+ {
+ htmltext = player.getPcCafePoints() >= 200 ? applyBuffs(npc, player, WIZARD.getSkill()) : "pccafe_buff_1001.htm";
+ break;
+ }
+ case "give_lottery_ticket":
+ {
+ if (!player.getVariables().getBoolean(USED_PC_LOTTERY_TICKET, false))
+ {
+ player.getVariables().set(USED_PC_LOTTERY_TICKET, true);
+ giveItems(player, PCCAFE_LOTTERY_TICKET_30DAYS, 1);
+ }
+ else
+ {
+ htmltext = "pccafe_help_lottery_notoneday.htm";
+ }
+ break;
+ }
+ case "trade_10":
+ {
+ htmltext = tradeItem(player, PCCAFE_5TH_LOTTERY_TICKET_30DAYS, 10);
+ break;
+ }
+ case "trade_100":
+ {
+ htmltext = tradeItem(player, PCCAFE_4TH_LOTTERY_TICKET_30DAYS, 100);
+ break;
+ }
+ case "trade_200":
+ {
+ htmltext = tradeItem(player, PCCAFE_3RD_LOTTERY_TICKET_30DAYS, 200);
+ break;
+ }
+ case "trade_1000":
+ {
+ htmltext = tradeItem(player, PCCAFE_2ND_LOTTERY_TICKET_30DAYS, 1000);
+ break;
+ }
+ case "trade_10000":
+ {
+ htmltext = tradeItem(player, PCCAFE_1ST_LOTTERY_TICKET_30DAYS, 10000);
+ break;
+ }
+ case "trade_seal85":
+ {
+ if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
+ {
+ if (hasQuestItems(player, VOUCHER_LEV_85))
+ {
+ takeItems(player, VOUCHER_LEV_85, 1);
+ giveItems(player, SEAL_LEV_85, 20);
+ addExpAndSp(player, 60000000, 0);
+ }
+ else
+ {
+ htmltext = "voucher_trader1003b.htm";
+ }
+ }
+ else
+ {
+ htmltext = "voucher_trader1007.htm";
+ }
+ break;
+ }
+ case "trade_seal90":
+ {
+ if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
+ {
+ if (hasQuestItems(player, VOUCHER_LEV_90))
+ {
+ takeItems(player, VOUCHER_LEV_90, 1);
+ giveItems(player, SEAL_LEV_90, 20);
+ addExpAndSp(player, 66000000, 0);
+ }
+ else
+ {
+ htmltext = "voucher_trader2003b.htm";
+ }
+ }
+ else
+ {
+ htmltext = "voucher_trader1007.htm";
+ }
+ break;
+ }
+ case "trade_seal95":
+ {
+ if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
+ {
+ if (hasQuestItems(player, VOUCHER_LEV_95))
+ {
+ takeItems(player, VOUCHER_LEV_95, 1);
+ giveItems(player, SEAL_LEV_95, 20);
+ addExpAndSp(player, 68000000, 0);
+ }
+ else
+ {
+ htmltext = "voucher_trader3003b.htm";
+ }
+ }
+ else
+ {
+ htmltext = "voucher_trader1007.htm";
+ }
+ break;
+ }
+ case "trade_seal97":
+ {
+ if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
+ {
+ if (hasQuestItems(player, VOUCHER_LEV_97))
+ {
+ takeItems(player, VOUCHER_LEV_97, 1);
+ giveItems(player, SEAL_LEV_97, 20);
+ addExpAndSp(player, 76000000, 0);
+ }
+ else
+ {
+ htmltext = "voucher_trader3003b.htm";
+ }
+ }
+ else
+ {
+ htmltext = "voucher_trader1007.htm";
+ }
+ break;
+ }
+ case "give_talismanR_by_class":
+ {
+ int multisellId = -1;
+
+ for (CategoryType type : R_CLASS_TALISMAN.keySet())
+ {
+ if (player.isInCategory(type))
+ {
+ multisellId = R_CLASS_TALISMAN.get(type);
+ break;
+ }
+ }
+
+ if (multisellId > 0)
+ {
+ MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
+ }
+ break;
+ }
+ case "give_talismanR90_by_class":
+ {
+ int multisellId = -1;
+
+ for (CategoryType type : R90_CLASS_TALISMAN.keySet())
+ {
+ if (player.isInCategory(type))
+ {
+ multisellId = R90_CLASS_TALISMAN.get(type);
+ break;
+ }
+ }
+
+ if (multisellId > 0)
+ {
+ MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
+ }
+ break;
+ }
+ case "give_talismanR95_by_class":
+ {
+ int multisellId = -1;
+ for (CategoryType type : R95_CLASS_TALISMAN.keySet())
+ {
+ if (player.isInCategory(type))
+ {
+ multisellId = R95_CLASS_TALISMAN.get(type);
+ break;
+ }
+ }
+
+ if (multisellId > 0)
+ {
+ MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
+ }
+ break;
+ }
+
+ case "give_talismanR99_by_class":
+ {
+ int multisellId = -1;
+
+ for (CategoryType type : R99_CLASS_TALISMAN.keySet())
+ {
+ if (player.isInCategory(type))
+ {
+ multisellId = R99_CLASS_TALISMAN.get(type);
+ break;
+ }
+ }
+
+ if (multisellId > 0)
+ {
+ MultisellData.getInstance().separateAndSend(multisellId, player, npc, false);
+ }
+ break;
+ }
+ }
+ if (event.startsWith("melody"))
+ {
+ final int buffOffset = CommonUtil.constrain(Integer.parseInt(event.substring(event.indexOf(" ") + 1)), 0, GROUP_MELODY.length);
+ if (player.getPcCafePoints() >= 20)
+ {
+ npc.setTarget(player);
+ npc.doCast(GROUP_MELODY[buffOffset].getSkill());
+ player.setPcCafePoints(player.getPcCafePoints() - 20);
+ htmltext = "pccafe_buff_1001.htm";
+ }
+ else
+ {
+ htmltext = "pccafe_notpoint001.htm";
+ }
+
+ }
+ return htmltext;
+ }
+
+ private String applyBuffs(Npc npc, PlayerInstance player, Skill skill)
+ {
+ for (SkillHolder holder : GROUP_MELODY)
+ {
+ SkillCaster.triggerCast(npc, player, holder.getSkill());
+ }
+ for (SkillHolder holder : GROUP_SONATA)
+ {
+ SkillCaster.triggerCast(npc, player, holder.getSkill());
+ }
+ SkillCaster.triggerCast(npc, player, skill);
+ player.setPcCafePoints(player.getPcCafePoints() - 200);
+ return null;
+ }
+
+ private String applyBuffsGroup(Npc npc, PlayerInstance player, int length)
+ {
+ for (SkillHolder holder : GROUP_MELODY)
+ {
+ SkillCaster.triggerCast(npc, player, holder.getSkill());
+ }
+ player.setPcCafePoints(player.getPcCafePoints() - 120);
+ return null;
+ }
+
+ private String tradeItem(PlayerInstance player, int itemId, int points)
+ {
+ if (player.getPcCafePoints() >= 200000)
+ {
+ return "pccafe_help_lottery_fail2.htm";
+ }
+
+ if (takeItems(player, itemId, 1))
+ {
+ player.setPcCafePoints(player.getPcCafePoints() + points);
+ return "pccafe_help_lottery003.htm";
+ }
+ return "pccafe_help_lottery_fail.htm";
+ }
+
+ @Override
+ public String onFirstTalk(Npc npc, PlayerInstance player)
+ {
+ return player.getLevel() < 40 ? "adventurer_agent_town_77001.htm" : "adventurer_agent_town_77001e.htm";
+ }
+
+ public static void main(String[] args)
+ {
+ new AdventureGuildsman();
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index 1abb859d66..c6431dabea 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index f85993288a..206e585ab2 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index b5345ac8e9..90acf3183b 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -103,7 +103,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
index 829a360773..4f046f6532 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
@@ -75,7 +75,8 @@ public class AdventureGuildsman extends AbstractNpcAI
};
// Misc
//@formatter:off
- private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ static
{
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
@@ -88,7 +89,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
}
- private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ static
{
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
@@ -101,7 +103,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
}
- private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ static
{
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
@@ -114,7 +117,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
}
- private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ static
{
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index 1abb859d66..c6431dabea 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index f85993288a..206e585ab2 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index 525fe43474..d44f3c6aa6 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
index db35665c98..c9e88ac760 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
@@ -73,7 +73,8 @@ public class AdventureGuildsman extends AbstractNpcAI
};
// Misc
//@formatter:off
- private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ static
{
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
@@ -86,7 +87,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
}
- private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ static
{
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
@@ -99,7 +101,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
}
- private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ static
{
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
@@ -112,7 +115,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
}
- private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ static
{
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index 1abb859d66..c6431dabea 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index f85993288a..206e585ab2 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index 525fe43474..d44f3c6aa6 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
index db35665c98..c9e88ac760 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
@@ -73,7 +73,8 @@ public class AdventureGuildsman extends AbstractNpcAI
};
// Misc
//@formatter:off
- private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ static
{
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
@@ -86,7 +87,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
}
- private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ static
{
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
@@ -99,7 +101,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
}
- private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ static
{
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
@@ -112,7 +115,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
}
- private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ static
{
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index 1abb859d66..c6431dabea 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index 83775af1c1..3dfd2d48ff 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index 525fe43474..d44f3c6aa6 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -102,7 +102,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
index 250742c433..92321be894 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/DragonValley/LeopardDragonHachling.java
@@ -1,114 +1,114 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package ai.areas.DragonValley;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.l2jmobius.gameserver.ai.CtrlIntention;
-import com.l2jmobius.gameserver.enums.ChatType;
-import com.l2jmobius.gameserver.model.Location;
-import com.l2jmobius.gameserver.model.actor.Npc;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.NpcStringId;
-import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
-
-import ai.AbstractNpcAI;
-
-/**
- * Leopard Dragon Hachling AI.
- * @author Mobius
- */
-public final class LeopardDragonHachling extends AbstractNpcAI
-{
- // NPCs
- private static final int DRAGON_HACHLING = 23434;
- private static final int LEOPARD_DRAGON = 23435;
- // Locations
- private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
-
- {
- TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
- TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
- TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
- TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
- }
-
- private LeopardDragonHachling()
- {
- addAttackId(DRAGON_HACHLING);
- }
-
- @Override
- public String onAdvEvent(String event, Npc npc, PlayerInstance player)
- {
- if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
- {
- if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
- {
- final int random = getRandom(1, 4);
- for (int counter = 1; counter < random; counter++)
- {
- final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
- leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
- addAttackDesire(leopard, player);
- }
- cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
- npc.deleteMe();
- }
- else
- {
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- }
- }
- return super.onAdvEvent(event, npc, player);
- }
-
- @Override
- public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
- {
- if (npc.getScriptValue() == 0)
- {
- npc.setScriptValue(1);
- npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
- startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
- }
- npc.abortAttack();
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
- return null;
- }
-
- private Location nearestLocation(Npc npc)
- {
- Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
- for (Location loc : TRANSFORM_LOCATIONS)
- {
- if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
- {
- gotoLoc = loc;
- }
- }
- return gotoLoc;
- }
-
- public static void main(String[] args)
- {
- new LeopardDragonHachling();
- }
-}
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package ai.areas.DragonValley;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.l2jmobius.gameserver.ai.CtrlIntention;
+import com.l2jmobius.gameserver.enums.ChatType;
+import com.l2jmobius.gameserver.model.Location;
+import com.l2jmobius.gameserver.model.actor.Npc;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.NpcStringId;
+import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
+
+import ai.AbstractNpcAI;
+
+/**
+ * Leopard Dragon Hachling AI.
+ * @author Mobius
+ */
+public final class LeopardDragonHachling extends AbstractNpcAI
+{
+ // NPCs
+ private static final int DRAGON_HACHLING = 23434;
+ private static final int LEOPARD_DRAGON = 23435;
+ // Locations
+ private static final List TRANSFORM_LOCATIONS = new ArrayList<>();
+ static
+ {
+ TRANSFORM_LOCATIONS.add(new Location(84199, 120022, -2944));
+ TRANSFORM_LOCATIONS.add(new Location(92138, 113735, -3076));
+ TRANSFORM_LOCATIONS.add(new Location(103925, 122422, -3776));
+ TRANSFORM_LOCATIONS.add(new Location(122040, 115493, -3648));
+ }
+
+ private LeopardDragonHachling()
+ {
+ addAttackId(DRAGON_HACHLING);
+ }
+
+ @Override
+ public String onAdvEvent(String event, Npc npc, PlayerInstance player)
+ {
+ if ((npc != null) && event.equals("MOVE_TO_TRANSFORM"))
+ {
+ if (npc.calculateDistance2D(nearestLocation(npc)) < 100)
+ {
+ final int random = getRandom(1, 4);
+ for (int counter = 1; counter < random; counter++)
+ {
+ final Npc leopard = addSpawn(LEOPARD_DRAGON, npc.getLocation(), true, 300000); // 5 minute despawn time
+ leopard.broadcastPacket(new NpcSay(leopard.getObjectId(), ChatType.NPC_GENERAL, LEOPARD_DRAGON, NpcStringId.I_M_GOING_TO_TRANSFORM_WITH_THE_POWER_OF_THE_VORTEX_YOU_JUST_WATCH));
+ addAttackDesire(leopard, player);
+ }
+ cancelQuestTimer("MOVE_TO_TRANSFORM", npc, player);
+ npc.deleteMe();
+ }
+ else
+ {
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ }
+ }
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
+ {
+ if (npc.getScriptValue() == 0)
+ {
+ npc.setScriptValue(1);
+ npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, DRAGON_HACHLING, NpcStringId.HEY_THAT_HURT_YOU_JUST_WAIT_HERE_AND_I_LL_BE_BACK_AS_A_STRONGER_DRAGON));
+ startQuestTimer("MOVE_TO_TRANSFORM", 1000, npc, attacker, true);
+ }
+ npc.abortAttack();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, nearestLocation(npc));
+ return null;
+ }
+
+ private Location nearestLocation(Npc npc)
+ {
+ Location gotoLoc = TRANSFORM_LOCATIONS.get(0);
+ for (Location loc : TRANSFORM_LOCATIONS)
+ {
+ if (npc.calculateDistance2D(loc) < npc.calculateDistance2D(gotoLoc))
+ {
+ gotoLoc = loc;
+ }
+ }
+ return gotoLoc;
+ }
+
+ public static void main(String[] args)
+ {
+ new LeopardDragonHachling();
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
index 56d5e6f72b..6ee86b5890 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/areas/TalkingIsland/Raina/Raina.java
@@ -109,7 +109,8 @@ public final class Raina extends AbstractNpcAI
subclassSetMap.put(PlayerClass.Spellhowler, subclasseSet5);
}
- private static final Map classCloak = new HashMap<>();
+ private static final Map classCloak = new HashMap<>();
+ static
{
classCloak.put(CategoryType.SIXTH_SIGEL_GROUP, 30310); // Abelius Cloak
classCloak.put(CategoryType.SIXTH_TIR_GROUP, 30311); // Sapyros Cloak Grade
@@ -121,7 +122,8 @@ public final class Raina extends AbstractNpcAI
classCloak.put(CategoryType.SIXTH_EOLH_GROUP, 30317); // Laksis Cloak Grade
}
- private static final List dualClassList = new ArrayList<>();
+ private static final List dualClassList = new ArrayList<>();
+ static
{
dualClassList.addAll(Arrays.asList(PlayerClass.sigelPhoenixKnight, PlayerClass.sigelHellKnight, PlayerClass.sigelEvasTemplar, PlayerClass.sigelShilenTemplar));
dualClassList.addAll(Arrays.asList(PlayerClass.tyrrDuelist, PlayerClass.tyrrDreadnought, PlayerClass.tyrrTitan, PlayerClass.tyrrGrandKhavatari, PlayerClass.tyrrDoombringer));
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
index 637314495a..15d03c6c01 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java
@@ -62,7 +62,8 @@ public final class Antharas extends AbstractNpcAI
private static final int BOMBER = 29070; // Dragon Bomber
private static final int HEART = 13001; // Heart of Warding
private static final int CUBE = 31859; // Teleportation Cubic
- private static final Map INVISIBLE_NPC = new HashMap<>();
+ private static final Map INVISIBLE_NPC = new HashMap<>();
+ static
{
INVISIBLE_NPC.put(29077, new Location(177229, 113298, -7735));
INVISIBLE_NPC.put(29078, new Location(176707, 113585, -7735));
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Core/Core.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Core/Core.java
index faed6f3a1d..740b90dc2e 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Core/Core.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/bosses/Core/Core.java
@@ -49,7 +49,8 @@ public final class Core extends AbstractNpcAI
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
index db35665c98..c9e88ac760 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/AdventureGuildsman/AdventureGuildsman.java
@@ -73,7 +73,8 @@ public class AdventureGuildsman extends AbstractNpcAI
};
// Misc
//@formatter:off
- private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R_CLASS_TALISMAN = new HashMap<>();
+ static
{
R_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 735);
R_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 736);
@@ -86,7 +87,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 736);
R_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 741);
}
- private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R90_CLASS_TALISMAN = new HashMap<>();
+ static
{
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 743);
R90_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 744);
@@ -99,7 +101,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 744);
R90_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 749);
}
- private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R95_CLASS_TALISMAN = new HashMap<>();
+ static
{
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 751);
R95_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 752);
@@ -112,7 +115,8 @@ public class AdventureGuildsman extends AbstractNpcAI
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_FIGHTER_GROUP, 752);
R95_CLASS_TALISMAN.put(CategoryType.ERTHEIA_WIZARD_GROUP, 757);
}
- private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ private static final Map R99_CLASS_TALISMAN = new HashMap<>();
+ static
{
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_SIGEL_GROUP, 759);
R99_CLASS_TALISMAN.put(CategoryType.SIXTH_TIR_GROUP, 760);
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
index c74cba2e07..5a664e103d 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ClassMaster/ClassMaster.java
@@ -66,7 +66,8 @@ import ai.AbstractNpcAI;
public final class ClassMaster extends AbstractNpcAI implements IXmlReader
{
// NPCs
- private static final List CLASS_MASTERS = new ArrayList<>();
+ private static final List CLASS_MASTERS = new ArrayList<>();
+ static
{
CLASS_MASTERS.add(31756); // Mr. Cat
CLASS_MASTERS.add(31757); // Queen of Hearts
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
index 83775af1c1..3dfd2d48ff 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/OlyManager/OlyManager.java
@@ -55,7 +55,8 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
// NPC
private static final int MANAGER = 31688;
// Misc
- private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ private static final Map EQUIPMENT_MULTISELL = new HashMap<>();
+ static
{
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_SIGEL_GROUP, 917);
EQUIPMENT_MULTISELL.put(CategoryType.SIXTH_TIR_GROUP, 918);
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AirBind.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
index 72502bc106..9dd9a94a48 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/AirBind.java
@@ -1,121 +1,122 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.effecthandlers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.ai.CtrlEvent;
-import com.l2jmobius.gameserver.enums.CategoryType;
-import com.l2jmobius.gameserver.enums.Race;
-import com.l2jmobius.gameserver.model.StatsSet;
-import com.l2jmobius.gameserver.model.World;
-import com.l2jmobius.gameserver.model.actor.Creature;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.ClassId;
-import com.l2jmobius.gameserver.model.effects.AbstractEffect;
-import com.l2jmobius.gameserver.model.effects.EffectType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.model.skills.Skill;
-import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
-
-/**
- * @author Mobius
- */
-public final class AirBind extends AbstractEffect
-{
- // skill data
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.ai.CtrlEvent;
+import com.l2jmobius.gameserver.enums.CategoryType;
+import com.l2jmobius.gameserver.enums.Race;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.World;
+import com.l2jmobius.gameserver.model.actor.Creature;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.ClassId;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.effects.EffectType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+import com.l2jmobius.gameserver.network.serverpackets.ExAlterSkillRequest;
+
+/**
+ * @author Mobius
+ */
+public final class AirBind extends AbstractEffect
+{
+ // skill data
private static final Map _chainedAirSkills = new HashMap<>(36);
- {
- _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
- _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
- }
-
- public AirBind(StatsSet params)
- {
- }
-
- @Override
- public boolean isInstant()
- {
- return false;
- }
-
- @Override
- public EffectType getEffectType()
- {
- return EffectType.KNOCK;
- }
-
- @Override
- public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
- {
- for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
- {
- if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
- && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
- {
- final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
- if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
- {
- nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
- }
- }
- }
- }
-
- @Override
- public void onExit(Creature effector, Creature effected, Skill skill)
- {
- if (!effected.isPlayer())
- {
- effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
- }
- }
-}
+ static
+ {
+ _chainedAirSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_EVA_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.SIGEL_SHILLIEN_TEMPLAR, 10249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DUELIST, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DREADNOUGHT, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_TITAN, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_GRAND_KHAVATARI, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_MAESTRO, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.TYRR_DOOMBRINGER, 10499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_ADVENTURER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_WIND_RIDER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_GHOST_HUNTER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.OTHELL_FORTUNE_SEEKER, 10749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_SAGITTARIUS, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_MOONLIGHT_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_GHOST_SENTINEL, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.YUL_TRICKSTER, 10999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_ARCHMAGE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOULTAKER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_MYSTIC_MUSE, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_STORM_SCREAMER, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.FEOH_SOUL_HOUND, 11249); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_HIEROPHANT, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SWORD_MUSE, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_SPECTRAL_DANCER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOMINATOR, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.ISS_DOOMCRYER, 11749); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ARCANA_LORD, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_ELEMENTAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.WYNN_SPECTRAL_MASTER, 11499); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_CARDINAL, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_EVA_SAINT, 11999); // Heavy Hit
+ _chainedAirSkills.put(ClassId.AEORE_SHILLIEN_SAINT, 11999); // Heavy Hit
+ }
+
+ public AirBind(StatsSet params)
+ {
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return false;
+ }
+
+ @Override
+ public EffectType getEffectType()
+ {
+ return EffectType.KNOCK;
+ }
+
+ @Override
+ public void continuousInstant(Creature effector, Creature effected, Skill skill, ItemInstance item)
+ {
+ for (PlayerInstance nearbyPlayer : World.getInstance().getVisibleObjectsInRange(effected, PlayerInstance.class, 1200))
+ {
+ if ((nearbyPlayer.getRace() != Race.ERTHEIA) && (nearbyPlayer.getTarget() == effected) //
+ && nearbyPlayer.isInCategory(CategoryType.SIXTH_CLASS_GROUP) && !nearbyPlayer.isAlterSkillActive())
+ {
+ final int chainSkill = _chainedAirSkills.get(nearbyPlayer.getClassId());
+ if (nearbyPlayer.getSkillRemainingReuseTime(chainSkill) == -1)
+ {
+ nearbyPlayer.sendPacket(new ExAlterSkillRequest(nearbyPlayer, chainSkill, chainSkill, 5));
+ }
+ }
+ }
+ }
+
+ @Override
+ public void onExit(Creature effector, Creature effected, Skill skill)
+ {
+ if (!effected.isPlayer())
+ {
+ effected.getAI().notifyEvent(CtrlEvent.EVT_THINK);
+ }
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
index 0db7363b7a..dad2c3ab1b 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java
@@ -55,7 +55,8 @@ public final class KnockBack extends AbstractEffect
private final FlyType _type;
// skill data
- private static final Map _chainKnockSkills = new HashMap<>(36);
+ private static final Map _chainKnockSkills = new HashMap<>(36);
+ static
{
_chainKnockSkills.put(ClassId.SIGEL_PHOENIX_KNIGHT, 10250); // Heavy Hit
_chainKnockSkills.put(ClassId.SIGEL_HELL_KNIGHT, 10250); // Heavy Hit
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
index d8c01c550b..7ab1ce1371 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/itemhandlers/ChangeAttributeCrystal.java
@@ -1,87 +1,88 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package handlers.itemhandlers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.enums.ItemGrade;
-import com.l2jmobius.gameserver.enums.PrivateStoreType;
-import com.l2jmobius.gameserver.handler.IItemHandler;
-import com.l2jmobius.gameserver.model.ItemInfo;
-import com.l2jmobius.gameserver.model.actor.Playable;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.SystemMessageId;
-import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
-import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
-
-/**
- * @author Mobius
- */
-public class ChangeAttributeCrystal implements IItemHandler
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.itemhandlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.enums.ItemGrade;
+import com.l2jmobius.gameserver.enums.PrivateStoreType;
+import com.l2jmobius.gameserver.handler.IItemHandler;
+import com.l2jmobius.gameserver.model.ItemInfo;
+import com.l2jmobius.gameserver.model.actor.Playable;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.SystemMessageId;
+import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import com.l2jmobius.gameserver.network.serverpackets.attributechange.ExChangeAttributeItemList;
+
+/**
+ * @author Mobius
+ */
+public class ChangeAttributeCrystal implements IItemHandler
+{
private static final Map ITEM_GRADES = new HashMap<>();
- {
- ITEM_GRADES.put(33502, ItemGrade.S);
- ITEM_GRADES.put(35749, ItemGrade.R);
- ITEM_GRADES.put(45817, ItemGrade.R);
- }
-
- @Override
- public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
- {
- if (!playable.isPlayer())
- {
- playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
- return false;
- }
-
- final PlayerInstance player = playable.getActingPlayer();
- if (player.getPrivateStoreType() != PrivateStoreType.NONE)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
- return false;
- }
-
- if (ITEM_GRADES.get(item.getId()) == null)
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
- return false;
- }
-
- final List itemList = new ArrayList<>();
- for (ItemInstance i : player.getInventory().getItems())
- {
- if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
- {
- itemList.add(new ItemInfo(i));
- }
- }
-
- if (itemList.isEmpty())
- {
- player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
- return false;
- }
-
- player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
- return true;
- }
+ static
+ {
+ ITEM_GRADES.put(33502, ItemGrade.S);
+ ITEM_GRADES.put(35749, ItemGrade.R);
+ ITEM_GRADES.put(45817, ItemGrade.R);
+ }
+
+ @Override
+ public boolean useItem(Playable playable, ItemInstance item, boolean forceUse)
+ {
+ if (!playable.isPlayer())
+ {
+ playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM);
+ return false;
+ }
+
+ final PlayerInstance player = playable.getActingPlayer();
+ if (player.getPrivateStoreType() != PrivateStoreType.NONE)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP));
+ return false;
+ }
+
+ if (ITEM_GRADES.get(item.getId()) == null)
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_HAS_BEEN_FAILED));
+ return false;
+ }
+
+ final List itemList = new ArrayList<>();
+ for (ItemInstance i : player.getInventory().getItems())
+ {
+ if (i.isWeapon() && i.hasAttributes() && (i.getItem().getItemGrade() == ITEM_GRADES.get(item.getId())))
+ {
+ itemList.add(new ItemInfo(i));
+ }
+ }
+
+ if (itemList.isEmpty())
+ {
+ player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_FOR_CHANGING_AN_ATTRIBUTE_DOES_NOT_EXIST));
+ return false;
+ }
+
+ player.sendPacket(new ExChangeAttributeItemList(item.getId(), itemList.toArray(new ItemInfo[itemList.size()])));
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
index 7095ed3e8f..5579e917ad 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00032_AnObviousLie/Q00032_AnObviousLie.java
@@ -46,7 +46,8 @@ public final class Q00032_AnObviousLie extends Quest
// Misc
private static final int MIN_LVL = 45;
// Reward
- private static final Map EARS = new HashMap<>();
+ private static final Map EARS = new HashMap<>();
+ static
{
EARS.put("cat", 6843); // Cat Ears
EARS.put("raccoon", 7680); // Raccoon ears
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
index 9dc74f2400..48a298ea2e 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00344_1000YearsTheEndOfLamentation/Q00344_1000YearsTheEndOfLamentation.java
@@ -45,7 +45,7 @@ public final class Q00344_1000YearsTheEndOfLamentation extends Quest
private static final ItemHolder CRUCIFIX = new ItemHolder(4273, 1);
// Monsters
private static final Map MONSTER_CHANCES = new HashMap<>();
-
+ static
{
MONSTER_CHANCES.put(20236, 0.58); // Cave Servant
MONSTER_CHANCES.put(20238, 0.75); // Cave Servant Warrior
diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
index de5db207d8..27fb0c3f6d 100644
--- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
+++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/quests/Q00420_LittleWing/Q00420_LittleWing.java
@@ -100,7 +100,8 @@ public final class Q00420_LittleWing extends Quest
private static final int HATCHLING_FOOD = 4038;
private static final List EGGS = Arrays.asList(EXARION_EGG, SUZET_EGG, KALIBRAN_EGG, SHAMHAI_EGG, ZWOV_EGG);
// Drake Drops
- private static final Map EGG_DROPS = new HashMap<>();
+ private static final Map EGG_DROPS = new HashMap<>();
+ static
{
EGG_DROPS.put(LESSER_BASILISK, SHAMHAI_EGG);
EGG_DROPS.put(BASILISK, SHAMHAI_EGG);
diff --git a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
index b6cbca35fd..449738e397 100644
--- a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
+++ b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/model/skills/MountEnabledSkillList.java
@@ -1,37 +1,38 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.skills;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Mobius
- */
-public class MountEnabledSkillList
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.model.skills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mobius
+ */
+public class MountEnabledSkillList
+{
private final static List ENABLED_SKILLS = new ArrayList<>(2);
- {
- ENABLED_SKILLS.add(4289); // Wyvern Breath
- ENABLED_SKILLS.add(325); // Strider Siege Assault
- }
-
- public static boolean contains(int skillId)
- {
- return ENABLED_SKILLS.contains(skillId);
- }
-}
+ static
+ {
+ ENABLED_SKILLS.add(4289); // Wyvern Breath
+ ENABLED_SKILLS.add(325); // Strider Siege Assault
+ }
+
+ public static boolean contains(int skillId)
+ {
+ return ENABLED_SKILLS.contains(skillId);
+ }
+}
diff --git a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
index ef93f5128c..d3c810242d 100644
--- a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
+++ b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/network/serverpackets/attributechange/ExChangeAttributeInfo.java
@@ -1,69 +1,70 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.network.serverpackets.attributechange;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.network.PacketWriter;
-import com.l2jmobius.gameserver.enums.AttributeType;
-import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
-import com.l2jmobius.gameserver.network.OutgoingPackets;
-import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
-
-/**
- * @author Mobius
- */
-public class ExChangeAttributeInfo implements IClientOutgoingPacket
-{
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.attributechange;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.enums.AttributeType;
+import com.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExChangeAttributeInfo implements IClientOutgoingPacket
+{
private static final Map ATTRIBUTE_MASKS = new HashMap<>();
- {
- ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
- ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
- ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
- ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
- ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
- ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
- }
-
- private final int _crystalItemId;
- private int _attributes;
- private int _itemObjId;
-
- public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
- {
- _crystalItemId = crystalItemId;
- _attributes = 0;
- for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
- {
- if (e != item.getAttackAttributeType())
- {
- _attributes |= ATTRIBUTE_MASKS.get(e);
- }
- }
- }
-
- @Override
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
- packet.writeD(_crystalItemId);
- packet.writeD(_attributes);
- packet.writeD(_itemObjId);
- return true;
- }
+ static
+ {
+ ATTRIBUTE_MASKS.put(AttributeType.FIRE, (byte) 1);
+ ATTRIBUTE_MASKS.put(AttributeType.WATER, (byte) 2);
+ ATTRIBUTE_MASKS.put(AttributeType.WIND, (byte) 4);
+ ATTRIBUTE_MASKS.put(AttributeType.EARTH, (byte) 8);
+ ATTRIBUTE_MASKS.put(AttributeType.HOLY, (byte) 16);
+ ATTRIBUTE_MASKS.put(AttributeType.DARK, (byte) 32);
+ }
+
+ private final int _crystalItemId;
+ private int _attributes;
+ private int _itemObjId;
+
+ public ExChangeAttributeInfo(int crystalItemId, ItemInstance item)
+ {
+ _crystalItemId = crystalItemId;
+ _attributes = 0;
+ for (AttributeType e : AttributeType.ATTRIBUTE_TYPES)
+ {
+ if (e != item.getAttackAttributeType())
+ {
+ _attributes |= ATTRIBUTE_MASKS.get(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_CHANGE_ATTRIBUTE_INFO.writeId(packet);
+ packet.writeD(_crystalItemId);
+ packet.writeD(_attributes);
+ packet.writeD(_itemObjId);
+ return true;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/util/exp4j/Operators.java b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
index ca28599f0c..649327cd88 100644
--- a/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
+++ b/L2J_Mobius_6.0_Fafurion/java/com/l2jmobius/gameserver/util/exp4j/Operators.java
@@ -27,7 +27,6 @@ public abstract class Operators
private static final int INDEX_UNARYPLUS = 7;
private static final Operator[] builtinOperators = new Operator[8];
-
static
{
builtinOperators[INDEX_ADDITION] = new Operator("+", 2, true, Operator.PRECEDENCE_ADDITION)
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
index 9b6b7ad164..31f61ed762 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/bosses/Core.java
@@ -48,7 +48,8 @@ public class Core extends Quest
private static final int DOOM_WRAITH = 29008;
private static final int SUSCEPTOR = 29011;
// Spawns
- private static final Map MINNION_SPAWNS = new HashMap<>();
+ private static final Map MINNION_SPAWNS = new HashMap<>();
+ static
{
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17191, 109298, -6488));
MINNION_SPAWNS.put(DEATH_KNIGHT, new Location(17564, 109548, -6488));
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/custom/EchoCrystals/EchoCrystals.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/custom/EchoCrystals/EchoCrystals.java
index 10a50dcd09..94e6910b42 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/custom/EchoCrystals/EchoCrystals.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/custom/EchoCrystals/EchoCrystals.java
@@ -1,140 +1,106 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package custom.EchoCrystals;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.util.Util;
-
-/**
- * @authors DrLecter (python), Plim (java)
- * @notes Formerly based on Elektra's script
- */
-public class EchoCrystals extends Quest
-{
- private static final String qn = "EchoCrystals";
-
- private static final int ADENA = 57;
- private static final int COST = 200;
-
- private static final Map SCORES = new HashMap<>();
- {
- SCORES.put(4410, new ScoreData(4411, "01", "02", "03"));
- SCORES.put(4409, new ScoreData(4412, "04", "05", "06"));
- SCORES.put(4408, new ScoreData(4413, "07", "08", "09"));
- SCORES.put(4420, new ScoreData(4414, "10", "11", "12"));
- SCORES.put(4421, new ScoreData(4415, "13", "14", "15"));
- SCORES.put(4419, new ScoreData(4417, "16", "05", "06"));
- SCORES.put(4418, new ScoreData(4416, "17", "05", "06"));
- }
-
- public EchoCrystals()
- {
- super(-1, qn, "custom");
-
- addStartNpc(31042, 31043);
- addTalkId(31042, 31043);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = "";
- QuestState st = player.getQuestState(qn);
-
- if ((st != null) && Util.isDigit(event))
- {
- int score = Integer.parseInt(event);
- if (SCORES.containsKey(score))
- {
- int crystal = SCORES.get(score).getCrystalId();
- String ok = SCORES.get(score).getOkMsg();
- String noadena = SCORES.get(score).getNoAdenaMsg();
- String noscore = SCORES.get(score).getNoScoreMsg();
-
- if (st.getQuestItemsCount(score) == 0)
- {
- htmltext = npc.getNpcId() + "-" + noscore + ".htm";
- }
- else if (st.getQuestItemsCount(ADENA) < COST)
- {
- htmltext = npc.getNpcId() + "-" + noadena + ".htm";
- }
- else
- {
- st.takeItems(ADENA, COST);
- st.giveItems(crystal, 1);
- htmltext = npc.getNpcId() + "-" + ok + ".htm";
- }
- }
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- return "1.htm";
- }
-
- private class ScoreData
- {
- private final int _crystalId;
- private final String _okMsg;
- private final String _noAdenaMsg;
- private final String _noScoreMsg;
-
- public ScoreData(int crystalId, String okMsg, String noAdenaMsg, String noScoreMsg)
- {
- _crystalId = crystalId;
- _okMsg = okMsg;
- _noAdenaMsg = noAdenaMsg;
- _noScoreMsg = noScoreMsg;
- }
-
- public int getCrystalId()
- {
- return _crystalId;
- }
-
- public String getOkMsg()
- {
- return _okMsg;
- }
-
- public String getNoAdenaMsg()
- {
- return _noAdenaMsg;
- }
-
- public String getNoScoreMsg()
- {
- return _noScoreMsg;
- }
- }
-
- public static void main(String[] args)
- {
- new EchoCrystals();
- }
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package custom.EchoCrystals;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.holders.ScoreDataHolder;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.util.Util;
+
+/**
+ * @authors DrLecter (python), Plim (java)
+ * @notes Formerly based on Elektra's script
+ */
+public class EchoCrystals extends Quest
+{
+ private static final String qn = "EchoCrystals";
+
+ private static final int ADENA = 57;
+ private static final int COST = 200;
+
+ private static final Map SCORES = new HashMap<>();
+ static
+ {
+ SCORES.put(4410, new ScoreDataHolder(4411, "01", "02", "03"));
+ SCORES.put(4409, new ScoreDataHolder(4412, "04", "05", "06"));
+ SCORES.put(4408, new ScoreDataHolder(4413, "07", "08", "09"));
+ SCORES.put(4420, new ScoreDataHolder(4414, "10", "11", "12"));
+ SCORES.put(4421, new ScoreDataHolder(4415, "13", "14", "15"));
+ SCORES.put(4419, new ScoreDataHolder(4417, "16", "05", "06"));
+ SCORES.put(4418, new ScoreDataHolder(4416, "17", "05", "06"));
+ }
+
+ public EchoCrystals()
+ {
+ super(-1, qn, "custom");
+
+ addStartNpc(31042, 31043);
+ addTalkId(31042, 31043);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = "";
+ QuestState st = player.getQuestState(qn);
+
+ if ((st != null) && Util.isDigit(event))
+ {
+ int score = Integer.parseInt(event);
+ if (SCORES.containsKey(score))
+ {
+ int crystal = SCORES.get(score).getCrystalId();
+ String ok = SCORES.get(score).getOkMsg();
+ String noadena = SCORES.get(score).getNoAdenaMsg();
+ String noscore = SCORES.get(score).getNoScoreMsg();
+
+ if (st.getQuestItemsCount(score) == 0)
+ {
+ htmltext = npc.getNpcId() + "-" + noscore + ".htm";
+ }
+ else if (st.getQuestItemsCount(ADENA) < COST)
+ {
+ htmltext = npc.getNpcId() + "-" + noadena + ".htm";
+ }
+ else
+ {
+ st.takeItems(ADENA, COST);
+ st.giveItems(crystal, 1);
+ htmltext = npc.getNpcId() + "-" + ok + ".htm";
+ }
+ }
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ return "1.htm";
+ }
+
+ public static void main(String[] args)
+ {
+ new EchoCrystals();
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q004_LongliveThePaagrioLord/Q004_LongliveThePaagrioLord.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q004_LongliveThePaagrioLord/Q004_LongliveThePaagrioLord.java
index 8415e5a6e6..d1816a71f9 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q004_LongliveThePaagrioLord/Q004_LongliveThePaagrioLord.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q004_LongliveThePaagrioLord/Q004_LongliveThePaagrioLord.java
@@ -1,161 +1,162 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q004_LongliveThePaagrioLord;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.Race;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q004_LongliveThePaagrioLord extends Quest
-{
- private static final String qn = "Q004_LongliveThePaagrioLord";
-
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q004_LongliveThePaagrioLord;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.Race;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q004_LongliveThePaagrioLord extends Quest
+{
+ private static final String qn = "Q004_LongliveThePaagrioLord";
+
private static final Map NPC_GIFTS = new HashMap<>();
- {
- NPC_GIFTS.put(30585, 1542);
- NPC_GIFTS.put(30566, 1541);
- NPC_GIFTS.put(30562, 1543);
- NPC_GIFTS.put(30560, 1544);
- NPC_GIFTS.put(30559, 1545);
- NPC_GIFTS.put(30587, 1546);
- }
-
- public Q004_LongliveThePaagrioLord()
- {
- super(4, qn, "Long live the Pa'agrio Lord!");
-
- registerQuestItems(1541, 1542, 1543, 1544, 1545, 1546);
-
- addStartNpc(30578); // Nakusin
- addTalkId(30578, 30585, 30566, 30562, 30560, 30559, 30587);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30578-03.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- String htmltext = getNoQuestMsg();
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- if (player.getRace() != Race.orc)
- {
- htmltext = "30578-00.htm";
- }
- else if (player.getLevel() < 2)
- {
- htmltext = "30578-01.htm";
- }
- else
- {
- htmltext = "30578-02.htm";
- }
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- int npcId = npc.getNpcId();
-
- if (npcId == 30578)
- {
- if (cond == 1)
- {
- htmltext = "30578-04.htm";
- }
- else if (cond == 2)
- {
- htmltext = "30578-06.htm";
- st.giveItems(4, 1);
- for (int item : NPC_GIFTS.values())
- {
- st.takeItems(item, -1);
- }
-
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
- }
- else
- {
- int i = NPC_GIFTS.get(npcId);
- if (st.hasQuestItems(i))
- {
- htmltext = npcId + "-02.htm";
- }
- else
- {
- st.giveItems(i, 1);
- htmltext = npcId + "-01.htm";
-
- int count = 0;
- for (int item : NPC_GIFTS.values())
- {
- count += st.getQuestItemsCount(item);
- }
-
- if (count == 6)
- {
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- }
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
+ static
+ {
+ NPC_GIFTS.put(30585, 1542);
+ NPC_GIFTS.put(30566, 1541);
+ NPC_GIFTS.put(30562, 1543);
+ NPC_GIFTS.put(30560, 1544);
+ NPC_GIFTS.put(30559, 1545);
+ NPC_GIFTS.put(30587, 1546);
+ }
+
+ public Q004_LongliveThePaagrioLord()
+ {
+ super(4, qn, "Long live the Pa'agrio Lord!");
+
+ registerQuestItems(1541, 1542, 1543, 1544, 1545, 1546);
+
+ addStartNpc(30578); // Nakusin
+ addTalkId(30578, 30585, 30566, 30562, 30560, 30559, 30587);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30578-03.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = getNoQuestMsg();
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ if (player.getRace() != Race.orc)
+ {
+ htmltext = "30578-00.htm";
+ }
+ else if (player.getLevel() < 2)
+ {
+ htmltext = "30578-01.htm";
+ }
+ else
+ {
+ htmltext = "30578-02.htm";
+ }
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ int npcId = npc.getNpcId();
+
+ if (npcId == 30578)
+ {
+ if (cond == 1)
+ {
+ htmltext = "30578-04.htm";
+ }
+ else if (cond == 2)
+ {
+ htmltext = "30578-06.htm";
+ st.giveItems(4, 1);
+ for (int item : NPC_GIFTS.values())
+ {
+ st.takeItems(item, -1);
+ }
+
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+ }
+ else
+ {
+ int i = NPC_GIFTS.get(npcId);
+ if (st.hasQuestItems(i))
+ {
+ htmltext = npcId + "-02.htm";
+ }
+ else
+ {
+ st.giveItems(i, 1);
+ htmltext = npcId + "-01.htm";
+
+ int count = 0;
+ for (int item : NPC_GIFTS.values())
+ {
+ count += st.getQuestItemsCount(item);
+ }
+
+ if (count == 6)
+ {
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ }
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q038_DragonFangs/Q038_DragonFangs.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q038_DragonFangs/Q038_DragonFangs.java
index d546ba957c..417b6086f9 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q038_DragonFangs/Q038_DragonFangs.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q038_DragonFangs/Q038_DragonFangs.java
@@ -64,7 +64,8 @@ public class Q038_DragonFangs extends Quest
};
// Droplist
- private static final Map DROPLIST = new HashMap<>();
+ private static final Map DROPLIST = new HashMap<>();
+ static
{
DROPLIST.put(21100, new int[]
{
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q039_RedEyedInvaders/Q039_RedEyedInvaders.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q039_RedEyedInvaders/Q039_RedEyedInvaders.java
index f37809158b..0fc0e5c8c7 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q039_RedEyedInvaders/Q039_RedEyedInvaders.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q039_RedEyedInvaders/Q039_RedEyedInvaders.java
@@ -1,244 +1,246 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q039_RedEyedInvaders;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q039_RedEyedInvaders extends Quest
-{
- private static final String qn = "Q039_RedEyedInvaders";
-
- // NPCs
- private static final int BABENCO = 30334;
- private static final int BATHIS = 30332;
-
- // Mobs
- private static final int MAILLE_LIZARDMAN = 20919;
- private static final int MAILLE_LIZARDMAN_SCOUT = 20920;
- private static final int MAILLE_LIZARDMAN_GUARD = 20921;
- private static final int ARANEID = 20925;
-
- // Items
- private static final int BLACK_BONE_NECKLACE = 7178;
- private static final int RED_BONE_NECKLACE = 7179;
- private static final int INCENSE_POUCH = 7180;
- private static final int GEM_OF_MAILLE = 7181;
-
- // First droplist
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q039_RedEyedInvaders;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q039_RedEyedInvaders extends Quest
+{
+ private static final String qn = "Q039_RedEyedInvaders";
+
+ // NPCs
+ private static final int BABENCO = 30334;
+ private static final int BATHIS = 30332;
+
+ // Mobs
+ private static final int MAILLE_LIZARDMAN = 20919;
+ private static final int MAILLE_LIZARDMAN_SCOUT = 20920;
+ private static final int MAILLE_LIZARDMAN_GUARD = 20921;
+ private static final int ARANEID = 20925;
+
+ // Items
+ private static final int BLACK_BONE_NECKLACE = 7178;
+ private static final int RED_BONE_NECKLACE = 7179;
+ private static final int INCENSE_POUCH = 7180;
+ private static final int GEM_OF_MAILLE = 7181;
+
+ // First droplist
private static final Map FIRST_DP = new HashMap<>();
- {
- FIRST_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]
- {
- RED_BONE_NECKLACE,
- BLACK_BONE_NECKLACE
- });
- FIRST_DP.put(MAILLE_LIZARDMAN, new int[]
- {
- BLACK_BONE_NECKLACE,
- RED_BONE_NECKLACE
- });
- FIRST_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]
- {
- BLACK_BONE_NECKLACE,
- RED_BONE_NECKLACE
- });
- }
-
- // Second droplist
+ static
+ {
+ FIRST_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]
+ {
+ RED_BONE_NECKLACE,
+ BLACK_BONE_NECKLACE
+ });
+ FIRST_DP.put(MAILLE_LIZARDMAN, new int[]
+ {
+ BLACK_BONE_NECKLACE,
+ RED_BONE_NECKLACE
+ });
+ FIRST_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]
+ {
+ BLACK_BONE_NECKLACE,
+ RED_BONE_NECKLACE
+ });
+ }
+
+ // Second droplist
private static final Map SECOND_DP = new HashMap<>();
- {
- SECOND_DP.put(ARANEID, new int[]
- {
- GEM_OF_MAILLE,
- INCENSE_POUCH,
- 500000
- });
- SECOND_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]
- {
- INCENSE_POUCH,
- GEM_OF_MAILLE,
- 300000
- });
- SECOND_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]
- {
- INCENSE_POUCH,
- GEM_OF_MAILLE,
- 250000
- });
- }
-
- // Rewards
- private static final int GREEN_COLORED_LURE_HG = 6521;
- private static final int BABY_DUCK_RODE = 6529;
- private static final int FISHING_SHOT_NG = 6535;
-
- public Q039_RedEyedInvaders()
- {
- super(39, qn, "Red-Eyed Invaders");
-
- registerQuestItems(BLACK_BONE_NECKLACE, RED_BONE_NECKLACE, INCENSE_POUCH, GEM_OF_MAILLE);
-
- addStartNpc(BABENCO);
- addTalkId(BABENCO, BATHIS);
-
- addKillId(MAILLE_LIZARDMAN, MAILLE_LIZARDMAN_SCOUT, MAILLE_LIZARDMAN_GUARD, ARANEID);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30334-1.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30332-1.htm"))
- {
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (event.equals("30332-3.htm"))
- {
- st.set("cond", "4");
- st.takeItems(BLACK_BONE_NECKLACE, -1);
- st.takeItems(RED_BONE_NECKLACE, -1);
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (event.equals("30332-5.htm"))
- {
- st.takeItems(INCENSE_POUCH, -1);
- st.takeItems(GEM_OF_MAILLE, -1);
- st.giveItems(GREEN_COLORED_LURE_HG, 60);
- st.giveItems(BABY_DUCK_RODE, 1);
- st.giveItems(FISHING_SHOT_NG, 500);
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- String htmltext = getNoQuestMsg();
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 20) ? "30334-2.htm" : "30334-0.htm";
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- switch (npc.getNpcId())
- {
- case BABENCO:
- htmltext = "30334-3.htm";
- break;
-
- case BATHIS:
- if (cond == 1)
- {
- htmltext = "30332-0.htm";
- }
- else if (cond == 2)
- {
- htmltext = "30332-2a.htm";
- }
- else if (cond == 3)
- {
- htmltext = "30332-2.htm";
- }
- else if (cond == 4)
- {
- htmltext = "30332-3a.htm";
- }
- else if (cond == 5)
- {
- htmltext = "30332-4.htm";
- }
- break;
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- final int npcId = npc.getNpcId();
-
- PlayerInstance partyMember = getRandomPartyMember(player, npc, "2");
- if ((partyMember != null) && (npcId != ARANEID))
- {
- final QuestState st = partyMember.getQuestState(qn);
- if (st == null)
- {
- return null;
- }
-
- final int[] list = FIRST_DP.get(npcId);
- if (st.dropItems(list[0], 1, 100, 500000) && (st.getQuestItemsCount(list[1]) == 100))
- {
- st.set("cond", "3");
- }
- }
- else
- {
- partyMember = getRandomPartyMember(player, npc, "4");
- if ((partyMember != null) && (npcId != MAILLE_LIZARDMAN))
- {
- final QuestState st = partyMember.getQuestState(qn);
- final int[] list = SECOND_DP.get(npcId);
-
- if (st.dropItems(list[0], 1, 30, list[2]) && (st.getQuestItemsCount(list[1]) == 30))
- {
- st.set("cond", "5");
- }
- }
- }
-
- return null;
- }
+ static
+ {
+ SECOND_DP.put(ARANEID, new int[]
+ {
+ GEM_OF_MAILLE,
+ INCENSE_POUCH,
+ 500000
+ });
+ SECOND_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]
+ {
+ INCENSE_POUCH,
+ GEM_OF_MAILLE,
+ 300000
+ });
+ SECOND_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]
+ {
+ INCENSE_POUCH,
+ GEM_OF_MAILLE,
+ 250000
+ });
+ }
+
+ // Rewards
+ private static final int GREEN_COLORED_LURE_HG = 6521;
+ private static final int BABY_DUCK_RODE = 6529;
+ private static final int FISHING_SHOT_NG = 6535;
+
+ public Q039_RedEyedInvaders()
+ {
+ super(39, qn, "Red-Eyed Invaders");
+
+ registerQuestItems(BLACK_BONE_NECKLACE, RED_BONE_NECKLACE, INCENSE_POUCH, GEM_OF_MAILLE);
+
+ addStartNpc(BABENCO);
+ addTalkId(BABENCO, BATHIS);
+
+ addKillId(MAILLE_LIZARDMAN, MAILLE_LIZARDMAN_SCOUT, MAILLE_LIZARDMAN_GUARD, ARANEID);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30334-1.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30332-1.htm"))
+ {
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (event.equals("30332-3.htm"))
+ {
+ st.set("cond", "4");
+ st.takeItems(BLACK_BONE_NECKLACE, -1);
+ st.takeItems(RED_BONE_NECKLACE, -1);
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (event.equals("30332-5.htm"))
+ {
+ st.takeItems(INCENSE_POUCH, -1);
+ st.takeItems(GEM_OF_MAILLE, -1);
+ st.giveItems(GREEN_COLORED_LURE_HG, 60);
+ st.giveItems(BABY_DUCK_RODE, 1);
+ st.giveItems(FISHING_SHOT_NG, 500);
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = getNoQuestMsg();
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 20) ? "30334-2.htm" : "30334-0.htm";
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ switch (npc.getNpcId())
+ {
+ case BABENCO:
+ htmltext = "30334-3.htm";
+ break;
+
+ case BATHIS:
+ if (cond == 1)
+ {
+ htmltext = "30332-0.htm";
+ }
+ else if (cond == 2)
+ {
+ htmltext = "30332-2a.htm";
+ }
+ else if (cond == 3)
+ {
+ htmltext = "30332-2.htm";
+ }
+ else if (cond == 4)
+ {
+ htmltext = "30332-3a.htm";
+ }
+ else if (cond == 5)
+ {
+ htmltext = "30332-4.htm";
+ }
+ break;
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ final int npcId = npc.getNpcId();
+
+ PlayerInstance partyMember = getRandomPartyMember(player, npc, "2");
+ if ((partyMember != null) && (npcId != ARANEID))
+ {
+ final QuestState st = partyMember.getQuestState(qn);
+ if (st == null)
+ {
+ return null;
+ }
+
+ final int[] list = FIRST_DP.get(npcId);
+ if (st.dropItems(list[0], 1, 100, 500000) && (st.getQuestItemsCount(list[1]) == 100))
+ {
+ st.set("cond", "3");
+ }
+ }
+ else
+ {
+ partyMember = getRandomPartyMember(player, npc, "4");
+ if ((partyMember != null) && (npcId != MAILLE_LIZARDMAN))
+ {
+ final QuestState st = partyMember.getQuestState(qn);
+ final int[] list = SECOND_DP.get(npcId);
+
+ if (st.dropItems(list[0], 1, 30, list[2]) && (st.getQuestItemsCount(list[1]) == 30))
+ {
+ st.set("cond", "5");
+ }
+ }
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q162_CurseOfTheUndergroundFortress/Q162_CurseOfTheUndergroundFortress.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q162_CurseOfTheUndergroundFortress/Q162_CurseOfTheUndergroundFortress.java
index fc2c790725..d7185e9503 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q162_CurseOfTheUndergroundFortress/Q162_CurseOfTheUndergroundFortress.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q162_CurseOfTheUndergroundFortress/Q162_CurseOfTheUndergroundFortress.java
@@ -1,178 +1,179 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q162_CurseOfTheUndergroundFortress;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.Race;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q162_CurseOfTheUndergroundFortress extends Quest
-{
- private static final String qn = "Q162_CurseOfTheUndergroundFortress";
-
- // Monsters
- private static final int SHADE_HORROR = 20033;
- private static final int DARK_TERROR = 20345;
- private static final int MIST_TERROR = 20371;
- private static final int DUNGEON_SKELETON_ARCHER = 20463;
- private static final int DUNGEON_SKELETON = 20464;
- private static final int DREAD_SOLDIER = 20504;
-
- // Items
- private static final int BONE_FRAGMENT = 1158;
- private static final int ELF_SKULL = 1159;
-
- // Rewards
- private static final int BONE_SHIELD = 625;
-
- // Drop chances
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q162_CurseOfTheUndergroundFortress;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.Race;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q162_CurseOfTheUndergroundFortress extends Quest
+{
+ private static final String qn = "Q162_CurseOfTheUndergroundFortress";
+
+ // Monsters
+ private static final int SHADE_HORROR = 20033;
+ private static final int DARK_TERROR = 20345;
+ private static final int MIST_TERROR = 20371;
+ private static final int DUNGEON_SKELETON_ARCHER = 20463;
+ private static final int DUNGEON_SKELETON = 20464;
+ private static final int DREAD_SOLDIER = 20504;
+
+ // Items
+ private static final int BONE_FRAGMENT = 1158;
+ private static final int ELF_SKULL = 1159;
+
+ // Rewards
+ private static final int BONE_SHIELD = 625;
+
+ // Drop chances
private static final Map CHANCES = new HashMap<>();
- {
- CHANCES.put(SHADE_HORROR, 250000);
- CHANCES.put(DARK_TERROR, 260000);
- CHANCES.put(MIST_TERROR, 230000);
- CHANCES.put(DUNGEON_SKELETON_ARCHER, 250000);
- CHANCES.put(DUNGEON_SKELETON, 230000);
- CHANCES.put(DREAD_SOLDIER, 260000);
- }
-
- public Q162_CurseOfTheUndergroundFortress()
- {
- super(162, qn, "Curse of the Underground Fortress");
-
- registerQuestItems(BONE_FRAGMENT, ELF_SKULL);
-
- addStartNpc(30147); // Unoren
- addTalkId(30147);
-
- addKillId(SHADE_HORROR, DARK_TERROR, MIST_TERROR, DUNGEON_SKELETON_ARCHER, DUNGEON_SKELETON, DREAD_SOLDIER);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30147-04.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- if (player.getRace() == Race.darkelf)
- {
- htmltext = "30147-00.htm";
- }
- else if (player.getLevel() < 12)
- {
- htmltext = "30147-01.htm";
- }
- else
- {
- htmltext = "30147-02.htm";
- }
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- if (cond == 1)
- {
- htmltext = "30147-05.htm";
- }
- else if (cond == 2)
- {
- htmltext = "30147-06.htm";
- st.takeItems(ELF_SKULL, -1);
- st.takeItems(BONE_FRAGMENT, -1);
- st.giveItems(BONE_SHIELD, 1);
- st.rewardItems(57, 24000);
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerCondition(player, npc, "cond", "1");
- if (st == null)
- {
- return null;
- }
-
- final int npcId = npc.getNpcId();
-
- switch (npcId)
- {
- case DUNGEON_SKELETON:
- case DUNGEON_SKELETON_ARCHER:
- case DREAD_SOLDIER:
- if (st.dropItems(BONE_FRAGMENT, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(ELF_SKULL) >= 3))
- {
- st.set("cond", "2");
- }
- break;
-
- case SHADE_HORROR:
- case DARK_TERROR:
- case MIST_TERROR:
- if (st.dropItems(ELF_SKULL, 1, 3, CHANCES.get(npcId)) && (st.getQuestItemsCount(BONE_FRAGMENT) >= 10))
- {
- st.set("cond", "2");
- }
- break;
- }
-
- return null;
- }
+ static
+ {
+ CHANCES.put(SHADE_HORROR, 250000);
+ CHANCES.put(DARK_TERROR, 260000);
+ CHANCES.put(MIST_TERROR, 230000);
+ CHANCES.put(DUNGEON_SKELETON_ARCHER, 250000);
+ CHANCES.put(DUNGEON_SKELETON, 230000);
+ CHANCES.put(DREAD_SOLDIER, 260000);
+ }
+
+ public Q162_CurseOfTheUndergroundFortress()
+ {
+ super(162, qn, "Curse of the Underground Fortress");
+
+ registerQuestItems(BONE_FRAGMENT, ELF_SKULL);
+
+ addStartNpc(30147); // Unoren
+ addTalkId(30147);
+
+ addKillId(SHADE_HORROR, DARK_TERROR, MIST_TERROR, DUNGEON_SKELETON_ARCHER, DUNGEON_SKELETON, DREAD_SOLDIER);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30147-04.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ if (player.getRace() == Race.darkelf)
+ {
+ htmltext = "30147-00.htm";
+ }
+ else if (player.getLevel() < 12)
+ {
+ htmltext = "30147-01.htm";
+ }
+ else
+ {
+ htmltext = "30147-02.htm";
+ }
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ if (cond == 1)
+ {
+ htmltext = "30147-05.htm";
+ }
+ else if (cond == 2)
+ {
+ htmltext = "30147-06.htm";
+ st.takeItems(ELF_SKULL, -1);
+ st.takeItems(BONE_FRAGMENT, -1);
+ st.giveItems(BONE_SHIELD, 1);
+ st.rewardItems(57, 24000);
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerCondition(player, npc, "cond", "1");
+ if (st == null)
+ {
+ return null;
+ }
+
+ final int npcId = npc.getNpcId();
+
+ switch (npcId)
+ {
+ case DUNGEON_SKELETON:
+ case DUNGEON_SKELETON_ARCHER:
+ case DREAD_SOLDIER:
+ if (st.dropItems(BONE_FRAGMENT, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(ELF_SKULL) >= 3))
+ {
+ st.set("cond", "2");
+ }
+ break;
+
+ case SHADE_HORROR:
+ case DARK_TERROR:
+ case MIST_TERROR:
+ if (st.dropItems(ELF_SKULL, 1, 3, CHANCES.get(npcId)) && (st.getQuestItemsCount(BONE_FRAGMENT) >= 10))
+ {
+ st.set("cond", "2");
+ }
+ break;
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q165_ShilensHunt/Q165_ShilensHunt.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q165_ShilensHunt/Q165_ShilensHunt.java
index 3d01be98b8..7d50b8ffd8 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q165_ShilensHunt/Q165_ShilensHunt.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q165_ShilensHunt/Q165_ShilensHunt.java
@@ -41,7 +41,8 @@ public class Q165_ShilensHunt extends Quest
private static final int LESSER_HEALING_POTION = 1060;
// Drop chances
- private static final Map CHANCES = new HashMap<>();
+ private static final Map CHANCES = new HashMap<>();
+ static
{
CHANCES.put(ASHEN_WOLF, 1000000);
CHANCES.put(YOUNG_BROWN_KELTIR, 333333);
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q171_ActsOfEvil/Q171_ActsOfEvil.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q171_ActsOfEvil/Q171_ActsOfEvil.java
index 5d83f9e6d0..e12453e2af 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q171_ActsOfEvil/Q171_ActsOfEvil.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q171_ActsOfEvil/Q171_ActsOfEvil.java
@@ -1,383 +1,384 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q171_ActsOfEvil;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.util.Rnd;
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q171_ActsOfEvil extends Quest
-{
- private static final String qn = "Q171_ActsOfEvil";
-
- // Items
- private static final int BLADE_MOLD = 4239;
- private static final int TYRA_BILL = 4240;
- private static final int RANGER_REPORT_1 = 4241;
- private static final int RANGER_REPORT_2 = 4242;
- private static final int RANGER_REPORT_3 = 4243;
- private static final int RANGER_REPORT_4 = 4244;
- private static final int WEAPON_TRADE_CONTRACT = 4245;
- private static final int ATTACK_DIRECTIVES = 4246;
- private static final int CERTIFICATE = 4247;
- private static final int CARGO_BOX = 4248;
- private static final int OL_MAHUM_HEAD = 4249;
-
- // NPCs
- private static final int ALVAH = 30381;
- private static final int ARODIN = 30207;
- private static final int TYRA = 30420;
- private static final int ROLENTO = 30437;
- private static final int NETI = 30425;
- private static final int BURAI = 30617;
-
- // Turek Orcs drop chances
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q171_ActsOfEvil;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.util.Rnd;
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q171_ActsOfEvil extends Quest
+{
+ private static final String qn = "Q171_ActsOfEvil";
+
+ // Items
+ private static final int BLADE_MOLD = 4239;
+ private static final int TYRA_BILL = 4240;
+ private static final int RANGER_REPORT_1 = 4241;
+ private static final int RANGER_REPORT_2 = 4242;
+ private static final int RANGER_REPORT_3 = 4243;
+ private static final int RANGER_REPORT_4 = 4244;
+ private static final int WEAPON_TRADE_CONTRACT = 4245;
+ private static final int ATTACK_DIRECTIVES = 4246;
+ private static final int CERTIFICATE = 4247;
+ private static final int CARGO_BOX = 4248;
+ private static final int OL_MAHUM_HEAD = 4249;
+
+ // NPCs
+ private static final int ALVAH = 30381;
+ private static final int ARODIN = 30207;
+ private static final int TYRA = 30420;
+ private static final int ROLENTO = 30437;
+ private static final int NETI = 30425;
+ private static final int BURAI = 30617;
+
+ // Turek Orcs drop chances
private static final Map CHANCES = new HashMap<>();
- {
- CHANCES.put(20496, 530000);
- CHANCES.put(20497, 550000);
- CHANCES.put(20498, 510000);
- CHANCES.put(20499, 500000);
- }
-
- public Q171_ActsOfEvil()
- {
- super(171, qn, "Acts of Evil");
-
- registerQuestItems(BLADE_MOLD, TYRA_BILL, RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4, WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES, CERTIFICATE, CARGO_BOX, OL_MAHUM_HEAD);
-
- addStartNpc(ALVAH);
- addTalkId(ALVAH, ARODIN, TYRA, ROLENTO, NETI, BURAI);
-
- addKillId(20496, 20497, 20498, 20499, 20062, 20064, 20066, 20438);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30381-02.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30207-02.htm"))
- {
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (event.equals("30381-04.htm"))
- {
- st.set("cond", "5");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (event.equals("30381-07.htm"))
- {
- st.set("cond", "7");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(WEAPON_TRADE_CONTRACT, 1);
- }
- else if (event.equals("30437-03.htm"))
- {
- st.set("cond", "9");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.giveItems(CARGO_BOX, 1);
- st.giveItems(CERTIFICATE, 1);
- }
- else if (event.equals("30617-04.htm"))
- {
- st.set("cond", "10");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(ATTACK_DIRECTIVES, 1);
- st.takeItems(CARGO_BOX, 1);
- st.takeItems(CERTIFICATE, 1);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 27) ? "30381-01a.htm" : "30381-01.htm";
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- switch (npc.getNpcId())
- {
- case ALVAH:
- if (cond < 4)
- {
- htmltext = "30381-02a.htm";
- }
- else if (cond == 4)
- {
- htmltext = "30381-03.htm";
- }
- else if (cond == 5)
- {
- if (st.hasQuestItems(RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4))
- {
- htmltext = "30381-05.htm";
- st.set("cond", "6");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(RANGER_REPORT_1, 1);
- st.takeItems(RANGER_REPORT_2, 1);
- st.takeItems(RANGER_REPORT_3, 1);
- st.takeItems(RANGER_REPORT_4, 1);
- }
- else
- {
- htmltext = "30381-04a.htm";
- }
- }
- else if (cond == 6)
- {
- if (st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
- {
- htmltext = "30381-06.htm";
- }
- else
- {
- htmltext = "30381-05a.htm";
- }
- }
- else if ((cond > 6) && (cond < 11))
- {
- htmltext = "30381-07a.htm";
- }
- else if (cond == 11)
- {
- htmltext = "30381-08.htm";
- st.rewardItems(57, 90000);
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
- break;
-
- case ARODIN:
- if (cond == 1)
- {
- htmltext = "30207-01.htm";
- }
- else if (cond == 2)
- {
- htmltext = "30207-01a.htm";
- }
- else if (cond == 3)
- {
- if (st.hasQuestItems(TYRA_BILL))
- {
- htmltext = "30207-03.htm";
- st.set("cond", "4");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(TYRA_BILL, 1);
- }
- else
- {
- htmltext = "30207-01a.htm";
- }
- }
- else if (cond > 3)
- {
- htmltext = "30207-03a.htm";
- }
- break;
-
- case TYRA:
- if (cond == 2)
- {
- if (st.getQuestItemsCount(BLADE_MOLD) >= 20)
- {
- htmltext = "30420-01.htm";
- st.set("cond", "3");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(BLADE_MOLD, -1);
- st.giveItems(TYRA_BILL, 1);
- }
- else
- {
- htmltext = "30420-01b.htm";
- }
- }
- else if (cond == 3)
- {
- htmltext = "30420-01a.htm";
- }
- else if (cond > 3)
- {
- htmltext = "30420-02.htm";
- }
- break;
-
- case NETI:
- if (cond == 7)
- {
- htmltext = "30425-01.htm";
- st.set("cond", "8");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (cond > 7)
- {
- htmltext = "30425-02.htm";
- }
- break;
-
- case ROLENTO:
- if (cond == 8)
- {
- htmltext = "30437-01.htm";
- }
- else if (cond > 8)
- {
- htmltext = "30437-03a.htm";
- }
- break;
-
- case BURAI:
- if ((cond == 9) && st.hasQuestItems(CERTIFICATE, CARGO_BOX, ATTACK_DIRECTIVES))
- {
- htmltext = "30617-01.htm";
- }
- else if (cond == 10)
- {
- if (st.getQuestItemsCount(OL_MAHUM_HEAD) >= 30)
- {
- htmltext = "30617-05.htm";
- st.set("cond", "11");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(OL_MAHUM_HEAD, -1);
- st.rewardItems(57, 8000);
- }
- else
- {
- htmltext = "30617-04a.htm";
- }
- }
- break;
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerState(player, npc, State.STARTED);
- if (st == null)
- {
- return null;
- }
-
- final int npcId = npc.getNpcId();
-
- switch (npcId)
- {
- case 20496:
- case 20497:
- case 20498:
- case 20499:
- if ((st.getInt("cond") == 2) && !st.dropItems(BLADE_MOLD, 1, 20, CHANCES.get(npcId)))
- {
- final int count = st.getQuestItemsCount(BLADE_MOLD);
- if ((count == 5) || ((count >= 10) && (Rnd.get(100) < 25)))
- {
- addSpawn(27190, player.getX(), player.getY(), player.getZ(), player.getHeading(), false, 0);
- }
- }
- break;
-
- case 20062:
- case 20064:
- if (st.getInt("cond") == 5)
- {
- if (!st.hasQuestItems(RANGER_REPORT_1))
- {
- st.giveItems(RANGER_REPORT_1, 1);
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- else if (Rnd.get(100) < 20)
- {
- if (!st.hasQuestItems(RANGER_REPORT_2))
- {
- st.giveItems(RANGER_REPORT_2, 1);
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- else if (!st.hasQuestItems(RANGER_REPORT_3))
- {
- st.giveItems(RANGER_REPORT_3, 1);
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- else if (!st.hasQuestItems(RANGER_REPORT_4))
- {
- st.giveItems(RANGER_REPORT_4, 1);
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- }
- }
- break;
-
- case 20438:
- if ((st.getInt("cond") == 6) && (Rnd.get(100) < 10) && !st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(WEAPON_TRADE_CONTRACT, 1);
- st.giveItems(ATTACK_DIRECTIVES, 1);
- }
- break;
-
- case 20066:
- if (st.getInt("cond") == 10)
- {
- st.dropItems(OL_MAHUM_HEAD, 1, 30, 500000);
- }
- break;
- }
-
- return null;
- }
+ static
+ {
+ CHANCES.put(20496, 530000);
+ CHANCES.put(20497, 550000);
+ CHANCES.put(20498, 510000);
+ CHANCES.put(20499, 500000);
+ }
+
+ public Q171_ActsOfEvil()
+ {
+ super(171, qn, "Acts of Evil");
+
+ registerQuestItems(BLADE_MOLD, TYRA_BILL, RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4, WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES, CERTIFICATE, CARGO_BOX, OL_MAHUM_HEAD);
+
+ addStartNpc(ALVAH);
+ addTalkId(ALVAH, ARODIN, TYRA, ROLENTO, NETI, BURAI);
+
+ addKillId(20496, 20497, 20498, 20499, 20062, 20064, 20066, 20438);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30381-02.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30207-02.htm"))
+ {
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (event.equals("30381-04.htm"))
+ {
+ st.set("cond", "5");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (event.equals("30381-07.htm"))
+ {
+ st.set("cond", "7");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(WEAPON_TRADE_CONTRACT, 1);
+ }
+ else if (event.equals("30437-03.htm"))
+ {
+ st.set("cond", "9");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.giveItems(CARGO_BOX, 1);
+ st.giveItems(CERTIFICATE, 1);
+ }
+ else if (event.equals("30617-04.htm"))
+ {
+ st.set("cond", "10");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(ATTACK_DIRECTIVES, 1);
+ st.takeItems(CARGO_BOX, 1);
+ st.takeItems(CERTIFICATE, 1);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 27) ? "30381-01a.htm" : "30381-01.htm";
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ switch (npc.getNpcId())
+ {
+ case ALVAH:
+ if (cond < 4)
+ {
+ htmltext = "30381-02a.htm";
+ }
+ else if (cond == 4)
+ {
+ htmltext = "30381-03.htm";
+ }
+ else if (cond == 5)
+ {
+ if (st.hasQuestItems(RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4))
+ {
+ htmltext = "30381-05.htm";
+ st.set("cond", "6");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(RANGER_REPORT_1, 1);
+ st.takeItems(RANGER_REPORT_2, 1);
+ st.takeItems(RANGER_REPORT_3, 1);
+ st.takeItems(RANGER_REPORT_4, 1);
+ }
+ else
+ {
+ htmltext = "30381-04a.htm";
+ }
+ }
+ else if (cond == 6)
+ {
+ if (st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
+ {
+ htmltext = "30381-06.htm";
+ }
+ else
+ {
+ htmltext = "30381-05a.htm";
+ }
+ }
+ else if ((cond > 6) && (cond < 11))
+ {
+ htmltext = "30381-07a.htm";
+ }
+ else if (cond == 11)
+ {
+ htmltext = "30381-08.htm";
+ st.rewardItems(57, 90000);
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+ break;
+
+ case ARODIN:
+ if (cond == 1)
+ {
+ htmltext = "30207-01.htm";
+ }
+ else if (cond == 2)
+ {
+ htmltext = "30207-01a.htm";
+ }
+ else if (cond == 3)
+ {
+ if (st.hasQuestItems(TYRA_BILL))
+ {
+ htmltext = "30207-03.htm";
+ st.set("cond", "4");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(TYRA_BILL, 1);
+ }
+ else
+ {
+ htmltext = "30207-01a.htm";
+ }
+ }
+ else if (cond > 3)
+ {
+ htmltext = "30207-03a.htm";
+ }
+ break;
+
+ case TYRA:
+ if (cond == 2)
+ {
+ if (st.getQuestItemsCount(BLADE_MOLD) >= 20)
+ {
+ htmltext = "30420-01.htm";
+ st.set("cond", "3");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(BLADE_MOLD, -1);
+ st.giveItems(TYRA_BILL, 1);
+ }
+ else
+ {
+ htmltext = "30420-01b.htm";
+ }
+ }
+ else if (cond == 3)
+ {
+ htmltext = "30420-01a.htm";
+ }
+ else if (cond > 3)
+ {
+ htmltext = "30420-02.htm";
+ }
+ break;
+
+ case NETI:
+ if (cond == 7)
+ {
+ htmltext = "30425-01.htm";
+ st.set("cond", "8");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (cond > 7)
+ {
+ htmltext = "30425-02.htm";
+ }
+ break;
+
+ case ROLENTO:
+ if (cond == 8)
+ {
+ htmltext = "30437-01.htm";
+ }
+ else if (cond > 8)
+ {
+ htmltext = "30437-03a.htm";
+ }
+ break;
+
+ case BURAI:
+ if ((cond == 9) && st.hasQuestItems(CERTIFICATE, CARGO_BOX, ATTACK_DIRECTIVES))
+ {
+ htmltext = "30617-01.htm";
+ }
+ else if (cond == 10)
+ {
+ if (st.getQuestItemsCount(OL_MAHUM_HEAD) >= 30)
+ {
+ htmltext = "30617-05.htm";
+ st.set("cond", "11");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(OL_MAHUM_HEAD, -1);
+ st.rewardItems(57, 8000);
+ }
+ else
+ {
+ htmltext = "30617-04a.htm";
+ }
+ }
+ break;
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerState(player, npc, State.STARTED);
+ if (st == null)
+ {
+ return null;
+ }
+
+ final int npcId = npc.getNpcId();
+
+ switch (npcId)
+ {
+ case 20496:
+ case 20497:
+ case 20498:
+ case 20499:
+ if ((st.getInt("cond") == 2) && !st.dropItems(BLADE_MOLD, 1, 20, CHANCES.get(npcId)))
+ {
+ final int count = st.getQuestItemsCount(BLADE_MOLD);
+ if ((count == 5) || ((count >= 10) && (Rnd.get(100) < 25)))
+ {
+ addSpawn(27190, player.getX(), player.getY(), player.getZ(), player.getHeading(), false, 0);
+ }
+ }
+ break;
+
+ case 20062:
+ case 20064:
+ if (st.getInt("cond") == 5)
+ {
+ if (!st.hasQuestItems(RANGER_REPORT_1))
+ {
+ st.giveItems(RANGER_REPORT_1, 1);
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ else if (Rnd.get(100) < 20)
+ {
+ if (!st.hasQuestItems(RANGER_REPORT_2))
+ {
+ st.giveItems(RANGER_REPORT_2, 1);
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ else if (!st.hasQuestItems(RANGER_REPORT_3))
+ {
+ st.giveItems(RANGER_REPORT_3, 1);
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ else if (!st.hasQuestItems(RANGER_REPORT_4))
+ {
+ st.giveItems(RANGER_REPORT_4, 1);
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ }
+ }
+ break;
+
+ case 20438:
+ if ((st.getInt("cond") == 6) && (Rnd.get(100) < 10) && !st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(WEAPON_TRADE_CONTRACT, 1);
+ st.giveItems(ATTACK_DIRECTIVES, 1);
+ }
+ break;
+
+ case 20066:
+ if (st.getInt("cond") == 10)
+ {
+ st.dropItems(OL_MAHUM_HEAD, 1, 30, 500000);
+ }
+ break;
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q219_TestimonyOfFate/Q219_TestimonyOfFate.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q219_TestimonyOfFate/Q219_TestimonyOfFate.java
index cd6a155be3..f1df3fea2d 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q219_TestimonyOfFate/Q219_TestimonyOfFate.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q219_TestimonyOfFate/Q219_TestimonyOfFate.java
@@ -1,646 +1,647 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q219_TestimonyOfFate;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.base.Race;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
-
-public class Q219_TestimonyOfFate extends Quest
-{
- private static final String qn = "Q219_TestimonyOfFate";
-
- // NPCs
- private static final int KAIRA = 30476;
- private static final int METHEUS = 30614;
- private static final int IXIA = 30463;
- private static final int ALDER_SPIRIT = 30613;
- private static final int ROA = 30114;
- private static final int NORMAN = 30210;
- private static final int THIFIELL = 30358;
- private static final int ARKENIA = 30419;
- private static final int BLOODY_PIXY = 31845;
- private static final int BLIGHT_TREANT = 31850;
-
- // Items
- private static final int KAIRA_LETTER = 3173;
- private static final int METHEUS_FUNERAL_JAR = 3174;
- private static final int KASANDRA_REMAINS = 3175;
- private static final int HERBALISM_TEXTBOOK = 3176;
- private static final int IXIA_LIST = 3177;
- private static final int MEDUSA_ICHOR = 3178;
- private static final int MARSH_SPIDER_FLUIDS = 3179;
- private static final int DEAD_SEEKER_DUNG = 3180;
- private static final int TYRANT_BLOOD = 3181;
- private static final int NIGHTSHADE_ROOT = 3182;
- private static final int BELLADONNA = 3183;
- private static final int ALDER_SKULL_1 = 3184;
- private static final int ALDER_SKULL_2 = 3185;
- private static final int ALDER_RECEIPT = 3186;
- private static final int REVELATIONS_MANUSCRIPT = 3187;
- private static final int KAIRA_RECOMMENDATION = 3189;
- private static final int KAIRA_INSTRUCTIONS = 3188;
- private static final int PALUS_CHARM = 3190;
- private static final int THIFIELL_LETTER = 3191;
- private static final int ARKENIA_NOTE = 3192;
- private static final int PIXY_GARNET = 3193;
- private static final int GRANDIS_SKULL = 3194;
- private static final int KARUL_BUGBEAR_SKULL = 3195;
- private static final int BREKA_OVERLORD_SKULL = 3196;
- private static final int LETO_OVERLORD_SKULL = 3197;
- private static final int RED_FAIRY_DUST = 3198;
- private static final int BLIGHT_TREANT_SEED = 3199;
- private static final int BLACK_WILLOW_LEAF = 3200;
- private static final int BLIGHT_TREANT_SAP = 3201;
- private static final int ARKENIA_LETTER = 3202;
-
- // Rewards
- private static final int MARK_OF_FATE = 3172;
- private static final int DIMENSIONAL_DIAMOND = 7562;
-
- // Monsters
- private static final int HANGMAN_TREE = 20144;
- private static final int MARSH_STAKATO = 20157;
- private static final int MEDUSA = 20158;
- private static final int TYRANT = 20192;
- private static final int TYRANT_KINGPIN = 20193;
- private static final int DEAD_SEEKER = 20202;
- private static final int MARSH_STAKATO_WORKER = 20230;
- private static final int MARSH_STAKATO_SOLDIER = 20232;
- private static final int MARSH_SPIDER = 20233;
- private static final int MARSH_STAKATO_DRONE = 20234;
- private static final int BREKA_ORC_OVERLORD = 20270;
- private static final int GRANDIS = 20554;
- private static final int LETO_LIZARDMAN_OVERLORD = 20582;
- private static final int KARUL_BUGBEAR = 20600;
- private static final int BLACK_WILLOW_LURKER = 27079;
-
- // Cond 6 drop chances
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q219_TestimonyOfFate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.base.Race;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
+
+public class Q219_TestimonyOfFate extends Quest
+{
+ private static final String qn = "Q219_TestimonyOfFate";
+
+ // NPCs
+ private static final int KAIRA = 30476;
+ private static final int METHEUS = 30614;
+ private static final int IXIA = 30463;
+ private static final int ALDER_SPIRIT = 30613;
+ private static final int ROA = 30114;
+ private static final int NORMAN = 30210;
+ private static final int THIFIELL = 30358;
+ private static final int ARKENIA = 30419;
+ private static final int BLOODY_PIXY = 31845;
+ private static final int BLIGHT_TREANT = 31850;
+
+ // Items
+ private static final int KAIRA_LETTER = 3173;
+ private static final int METHEUS_FUNERAL_JAR = 3174;
+ private static final int KASANDRA_REMAINS = 3175;
+ private static final int HERBALISM_TEXTBOOK = 3176;
+ private static final int IXIA_LIST = 3177;
+ private static final int MEDUSA_ICHOR = 3178;
+ private static final int MARSH_SPIDER_FLUIDS = 3179;
+ private static final int DEAD_SEEKER_DUNG = 3180;
+ private static final int TYRANT_BLOOD = 3181;
+ private static final int NIGHTSHADE_ROOT = 3182;
+ private static final int BELLADONNA = 3183;
+ private static final int ALDER_SKULL_1 = 3184;
+ private static final int ALDER_SKULL_2 = 3185;
+ private static final int ALDER_RECEIPT = 3186;
+ private static final int REVELATIONS_MANUSCRIPT = 3187;
+ private static final int KAIRA_RECOMMENDATION = 3189;
+ private static final int KAIRA_INSTRUCTIONS = 3188;
+ private static final int PALUS_CHARM = 3190;
+ private static final int THIFIELL_LETTER = 3191;
+ private static final int ARKENIA_NOTE = 3192;
+ private static final int PIXY_GARNET = 3193;
+ private static final int GRANDIS_SKULL = 3194;
+ private static final int KARUL_BUGBEAR_SKULL = 3195;
+ private static final int BREKA_OVERLORD_SKULL = 3196;
+ private static final int LETO_OVERLORD_SKULL = 3197;
+ private static final int RED_FAIRY_DUST = 3198;
+ private static final int BLIGHT_TREANT_SEED = 3199;
+ private static final int BLACK_WILLOW_LEAF = 3200;
+ private static final int BLIGHT_TREANT_SAP = 3201;
+ private static final int ARKENIA_LETTER = 3202;
+
+ // Rewards
+ private static final int MARK_OF_FATE = 3172;
+ private static final int DIMENSIONAL_DIAMOND = 7562;
+
+ // Monsters
+ private static final int HANGMAN_TREE = 20144;
+ private static final int MARSH_STAKATO = 20157;
+ private static final int MEDUSA = 20158;
+ private static final int TYRANT = 20192;
+ private static final int TYRANT_KINGPIN = 20193;
+ private static final int DEAD_SEEKER = 20202;
+ private static final int MARSH_STAKATO_WORKER = 20230;
+ private static final int MARSH_STAKATO_SOLDIER = 20232;
+ private static final int MARSH_SPIDER = 20233;
+ private static final int MARSH_STAKATO_DRONE = 20234;
+ private static final int BREKA_ORC_OVERLORD = 20270;
+ private static final int GRANDIS = 20554;
+ private static final int LETO_LIZARDMAN_OVERLORD = 20582;
+ private static final int KARUL_BUGBEAR = 20600;
+ private static final int BLACK_WILLOW_LURKER = 27079;
+
+ // Cond 6 drop chances
private static final Map CHANCES = new HashMap<>();
- {
- CHANCES.put(DEAD_SEEKER, 500000);
- CHANCES.put(TYRANT, 500000);
- CHANCES.put(TYRANT_KINGPIN, 600000);
- CHANCES.put(MEDUSA, 500000);
- CHANCES.put(MARSH_STAKATO, 400000);
- CHANCES.put(MARSH_STAKATO_WORKER, 300000);
- CHANCES.put(MARSH_STAKATO_SOLDIER, 500000);
- CHANCES.put(MARSH_STAKATO_DRONE, 600000);
- CHANCES.put(MARSH_SPIDER, 500000);
- }
-
- public Q219_TestimonyOfFate()
- {
- super(219, qn, "Testimony of Fate");
-
- registerQuestItems(KAIRA_LETTER, METHEUS_FUNERAL_JAR, KASANDRA_REMAINS, HERBALISM_TEXTBOOK, IXIA_LIST, MEDUSA_ICHOR, MARSH_SPIDER_FLUIDS, DEAD_SEEKER_DUNG, TYRANT_BLOOD, NIGHTSHADE_ROOT, BELLADONNA, ALDER_SKULL_1, ALDER_SKULL_2, ALDER_RECEIPT, REVELATIONS_MANUSCRIPT, KAIRA_RECOMMENDATION, KAIRA_INSTRUCTIONS, PALUS_CHARM, THIFIELL_LETTER, ARKENIA_NOTE, PIXY_GARNET, GRANDIS_SKULL, KARUL_BUGBEAR_SKULL, BREKA_OVERLORD_SKULL, LETO_OVERLORD_SKULL, RED_FAIRY_DUST, BLIGHT_TREANT_SEED, BLACK_WILLOW_LEAF, BLIGHT_TREANT_SAP, ARKENIA_LETTER);
-
- addStartNpc(KAIRA);
- addTalkId(KAIRA, METHEUS, IXIA, ALDER_SPIRIT, ROA, NORMAN, THIFIELL, ARKENIA, BLOODY_PIXY, BLIGHT_TREANT);
-
- addKillId(HANGMAN_TREE, MARSH_STAKATO, MEDUSA, TYRANT, TYRANT_KINGPIN, DEAD_SEEKER, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_SPIDER, MARSH_STAKATO_DRONE, BREKA_ORC_OVERLORD, GRANDIS, LETO_LIZARDMAN_OVERLORD, KARUL_BUGBEAR, BLACK_WILLOW_LURKER);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30476-05.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- st.giveItems(KAIRA_LETTER, 1);
-
- if (!player.getVariables().getBool("secondClassChange37", false))
- {
- htmltext = "30476-05a.htm";
- st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
- player.getVariables().set("secondClassChange37", true);
- }
- }
- else if (event.equals("30114-04.htm"))
- {
- st.set("cond", "12");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(ALDER_SKULL_2, 1);
- st.giveItems(ALDER_RECEIPT, 1);
- }
- else if (event.equals("30476-12.htm"))
- {
- st.playSound(QuestState.SOUND_MIDDLE);
-
- if (player.getLevel() < 38)
- {
- htmltext = "30476-13.htm";
- st.set("cond", "14");
- st.giveItems(KAIRA_INSTRUCTIONS, 1);
- }
- else
- {
- st.set("cond", "15");
- st.takeItems(REVELATIONS_MANUSCRIPT, 1);
- st.giveItems(KAIRA_RECOMMENDATION, 1);
- }
- }
- else if (event.equals("30419-02.htm"))
- {
- st.set("cond", "17");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(THIFIELL_LETTER, 1);
- st.giveItems(ARKENIA_NOTE, 1);
- }
- else if (event.equals("31845-02.htm"))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(PIXY_GARNET, 1);
- }
- else if (event.equals("31850-02.htm"))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(BLIGHT_TREANT_SEED, 1);
- }
- else if (event.equals("30419-05.htm"))
- {
- st.set("cond", "18");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(ARKENIA_NOTE, 1);
- st.takeItems(BLIGHT_TREANT_SAP, 1);
- st.takeItems(RED_FAIRY_DUST, 1);
- st.giveItems(ARKENIA_LETTER, 1);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- if (player.getRace() != Race.darkelf)
- {
- htmltext = "30476-02.htm";
- }
- else if ((player.getLevel() < 37) || (player.getClassId().level() != 1))
- {
- htmltext = "30476-01.htm";
- }
- else
- {
- htmltext = "30476-03.htm";
- }
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- switch (npc.getNpcId())
- {
- case KAIRA:
- if (cond == 1)
- {
- htmltext = "30476-06.htm";
- }
- else if ((cond == 2) || (cond == 3))
- {
- htmltext = "30476-07.htm";
- }
- else if ((cond > 3) && (cond < 9))
- {
- htmltext = "30476-08.htm";
- }
- else if (cond == 9)
- {
- htmltext = "30476-09.htm";
- st.set("cond", "10");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(ALDER_SKULL_1, 1);
- addSpawn(ALDER_SPIRIT, player, false, 0);
- }
- else if ((cond > 9) && (cond < 13))
- {
- htmltext = "30476-10.htm";
- }
- else if (cond == 13)
- {
- htmltext = "30476-11.htm";
- }
- else if (cond == 14)
- {
- if (player.getLevel() < 38)
- {
- htmltext = "30476-14.htm";
- }
- else
- {
- htmltext = "30476-12.htm";
- st.set("cond", "15");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(KAIRA_INSTRUCTIONS, 1);
- st.takeItems(REVELATIONS_MANUSCRIPT, 1);
- st.giveItems(KAIRA_RECOMMENDATION, 1);
- }
- }
- else if (cond == 15)
- {
- htmltext = "30476-16.htm";
- }
- else if (cond > 15)
- {
- htmltext = "30476-17.htm";
- }
- break;
-
- case METHEUS:
- if (cond == 1)
- {
- htmltext = "30614-01.htm";
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(KAIRA_LETTER, 1);
- st.giveItems(METHEUS_FUNERAL_JAR, 1);
- }
- else if (cond == 2)
- {
- htmltext = "30614-02.htm";
- }
- else if (cond == 3)
- {
- htmltext = "30614-03.htm";
- st.set("cond", "4");
- st.set("cond", "5");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(KASANDRA_REMAINS, 1);
- st.giveItems(HERBALISM_TEXTBOOK, 1);
- }
- else if ((cond > 3) && (cond < 8))
- {
- htmltext = "30614-04.htm";
- }
- else if (cond == 8)
- {
- htmltext = "30614-05.htm";
- st.set("cond", "9");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(BELLADONNA, 1);
- st.giveItems(ALDER_SKULL_1, 1);
- }
- else if (cond > 8)
- {
- htmltext = "30614-06.htm";
- }
- break;
-
- case IXIA:
- if (cond == 5)
- {
- htmltext = "30463-01.htm";
- st.set("cond", "6");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(HERBALISM_TEXTBOOK, 1);
- st.giveItems(IXIA_LIST, 1);
- }
- else if (cond == 6)
- {
- htmltext = "30463-02.htm";
- }
- else if (cond == 7)
- {
- htmltext = "30463-03.htm";
- st.set("cond", "8");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(IXIA_LIST, 1);
- st.takeItems(DEAD_SEEKER_DUNG, -1);
- st.takeItems(MARSH_SPIDER_FLUIDS, -1);
- st.takeItems(MEDUSA_ICHOR, -1);
- st.takeItems(NIGHTSHADE_ROOT, -1);
- st.takeItems(TYRANT_BLOOD, -1);
- st.giveItems(BELLADONNA, 1);
- }
- else if (cond == 8)
- {
- htmltext = "30463-04.htm";
- }
- else if (cond > 8)
- {
- htmltext = "30463-05.htm";
- }
- break;
-
- case ALDER_SPIRIT:
- if (cond == 10)
- {
- htmltext = "30613-01.htm";
- st.set("cond", "11");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.giveItems(ALDER_SKULL_2, 1);
- npc.deleteMe();
- }
- break;
-
- case ROA:
- if (cond == 11)
- {
- htmltext = "30114-01.htm";
- }
- else if (cond == 12)
- {
- htmltext = "30114-05.htm";
- }
- else if (cond > 12)
- {
- htmltext = "30114-06.htm";
- }
- break;
-
- case NORMAN:
- if (cond == 12)
- {
- htmltext = "30210-01.htm";
- st.set("cond", "13");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(ALDER_RECEIPT, 1);
- st.giveItems(REVELATIONS_MANUSCRIPT, 1);
- }
- else if (cond > 12)
- {
- htmltext = "30210-02.htm";
- }
- break;
-
- case THIFIELL:
- if (cond == 15)
- {
- htmltext = "30358-01.htm";
- st.set("cond", "16");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(KAIRA_RECOMMENDATION, 1);
- st.giveItems(PALUS_CHARM, 1);
- st.giveItems(THIFIELL_LETTER, 1);
- }
- else if (cond == 16)
- {
- htmltext = "30358-02.htm";
- }
- else if (cond == 17)
- {
- htmltext = "30358-03.htm";
- }
- else if (cond == 18)
- {
- htmltext = "30358-04.htm";
- st.takeItems(PALUS_CHARM, 1);
- st.takeItems(ARKENIA_LETTER, 1);
- st.giveItems(MARK_OF_FATE, 1);
- st.rewardExpAndSp(68183, 1750);
- player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
- break;
-
- case ARKENIA:
- if (cond == 16)
- {
- htmltext = "30419-01.htm";
- }
- else if (cond == 17)
- {
- htmltext = (st.hasQuestItems(BLIGHT_TREANT_SAP) && st.hasQuestItems(RED_FAIRY_DUST)) ? "30419-04.htm" : "30419-03.htm";
- }
- else if (cond == 18)
- {
- htmltext = "30419-06.htm";
- }
- break;
-
- case BLOODY_PIXY:
- if (cond == 17)
- {
- if (st.hasQuestItems(PIXY_GARNET))
- {
- if ((st.getQuestItemsCount(GRANDIS_SKULL) >= 10) && (st.getQuestItemsCount(KARUL_BUGBEAR_SKULL) >= 10) && (st.getQuestItemsCount(BREKA_OVERLORD_SKULL) >= 10) && (st.getQuestItemsCount(LETO_OVERLORD_SKULL) >= 10))
- {
- htmltext = "31845-04.htm";
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(BREKA_OVERLORD_SKULL, -1);
- st.takeItems(GRANDIS_SKULL, -1);
- st.takeItems(KARUL_BUGBEAR_SKULL, -1);
- st.takeItems(LETO_OVERLORD_SKULL, -1);
- st.takeItems(PIXY_GARNET, 1);
- st.giveItems(RED_FAIRY_DUST, 1);
- }
- else
- {
- htmltext = "31845-03.htm";
- }
- }
- else if (st.hasQuestItems(RED_FAIRY_DUST))
- {
- htmltext = "31845-05.htm";
- }
- else
- {
- htmltext = "31845-01.htm";
- }
- }
- else if (cond == 18)
- {
- htmltext = "31845-05.htm";
- }
- break;
-
- case BLIGHT_TREANT:
- if (cond == 17)
- {
- if (st.hasQuestItems(BLIGHT_TREANT_SEED))
- {
- if (st.hasQuestItems(BLACK_WILLOW_LEAF))
- {
- htmltext = "31850-04.htm";
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(BLACK_WILLOW_LEAF, 1);
- st.takeItems(BLIGHT_TREANT_SEED, 1);
- st.giveItems(BLIGHT_TREANT_SAP, 1);
- }
- else
- {
- htmltext = "31850-03.htm";
- }
- }
- else if (st.hasQuestItems(BLIGHT_TREANT_SAP))
- {
- htmltext = "31850-05.htm";
- }
- else
- {
- htmltext = "31850-01.htm";
- }
- }
- else if (cond == 18)
- {
- htmltext = "31850-05.htm";
- }
- break;
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerState(player, npc, State.STARTED);
- if (st == null)
- {
- return null;
- }
-
- final int npcId = npc.getNpcId();
-
- switch (npcId)
- {
- case HANGMAN_TREE:
- if (st.getInt("cond") == 2)
- {
- st.set("cond", "3");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(METHEUS_FUNERAL_JAR, 1);
- st.giveItems(KASANDRA_REMAINS, 1);
- }
- break;
-
- case DEAD_SEEKER:
- if ((st.getInt("cond") == 6) && st.dropItems(DEAD_SEEKER_DUNG, 1, 10, CHANCES.get(npcId)))
- {
- if ((st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
- {
- st.set("cond", "7");
- }
- }
- break;
-
- case TYRANT:
- case TYRANT_KINGPIN:
- if ((st.getInt("cond") == 6) && st.dropItems(TYRANT_BLOOD, 1, 10, CHANCES.get(npcId)))
- {
- if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
- {
- st.set("cond", "7");
- }
- }
- break;
-
- case MEDUSA:
- if ((st.getInt("cond") == 6) && st.dropItems(MEDUSA_ICHOR, 1, 10, CHANCES.get(npcId)))
- {
- if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
- {
- st.set("cond", "7");
- }
- }
- break;
-
- case MARSH_STAKATO:
- case MARSH_STAKATO_WORKER:
- case MARSH_STAKATO_SOLDIER:
- case MARSH_STAKATO_DRONE:
- if ((st.getInt("cond") == 6) && st.dropItems(NIGHTSHADE_ROOT, 1, 10, CHANCES.get(npcId)))
- {
- if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
- {
- st.set("cond", "7");
- }
- }
- break;
-
- case MARSH_SPIDER:
- if ((st.getInt("cond") == 6) && st.dropItems(MARSH_SPIDER_FLUIDS, 1, 10, CHANCES.get(npcId)))
- {
- if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10))
- {
- st.set("cond", "7");
- }
- }
- break;
-
- case GRANDIS:
- if (st.hasQuestItems(PIXY_GARNET))
- {
- st.dropItemsAlways(GRANDIS_SKULL, 1, 10);
- }
- break;
-
- case LETO_LIZARDMAN_OVERLORD:
- if (st.hasQuestItems(PIXY_GARNET))
- {
- st.dropItemsAlways(LETO_OVERLORD_SKULL, 1, 10);
- }
- break;
-
- case BREKA_ORC_OVERLORD:
- if (st.hasQuestItems(PIXY_GARNET))
- {
- st.dropItemsAlways(BREKA_OVERLORD_SKULL, 1, 10);
- }
- break;
-
- case KARUL_BUGBEAR:
- if (st.hasQuestItems(PIXY_GARNET))
- {
- st.dropItemsAlways(KARUL_BUGBEAR_SKULL, 1, 10);
- }
- break;
-
- case BLACK_WILLOW_LURKER:
- if (st.hasQuestItems(BLIGHT_TREANT_SEED))
- {
- st.dropItemsAlways(BLACK_WILLOW_LEAF, 1, 1);
- }
- break;
- }
-
- return null;
- }
+ static
+ {
+ CHANCES.put(DEAD_SEEKER, 500000);
+ CHANCES.put(TYRANT, 500000);
+ CHANCES.put(TYRANT_KINGPIN, 600000);
+ CHANCES.put(MEDUSA, 500000);
+ CHANCES.put(MARSH_STAKATO, 400000);
+ CHANCES.put(MARSH_STAKATO_WORKER, 300000);
+ CHANCES.put(MARSH_STAKATO_SOLDIER, 500000);
+ CHANCES.put(MARSH_STAKATO_DRONE, 600000);
+ CHANCES.put(MARSH_SPIDER, 500000);
+ }
+
+ public Q219_TestimonyOfFate()
+ {
+ super(219, qn, "Testimony of Fate");
+
+ registerQuestItems(KAIRA_LETTER, METHEUS_FUNERAL_JAR, KASANDRA_REMAINS, HERBALISM_TEXTBOOK, IXIA_LIST, MEDUSA_ICHOR, MARSH_SPIDER_FLUIDS, DEAD_SEEKER_DUNG, TYRANT_BLOOD, NIGHTSHADE_ROOT, BELLADONNA, ALDER_SKULL_1, ALDER_SKULL_2, ALDER_RECEIPT, REVELATIONS_MANUSCRIPT, KAIRA_RECOMMENDATION, KAIRA_INSTRUCTIONS, PALUS_CHARM, THIFIELL_LETTER, ARKENIA_NOTE, PIXY_GARNET, GRANDIS_SKULL, KARUL_BUGBEAR_SKULL, BREKA_OVERLORD_SKULL, LETO_OVERLORD_SKULL, RED_FAIRY_DUST, BLIGHT_TREANT_SEED, BLACK_WILLOW_LEAF, BLIGHT_TREANT_SAP, ARKENIA_LETTER);
+
+ addStartNpc(KAIRA);
+ addTalkId(KAIRA, METHEUS, IXIA, ALDER_SPIRIT, ROA, NORMAN, THIFIELL, ARKENIA, BLOODY_PIXY, BLIGHT_TREANT);
+
+ addKillId(HANGMAN_TREE, MARSH_STAKATO, MEDUSA, TYRANT, TYRANT_KINGPIN, DEAD_SEEKER, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_SPIDER, MARSH_STAKATO_DRONE, BREKA_ORC_OVERLORD, GRANDIS, LETO_LIZARDMAN_OVERLORD, KARUL_BUGBEAR, BLACK_WILLOW_LURKER);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30476-05.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ st.giveItems(KAIRA_LETTER, 1);
+
+ if (!player.getVariables().getBool("secondClassChange37", false))
+ {
+ htmltext = "30476-05a.htm";
+ st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
+ player.getVariables().set("secondClassChange37", true);
+ }
+ }
+ else if (event.equals("30114-04.htm"))
+ {
+ st.set("cond", "12");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(ALDER_SKULL_2, 1);
+ st.giveItems(ALDER_RECEIPT, 1);
+ }
+ else if (event.equals("30476-12.htm"))
+ {
+ st.playSound(QuestState.SOUND_MIDDLE);
+
+ if (player.getLevel() < 38)
+ {
+ htmltext = "30476-13.htm";
+ st.set("cond", "14");
+ st.giveItems(KAIRA_INSTRUCTIONS, 1);
+ }
+ else
+ {
+ st.set("cond", "15");
+ st.takeItems(REVELATIONS_MANUSCRIPT, 1);
+ st.giveItems(KAIRA_RECOMMENDATION, 1);
+ }
+ }
+ else if (event.equals("30419-02.htm"))
+ {
+ st.set("cond", "17");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(THIFIELL_LETTER, 1);
+ st.giveItems(ARKENIA_NOTE, 1);
+ }
+ else if (event.equals("31845-02.htm"))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(PIXY_GARNET, 1);
+ }
+ else if (event.equals("31850-02.htm"))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(BLIGHT_TREANT_SEED, 1);
+ }
+ else if (event.equals("30419-05.htm"))
+ {
+ st.set("cond", "18");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(ARKENIA_NOTE, 1);
+ st.takeItems(BLIGHT_TREANT_SAP, 1);
+ st.takeItems(RED_FAIRY_DUST, 1);
+ st.giveItems(ARKENIA_LETTER, 1);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ if (player.getRace() != Race.darkelf)
+ {
+ htmltext = "30476-02.htm";
+ }
+ else if ((player.getLevel() < 37) || (player.getClassId().level() != 1))
+ {
+ htmltext = "30476-01.htm";
+ }
+ else
+ {
+ htmltext = "30476-03.htm";
+ }
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ switch (npc.getNpcId())
+ {
+ case KAIRA:
+ if (cond == 1)
+ {
+ htmltext = "30476-06.htm";
+ }
+ else if ((cond == 2) || (cond == 3))
+ {
+ htmltext = "30476-07.htm";
+ }
+ else if ((cond > 3) && (cond < 9))
+ {
+ htmltext = "30476-08.htm";
+ }
+ else if (cond == 9)
+ {
+ htmltext = "30476-09.htm";
+ st.set("cond", "10");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(ALDER_SKULL_1, 1);
+ addSpawn(ALDER_SPIRIT, player, false, 0);
+ }
+ else if ((cond > 9) && (cond < 13))
+ {
+ htmltext = "30476-10.htm";
+ }
+ else if (cond == 13)
+ {
+ htmltext = "30476-11.htm";
+ }
+ else if (cond == 14)
+ {
+ if (player.getLevel() < 38)
+ {
+ htmltext = "30476-14.htm";
+ }
+ else
+ {
+ htmltext = "30476-12.htm";
+ st.set("cond", "15");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(KAIRA_INSTRUCTIONS, 1);
+ st.takeItems(REVELATIONS_MANUSCRIPT, 1);
+ st.giveItems(KAIRA_RECOMMENDATION, 1);
+ }
+ }
+ else if (cond == 15)
+ {
+ htmltext = "30476-16.htm";
+ }
+ else if (cond > 15)
+ {
+ htmltext = "30476-17.htm";
+ }
+ break;
+
+ case METHEUS:
+ if (cond == 1)
+ {
+ htmltext = "30614-01.htm";
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(KAIRA_LETTER, 1);
+ st.giveItems(METHEUS_FUNERAL_JAR, 1);
+ }
+ else if (cond == 2)
+ {
+ htmltext = "30614-02.htm";
+ }
+ else if (cond == 3)
+ {
+ htmltext = "30614-03.htm";
+ st.set("cond", "4");
+ st.set("cond", "5");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(KASANDRA_REMAINS, 1);
+ st.giveItems(HERBALISM_TEXTBOOK, 1);
+ }
+ else if ((cond > 3) && (cond < 8))
+ {
+ htmltext = "30614-04.htm";
+ }
+ else if (cond == 8)
+ {
+ htmltext = "30614-05.htm";
+ st.set("cond", "9");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(BELLADONNA, 1);
+ st.giveItems(ALDER_SKULL_1, 1);
+ }
+ else if (cond > 8)
+ {
+ htmltext = "30614-06.htm";
+ }
+ break;
+
+ case IXIA:
+ if (cond == 5)
+ {
+ htmltext = "30463-01.htm";
+ st.set("cond", "6");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(HERBALISM_TEXTBOOK, 1);
+ st.giveItems(IXIA_LIST, 1);
+ }
+ else if (cond == 6)
+ {
+ htmltext = "30463-02.htm";
+ }
+ else if (cond == 7)
+ {
+ htmltext = "30463-03.htm";
+ st.set("cond", "8");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(IXIA_LIST, 1);
+ st.takeItems(DEAD_SEEKER_DUNG, -1);
+ st.takeItems(MARSH_SPIDER_FLUIDS, -1);
+ st.takeItems(MEDUSA_ICHOR, -1);
+ st.takeItems(NIGHTSHADE_ROOT, -1);
+ st.takeItems(TYRANT_BLOOD, -1);
+ st.giveItems(BELLADONNA, 1);
+ }
+ else if (cond == 8)
+ {
+ htmltext = "30463-04.htm";
+ }
+ else if (cond > 8)
+ {
+ htmltext = "30463-05.htm";
+ }
+ break;
+
+ case ALDER_SPIRIT:
+ if (cond == 10)
+ {
+ htmltext = "30613-01.htm";
+ st.set("cond", "11");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.giveItems(ALDER_SKULL_2, 1);
+ npc.deleteMe();
+ }
+ break;
+
+ case ROA:
+ if (cond == 11)
+ {
+ htmltext = "30114-01.htm";
+ }
+ else if (cond == 12)
+ {
+ htmltext = "30114-05.htm";
+ }
+ else if (cond > 12)
+ {
+ htmltext = "30114-06.htm";
+ }
+ break;
+
+ case NORMAN:
+ if (cond == 12)
+ {
+ htmltext = "30210-01.htm";
+ st.set("cond", "13");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(ALDER_RECEIPT, 1);
+ st.giveItems(REVELATIONS_MANUSCRIPT, 1);
+ }
+ else if (cond > 12)
+ {
+ htmltext = "30210-02.htm";
+ }
+ break;
+
+ case THIFIELL:
+ if (cond == 15)
+ {
+ htmltext = "30358-01.htm";
+ st.set("cond", "16");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(KAIRA_RECOMMENDATION, 1);
+ st.giveItems(PALUS_CHARM, 1);
+ st.giveItems(THIFIELL_LETTER, 1);
+ }
+ else if (cond == 16)
+ {
+ htmltext = "30358-02.htm";
+ }
+ else if (cond == 17)
+ {
+ htmltext = "30358-03.htm";
+ }
+ else if (cond == 18)
+ {
+ htmltext = "30358-04.htm";
+ st.takeItems(PALUS_CHARM, 1);
+ st.takeItems(ARKENIA_LETTER, 1);
+ st.giveItems(MARK_OF_FATE, 1);
+ st.rewardExpAndSp(68183, 1750);
+ player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+ break;
+
+ case ARKENIA:
+ if (cond == 16)
+ {
+ htmltext = "30419-01.htm";
+ }
+ else if (cond == 17)
+ {
+ htmltext = (st.hasQuestItems(BLIGHT_TREANT_SAP) && st.hasQuestItems(RED_FAIRY_DUST)) ? "30419-04.htm" : "30419-03.htm";
+ }
+ else if (cond == 18)
+ {
+ htmltext = "30419-06.htm";
+ }
+ break;
+
+ case BLOODY_PIXY:
+ if (cond == 17)
+ {
+ if (st.hasQuestItems(PIXY_GARNET))
+ {
+ if ((st.getQuestItemsCount(GRANDIS_SKULL) >= 10) && (st.getQuestItemsCount(KARUL_BUGBEAR_SKULL) >= 10) && (st.getQuestItemsCount(BREKA_OVERLORD_SKULL) >= 10) && (st.getQuestItemsCount(LETO_OVERLORD_SKULL) >= 10))
+ {
+ htmltext = "31845-04.htm";
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(BREKA_OVERLORD_SKULL, -1);
+ st.takeItems(GRANDIS_SKULL, -1);
+ st.takeItems(KARUL_BUGBEAR_SKULL, -1);
+ st.takeItems(LETO_OVERLORD_SKULL, -1);
+ st.takeItems(PIXY_GARNET, 1);
+ st.giveItems(RED_FAIRY_DUST, 1);
+ }
+ else
+ {
+ htmltext = "31845-03.htm";
+ }
+ }
+ else if (st.hasQuestItems(RED_FAIRY_DUST))
+ {
+ htmltext = "31845-05.htm";
+ }
+ else
+ {
+ htmltext = "31845-01.htm";
+ }
+ }
+ else if (cond == 18)
+ {
+ htmltext = "31845-05.htm";
+ }
+ break;
+
+ case BLIGHT_TREANT:
+ if (cond == 17)
+ {
+ if (st.hasQuestItems(BLIGHT_TREANT_SEED))
+ {
+ if (st.hasQuestItems(BLACK_WILLOW_LEAF))
+ {
+ htmltext = "31850-04.htm";
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(BLACK_WILLOW_LEAF, 1);
+ st.takeItems(BLIGHT_TREANT_SEED, 1);
+ st.giveItems(BLIGHT_TREANT_SAP, 1);
+ }
+ else
+ {
+ htmltext = "31850-03.htm";
+ }
+ }
+ else if (st.hasQuestItems(BLIGHT_TREANT_SAP))
+ {
+ htmltext = "31850-05.htm";
+ }
+ else
+ {
+ htmltext = "31850-01.htm";
+ }
+ }
+ else if (cond == 18)
+ {
+ htmltext = "31850-05.htm";
+ }
+ break;
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerState(player, npc, State.STARTED);
+ if (st == null)
+ {
+ return null;
+ }
+
+ final int npcId = npc.getNpcId();
+
+ switch (npcId)
+ {
+ case HANGMAN_TREE:
+ if (st.getInt("cond") == 2)
+ {
+ st.set("cond", "3");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(METHEUS_FUNERAL_JAR, 1);
+ st.giveItems(KASANDRA_REMAINS, 1);
+ }
+ break;
+
+ case DEAD_SEEKER:
+ if ((st.getInt("cond") == 6) && st.dropItems(DEAD_SEEKER_DUNG, 1, 10, CHANCES.get(npcId)))
+ {
+ if ((st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
+ {
+ st.set("cond", "7");
+ }
+ }
+ break;
+
+ case TYRANT:
+ case TYRANT_KINGPIN:
+ if ((st.getInt("cond") == 6) && st.dropItems(TYRANT_BLOOD, 1, 10, CHANCES.get(npcId)))
+ {
+ if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
+ {
+ st.set("cond", "7");
+ }
+ }
+ break;
+
+ case MEDUSA:
+ if ((st.getInt("cond") == 6) && st.dropItems(MEDUSA_ICHOR, 1, 10, CHANCES.get(npcId)))
+ {
+ if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
+ {
+ st.set("cond", "7");
+ }
+ }
+ break;
+
+ case MARSH_STAKATO:
+ case MARSH_STAKATO_WORKER:
+ case MARSH_STAKATO_SOLDIER:
+ case MARSH_STAKATO_DRONE:
+ if ((st.getInt("cond") == 6) && st.dropItems(NIGHTSHADE_ROOT, 1, 10, CHANCES.get(npcId)))
+ {
+ if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
+ {
+ st.set("cond", "7");
+ }
+ }
+ break;
+
+ case MARSH_SPIDER:
+ if ((st.getInt("cond") == 6) && st.dropItems(MARSH_SPIDER_FLUIDS, 1, 10, CHANCES.get(npcId)))
+ {
+ if ((st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10))
+ {
+ st.set("cond", "7");
+ }
+ }
+ break;
+
+ case GRANDIS:
+ if (st.hasQuestItems(PIXY_GARNET))
+ {
+ st.dropItemsAlways(GRANDIS_SKULL, 1, 10);
+ }
+ break;
+
+ case LETO_LIZARDMAN_OVERLORD:
+ if (st.hasQuestItems(PIXY_GARNET))
+ {
+ st.dropItemsAlways(LETO_OVERLORD_SKULL, 1, 10);
+ }
+ break;
+
+ case BREKA_ORC_OVERLORD:
+ if (st.hasQuestItems(PIXY_GARNET))
+ {
+ st.dropItemsAlways(BREKA_OVERLORD_SKULL, 1, 10);
+ }
+ break;
+
+ case KARUL_BUGBEAR:
+ if (st.hasQuestItems(PIXY_GARNET))
+ {
+ st.dropItemsAlways(KARUL_BUGBEAR_SKULL, 1, 10);
+ }
+ break;
+
+ case BLACK_WILLOW_LURKER:
+ if (st.hasQuestItems(BLIGHT_TREANT_SEED))
+ {
+ st.dropItemsAlways(BLACK_WILLOW_LEAF, 1, 1);
+ }
+ break;
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q234_FatesWhisper/Q234_FatesWhisper.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q234_FatesWhisper/Q234_FatesWhisper.java
index 33ebb5c5e2..d7cbb85897 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q234_FatesWhisper/Q234_FatesWhisper.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q234_FatesWhisper/Q234_FatesWhisper.java
@@ -1,417 +1,419 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q234_FatesWhisper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.datatables.xml.ItemTable;
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
-
-public class Q234_FatesWhisper extends Quest
-{
- private static final String qn = "Q234_FatesWhisper";
-
- // Items
- private static final int REIRIA_SOUL_ORB = 4666;
- private static final int KERMON_INFERNIUM_SCEPTER = 4667;
- private static final int GOLKONDA_INFERNIUM_SCEPTER = 4668;
- private static final int HALLATE_INFERNIUM_SCEPTER = 4669;
-
- private static final int INFERNIUM_VARNISH = 4672;
- private static final int REORIN_HAMMER = 4670;
- private static final int REORIN_MOLD = 4671;
-
- private static final int PIPETTE_KNIFE = 4665;
- private static final int RED_PIPETTE_KNIFE = 4673;
-
- private static final int CRYSTAL_B = 1460;
-
- // Reward
- private static final int STAR_OF_DESTINY = 5011;
-
- // Chest Spawn
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q234_FatesWhisper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.datatables.xml.ItemTable;
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
+
+public class Q234_FatesWhisper extends Quest
+{
+ private static final String qn = "Q234_FatesWhisper";
+
+ // Items
+ private static final int REIRIA_SOUL_ORB = 4666;
+ private static final int KERMON_INFERNIUM_SCEPTER = 4667;
+ private static final int GOLKONDA_INFERNIUM_SCEPTER = 4668;
+ private static final int HALLATE_INFERNIUM_SCEPTER = 4669;
+
+ private static final int INFERNIUM_VARNISH = 4672;
+ private static final int REORIN_HAMMER = 4670;
+ private static final int REORIN_MOLD = 4671;
+
+ private static final int PIPETTE_KNIFE = 4665;
+ private static final int RED_PIPETTE_KNIFE = 4673;
+
+ private static final int CRYSTAL_B = 1460;
+
+ // Reward
+ private static final int STAR_OF_DESTINY = 5011;
+
+ // Chest Spawn
private static final Map CHEST_SPAWN = new HashMap<>();
- {
- CHEST_SPAWN.put(25035, 31027);
- CHEST_SPAWN.put(25054, 31028);
- CHEST_SPAWN.put(25126, 31029);
- CHEST_SPAWN.put(25220, 31030);
- }
-
- // Weapons
+ static
+ {
+ CHEST_SPAWN.put(25035, 31027);
+ CHEST_SPAWN.put(25054, 31028);
+ CHEST_SPAWN.put(25126, 31029);
+ CHEST_SPAWN.put(25220, 31030);
+ }
+
+ // Weapons
private static final Map WEAPONS = new HashMap<>();
- {
- WEAPONS.put(79, "Sword of Damascus");
- WEAPONS.put(97, "Lance");
- WEAPONS.put(171, "Deadman's Glory");
- WEAPONS.put(175, "Art of Battle Axe");
- WEAPONS.put(210, "Staff of Evil Spirits");
- WEAPONS.put(234, "Demon Dagger");
- WEAPONS.put(268, "Bellion Cestus");
- WEAPONS.put(287, "Bow of Peril");
- WEAPONS.put(2626, "Samurai Dual-sword");
- WEAPONS.put(7883, "Guardian Sword");
- WEAPONS.put(7889, "Wizard's Tear");
- WEAPONS.put(7893, "Kaim Vanul's Bones");
- WEAPONS.put(7901, "Star Buster");
- }
-
- public Q234_FatesWhisper()
- {
- super(234, qn, "Fate's Whispers");
-
- registerQuestItems(PIPETTE_KNIFE, RED_PIPETTE_KNIFE);
-
- addStartNpc(31002);
- addTalkId(31002, 30182, 30847, 30178, 30833, 31028, 31029, 31030, 31027);
-
- // The 4 bosses which spawn chests
- addKillId(25035, 25054, 25126, 25220);
-
- // Baium
- addAttackId(29020);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("31002-03.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30182-01c.htm"))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(INFERNIUM_VARNISH, 1);
- }
- else if (event.equals("30178-01a.htm"))
- {
- st.set("cond", "6");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (event.equals("30833-01b.htm"))
- {
- st.set("cond", "7");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.giveItems(PIPETTE_KNIFE, 1);
- }
- else if (event.startsWith("selectBGrade_"))
- {
- if (st.getInt("bypass") == 1)
- {
- return null;
- }
-
- String bGradeId = event.replace("selectBGrade_", "");
- st.set("weaponId", bGradeId);
- htmltext = getHtmlText("31002-13.htm").replace("%weaponname%", WEAPONS.get(st.getInt("weaponId")));
- }
- else if (event.startsWith("confirmWeapon"))
- {
- st.set("bypass", "1");
- htmltext = getHtmlText("31002-14.htm").replace("%weaponname%", WEAPONS.get(st.getInt("weaponId")));
- }
- else if (event.startsWith("selectAGrade_"))
- {
- if (st.getInt("bypass") == 1)
- {
- final int itemId = st.getInt("weaponId");
- if (st.hasQuestItems(itemId))
- {
- int aGradeItemId = Integer.parseInt(event.replace("selectAGrade_", ""));
-
- htmltext = getHtmlText("31002-12.htm").replace("%weaponname%", ItemTable.getInstance().getTemplate(aGradeItemId).getName());
- st.takeItems(itemId, 1);
- st.giveItems(aGradeItemId, 1);
- st.giveItems(STAR_OF_DESTINY, 1);
- player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(false);
- }
- else
- {
- htmltext = getHtmlText("31002-15.htm").replace("%weaponname%", WEAPONS.get(itemId));
- }
- }
- else
- {
- htmltext = "31002-16.htm";
- }
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 75) ? "31002-01.htm" : "31002-02.htm";
- break;
-
- case State.STARTED:
- int cond = st.getInt("cond");
- switch (npc.getNpcId())
- {
- case 31002:
- if (cond == 1)
- {
- if (!st.hasQuestItems(REIRIA_SOUL_ORB))
- {
- htmltext = "31002-04b.htm";
- }
- else
- {
- htmltext = "31002-05.htm";
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(REIRIA_SOUL_ORB, 1);
- }
- }
- else if (cond == 2)
- {
- if (!st.hasQuestItems(KERMON_INFERNIUM_SCEPTER) || !st.hasQuestItems(GOLKONDA_INFERNIUM_SCEPTER) || !st.hasQuestItems(HALLATE_INFERNIUM_SCEPTER))
- {
- htmltext = "31002-05c.htm";
- }
- else
- {
- htmltext = "31002-06.htm";
- st.set("cond", "3");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(GOLKONDA_INFERNIUM_SCEPTER, 1);
- st.takeItems(HALLATE_INFERNIUM_SCEPTER, 1);
- st.takeItems(KERMON_INFERNIUM_SCEPTER, 1);
- }
- }
- else if (cond == 3)
- {
- if (!st.hasQuestItems(INFERNIUM_VARNISH))
- {
- htmltext = "31002-06b.htm";
- }
- else
- {
- htmltext = "31002-07.htm";
- st.set("cond", "4");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(INFERNIUM_VARNISH, 1);
- }
- }
- else if (cond == 4)
- {
- if (!st.hasQuestItems(REORIN_HAMMER))
- {
- htmltext = "31002-07b.htm";
- }
- else
- {
- htmltext = "31002-08.htm";
- st.set("cond", "5");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(REORIN_HAMMER, 1);
- }
- }
- else if ((cond > 4) && (cond < 8))
- {
- htmltext = "31002-08b.htm";
- }
- else if (cond == 8)
- {
- htmltext = "31002-09.htm";
- st.set("cond", "9");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(REORIN_MOLD, 1);
- }
- else if (cond == 9)
- {
- if (st.getQuestItemsCount(CRYSTAL_B) < 984)
- {
- htmltext = "31002-09b.htm";
- }
- else
- {
- htmltext = "31002-BGradeList.htm";
- st.set("cond", "10");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(CRYSTAL_B, 984);
- }
- }
- else if (cond == 10)
- {
- // If a weapon is selected
- if (st.getInt("bypass") == 1)
- {
- // If you got it in the inventory
- final int itemId = st.getInt("weaponId");
- htmltext = getHtmlText((st.hasQuestItems(itemId)) ? "31002-AGradeList.htm" : "31002-15.htm").replace("%weaponname%", WEAPONS.get(itemId));
- }
- // B weapon is still not selected
- else
- {
- htmltext = "31002-BGradeList.htm";
- }
- }
- break;
-
- case 30182:
- if (cond == 3)
- {
- htmltext = (!st.hasQuestItems(INFERNIUM_VARNISH)) ? "30182-01.htm" : "30182-02.htm";
- }
- break;
-
- case 30847:
- if ((cond == 4) && !st.hasQuestItems(REORIN_HAMMER))
- {
- htmltext = "30847-01.htm";
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(REORIN_HAMMER, 1);
- }
- else if ((cond >= 4) && st.hasQuestItems(REORIN_HAMMER))
- {
- htmltext = "30847-02.htm";
- }
- break;
-
- case 30178:
- if (cond == 5)
- {
- htmltext = "30178-01.htm";
- }
- else if (cond > 5)
- {
- htmltext = "30178-02.htm";
- }
- break;
-
- case 30833:
- if (cond == 6)
- {
- htmltext = "30833-01.htm";
- }
- else if (cond == 7)
- {
- if (st.hasQuestItems(PIPETTE_KNIFE) && !st.hasQuestItems(RED_PIPETTE_KNIFE))
- {
- htmltext = "30833-02.htm";
- }
- else
- {
- htmltext = "30833-03.htm";
- st.set("cond", "8");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(RED_PIPETTE_KNIFE, 1);
- st.giveItems(REORIN_MOLD, 1);
- }
- }
- else if (cond > 7)
- {
- htmltext = "30833-04.htm";
- }
- break;
-
- case 31027:
- if ((cond == 1) && !st.hasQuestItems(REIRIA_SOUL_ORB))
- {
- htmltext = "31027-01.htm";
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(REIRIA_SOUL_ORB, 1);
- }
- else
- {
- htmltext = "31027-02.htm";
- }
- break;
-
- case 31028:
- case 31029:
- case 31030:
- final int itemId = npc.getNpcId() - 26361;
- if ((cond == 2) && !st.hasQuestItems(itemId))
- {
- htmltext = npc.getNpcId() + "-01.htm";
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(itemId, 1);
- }
- else
- {
- htmltext = npc.getNpcId() + "-02.htm";
- }
- break;
- }
- break;
-
- case State.COMPLETED:
- htmltext = getAlreadyCompletedMsg();
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
- {
- QuestState st = checkPlayerCondition(attacker, npc, "cond", "7");
- if (st == null)
- {
- return null;
- }
-
- if ((attacker.getActiveWeaponItem() != null) && (attacker.getActiveWeaponItem().getItemId() == PIPETTE_KNIFE) && !st.hasQuestItems(RED_PIPETTE_KNIFE))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(PIPETTE_KNIFE, 1);
- st.giveItems(RED_PIPETTE_KNIFE, 1);
- }
-
- return null;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- addSpawn(CHEST_SPAWN.get(npc.getNpcId()), npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 120000);
-
- return null;
- }
+ static
+ {
+ WEAPONS.put(79, "Sword of Damascus");
+ WEAPONS.put(97, "Lance");
+ WEAPONS.put(171, "Deadman's Glory");
+ WEAPONS.put(175, "Art of Battle Axe");
+ WEAPONS.put(210, "Staff of Evil Spirits");
+ WEAPONS.put(234, "Demon Dagger");
+ WEAPONS.put(268, "Bellion Cestus");
+ WEAPONS.put(287, "Bow of Peril");
+ WEAPONS.put(2626, "Samurai Dual-sword");
+ WEAPONS.put(7883, "Guardian Sword");
+ WEAPONS.put(7889, "Wizard's Tear");
+ WEAPONS.put(7893, "Kaim Vanul's Bones");
+ WEAPONS.put(7901, "Star Buster");
+ }
+
+ public Q234_FatesWhisper()
+ {
+ super(234, qn, "Fate's Whispers");
+
+ registerQuestItems(PIPETTE_KNIFE, RED_PIPETTE_KNIFE);
+
+ addStartNpc(31002);
+ addTalkId(31002, 30182, 30847, 30178, 30833, 31028, 31029, 31030, 31027);
+
+ // The 4 bosses which spawn chests
+ addKillId(25035, 25054, 25126, 25220);
+
+ // Baium
+ addAttackId(29020);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("31002-03.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30182-01c.htm"))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(INFERNIUM_VARNISH, 1);
+ }
+ else if (event.equals("30178-01a.htm"))
+ {
+ st.set("cond", "6");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (event.equals("30833-01b.htm"))
+ {
+ st.set("cond", "7");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.giveItems(PIPETTE_KNIFE, 1);
+ }
+ else if (event.startsWith("selectBGrade_"))
+ {
+ if (st.getInt("bypass") == 1)
+ {
+ return null;
+ }
+
+ String bGradeId = event.replace("selectBGrade_", "");
+ st.set("weaponId", bGradeId);
+ htmltext = getHtmlText("31002-13.htm").replace("%weaponname%", WEAPONS.get(st.getInt("weaponId")));
+ }
+ else if (event.startsWith("confirmWeapon"))
+ {
+ st.set("bypass", "1");
+ htmltext = getHtmlText("31002-14.htm").replace("%weaponname%", WEAPONS.get(st.getInt("weaponId")));
+ }
+ else if (event.startsWith("selectAGrade_"))
+ {
+ if (st.getInt("bypass") == 1)
+ {
+ final int itemId = st.getInt("weaponId");
+ if (st.hasQuestItems(itemId))
+ {
+ int aGradeItemId = Integer.parseInt(event.replace("selectAGrade_", ""));
+
+ htmltext = getHtmlText("31002-12.htm").replace("%weaponname%", ItemTable.getInstance().getTemplate(aGradeItemId).getName());
+ st.takeItems(itemId, 1);
+ st.giveItems(aGradeItemId, 1);
+ st.giveItems(STAR_OF_DESTINY, 1);
+ player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(false);
+ }
+ else
+ {
+ htmltext = getHtmlText("31002-15.htm").replace("%weaponname%", WEAPONS.get(itemId));
+ }
+ }
+ else
+ {
+ htmltext = "31002-16.htm";
+ }
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 75) ? "31002-01.htm" : "31002-02.htm";
+ break;
+
+ case State.STARTED:
+ int cond = st.getInt("cond");
+ switch (npc.getNpcId())
+ {
+ case 31002:
+ if (cond == 1)
+ {
+ if (!st.hasQuestItems(REIRIA_SOUL_ORB))
+ {
+ htmltext = "31002-04b.htm";
+ }
+ else
+ {
+ htmltext = "31002-05.htm";
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(REIRIA_SOUL_ORB, 1);
+ }
+ }
+ else if (cond == 2)
+ {
+ if (!st.hasQuestItems(KERMON_INFERNIUM_SCEPTER) || !st.hasQuestItems(GOLKONDA_INFERNIUM_SCEPTER) || !st.hasQuestItems(HALLATE_INFERNIUM_SCEPTER))
+ {
+ htmltext = "31002-05c.htm";
+ }
+ else
+ {
+ htmltext = "31002-06.htm";
+ st.set("cond", "3");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(GOLKONDA_INFERNIUM_SCEPTER, 1);
+ st.takeItems(HALLATE_INFERNIUM_SCEPTER, 1);
+ st.takeItems(KERMON_INFERNIUM_SCEPTER, 1);
+ }
+ }
+ else if (cond == 3)
+ {
+ if (!st.hasQuestItems(INFERNIUM_VARNISH))
+ {
+ htmltext = "31002-06b.htm";
+ }
+ else
+ {
+ htmltext = "31002-07.htm";
+ st.set("cond", "4");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(INFERNIUM_VARNISH, 1);
+ }
+ }
+ else if (cond == 4)
+ {
+ if (!st.hasQuestItems(REORIN_HAMMER))
+ {
+ htmltext = "31002-07b.htm";
+ }
+ else
+ {
+ htmltext = "31002-08.htm";
+ st.set("cond", "5");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(REORIN_HAMMER, 1);
+ }
+ }
+ else if ((cond > 4) && (cond < 8))
+ {
+ htmltext = "31002-08b.htm";
+ }
+ else if (cond == 8)
+ {
+ htmltext = "31002-09.htm";
+ st.set("cond", "9");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(REORIN_MOLD, 1);
+ }
+ else if (cond == 9)
+ {
+ if (st.getQuestItemsCount(CRYSTAL_B) < 984)
+ {
+ htmltext = "31002-09b.htm";
+ }
+ else
+ {
+ htmltext = "31002-BGradeList.htm";
+ st.set("cond", "10");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(CRYSTAL_B, 984);
+ }
+ }
+ else if (cond == 10)
+ {
+ // If a weapon is selected
+ if (st.getInt("bypass") == 1)
+ {
+ // If you got it in the inventory
+ final int itemId = st.getInt("weaponId");
+ htmltext = getHtmlText((st.hasQuestItems(itemId)) ? "31002-AGradeList.htm" : "31002-15.htm").replace("%weaponname%", WEAPONS.get(itemId));
+ }
+ // B weapon is still not selected
+ else
+ {
+ htmltext = "31002-BGradeList.htm";
+ }
+ }
+ break;
+
+ case 30182:
+ if (cond == 3)
+ {
+ htmltext = (!st.hasQuestItems(INFERNIUM_VARNISH)) ? "30182-01.htm" : "30182-02.htm";
+ }
+ break;
+
+ case 30847:
+ if ((cond == 4) && !st.hasQuestItems(REORIN_HAMMER))
+ {
+ htmltext = "30847-01.htm";
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(REORIN_HAMMER, 1);
+ }
+ else if ((cond >= 4) && st.hasQuestItems(REORIN_HAMMER))
+ {
+ htmltext = "30847-02.htm";
+ }
+ break;
+
+ case 30178:
+ if (cond == 5)
+ {
+ htmltext = "30178-01.htm";
+ }
+ else if (cond > 5)
+ {
+ htmltext = "30178-02.htm";
+ }
+ break;
+
+ case 30833:
+ if (cond == 6)
+ {
+ htmltext = "30833-01.htm";
+ }
+ else if (cond == 7)
+ {
+ if (st.hasQuestItems(PIPETTE_KNIFE) && !st.hasQuestItems(RED_PIPETTE_KNIFE))
+ {
+ htmltext = "30833-02.htm";
+ }
+ else
+ {
+ htmltext = "30833-03.htm";
+ st.set("cond", "8");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(RED_PIPETTE_KNIFE, 1);
+ st.giveItems(REORIN_MOLD, 1);
+ }
+ }
+ else if (cond > 7)
+ {
+ htmltext = "30833-04.htm";
+ }
+ break;
+
+ case 31027:
+ if ((cond == 1) && !st.hasQuestItems(REIRIA_SOUL_ORB))
+ {
+ htmltext = "31027-01.htm";
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(REIRIA_SOUL_ORB, 1);
+ }
+ else
+ {
+ htmltext = "31027-02.htm";
+ }
+ break;
+
+ case 31028:
+ case 31029:
+ case 31030:
+ final int itemId = npc.getNpcId() - 26361;
+ if ((cond == 2) && !st.hasQuestItems(itemId))
+ {
+ htmltext = npc.getNpcId() + "-01.htm";
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(itemId, 1);
+ }
+ else
+ {
+ htmltext = npc.getNpcId() + "-02.htm";
+ }
+ break;
+ }
+ break;
+
+ case State.COMPLETED:
+ htmltext = getAlreadyCompletedMsg();
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
+ {
+ QuestState st = checkPlayerCondition(attacker, npc, "cond", "7");
+ if (st == null)
+ {
+ return null;
+ }
+
+ if ((attacker.getActiveWeaponItem() != null) && (attacker.getActiveWeaponItem().getItemId() == PIPETTE_KNIFE) && !st.hasQuestItems(RED_PIPETTE_KNIFE))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(PIPETTE_KNIFE, 1);
+ st.giveItems(RED_PIPETTE_KNIFE, 1);
+ }
+
+ return null;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ addSpawn(CHEST_SPAWN.get(npc.getNpcId()), npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 120000);
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q300_HuntingLetoLizardman/Q300_HuntingLetoLizardman.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q300_HuntingLetoLizardman/Q300_HuntingLetoLizardman.java
index 301bf23b80..034e9507f1 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q300_HuntingLetoLizardman/Q300_HuntingLetoLizardman.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q300_HuntingLetoLizardman/Q300_HuntingLetoLizardman.java
@@ -1,156 +1,157 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q300_HuntingLetoLizardman;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.util.Rnd;
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q300_HuntingLetoLizardman extends Quest
-{
- private static final String qn = "Q300_HuntingLetoLizardman";
-
- // Item
- private static final int BRACELET = 7139;
-
- // Monsters
- private static final int LETO_LIZARDMAN = 20577;
- private static final int LETO_LIZARDMAN_ARCHER = 20578;
- private static final int LETO_LIZARDMAN_SOLDIER = 20579;
- private static final int LETO_LIZARDMAN_WARRIOR = 20580;
- private static final int LETO_LIZARDMAN_OVERLORD = 20582;
-
- // Drop chances
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q300_HuntingLetoLizardman;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.util.Rnd;
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q300_HuntingLetoLizardman extends Quest
+{
+ private static final String qn = "Q300_HuntingLetoLizardman";
+
+ // Item
+ private static final int BRACELET = 7139;
+
+ // Monsters
+ private static final int LETO_LIZARDMAN = 20577;
+ private static final int LETO_LIZARDMAN_ARCHER = 20578;
+ private static final int LETO_LIZARDMAN_SOLDIER = 20579;
+ private static final int LETO_LIZARDMAN_WARRIOR = 20580;
+ private static final int LETO_LIZARDMAN_OVERLORD = 20582;
+
+ // Drop chances
private static final Map CHANCES = new HashMap<>();
- {
- CHANCES.put(LETO_LIZARDMAN, 300000);
- CHANCES.put(LETO_LIZARDMAN_ARCHER, 320000);
- CHANCES.put(LETO_LIZARDMAN_SOLDIER, 350000);
- CHANCES.put(LETO_LIZARDMAN_WARRIOR, 650000);
- CHANCES.put(LETO_LIZARDMAN_OVERLORD, 700000);
- }
-
- public Q300_HuntingLetoLizardman()
- {
- super(300, qn, "Hunting Leto Lizardman");
-
- registerQuestItems(BRACELET);
-
- addStartNpc(30126); // Rath
- addTalkId(30126);
-
- addKillId(LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_OVERLORD);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30126-03.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30126-05.htm"))
- {
- if (st.getQuestItemsCount(BRACELET) >= 60)
- {
- htmltext = "30126-06.htm";
- st.takeItems(BRACELET, -1);
-
- final int luck = Rnd.get(3);
- if (luck == 0)
- {
- st.rewardItems(57, 30000);
- }
- else if (luck == 1)
- {
- st.rewardItems(1867, 50);
- }
- else if (luck == 2)
- {
- st.rewardItems(1872, 50);
- }
-
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(true);
- }
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 34) ? "30126-01.htm" : "30126-02.htm";
- break;
-
- case State.STARTED:
- htmltext = (st.getInt("cond") == 1) ? "30126-04a.htm" : "30126-04.htm";
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- PlayerInstance partyMember = getRandomPartyMember(player, npc, "1");
- if (partyMember == null)
- {
- return null;
- }
-
- QuestState st = partyMember.getQuestState(qn);
- if (st == null)
- {
- return null;
- }
-
- if (st.dropItems(BRACELET, 1, 60, CHANCES.get(npc.getNpcId())))
- {
- st.set("cond", "2");
- }
-
- return null;
- }
+ static
+ {
+ CHANCES.put(LETO_LIZARDMAN, 300000);
+ CHANCES.put(LETO_LIZARDMAN_ARCHER, 320000);
+ CHANCES.put(LETO_LIZARDMAN_SOLDIER, 350000);
+ CHANCES.put(LETO_LIZARDMAN_WARRIOR, 650000);
+ CHANCES.put(LETO_LIZARDMAN_OVERLORD, 700000);
+ }
+
+ public Q300_HuntingLetoLizardman()
+ {
+ super(300, qn, "Hunting Leto Lizardman");
+
+ registerQuestItems(BRACELET);
+
+ addStartNpc(30126); // Rath
+ addTalkId(30126);
+
+ addKillId(LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_OVERLORD);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30126-03.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30126-05.htm"))
+ {
+ if (st.getQuestItemsCount(BRACELET) >= 60)
+ {
+ htmltext = "30126-06.htm";
+ st.takeItems(BRACELET, -1);
+
+ final int luck = Rnd.get(3);
+ if (luck == 0)
+ {
+ st.rewardItems(57, 30000);
+ }
+ else if (luck == 1)
+ {
+ st.rewardItems(1867, 50);
+ }
+ else if (luck == 2)
+ {
+ st.rewardItems(1872, 50);
+ }
+
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(true);
+ }
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 34) ? "30126-01.htm" : "30126-02.htm";
+ break;
+
+ case State.STARTED:
+ htmltext = (st.getInt("cond") == 1) ? "30126-04a.htm" : "30126-04.htm";
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ PlayerInstance partyMember = getRandomPartyMember(player, npc, "1");
+ if (partyMember == null)
+ {
+ return null;
+ }
+
+ QuestState st = partyMember.getQuestState(qn);
+ if (st == null)
+ {
+ return null;
+ }
+
+ if (st.dropItems(BRACELET, 1, 60, CHANCES.get(npc.getNpcId())))
+ {
+ st.set("cond", "2");
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q324_SweetestVenom/Q324_SweetestVenom.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q324_SweetestVenom/Q324_SweetestVenom.java
index b43efd4837..6d2126d706 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q324_SweetestVenom/Q324_SweetestVenom.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q324_SweetestVenom/Q324_SweetestVenom.java
@@ -1,126 +1,127 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q324_SweetestVenom;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q324_SweetestVenom extends Quest
-{
- private static final String qn = "Q324_SweetestVenom";
-
- // Item
- private static final int VENOM_SAC = 1077;
-
- // Drop chances
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q324_SweetestVenom;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q324_SweetestVenom extends Quest
+{
+ private static final String qn = "Q324_SweetestVenom";
+
+ // Item
+ private static final int VENOM_SAC = 1077;
+
+ // Drop chances
private static final Map CHANCES = new HashMap<>();
- {
- CHANCES.put(20034, 220000);
- CHANCES.put(20038, 230000);
- CHANCES.put(20043, 250000);
- }
-
- public Q324_SweetestVenom()
- {
- super(324, qn, "Sweetest Venom");
-
- registerQuestItems(VENOM_SAC);
-
- addStartNpc(30351); // Astaron
- addTalkId(30351);
-
- addKillId(20034, 20038, 20043);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30351-04.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 18) ? "30351-02.htm" : "30351-03.htm";
- break;
-
- case State.STARTED:
- if (st.getInt("cond") == 1)
- {
- htmltext = "30351-05.htm";
- }
- else
- {
- htmltext = "30351-06.htm";
- st.takeItems(VENOM_SAC, -1);
- st.rewardItems(57, 5810);
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(true);
- }
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerCondition(player, npc, "cond", "1");
- if (st == null)
- {
- return null;
- }
-
- if (st.dropItems(VENOM_SAC, 1, 10, CHANCES.get(npc.getNpcId())))
- {
- st.set("cond", "2");
- }
-
- return null;
- }
+ static
+ {
+ CHANCES.put(20034, 220000);
+ CHANCES.put(20038, 230000);
+ CHANCES.put(20043, 250000);
+ }
+
+ public Q324_SweetestVenom()
+ {
+ super(324, qn, "Sweetest Venom");
+
+ registerQuestItems(VENOM_SAC);
+
+ addStartNpc(30351); // Astaron
+ addTalkId(30351);
+
+ addKillId(20034, 20038, 20043);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30351-04.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 18) ? "30351-02.htm" : "30351-03.htm";
+ break;
+
+ case State.STARTED:
+ if (st.getInt("cond") == 1)
+ {
+ htmltext = "30351-05.htm";
+ }
+ else
+ {
+ htmltext = "30351-06.htm";
+ st.takeItems(VENOM_SAC, -1);
+ st.rewardItems(57, 5810);
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(true);
+ }
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerCondition(player, npc, "cond", "1");
+ if (st == null)
+ {
+ return null;
+ }
+
+ if (st.dropItems(VENOM_SAC, 1, 10, CHANCES.get(npc.getNpcId())))
+ {
+ st.set("cond", "2");
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q325_GrimCollector/Q325_GrimCollector.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q325_GrimCollector/Q325_GrimCollector.java
index 3a9304cad0..1977a44ecf 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q325_GrimCollector/Q325_GrimCollector.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q325_GrimCollector/Q325_GrimCollector.java
@@ -1,262 +1,263 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q325_GrimCollector;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.l2jmobius.commons.util.Rnd;
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.holders.ItemHolder;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q325_GrimCollector extends Quest
-{
- private static final String qn = "Q325_GrimCollector";
-
- // Items
- private static final int ANATOMY_DIAGRAM = 1349;
- private static final int ZOMBIE_HEAD = 1350;
- private static final int ZOMBIE_HEART = 1351;
- private static final int ZOMBIE_LIVER = 1352;
- private static final int SKULL = 1353;
- private static final int RIB_BONE = 1354;
- private static final int SPINE = 1355;
- private static final int ARM_BONE = 1356;
- private static final int THIGH_BONE = 1357;
- private static final int COMPLETE_SKELETON = 1358;
-
- // NPCs
- private static final int CURTIS = 30336;
- private static final int VARSAK = 30342;
- private static final int SAMED = 30434;
-
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q325_GrimCollector;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jmobius.commons.util.Rnd;
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.holders.ItemHolder;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q325_GrimCollector extends Quest
+{
+ private static final String qn = "Q325_GrimCollector";
+
+ // Items
+ private static final int ANATOMY_DIAGRAM = 1349;
+ private static final int ZOMBIE_HEAD = 1350;
+ private static final int ZOMBIE_HEART = 1351;
+ private static final int ZOMBIE_LIVER = 1352;
+ private static final int SKULL = 1353;
+ private static final int RIB_BONE = 1354;
+ private static final int SPINE = 1355;
+ private static final int ARM_BONE = 1356;
+ private static final int THIGH_BONE = 1357;
+ private static final int COMPLETE_SKELETON = 1358;
+
+ // NPCs
+ private static final int CURTIS = 30336;
+ private static final int VARSAK = 30342;
+ private static final int SAMED = 30434;
+
private static final Map> DROPLIST = new HashMap<>();
- {
- DROPLIST.put(20026, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 30), new ItemHolder(ZOMBIE_HEART, 50), new ItemHolder(ZOMBIE_LIVER, 75)));
- DROPLIST.put(20029, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 30), new ItemHolder(ZOMBIE_HEART, 52), new ItemHolder(ZOMBIE_LIVER, 75)));
- DROPLIST.put(20035, Arrays.asList(new ItemHolder(SKULL, 5), new ItemHolder(RIB_BONE, 15), new ItemHolder(SPINE, 29), new ItemHolder(THIGH_BONE, 79)));
- DROPLIST.put(20042, Arrays.asList(new ItemHolder(SKULL, 6), new ItemHolder(RIB_BONE, 19), new ItemHolder(ARM_BONE, 69), new ItemHolder(THIGH_BONE, 86)));
- DROPLIST.put(20045, Arrays.asList(new ItemHolder(SKULL, 9), new ItemHolder(SPINE, 59), new ItemHolder(ARM_BONE, 77), new ItemHolder(THIGH_BONE, 97)));
- DROPLIST.put(20051, Arrays.asList(new ItemHolder(SKULL, 9), new ItemHolder(RIB_BONE, 59), new ItemHolder(SPINE, 79), new ItemHolder(ARM_BONE, 100)));
- DROPLIST.put(20457, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 40), new ItemHolder(ZOMBIE_HEART, 60), new ItemHolder(ZOMBIE_LIVER, 80)));
- DROPLIST.put(20458, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 40), new ItemHolder(ZOMBIE_HEART, 70), new ItemHolder(ZOMBIE_LIVER, 100)));
- DROPLIST.put(20514, Arrays.asList(new ItemHolder(SKULL, 6), new ItemHolder(RIB_BONE, 21), new ItemHolder(SPINE, 30), new ItemHolder(ARM_BONE, 31), new ItemHolder(THIGH_BONE, 64)));
- DROPLIST.put(20515, Arrays.asList(new ItemHolder(SKULL, 5), new ItemHolder(RIB_BONE, 20), new ItemHolder(SPINE, 31), new ItemHolder(ARM_BONE, 33), new ItemHolder(THIGH_BONE, 69)));
- }
-
- public Q325_GrimCollector()
- {
- super(325, qn, "Grim Collector");
-
- registerQuestItems(ZOMBIE_HEAD, ZOMBIE_HEART, ZOMBIE_LIVER, SKULL, RIB_BONE, SPINE, ARM_BONE, THIGH_BONE, COMPLETE_SKELETON, ANATOMY_DIAGRAM);
-
- addStartNpc(CURTIS);
- addTalkId(CURTIS, VARSAK, SAMED);
-
- for (int npcId : DROPLIST.keySet())
- {
- addKillId(npcId);
- }
- }
-
- private static int getNumberOfPieces(QuestState st)
- {
- return st.getQuestItemsCount(ZOMBIE_HEAD) + st.getQuestItemsCount(SPINE) + st.getQuestItemsCount(ARM_BONE) + st.getQuestItemsCount(ZOMBIE_HEART) + st.getQuestItemsCount(ZOMBIE_LIVER) + st.getQuestItemsCount(SKULL) + st.getQuestItemsCount(RIB_BONE) + st.getQuestItemsCount(THIGH_BONE) + st.getQuestItemsCount(COMPLETE_SKELETON);
- }
-
- private static void payback(QuestState st)
- {
- final int count = getNumberOfPieces(st);
- if (count > 0)
- {
- int reward = (30 * st.getQuestItemsCount(ZOMBIE_HEAD)) + (20 * st.getQuestItemsCount(ZOMBIE_HEART)) + (20 * st.getQuestItemsCount(ZOMBIE_LIVER)) + (100 * st.getQuestItemsCount(SKULL)) + (40 * st.getQuestItemsCount(RIB_BONE)) + (14 * st.getQuestItemsCount(SPINE)) + (14 * st.getQuestItemsCount(ARM_BONE)) + (14 * st.getQuestItemsCount(THIGH_BONE)) + (341 * st.getQuestItemsCount(COMPLETE_SKELETON));
- if (count > 10)
- {
- reward += 1629;
- }
-
- if (st.hasQuestItems(COMPLETE_SKELETON))
- {
- reward += 543;
- }
-
- st.takeItems(ZOMBIE_HEAD, -1);
- st.takeItems(ZOMBIE_HEART, -1);
- st.takeItems(ZOMBIE_LIVER, -1);
- st.takeItems(SKULL, -1);
- st.takeItems(RIB_BONE, -1);
- st.takeItems(SPINE, -1);
- st.takeItems(ARM_BONE, -1);
- st.takeItems(THIGH_BONE, -1);
- st.takeItems(COMPLETE_SKELETON, -1);
-
- st.rewardItems(57, reward);
- }
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- if (event.equals("30336-03.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30434-03.htm"))
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.giveItems(ANATOMY_DIAGRAM, 1);
- }
- else if (event.equals("30434-06.htm"))
- {
- st.takeItems(ANATOMY_DIAGRAM, -1);
- payback(st);
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(true);
- }
- else if (event.equals("30434-07.htm"))
- {
- payback(st);
- }
- else if (event.equals("30434-09.htm"))
- {
- final int skeletons = st.getQuestItemsCount(COMPLETE_SKELETON);
- if (skeletons > 0)
- {
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(COMPLETE_SKELETON, -1);
- st.rewardItems(57, 543 + (341 * skeletons));
- }
- }
- else if (event.equals("30342-03.htm"))
- {
- if (!st.hasQuestItems(SPINE, ARM_BONE, SKULL, RIB_BONE, THIGH_BONE))
- {
- htmltext = "30342-02.htm";
- }
- else
- {
- st.takeItems(SPINE, 1);
- st.takeItems(SKULL, 1);
- st.takeItems(ARM_BONE, 1);
- st.takeItems(RIB_BONE, 1);
- st.takeItems(THIGH_BONE, 1);
-
- if (Rnd.get(10) < 9)
- {
- st.giveItems(COMPLETE_SKELETON, 1);
- }
- else
- {
- htmltext = "30342-04.htm";
- }
- }
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- QuestState st = player.getQuestState(qn);
- String htmltext = getNoQuestMsg();
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = (player.getLevel() < 15) ? "30336-01.htm" : "30336-02.htm";
- break;
-
- case State.STARTED:
- switch (npc.getNpcId())
- {
- case CURTIS:
- htmltext = (!st.hasQuestItems(ANATOMY_DIAGRAM)) ? "30336-04.htm" : "30336-05.htm";
- break;
-
- case SAMED:
- if (!st.hasQuestItems(ANATOMY_DIAGRAM))
- {
- htmltext = "30434-01.htm";
- }
- else
- {
- if (getNumberOfPieces(st) == 0)
- {
- htmltext = "30434-04.htm";
- }
- else
- {
- htmltext = (!st.hasQuestItems(COMPLETE_SKELETON)) ? "30434-05.htm" : "30434-08.htm";
- }
- }
- break;
-
- case VARSAK:
- htmltext = "30342-01.htm";
- break;
- }
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerState(player, npc, State.STARTED);
- if (st == null)
- {
- return null;
- }
-
- if (st.hasQuestItems(ANATOMY_DIAGRAM))
- {
- final int chance = Rnd.get(100);
- for (ItemHolder drop : DROPLIST.get(npc.getNpcId()))
- {
- if (chance < drop.getCount())
- {
- st.dropItemsAlways(drop.getId(), 1, 0);
- break;
- }
- }
- }
-
- return null;
- }
+ static
+ {
+ DROPLIST.put(20026, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 30), new ItemHolder(ZOMBIE_HEART, 50), new ItemHolder(ZOMBIE_LIVER, 75)));
+ DROPLIST.put(20029, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 30), new ItemHolder(ZOMBIE_HEART, 52), new ItemHolder(ZOMBIE_LIVER, 75)));
+ DROPLIST.put(20035, Arrays.asList(new ItemHolder(SKULL, 5), new ItemHolder(RIB_BONE, 15), new ItemHolder(SPINE, 29), new ItemHolder(THIGH_BONE, 79)));
+ DROPLIST.put(20042, Arrays.asList(new ItemHolder(SKULL, 6), new ItemHolder(RIB_BONE, 19), new ItemHolder(ARM_BONE, 69), new ItemHolder(THIGH_BONE, 86)));
+ DROPLIST.put(20045, Arrays.asList(new ItemHolder(SKULL, 9), new ItemHolder(SPINE, 59), new ItemHolder(ARM_BONE, 77), new ItemHolder(THIGH_BONE, 97)));
+ DROPLIST.put(20051, Arrays.asList(new ItemHolder(SKULL, 9), new ItemHolder(RIB_BONE, 59), new ItemHolder(SPINE, 79), new ItemHolder(ARM_BONE, 100)));
+ DROPLIST.put(20457, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 40), new ItemHolder(ZOMBIE_HEART, 60), new ItemHolder(ZOMBIE_LIVER, 80)));
+ DROPLIST.put(20458, Arrays.asList(new ItemHolder(ZOMBIE_HEAD, 40), new ItemHolder(ZOMBIE_HEART, 70), new ItemHolder(ZOMBIE_LIVER, 100)));
+ DROPLIST.put(20514, Arrays.asList(new ItemHolder(SKULL, 6), new ItemHolder(RIB_BONE, 21), new ItemHolder(SPINE, 30), new ItemHolder(ARM_BONE, 31), new ItemHolder(THIGH_BONE, 64)));
+ DROPLIST.put(20515, Arrays.asList(new ItemHolder(SKULL, 5), new ItemHolder(RIB_BONE, 20), new ItemHolder(SPINE, 31), new ItemHolder(ARM_BONE, 33), new ItemHolder(THIGH_BONE, 69)));
+ }
+
+ public Q325_GrimCollector()
+ {
+ super(325, qn, "Grim Collector");
+
+ registerQuestItems(ZOMBIE_HEAD, ZOMBIE_HEART, ZOMBIE_LIVER, SKULL, RIB_BONE, SPINE, ARM_BONE, THIGH_BONE, COMPLETE_SKELETON, ANATOMY_DIAGRAM);
+
+ addStartNpc(CURTIS);
+ addTalkId(CURTIS, VARSAK, SAMED);
+
+ for (int npcId : DROPLIST.keySet())
+ {
+ addKillId(npcId);
+ }
+ }
+
+ private static int getNumberOfPieces(QuestState st)
+ {
+ return st.getQuestItemsCount(ZOMBIE_HEAD) + st.getQuestItemsCount(SPINE) + st.getQuestItemsCount(ARM_BONE) + st.getQuestItemsCount(ZOMBIE_HEART) + st.getQuestItemsCount(ZOMBIE_LIVER) + st.getQuestItemsCount(SKULL) + st.getQuestItemsCount(RIB_BONE) + st.getQuestItemsCount(THIGH_BONE) + st.getQuestItemsCount(COMPLETE_SKELETON);
+ }
+
+ private static void payback(QuestState st)
+ {
+ final int count = getNumberOfPieces(st);
+ if (count > 0)
+ {
+ int reward = (30 * st.getQuestItemsCount(ZOMBIE_HEAD)) + (20 * st.getQuestItemsCount(ZOMBIE_HEART)) + (20 * st.getQuestItemsCount(ZOMBIE_LIVER)) + (100 * st.getQuestItemsCount(SKULL)) + (40 * st.getQuestItemsCount(RIB_BONE)) + (14 * st.getQuestItemsCount(SPINE)) + (14 * st.getQuestItemsCount(ARM_BONE)) + (14 * st.getQuestItemsCount(THIGH_BONE)) + (341 * st.getQuestItemsCount(COMPLETE_SKELETON));
+ if (count > 10)
+ {
+ reward += 1629;
+ }
+
+ if (st.hasQuestItems(COMPLETE_SKELETON))
+ {
+ reward += 543;
+ }
+
+ st.takeItems(ZOMBIE_HEAD, -1);
+ st.takeItems(ZOMBIE_HEART, -1);
+ st.takeItems(ZOMBIE_LIVER, -1);
+ st.takeItems(SKULL, -1);
+ st.takeItems(RIB_BONE, -1);
+ st.takeItems(SPINE, -1);
+ st.takeItems(ARM_BONE, -1);
+ st.takeItems(THIGH_BONE, -1);
+ st.takeItems(COMPLETE_SKELETON, -1);
+
+ st.rewardItems(57, reward);
+ }
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ if (event.equals("30336-03.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30434-03.htm"))
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.giveItems(ANATOMY_DIAGRAM, 1);
+ }
+ else if (event.equals("30434-06.htm"))
+ {
+ st.takeItems(ANATOMY_DIAGRAM, -1);
+ payback(st);
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(true);
+ }
+ else if (event.equals("30434-07.htm"))
+ {
+ payback(st);
+ }
+ else if (event.equals("30434-09.htm"))
+ {
+ final int skeletons = st.getQuestItemsCount(COMPLETE_SKELETON);
+ if (skeletons > 0)
+ {
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(COMPLETE_SKELETON, -1);
+ st.rewardItems(57, 543 + (341 * skeletons));
+ }
+ }
+ else if (event.equals("30342-03.htm"))
+ {
+ if (!st.hasQuestItems(SPINE, ARM_BONE, SKULL, RIB_BONE, THIGH_BONE))
+ {
+ htmltext = "30342-02.htm";
+ }
+ else
+ {
+ st.takeItems(SPINE, 1);
+ st.takeItems(SKULL, 1);
+ st.takeItems(ARM_BONE, 1);
+ st.takeItems(RIB_BONE, 1);
+ st.takeItems(THIGH_BONE, 1);
+
+ if (Rnd.get(10) < 9)
+ {
+ st.giveItems(COMPLETE_SKELETON, 1);
+ }
+ else
+ {
+ htmltext = "30342-04.htm";
+ }
+ }
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ QuestState st = player.getQuestState(qn);
+ String htmltext = getNoQuestMsg();
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = (player.getLevel() < 15) ? "30336-01.htm" : "30336-02.htm";
+ break;
+
+ case State.STARTED:
+ switch (npc.getNpcId())
+ {
+ case CURTIS:
+ htmltext = (!st.hasQuestItems(ANATOMY_DIAGRAM)) ? "30336-04.htm" : "30336-05.htm";
+ break;
+
+ case SAMED:
+ if (!st.hasQuestItems(ANATOMY_DIAGRAM))
+ {
+ htmltext = "30434-01.htm";
+ }
+ else
+ {
+ if (getNumberOfPieces(st) == 0)
+ {
+ htmltext = "30434-04.htm";
+ }
+ else
+ {
+ htmltext = (!st.hasQuestItems(COMPLETE_SKELETON)) ? "30434-05.htm" : "30434-08.htm";
+ }
+ }
+ break;
+
+ case VARSAK:
+ htmltext = "30342-01.htm";
+ break;
+ }
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerState(player, npc, State.STARTED);
+ if (st == null)
+ {
+ return null;
+ }
+
+ if (st.hasQuestItems(ANATOMY_DIAGRAM))
+ {
+ final int chance = Rnd.get(100);
+ for (ItemHolder drop : DROPLIST.get(npc.getNpcId()))
+ {
+ if (chance < drop.getCount())
+ {
+ st.dropItemsAlways(drop.getId(), 1, 0);
+ break;
+ }
+ }
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q327_RecoverTheFarmland/Q327_RecoverTheFarmland.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q327_RecoverTheFarmland/Q327_RecoverTheFarmland.java
index 65a6ba9087..2c0e67e237 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q327_RecoverTheFarmland/Q327_RecoverTheFarmland.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q327_RecoverTheFarmland/Q327_RecoverTheFarmland.java
@@ -1,475 +1,476 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package quests.Q327_RecoverTheFarmland;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jmobius.commons.util.Rnd;
-import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
-import com.l2jmobius.gameserver.model.quest.Quest;
-import com.l2jmobius.gameserver.model.quest.QuestState;
-import com.l2jmobius.gameserver.model.quest.State;
-
-public class Q327_RecoverTheFarmland extends Quest
-{
- private static final String qn = "Q327_RecoverTheFarmland";
-
- // Items
- private static final int LEIKAN_LETTER = 5012;
- private static final int TUREK_DOGTAG = 1846;
- private static final int TUREK_MEDALLION = 1847;
- private static final int CLAY_URN_FRAGMENT = 1848;
- private static final int BRASS_TRINKET_PIECE = 1849;
- private static final int BRONZE_MIRROR_PIECE = 1850;
- private static final int JADE_NECKLACE_BEAD = 1851;
- private static final int ANCIENT_CLAY_URN = 1852;
- private static final int ANCIENT_BRASS_TIARA = 1853;
- private static final int ANCIENT_BRONZE_MIRROR = 1854;
- private static final int ANCIENT_JADE_NECKLACE = 1855;
-
- // Rewards
- private static final int ADENA = 57;
- private static final int SOULSHOT_D = 1463;
- private static final int SPIRITSHOT_D = 2510;
- private static final int HEALING_POTION = 1061;
- private static final int HASTE_POTION = 734;
- private static final int POTION_OF_ALACRITY = 735;
- private static final int SCROLL_OF_ESCAPE = 736;
- private static final int SCROLL_OF_RESURRECTION = 737;
-
- // NPCs
- private static final int LEIKAN = 30382;
- private static final int PIOTUR = 30597;
- private static final int IRIS = 30034;
- private static final int ASHA = 30313;
- private static final int NESTLE = 30314;
-
- // Monsters
- private static final int TUREK_ORC_WARLORD = 20495;
- private static final int TUREK_ORC_ARCHER = 20496;
- private static final int TUREK_ORC_SKIRMISHER = 20497;
- private static final int TUREK_ORC_SUPPLIER = 20498;
- private static final int TUREK_ORC_FOOTMAN = 20499;
- private static final int TUREK_ORC_SENTINEL = 20500;
- private static final int TUREK_ORC_SHAMAN = 20501;
-
- // Chances
- private static final int[][] DROPLIST =
- {
- {
- TUREK_ORC_ARCHER,
- 140000,
- TUREK_DOGTAG
- },
- {
- TUREK_ORC_SKIRMISHER,
- 70000,
- TUREK_DOGTAG
- },
- {
- TUREK_ORC_SUPPLIER,
- 120000,
- TUREK_DOGTAG
- },
- {
- TUREK_ORC_FOOTMAN,
- 100000,
- TUREK_DOGTAG
- },
- {
- TUREK_ORC_SENTINEL,
- 80000,
- TUREK_DOGTAG
- },
- {
- TUREK_ORC_SHAMAN,
- 90000,
- TUREK_MEDALLION
- },
- {
- TUREK_ORC_WARLORD,
- 180000,
- TUREK_MEDALLION
- }
- };
-
- // Exp
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q327_RecoverTheFarmland;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jmobius.commons.util.Rnd;
+import com.l2jmobius.gameserver.model.actor.instance.NpcInstance;
+import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import com.l2jmobius.gameserver.model.quest.Quest;
+import com.l2jmobius.gameserver.model.quest.QuestState;
+import com.l2jmobius.gameserver.model.quest.State;
+
+public class Q327_RecoverTheFarmland extends Quest
+{
+ private static final String qn = "Q327_RecoverTheFarmland";
+
+ // Items
+ private static final int LEIKAN_LETTER = 5012;
+ private static final int TUREK_DOGTAG = 1846;
+ private static final int TUREK_MEDALLION = 1847;
+ private static final int CLAY_URN_FRAGMENT = 1848;
+ private static final int BRASS_TRINKET_PIECE = 1849;
+ private static final int BRONZE_MIRROR_PIECE = 1850;
+ private static final int JADE_NECKLACE_BEAD = 1851;
+ private static final int ANCIENT_CLAY_URN = 1852;
+ private static final int ANCIENT_BRASS_TIARA = 1853;
+ private static final int ANCIENT_BRONZE_MIRROR = 1854;
+ private static final int ANCIENT_JADE_NECKLACE = 1855;
+
+ // Rewards
+ private static final int ADENA = 57;
+ private static final int SOULSHOT_D = 1463;
+ private static final int SPIRITSHOT_D = 2510;
+ private static final int HEALING_POTION = 1061;
+ private static final int HASTE_POTION = 734;
+ private static final int POTION_OF_ALACRITY = 735;
+ private static final int SCROLL_OF_ESCAPE = 736;
+ private static final int SCROLL_OF_RESURRECTION = 737;
+
+ // NPCs
+ private static final int LEIKAN = 30382;
+ private static final int PIOTUR = 30597;
+ private static final int IRIS = 30034;
+ private static final int ASHA = 30313;
+ private static final int NESTLE = 30314;
+
+ // Monsters
+ private static final int TUREK_ORC_WARLORD = 20495;
+ private static final int TUREK_ORC_ARCHER = 20496;
+ private static final int TUREK_ORC_SKIRMISHER = 20497;
+ private static final int TUREK_ORC_SUPPLIER = 20498;
+ private static final int TUREK_ORC_FOOTMAN = 20499;
+ private static final int TUREK_ORC_SENTINEL = 20500;
+ private static final int TUREK_ORC_SHAMAN = 20501;
+
+ // Chances
+ private static final int[][] DROPLIST =
+ {
+ {
+ TUREK_ORC_ARCHER,
+ 140000,
+ TUREK_DOGTAG
+ },
+ {
+ TUREK_ORC_SKIRMISHER,
+ 70000,
+ TUREK_DOGTAG
+ },
+ {
+ TUREK_ORC_SUPPLIER,
+ 120000,
+ TUREK_DOGTAG
+ },
+ {
+ TUREK_ORC_FOOTMAN,
+ 100000,
+ TUREK_DOGTAG
+ },
+ {
+ TUREK_ORC_SENTINEL,
+ 80000,
+ TUREK_DOGTAG
+ },
+ {
+ TUREK_ORC_SHAMAN,
+ 90000,
+ TUREK_MEDALLION
+ },
+ {
+ TUREK_ORC_WARLORD,
+ 180000,
+ TUREK_MEDALLION
+ }
+ };
+
+ // Exp
private static final Map EXP_REWARD = new HashMap<>();
- {
- EXP_REWARD.put(ANCIENT_CLAY_URN, 2766);
- EXP_REWARD.put(ANCIENT_BRASS_TIARA, 3227);
- EXP_REWARD.put(ANCIENT_BRONZE_MIRROR, 3227);
- EXP_REWARD.put(ANCIENT_JADE_NECKLACE, 3919);
- }
-
- public Q327_RecoverTheFarmland()
- {
- super(327, qn, "Recover the Farmland");
-
- registerQuestItems(LEIKAN_LETTER);
-
- addStartNpc(LEIKAN, PIOTUR);
- addTalkId(LEIKAN, PIOTUR, IRIS, ASHA, NESTLE);
-
- addKillId(TUREK_ORC_WARLORD, TUREK_ORC_ARCHER, TUREK_ORC_SKIRMISHER, TUREK_ORC_SUPPLIER, TUREK_ORC_FOOTMAN, TUREK_ORC_SENTINEL, TUREK_ORC_SHAMAN);
- }
-
- @Override
- public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
- {
- String htmltext = event;
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- // Piotur
- if (event.equals("30597-03.htm") && (st.getInt("cond") < 1))
- {
- st.setState(State.STARTED);
- st.set("cond", "1");
- st.playSound(QuestState.SOUND_ACCEPT);
- }
- else if (event.equals("30597-06.htm"))
- {
- st.playSound(QuestState.SOUND_FINISH);
- st.exitQuest(true);
- }
- // Leikan
- else if (event.equals("30382-03.htm"))
- {
- st.setState(State.STARTED);
- st.set("cond", "2");
- st.playSound(QuestState.SOUND_ACCEPT);
- st.giveItems(LEIKAN_LETTER, 1);
- }
- // Asha
- else if (event.equals("30313-02.htm"))
- {
- if (st.getQuestItemsCount(CLAY_URN_FRAGMENT) >= 5)
- {
- st.takeItems(CLAY_URN_FRAGMENT, 5);
- if (Rnd.get(6) < 5)
- {
- htmltext = "30313-03.htm";
- st.rewardItems(ANCIENT_CLAY_URN, 1);
- }
- else
- {
- htmltext = "30313-10.htm";
- }
- }
- }
- else if (event.equals("30313-04.htm"))
- {
- if (st.getQuestItemsCount(BRASS_TRINKET_PIECE) >= 5)
- {
- st.takeItems(BRASS_TRINKET_PIECE, 5);
- if (Rnd.get(7) < 6)
- {
- htmltext = "30313-05.htm";
- st.rewardItems(ANCIENT_BRASS_TIARA, 1);
- }
- else
- {
- htmltext = "30313-10.htm";
- }
- }
- }
- else if (event.equals("30313-06.htm"))
- {
- if (st.getQuestItemsCount(BRONZE_MIRROR_PIECE) >= 5)
- {
- st.takeItems(BRONZE_MIRROR_PIECE, 5);
- if (Rnd.get(7) < 6)
- {
- htmltext = "30313-07.htm";
- st.rewardItems(ANCIENT_BRONZE_MIRROR, 1);
- }
- else
- {
- htmltext = "30313-10.htm";
- }
- }
- }
- else if (event.equals("30313-08.htm"))
- {
- if (st.getQuestItemsCount(JADE_NECKLACE_BEAD) >= 5)
- {
- st.takeItems(JADE_NECKLACE_BEAD, 5);
- if (Rnd.get(8) < 7)
- {
- htmltext = "30313-09.htm";
- st.rewardItems(ANCIENT_JADE_NECKLACE, 1);
- }
- else
- {
- htmltext = "30313-10.htm";
- }
- }
- }
- // Iris
- else if (event.equals("30034-03.htm"))
- {
- final int n = st.getQuestItemsCount(CLAY_URN_FRAGMENT);
- if (n == 0)
- {
- htmltext = "30034-02.htm";
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(CLAY_URN_FRAGMENT, n);
- st.rewardExpAndSp(n * 307, 0);
- }
- }
- else if (event.equals("30034-04.htm"))
- {
- final int n = st.getQuestItemsCount(BRASS_TRINKET_PIECE);
- if (n == 0)
- {
- htmltext = "30034-02.htm";
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(BRASS_TRINKET_PIECE, n);
- st.rewardExpAndSp(n * 368, 0);
- }
- }
- else if (event.equals("30034-05.htm"))
- {
- final int n = st.getQuestItemsCount(BRONZE_MIRROR_PIECE);
- if (n == 0)
- {
- htmltext = "30034-02.htm";
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(BRONZE_MIRROR_PIECE, n);
- st.rewardExpAndSp(n * 368, 0);
- }
- }
- else if (event.equals("30034-06.htm"))
- {
- final int n = st.getQuestItemsCount(JADE_NECKLACE_BEAD);
- if (n == 0)
- {
- htmltext = "30034-02.htm";
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- st.takeItems(JADE_NECKLACE_BEAD, n);
- st.rewardExpAndSp(n * 430, 0);
- }
- }
- else if (event.equals("30034-07.htm"))
- {
- boolean isRewarded = false;
-
- for (int i = 1852; i < 1856; i++)
- {
- int n = st.getQuestItemsCount(i);
- if (n > 0)
- {
- st.takeItems(i, n);
- st.rewardExpAndSp(n * EXP_REWARD.get(i), 0);
- isRewarded = true;
- }
- }
- if (!isRewarded)
- {
- htmltext = "30034-02.htm";
- }
- else
- {
- st.playSound(QuestState.SOUND_ITEMGET);
- }
- }
- // Nestle
- else if (event.equals("30314-03.htm"))
- {
- if (!st.hasQuestItems(ANCIENT_CLAY_URN))
- {
- htmltext = "30314-07.htm";
- }
- else
- {
- st.takeItems(ANCIENT_CLAY_URN, 1);
- st.rewardItems(SOULSHOT_D, 70 + Rnd.get(41));
- }
- }
- else if (event.equals("30314-04.htm"))
- {
- if (!st.hasQuestItems(ANCIENT_BRASS_TIARA))
- {
- htmltext = "30314-07.htm";
- }
- else
- {
- st.takeItems(ANCIENT_BRASS_TIARA, 1);
- final int rnd = Rnd.get(100);
- if (rnd < 40)
- {
- st.rewardItems(HEALING_POTION, 1);
- }
- else if (rnd < 84)
- {
- st.rewardItems(HASTE_POTION, 1);
- }
- else
- {
- st.rewardItems(POTION_OF_ALACRITY, 1);
- }
- }
- }
- else if (event.equals("30314-05.htm"))
- {
- if (!st.hasQuestItems(ANCIENT_BRONZE_MIRROR))
- {
- htmltext = "30314-07.htm";
- }
- else
- {
- st.takeItems(ANCIENT_BRONZE_MIRROR, 1);
- st.rewardItems((Rnd.get(100) < 59) ? SCROLL_OF_ESCAPE : SCROLL_OF_RESURRECTION, 1);
- }
- }
- else if (event.equals("30314-06.htm"))
- {
- if (!st.hasQuestItems(ANCIENT_JADE_NECKLACE))
- {
- htmltext = "30314-07.htm";
- }
- else
- {
- st.takeItems(ANCIENT_JADE_NECKLACE, 1);
- st.rewardItems(SPIRITSHOT_D, 50 + Rnd.get(41));
- }
- }
-
- return htmltext;
- }
-
- @Override
- public String onTalk(NpcInstance npc, PlayerInstance player)
- {
- String htmltext = getNoQuestMsg();
- QuestState st = player.getQuestState(qn);
- if (st == null)
- {
- return htmltext;
- }
-
- switch (st.getState())
- {
- case State.CREATED:
- htmltext = npc.getNpcId() + ((player.getLevel() < 25) ? "-01.htm" : "-02.htm");
- break;
-
- case State.STARTED:
- final int cond = st.getInt("cond");
- switch (npc.getNpcId())
- {
- case PIOTUR:
- if (!st.hasQuestItems(LEIKAN_LETTER))
- {
- if (st.hasAtLeastOneQuestItem(TUREK_DOGTAG, TUREK_MEDALLION))
- {
- htmltext = "30597-05.htm";
-
- if (cond < 4)
- {
- st.set("cond", "4");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
-
- final int dogtag = st.getQuestItemsCount(TUREK_DOGTAG);
- final int medallion = st.getQuestItemsCount(TUREK_MEDALLION);
-
- st.takeItems(TUREK_DOGTAG, -1);
- st.takeItems(TUREK_MEDALLION, -1);
- st.rewardItems(ADENA, (dogtag * 40) + (medallion * 50) + (((dogtag + medallion) >= 10) ? 619 : 0));
- }
- else
- {
- htmltext = "30597-04.htm";
- }
- }
- else
- {
- htmltext = "30597-03a.htm";
- st.set("cond", "3");
- st.playSound(QuestState.SOUND_MIDDLE);
- st.takeItems(LEIKAN_LETTER, 1);
- }
- break;
-
- case LEIKAN:
- if (cond == 2)
- {
- htmltext = "30382-04.htm";
- }
- else if ((cond == 3) || (cond == 4))
- {
- htmltext = "30382-05.htm";
- st.set("cond", "5");
- st.playSound(QuestState.SOUND_MIDDLE);
- }
- else if (cond == 5)
- {
- htmltext = "30382-05.htm";
- }
- break;
-
- default:
- htmltext = npc.getNpcId() + "-01.htm";
- break;
- }
- break;
- }
-
- return htmltext;
- }
-
- @Override
- public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
- {
- QuestState st = checkPlayerState(player, npc, State.STARTED);
- if (st == null)
- {
- return null;
- }
-
- for (int[] npcData : DROPLIST)
- {
- if (npcData[0] == npc.getNpcId())
- {
- st.dropItemsAlways(npcData[2], 1, -1);
- st.dropItems(Rnd.get(1848, 1851), 1, 0, npcData[1]);
- break;
- }
- }
-
- return null;
- }
+ static
+ {
+ EXP_REWARD.put(ANCIENT_CLAY_URN, 2766);
+ EXP_REWARD.put(ANCIENT_BRASS_TIARA, 3227);
+ EXP_REWARD.put(ANCIENT_BRONZE_MIRROR, 3227);
+ EXP_REWARD.put(ANCIENT_JADE_NECKLACE, 3919);
+ }
+
+ public Q327_RecoverTheFarmland()
+ {
+ super(327, qn, "Recover the Farmland");
+
+ registerQuestItems(LEIKAN_LETTER);
+
+ addStartNpc(LEIKAN, PIOTUR);
+ addTalkId(LEIKAN, PIOTUR, IRIS, ASHA, NESTLE);
+
+ addKillId(TUREK_ORC_WARLORD, TUREK_ORC_ARCHER, TUREK_ORC_SKIRMISHER, TUREK_ORC_SUPPLIER, TUREK_ORC_FOOTMAN, TUREK_ORC_SENTINEL, TUREK_ORC_SHAMAN);
+ }
+
+ @Override
+ public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = event;
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ // Piotur
+ if (event.equals("30597-03.htm") && (st.getInt("cond") < 1))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "1");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ }
+ else if (event.equals("30597-06.htm"))
+ {
+ st.playSound(QuestState.SOUND_FINISH);
+ st.exitQuest(true);
+ }
+ // Leikan
+ else if (event.equals("30382-03.htm"))
+ {
+ st.setState(State.STARTED);
+ st.set("cond", "2");
+ st.playSound(QuestState.SOUND_ACCEPT);
+ st.giveItems(LEIKAN_LETTER, 1);
+ }
+ // Asha
+ else if (event.equals("30313-02.htm"))
+ {
+ if (st.getQuestItemsCount(CLAY_URN_FRAGMENT) >= 5)
+ {
+ st.takeItems(CLAY_URN_FRAGMENT, 5);
+ if (Rnd.get(6) < 5)
+ {
+ htmltext = "30313-03.htm";
+ st.rewardItems(ANCIENT_CLAY_URN, 1);
+ }
+ else
+ {
+ htmltext = "30313-10.htm";
+ }
+ }
+ }
+ else if (event.equals("30313-04.htm"))
+ {
+ if (st.getQuestItemsCount(BRASS_TRINKET_PIECE) >= 5)
+ {
+ st.takeItems(BRASS_TRINKET_PIECE, 5);
+ if (Rnd.get(7) < 6)
+ {
+ htmltext = "30313-05.htm";
+ st.rewardItems(ANCIENT_BRASS_TIARA, 1);
+ }
+ else
+ {
+ htmltext = "30313-10.htm";
+ }
+ }
+ }
+ else if (event.equals("30313-06.htm"))
+ {
+ if (st.getQuestItemsCount(BRONZE_MIRROR_PIECE) >= 5)
+ {
+ st.takeItems(BRONZE_MIRROR_PIECE, 5);
+ if (Rnd.get(7) < 6)
+ {
+ htmltext = "30313-07.htm";
+ st.rewardItems(ANCIENT_BRONZE_MIRROR, 1);
+ }
+ else
+ {
+ htmltext = "30313-10.htm";
+ }
+ }
+ }
+ else if (event.equals("30313-08.htm"))
+ {
+ if (st.getQuestItemsCount(JADE_NECKLACE_BEAD) >= 5)
+ {
+ st.takeItems(JADE_NECKLACE_BEAD, 5);
+ if (Rnd.get(8) < 7)
+ {
+ htmltext = "30313-09.htm";
+ st.rewardItems(ANCIENT_JADE_NECKLACE, 1);
+ }
+ else
+ {
+ htmltext = "30313-10.htm";
+ }
+ }
+ }
+ // Iris
+ else if (event.equals("30034-03.htm"))
+ {
+ final int n = st.getQuestItemsCount(CLAY_URN_FRAGMENT);
+ if (n == 0)
+ {
+ htmltext = "30034-02.htm";
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(CLAY_URN_FRAGMENT, n);
+ st.rewardExpAndSp(n * 307, 0);
+ }
+ }
+ else if (event.equals("30034-04.htm"))
+ {
+ final int n = st.getQuestItemsCount(BRASS_TRINKET_PIECE);
+ if (n == 0)
+ {
+ htmltext = "30034-02.htm";
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(BRASS_TRINKET_PIECE, n);
+ st.rewardExpAndSp(n * 368, 0);
+ }
+ }
+ else if (event.equals("30034-05.htm"))
+ {
+ final int n = st.getQuestItemsCount(BRONZE_MIRROR_PIECE);
+ if (n == 0)
+ {
+ htmltext = "30034-02.htm";
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(BRONZE_MIRROR_PIECE, n);
+ st.rewardExpAndSp(n * 368, 0);
+ }
+ }
+ else if (event.equals("30034-06.htm"))
+ {
+ final int n = st.getQuestItemsCount(JADE_NECKLACE_BEAD);
+ if (n == 0)
+ {
+ htmltext = "30034-02.htm";
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ st.takeItems(JADE_NECKLACE_BEAD, n);
+ st.rewardExpAndSp(n * 430, 0);
+ }
+ }
+ else if (event.equals("30034-07.htm"))
+ {
+ boolean isRewarded = false;
+
+ for (int i = 1852; i < 1856; i++)
+ {
+ int n = st.getQuestItemsCount(i);
+ if (n > 0)
+ {
+ st.takeItems(i, n);
+ st.rewardExpAndSp(n * EXP_REWARD.get(i), 0);
+ isRewarded = true;
+ }
+ }
+ if (!isRewarded)
+ {
+ htmltext = "30034-02.htm";
+ }
+ else
+ {
+ st.playSound(QuestState.SOUND_ITEMGET);
+ }
+ }
+ // Nestle
+ else if (event.equals("30314-03.htm"))
+ {
+ if (!st.hasQuestItems(ANCIENT_CLAY_URN))
+ {
+ htmltext = "30314-07.htm";
+ }
+ else
+ {
+ st.takeItems(ANCIENT_CLAY_URN, 1);
+ st.rewardItems(SOULSHOT_D, 70 + Rnd.get(41));
+ }
+ }
+ else if (event.equals("30314-04.htm"))
+ {
+ if (!st.hasQuestItems(ANCIENT_BRASS_TIARA))
+ {
+ htmltext = "30314-07.htm";
+ }
+ else
+ {
+ st.takeItems(ANCIENT_BRASS_TIARA, 1);
+ final int rnd = Rnd.get(100);
+ if (rnd < 40)
+ {
+ st.rewardItems(HEALING_POTION, 1);
+ }
+ else if (rnd < 84)
+ {
+ st.rewardItems(HASTE_POTION, 1);
+ }
+ else
+ {
+ st.rewardItems(POTION_OF_ALACRITY, 1);
+ }
+ }
+ }
+ else if (event.equals("30314-05.htm"))
+ {
+ if (!st.hasQuestItems(ANCIENT_BRONZE_MIRROR))
+ {
+ htmltext = "30314-07.htm";
+ }
+ else
+ {
+ st.takeItems(ANCIENT_BRONZE_MIRROR, 1);
+ st.rewardItems((Rnd.get(100) < 59) ? SCROLL_OF_ESCAPE : SCROLL_OF_RESURRECTION, 1);
+ }
+ }
+ else if (event.equals("30314-06.htm"))
+ {
+ if (!st.hasQuestItems(ANCIENT_JADE_NECKLACE))
+ {
+ htmltext = "30314-07.htm";
+ }
+ else
+ {
+ st.takeItems(ANCIENT_JADE_NECKLACE, 1);
+ st.rewardItems(SPIRITSHOT_D, 50 + Rnd.get(41));
+ }
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(NpcInstance npc, PlayerInstance player)
+ {
+ String htmltext = getNoQuestMsg();
+ QuestState st = player.getQuestState(qn);
+ if (st == null)
+ {
+ return htmltext;
+ }
+
+ switch (st.getState())
+ {
+ case State.CREATED:
+ htmltext = npc.getNpcId() + ((player.getLevel() < 25) ? "-01.htm" : "-02.htm");
+ break;
+
+ case State.STARTED:
+ final int cond = st.getInt("cond");
+ switch (npc.getNpcId())
+ {
+ case PIOTUR:
+ if (!st.hasQuestItems(LEIKAN_LETTER))
+ {
+ if (st.hasAtLeastOneQuestItem(TUREK_DOGTAG, TUREK_MEDALLION))
+ {
+ htmltext = "30597-05.htm";
+
+ if (cond < 4)
+ {
+ st.set("cond", "4");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+
+ final int dogtag = st.getQuestItemsCount(TUREK_DOGTAG);
+ final int medallion = st.getQuestItemsCount(TUREK_MEDALLION);
+
+ st.takeItems(TUREK_DOGTAG, -1);
+ st.takeItems(TUREK_MEDALLION, -1);
+ st.rewardItems(ADENA, (dogtag * 40) + (medallion * 50) + (((dogtag + medallion) >= 10) ? 619 : 0));
+ }
+ else
+ {
+ htmltext = "30597-04.htm";
+ }
+ }
+ else
+ {
+ htmltext = "30597-03a.htm";
+ st.set("cond", "3");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ st.takeItems(LEIKAN_LETTER, 1);
+ }
+ break;
+
+ case LEIKAN:
+ if (cond == 2)
+ {
+ htmltext = "30382-04.htm";
+ }
+ else if ((cond == 3) || (cond == 4))
+ {
+ htmltext = "30382-05.htm";
+ st.set("cond", "5");
+ st.playSound(QuestState.SOUND_MIDDLE);
+ }
+ else if (cond == 5)
+ {
+ htmltext = "30382-05.htm";
+ }
+ break;
+
+ default:
+ htmltext = npc.getNpcId() + "-01.htm";
+ break;
+ }
+ break;
+ }
+
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
+ {
+ QuestState st = checkPlayerState(player, npc, State.STARTED);
+ if (st == null)
+ {
+ return null;
+ }
+
+ for (int[] npcData : DROPLIST)
+ {
+ if (npcData[0] == npc.getNpcId())
+ {
+ st.dropItemsAlways(npcData[2], 1, -1);
+ st.dropItems(Rnd.get(1848, 1851), 1, 0, npcData[1]);
+ break;
+ }
+ }
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q328_SenseForBusiness/Q328_SenseForBusiness.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q328_SenseForBusiness/Q328_SenseForBusiness.java
index e616886593..a94e07d59f 100644
--- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q328_SenseForBusiness/Q328_SenseForBusiness.java
+++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/quests/Q328_SenseForBusiness/Q328_SenseForBusiness.java
@@ -1,154 +1,155 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see