Removal of assorted empty lines.

This commit is contained in:
MobiusDevelopment
2020-03-03 17:07:18 +00:00
parent ecaf8a1a66
commit 6d8addc784
14371 changed files with 304 additions and 44722 deletions

View File

@@ -195,7 +195,6 @@ public class FeedableBeasts extends AbstractNpcAI
final int[][] Kookabura_1_Crystal_2 = {{ 21465, 21467 }};
final int[][] Kookabura_2_1 = {{ 21468, 21824}, { TRAINED_KOOKABURRA1, TRAINED_KOOKABURRA2 }};
final int[][] Kookabura_2_2 = {{ 21469, 21825}, { TRAINED_KOOKABURRA1, TRAINED_KOOKABURRA2 }};
final int[][] Buffalo_0_Gold = {{ 21471, 21472, 21473, 21474 }};
final int[][] Buffalo_0_Crystal = {{ 21475, 21476, 21477, 21478 }};
final int[][] Buffalo_1_Gold_1 = {{ 21479, 21481 }};
@@ -204,7 +203,6 @@ public class FeedableBeasts extends AbstractNpcAI
final int[][] Buffalo_1_Crystal_2 = {{ 21484, 21486 }};
final int[][] Buffalo_2_1 = {{ 21487, 21826}, {TRAINED_BUFFALO1, TRAINED_BUFFALO2 }};
final int[][] Buffalo_2_2 = {{ 21488, 21827}, {TRAINED_BUFFALO1, TRAINED_BUFFALO2 }};
final int[][] Cougar_0_Gold = {{ 21490, 21491, 21492, 21493 }};
final int[][] Cougar_0_Crystal = {{ 21494, 21495, 21496, 21497 }};
final int[][] Cougar_1_Gold_1 = {{ 21498, 21500 }};
@@ -464,7 +462,6 @@ public class FeedableBeasts extends AbstractNpcAI
// if not trained, the newly spawned mob will automatically be aggro against its feeder
// (what happened to "never bite the hand that feeds you" anyway?!)
final Attackable nextNpc = (Attackable) addSpawn(nextNpcId, npc);
if (MAD_COW_POLYMORPH.containsKey(nextNpcId))
{
startQuestTimer("polymorph Mad Cow", 10000, nextNpc, player);

View File

@@ -165,7 +165,6 @@ public class Parade extends AbstractNpcAI
{
dd += 86400;
}
return (dd * 1000) / 6;
}

View File

@@ -50,7 +50,6 @@ public class FrozenLabyrinth extends AbstractNpcAI
{
final int x = diff < 60 ? npc.getX() + diff : npc.getX();
final int y = diff >= 60 ? npc.getY() + (diff - 40) : npc.getY();
final Npc monster = addSpawn(spawnId, x, y, npc.getZ(), npc.getHeading(), false, 0);
addAttackDesire(monster, attacker);
diff += 20;

View File

@@ -44,7 +44,6 @@ public class Sirra extends AbstractNpcAI
public String onFirstTalk(Npc npc, PlayerInstance player)
{
final InstanceWorld world = InstanceManager.getInstance().getWorld(npc);
if ((world != null) && (world.getTemplateId() == FREYA_INSTID))
{
return (world.isStatus(0)) ? "32762-easy.html" : "32762-easyfight.html";

View File

@@ -102,7 +102,6 @@ public class Alexandria extends AbstractNpcAI
{
giveItems(player, agathion);
htmltext = "30098-03.html";
if (agathion instanceof AdditionalQuestItemHolder)
{
giveItems(player, ((AdditionalQuestItemHolder) agathion).getAdditionalId(), 1);

View File

@@ -93,7 +93,7 @@ public class EnergySeeds extends AbstractNpcAI
};
private static final Location SOI_EXIT_POINT = new Location(-183285, 205996, -12896);
private static final Location SOD_EXIT_POINT = new Location(-248717, 250260, 4337);
private static final int SOD_ZONE = 60009;
private static final int SOI_ZONE = 60010;

View File

@@ -39,7 +39,6 @@ public class AbyssGaze extends AbstractNpcAI
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = event;
QuestState qs = player.getQuestState(getName());
if (qs == null)
{

View File

@@ -39,7 +39,6 @@ public class EkimusMouth extends AbstractNpcAI
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = event;
QuestState qs = player.getQuestState(getName());
if (qs == null)
{

View File

@@ -308,7 +308,6 @@ public class HallOfErosionAttack extends AbstractNpcAI
protected void enterInstance(PlayerInstance player, int[] coords)
{
InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
if (!(world instanceof HEAWorld))
@@ -327,7 +326,6 @@ public class HallOfErosionAttack extends AbstractNpcAI
((HEAWorld) world).startTime = System.currentTimeMillis();
InstanceManager.getInstance().addWorld(world);
LOGGER.info("Hall Of Erosion Attack started " + INSTANCEID + " Instance: " + world.getInstanceId() + " created by player: " + player.getName());
if (player.isInParty())
{
for (PlayerInstance partyMember : player.getParty().isInCommandChannel() ? player.getParty().getCommandChannel().getMembers() : player.getParty().getMembers())
@@ -408,7 +406,6 @@ public class HallOfErosionAttack extends AbstractNpcAI
if (tmpworld instanceof HEAWorld)
{
final HEAWorld world = (HEAWorld) tmpworld;
if (event.startsWith("warp"))
{
Npc victim = null;
@@ -454,7 +451,6 @@ public class HallOfErosionAttack extends AbstractNpcAI
if (tmpworld instanceof HEAWorld)
{
final HEAWorld world = (HEAWorld) tmpworld;
if (npc.getId() == 18668)
{
for (int i = 0; i < Rnd.get(1, 4); i++)
@@ -598,7 +594,6 @@ public class HallOfErosionAttack extends AbstractNpcAI
{
final Calendar reenter = Calendar.getInstance();
reenter.set(Calendar.MINUTE, 30);
if (reenter.get(Calendar.HOUR_OF_DAY) >= 6)
{
reenter.add(Calendar.DATE, 1);

View File

@@ -328,7 +328,6 @@ public class HallOfErosionDefence extends AbstractNpcAI
((HEDWorld) world).startTime = System.currentTimeMillis();
InstanceManager.getInstance().addWorld(world);
LOGGER.info("Hall Of Erosion Defence started " + INSTANCEID + " Instance: " + world.getInstanceId() + " created by player: " + player.getName());
if (player.isInParty())
{
for (PlayerInstance partyMember : player.getParty().isInCommandChannel() ? player.getParty().getCommandChannel().getMembers() : player.getParty().getMembers())
@@ -429,7 +428,6 @@ public class HallOfErosionDefence extends AbstractNpcAI
if (tmpworld instanceof HEDWorld)
{
final HEDWorld world = (HEDWorld) tmpworld;
if (event.startsWith("warp"))
{
Npc victim = null;
@@ -475,7 +473,6 @@ public class HallOfErosionDefence extends AbstractNpcAI
if (tmpworld instanceof HEDWorld)
{
final HEDWorld world = (HEDWorld) tmpworld;
if (npc.getId() == 18668)
{
for (int i = 0; i < Rnd.get(1, 4); i++)
@@ -553,7 +550,6 @@ public class HallOfErosionDefence extends AbstractNpcAI
if (tmpworld instanceof HEDWorld)
{
final HEDWorld world = (HEDWorld) tmpworld;
seedKills++;
if (seedKills >= 1)
{
@@ -653,7 +649,6 @@ public class HallOfErosionDefence extends AbstractNpcAI
world.finishTask = null;
}
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.YOU_HAVE_FAILED_AT_S1_S2_THE_INSTANCE_WILL_SHORTLY_EXPIRE, 2, 8000));
conquestEnded = true;
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
if (inst != null)

View File

@@ -223,7 +223,6 @@ public class AirShipGludioGracia extends AbstractNpcAI implements Runnable
{
_ship.addPassenger(player);
}
return null;
}

View File

@@ -79,17 +79,13 @@ public class KeucereusNorthController extends AirShipController
_shipSpawnX = -184145;
_shipSpawnY = 242373;
_shipSpawnZ = 3000;
_oustLoc = new Location(-183900, 239384, 1320);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movie = Movie.LAND_KSERTH_B;
validityCheck();
}
}

View File

@@ -79,17 +79,13 @@ public class KeucereusSouthController extends AirShipController
_shipSpawnX = -184527;
_shipSpawnY = 243611;
_shipSpawnZ = 3000;
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_oustLoc = new Location(-186148, 246296, 1360);
_movie = Movie.LAND_KSERTH_A;
validityCheck();
}
}

View File

@@ -69,17 +69,13 @@ public class SoDController extends AirShipController
_shipSpawnX = -247702;
_shipSpawnY = 253631;
_shipSpawnZ = 4359;
_oustLoc = new Location(-247746, 251079, 4328);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movie = Movie.LAND_DISTRUCTION_A;
validityCheck();
}
}

View File

@@ -73,17 +73,13 @@ public class SoIController extends AirShipController
_shipSpawnX = -212719;
_shipSpawnY = 213348;
_shipSpawnZ = 5000;
_oustLoc = new Location(-213401, 210401, 4408);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movie = Movie.LAND_UNDEAD_A;
validityCheck();
}
}

View File

@@ -71,7 +71,6 @@ public class HellboundCore extends AbstractNpcAI
{
startQuestTimer("cast", 10000, npc, null);
}
return super.onSpawn(npc);
}
}

View File

@@ -126,7 +126,6 @@ public class Quarry extends AbstractNpcAI
}
}
}
return htmltext;
}

View File

@@ -95,7 +95,6 @@ public class Warpgate extends AbstractNpcAI
if (creature.isPlayer())
{
final PlayerInstance player = creature.getActingPlayer();
if (!canEnter(player) && !player.canOverrideCond(PlayerCondOverride.ZONE_CONDITIONS) && !player.isOnEvent())
{
startQuestTimer("TELEPORT", 1000, null, player);
@@ -122,7 +121,6 @@ public class Warpgate extends AbstractNpcAI
final QuestState qs1 = player.getQuestState(Q00130_PathToHellbound.class.getSimpleName());
final QuestState qs2 = player.getQuestState(Q00133_ThatsBloodyHot.class.getSimpleName());
return (((qs1 != null) && qs1.isCompleted()) || ((qs2 != null) && qs2.isCompleted()));
}
}

View File

@@ -79,7 +79,6 @@ public class Slaves extends AbstractNpcAI
slave.abortAttack();
slave.abortCast();
slave.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THANK_YOU_FOR_SAVING_ME_FROM_THE_CLUTCHES_OF_EVIL);
if ((HellboundEngine.getInstance().getLevel() >= 1) && (HellboundEngine.getInstance().getLevel() <= 2))
{
HellboundEngine.getInstance().updateTrust(TRUST_REWARD, false);

View File

@@ -128,7 +128,6 @@ public class AnomicFoundry extends AbstractNpcAI
requestHelp(npc, player, 500, LESSER_EVIL);
requestHelp(npc, player, 500, GREATER_EVIL);
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@@ -141,7 +140,6 @@ public class AnomicFoundry extends AbstractNpcAI
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENEMY_INVASION_HURRY_UP);
cancelQuestTimer("return_laborer", npc, null);
startQuestTimer("return_laborer", 60000, npc, null);
if (respawnTime > respawnMin)
{
respawnTime -= 5000;
@@ -191,7 +189,6 @@ public class AnomicFoundry extends AbstractNpcAI
}
_atkIndex.remove(npc.getObjectId());
}
return super.onKill(npc, killer, isSummon);
}
@@ -238,7 +235,6 @@ public class AnomicFoundry extends AbstractNpcAI
final int coordX = npc.getSpawn().getX();
final int coordY = npc.getSpawn().getY();
final int npcId = npc.getId();
for (int i = 0; i < 5; i++)
{
if ((SPAWNS[i][0] == npcId) && (SPAWNS[i][1] == coordX) && (SPAWNS[i][2] == coordY))

View File

@@ -105,7 +105,6 @@ public class TowerOfInfinitum extends AbstractNpcAI
{
String htmltext = event;
final int npcId = npc.getId();
if (event.equalsIgnoreCase("enter") && (npcId == JERIAN))
{
if (HellboundEngine.getInstance().getLevel() >= 11)
@@ -140,7 +139,6 @@ public class TowerOfInfinitum extends AbstractNpcAI
{
final int direction = event.equalsIgnoreCase("up") ? 0 : 1;
final Party party = player.getParty();
if (party == null)
{
htmltext = "gk-noparty.htm";

View File

@@ -383,7 +383,6 @@ public class TowerOfNaia extends AbstractNpcAI
public String onFirstTalk(Npc npc, PlayerInstance player)
{
final int npcId = npc.getId();
if (npcId == CONTROLLER)
{
if (_lock == null)
@@ -463,11 +462,9 @@ public class TowerOfNaia extends AbstractNpcAI
}
final int npcId = npc.getId();
if (event.equalsIgnoreCase("despawn_spore") && !npc.isDead() && (_challengeState == STATE_SPORE_CHALLENGE_IN_PROGRESS))
{
htmltext = null;
_sporeSpawn.remove(npc);
npc.deleteMe();
@@ -540,7 +537,6 @@ public class TowerOfNaia extends AbstractNpcAI
{
htmltext = null;
final Party party = player.getParty();
if (party != null)
{
removeForeigners(npcId, party);
@@ -561,7 +557,6 @@ public class TowerOfNaia extends AbstractNpcAI
if ((_lock != null) && (npc.getObjectId() == _lock.getObjectId()))
{
final int remaindedHpPercent = (int) ((npc.getCurrentHp() * 100) / npc.getMaxHp());
if ((remaindedHpPercent <= _counter) && (_controller != null))
{
if (_counter == 50)
@@ -585,7 +580,6 @@ public class TowerOfNaia extends AbstractNpcAI
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == LOCK)
{
_lock = null;
@@ -596,7 +590,6 @@ public class TowerOfNaia extends AbstractNpcAI
else if (Arrays.binarySearch(TOWER_MONSTERS, npcId) >= 0)
{
int managerId = 0;
for (ZoneType zone : ZoneManager.getInstance().getZones(npc.getX(), npc.getY(), npc.getZ()))
{
if (ZONES.containsValue(zone.getId()))
@@ -650,7 +643,6 @@ public class TowerOfNaia extends AbstractNpcAI
{
_despawnedSporesCount.decrementAndGet();
final int sporeGroup = getSporeGroup(npcId);
if (sporeGroup >= 0)
{
if ((npcId == SPORE_FIRE) || (npcId == SPORE_WIND))
@@ -700,7 +692,6 @@ public class TowerOfNaia extends AbstractNpcAI
_despawnedSporesCount.set(0);
_winIndex = Arrays.binarySearch(ELEMENTS, npcId);
final int[] coord = SPORES_MERGE_POSITION[_winIndex];
for (Npc spore : _sporeSpawn)
{
if ((spore != null) && !spore.isDead())
@@ -721,7 +712,6 @@ public class TowerOfNaia extends AbstractNpcAI
public String onSpawn(Npc npc)
{
final int npcId = npc.getId();
if (npcId == MUTATED_ELPY)
{
DoorData.getInstance().getDoor(18250025).openMe();

View File

@@ -541,7 +541,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
final ClassId classId = player.getClassId();
final int npcId = npc.getId();
if (TULLY_DOORLIST.containsKey(npcId))
{
if (classId.equalsOrChildOf(ClassId.MAESTRO))
@@ -698,7 +697,6 @@ public class TullyWorkshop extends AbstractNpcAI
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = event;
if (event.equalsIgnoreCase("disable_zone"))
{
final ZoneType dmgZone = ZoneManager.getInstance().getZoneById(200011);
@@ -801,7 +799,6 @@ public class TullyWorkshop extends AbstractNpcAI
if (event.equalsIgnoreCase("enter") && (npcId == DORIAN))
{
final Party party = player.getParty();
if ((party != null) && (party.getLeaderObjectId() == player.getObjectId()))
{
for (PlayerInstance partyMember : party.getMembers())
@@ -817,7 +814,6 @@ public class TullyWorkshop extends AbstractNpcAI
partyMember.teleToLocation(-13400, 272827, -15300, true);
}
htmltext = null;
}
else
{
@@ -876,7 +872,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
final int i0 = talkedContraptions.contains(npc.getObjectId()) ? 0 : 1;
final int i1 = player.getClassId().equalsOrChildOf(ClassId.MAESTRO) ? 6 : 3;
if (getRandom(1000) < ((i1 - i0) * 100))
{
talkedContraptions.add(npc.getObjectId());
@@ -1007,7 +1002,6 @@ public class TullyWorkshop extends AbstractNpcAI
allowAgentSpawn_7th = true;
npc.deleteMe();
spawnedAgent = null;
for (MonsterInstance monster : spawnedFollowers)
{
if ((monster != null) && !monster.isDead())
@@ -1072,7 +1066,6 @@ public class TullyWorkshop extends AbstractNpcAI
htmltext = null;
final int tpId = Integer.parseInt(event.substring(10));
final Party party = player.getParty();
if (party != null)
{
if (!party.isLeader(player))
@@ -1119,7 +1112,6 @@ public class TullyWorkshop extends AbstractNpcAI
final MonsterInstance victim1 = spawnedFollowers.get(1); // TEMENIR
final MonsterInstance victim2 = spawnedFollowers.get(0); // KIRETCENAH
final MonsterInstance actor = spawnedFollowers.get(2); // DRAXIUS
if ((actor != null) && !actor.isDead())
{
final double transferringHp = actor.getMaxHp() * 0.0001;
@@ -1141,7 +1133,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
final MonsterInstance victim = npcId == TEMENIR ? spawnedFollowers.get(1) : spawnedFollowers.get(2);
final MonsterInstance actor = spawnedFollowers.get(0);
if ((actor != null) && (victim != null) && !actor.isDead() && !victim.isDead() && (getRandom(1000) > 333))
{
actor.clearAggroList();
@@ -1170,7 +1161,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
is7thFloorAttackBegan = true;
startQuestTimer("end_7th_floor_attack", 1200000, null, null);
if (spawnedAgent != null)
{
spawnedAgent.deleteMe();
@@ -1186,7 +1176,6 @@ public class TullyWorkshop extends AbstractNpcAI
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final int npcId = npc.getId();
if ((npcId == TULLY) && npc.isInsideRadius2D(-12557, 273901, -9000, 1000))
{
for (int[] i : POST_MORTEM_SPAWNLIST)
@@ -1313,7 +1302,6 @@ public class TullyWorkshop extends AbstractNpcAI
else if ((npcId >= SERVANT_FIRST) && (npcId <= SERVANT_LAST))
{
final int[] roomData = getRoomData(npc);
if ((roomData[0] >= 0) && (roomData[1] >= 0) && allowAgentSpawn)
{
allowServantSpawn = true;
@@ -1419,7 +1407,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
final int npcId = npc.getId();
final int skillId = skill.getId();
if ((npcId == AGENT) && (skillId == 5526))
{
player.teleToLocation(21935, 243923, 11088, true); // to the roof
@@ -1485,7 +1472,6 @@ public class TullyWorkshop extends AbstractNpcAI
{
killedFollowersCount = 0;
is7thFloorAttackBegan = false;
for (int[] data : SPAWNLIST_7TH_FLOOR)
{
final MonsterInstance monster = (MonsterInstance) addSpawn(data[0], data[1], data[2], data[3], data[4], false, 0, false);

View File

@@ -105,7 +105,6 @@ public class HellboundPointData implements IXmlReader
final int maxHbLvl = Integer.parseInt(att.getNodeValue());
att = attrs.getNamedItem("lowestTrustLimit");
final int lowestTrustLimit = (att == null) ? 0 : Integer.parseInt(att.getNodeValue());
_pointsInfo.put(npcId, new int[]
{
points,

View File

@@ -116,7 +116,6 @@ public class DemonPrinceFloor extends AbstractInstance
}
final Party party = player.getParty();
if ((party == null) || !party.isLeader(player))
{
player.sendPacket(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER);

View File

@@ -60,7 +60,6 @@ public class RankuFloor extends AbstractInstance
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = null;
if (npc.getId() == GK_9)
{
if (!player.canOverrideCond(PlayerCondOverride.INSTANCE_CONDITIONS))
@@ -115,7 +114,6 @@ public class RankuFloor extends AbstractInstance
}
final Party party = player.getParty();
if ((party == null) || !party.isLeader(player))
{
player.sendPacket(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER);

View File

@@ -130,7 +130,6 @@ public class UrbanArea extends AbstractInstance
if (world != null)
{
final Party party = player.getParty();
if (party == null)
{
htmltext = "32343-02.htm";
@@ -325,7 +324,6 @@ public class UrbanArea extends AbstractInstance
}
final Party party = player.getParty();
if ((party == null) || !party.isLeader(player))
{
player.sendPacket(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER);

View File

@@ -91,7 +91,6 @@ public class HotSprings extends AbstractNpcAI
final BuffInfo info = creature.getEffectList().getBuffInfoBySkillId(diseaseId);
final int skillLevel = (info == null) ? 1 : (info.getSkill().getLevel() < 10) ? info.getSkill().getLevel() + 1 : 10;
final Skill skill = SkillData.getInstance().getSkill(diseaseId, skillLevel);
if ((skill != null) && !npc.isCastingNow() && npc.checkDoCastConditions(skill))
{
npc.setTarget(creature);

View File

@@ -106,7 +106,6 @@ public class DarkWaterDragon extends AbstractNpcAI
cancelQuestTimer("2", npc, null);
cancelQuestTimer("3", npc, null);
cancelQuestTimer("4", npc, null);
MY_TRACKING_SET.remove(npc.getObjectId());
player = ID_MAP.remove(npc.getObjectId());
if (player != null)

View File

@@ -278,7 +278,6 @@ public class Venom extends AbstractNpcAI
case VENOM:
{
_venom = npc;
_loc = _venom.getLocation();
_venom.disableSkill(VENOM_TELEPORT.getSkill(), -1);
_venom.disableSkill(RANGE_TELEPORT.getSkill(), -1);

View File

@@ -52,11 +52,9 @@ public class StakatoNestTeleporter extends AbstractNpcAI
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final int index = Integer.parseInt(event) - 1;
if (LOCS.length > index)
{
final Location loc = LOCS[index];
if (player.getParty() != null)
{
for (PlayerInstance partyMember : player.getParty().getMembers())

View File

@@ -615,7 +615,6 @@ public class Antharas extends AbstractNpcAI
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
{
_lastAttack = System.currentTimeMillis();
if (npc.getId() == BOMBER)
{
if (npc.calculateDistance3D(attacker) < 230)
@@ -880,7 +879,6 @@ public class Antharas extends AbstractNpcAI
final double distance_c2 = npc.calculateDistance3D(c2);
final double direction_c2 = npc.calculateDirectionTo(c2);
SkillHolder skillToCast = null;
boolean castOnTarget = false;
if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25))

View File

@@ -317,7 +317,6 @@ public class Baium extends AbstractNpcAI
{
final Attackable mob = (Attackable) npc;
final Creature mostHated = mob.getMostHated();
if ((_baium == null) || _baium.isDead())
{
mob.deleteMe();
@@ -482,7 +481,6 @@ public class Baium extends AbstractNpcAI
public String onAttack(Npc npc, PlayerInstance attacker, int damage, boolean isSummon, Skill skill)
{
_lastAttack = System.currentTimeMillis();
if (npc.getId() == BAIUM)
{
if ((attacker.getMountType() == MountType.STRIDER) && !attacker.isAffectedBySkill(ANTI_STRIDER.getSkillId()) && !npc.isSkillDisabled(ANTI_STRIDER.getSkill()))
@@ -517,7 +515,6 @@ public class Baium extends AbstractNpcAI
{
final Attackable mob = (Attackable) npc;
final Creature mostHated = mob.getMostHated();
if ((getRandom(100) < 10) && mob.checkDoCastConditions(SPEAR_ATTACK.getSkill()))
{
if ((mostHated != null) && (npc.calculateDistance3D(mostHated) < 1000) && zone.isCharacterInZone(mostHated))
@@ -598,7 +595,6 @@ public class Baium extends AbstractNpcAI
public String onSpellFinished(Npc npc, PlayerInstance player, Skill skill)
{
startQuestTimer("MANAGE_SKILLS", 1000, npc, null);
if (!zone.isCharacterInZone(npc) && (_baium != null))
{
_baium.teleToLocation(BAIUM_LOC);

View File

@@ -159,39 +159,33 @@ public class Beleth extends AbstractNpcAI
_camera2 = addSpawn(29121, new Location(16323, 210741, -9357));
_camera3 = addSpawn(29122, new Location(16323, 213170, -9357));
_camera4 = addSpawn(29123, new Location(16323, 214917, -9356));
ZONE.broadcastPacket(new PlaySound(1, "BS07_A", 1, _camera1.getObjectId(), _camera1.getX(), _camera1.getY(), _camera1.getZ()));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 75, -25, 0, 2500, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 75, -25, 0, 2500, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN2", 300, null, null);
break;
}
case "SPAWN2":
{
ZONE.broadcastPacket(new SpecialCamera(_camera1, 1800, -45, -45, 5000, 5000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN3", 4900, null, null);
break;
}
case "SPAWN3":
{
ZONE.broadcastPacket(new SpecialCamera(_camera1, 2500, -120, -45, 5000, 5000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN4", 4900, null, null);
break;
}
case "SPAWN4":
{
ZONE.broadcastPacket(new SpecialCamera(_camera2, 2200, 130, 0, 0, 1500, -20, 15, 1, 0, 0));
startQuestTimer("SPAWN5", 1400, null, null);
break;
}
case "SPAWN5":
{
ZONE.broadcastPacket(new SpecialCamera(_camera2, 2300, 100, 0, 2000, 4500, 0, 10, 1, 0, 0));
startQuestTimer("SPAWN6", 2500, null, null);
break;
}
@@ -202,7 +196,6 @@ public class Beleth extends AbstractNpcAI
ZONE.broadcastPacket(new StaticObject(door, false));
ZONE.broadcastPacket(new DoorStatusUpdate(door));
startQuestTimer("SPAWN7", 1700, null, null);
break;
}
@@ -210,23 +203,19 @@ public class Beleth extends AbstractNpcAI
{
ZONE.broadcastPacket(new SpecialCamera(_camera4, 1500, 210, 0, 0, 1500, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera4, 900, 255, 0, 5000, 6500, 0, 10, 1, 0, 0));
startQuestTimer("SPAWN8", 6000, null, null);
break;
}
case "SPAWN8":
{
_whirpool = addSpawn(WHIRPOOL, new Location(16323, 214917, -9356));
ZONE.broadcastPacket(new SpecialCamera(_camera4, 900, 255, 0, 0, 1500, 0, 10, 1, 0, 0));
startQuestTimer("SPAWN9", 1000, null, null);
break;
}
case "SPAWN9":
{
ZONE.broadcastPacket(new SpecialCamera(_camera4, 1000, 255, 0, 7000, 17000, 0, 25, 1, 0, 0));
startQuestTimer("SPAWN10", 3000, null, null);
break;
}
@@ -243,7 +232,6 @@ public class Beleth extends AbstractNpcAI
case "SPAWN11":
{
ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 1));
for (int i = 0; i < 6; i++)
{
final int x = (int) ((150 * Math.cos(i * 1.046666667)) + 16323);
@@ -261,14 +249,12 @@ public class Beleth extends AbstractNpcAI
case "SPAWN12":
{
ZONE.broadcastPacket(new SpecialCamera(_beleth, 0, 270, -5, 0, 4000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN13", 3500, null, null);
break;
}
case "SPAWN13":
{
ZONE.broadcastPacket(new SpecialCamera(_beleth, 800, 270, 10, 3000, 6000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN14", 5000, null, null);
break;
}
@@ -276,14 +262,12 @@ public class Beleth extends AbstractNpcAI
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 0, 5000, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 0, 5000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN15", 100, null, null);
break;
}
case "SPAWN15":
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 100, 270, 15, 3000, 6000, 0, 5, 1, 0, 0));
startQuestTimer("SPAWN16", 1400, null, null);
break;
}
@@ -297,21 +281,18 @@ public class Beleth extends AbstractNpcAI
case "SPAWN17":
{
ZONE.broadcastPacket(new MagicSkillUse(_beleth, _beleth, 5532, 1, 2000, 0));
startQuestTimer("SPAWN18", 2000, null, null);
break;
}
case "SPAWN18":
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 700, 270, 20, 1500, 8000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN19", 6900, null, null);
break;
}
case "SPAWN19":
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 40, 260, 0, 0, 4000, 0, 0, 1, 0, 0));
for (Npc fakeBeleth : _minions)
{
fakeBeleth.spawnMe();
@@ -326,28 +307,24 @@ public class Beleth extends AbstractNpcAI
case "SPAWN20":
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 40, 280, 0, 0, 4000, 5, 0, 1, 0, 0));
startQuestTimer("SPAWN21", 3000, null, null);
break;
}
case "SPAWN21":
{
ZONE.broadcastPacket(new SpecialCamera(_camera3, 5, 250, 5, 0, 13000, 20, 15, 1, 0, 0));
startQuestTimer("SPAWN22", 1000, null, null);
break;
}
case "SPAWN22":
{
ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 3));
startQuestTimer("SPAWN23", 4000, null, null);
break;
}
case "SPAWN23":
{
ZONE.broadcastPacket(new MagicSkillUse(_beleth, _beleth, 5533, 1, 2000, 0));
startQuestTimer("SPAWN24", 6800, null, null);
break;
}
@@ -355,7 +332,6 @@ public class Beleth extends AbstractNpcAI
{
_beleth.deleteMe();
_beleth = null;
for (Npc fakeBeleth : _minions)
{
fakeBeleth.deleteMe();
@@ -375,9 +351,7 @@ public class Beleth extends AbstractNpcAI
}
_lastAttack = System.currentTimeMillis();
startQuestTimer("CHECK_ATTACK", 60000, null, null);
startQuestTimer("SPAWN25", 60000, null, null);
break;
}
@@ -392,7 +366,6 @@ public class Beleth extends AbstractNpcAI
final int x = (int) ((650 * Math.cos(i * 0.39)) + 16323);
final int y = (int) ((650 * Math.sin(i * 0.39)) + 213170);
npc = addSpawn(FAKE_BELETH, new Location(x, y, -9357, 49152));
_minions.add(npc);
@@ -409,7 +382,6 @@ public class Beleth extends AbstractNpcAI
{
xm[i] = (int) ((1700 * Math.cos((i * 1.57) + 0.78)) + 16323);
ym[i] = (int) ((1700 * Math.sin((i * 1.57) + 0.78)) + 213170);
npc = addSpawn(FAKE_BELETH, new Location(xm[i], ym[i], -9357, 49152));
npc.setImmobilized(true);
@@ -461,7 +433,6 @@ public class Beleth extends AbstractNpcAI
xm[15] = (xm[7] + xm[0]) / 2;
ym[15] = (ym[7] + ym[0]) / 2;
_minions.add(addSpawn(FAKE_BELETH, new Location(xm[15], ym[15], -9357, 49152)));
_allowedObjId = getRandomEntry(_minions).getObjectId();
break;
}
@@ -477,26 +448,22 @@ public class Beleth extends AbstractNpcAI
_camera1 = addSpawn(29122, new Location(16323, 213170, -9357));
_camera1.broadcastPacket(new PlaySound(1, "BS07_D", 1, _camera1.getObjectId(), _camera1.getX(), _camera1.getY(), _camera1.getZ()));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 290, 25, 0, 10000, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 290, 25, 0, 10000, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 110, 25, 4000, 10000, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SocialAction(_beleth.getObjectId(), 5));
startQuestTimer("SPAWN27", 4000, null, null);
break;
}
case "SPAWN27":
{
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 295, 25, 4000, 5000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN28", 4500, null, null);
break;
}
case "SPAWN28":
{
ZONE.broadcastPacket(new SpecialCamera(_camera1, 400, 295, 10, 4000, 11000, 0, 25, 1, 0, 0));
startQuestTimer("SPAWN29", 9000, null, null);
break;
}
@@ -504,7 +471,6 @@ public class Beleth extends AbstractNpcAI
{
ZONE.broadcastPacket(new SpecialCamera(_camera1, 250, 90, 25, 0, 1000, 0, 0, 1, 0, 0));
ZONE.broadcastPacket(new SpecialCamera(_camera1, 250, 90, 25, 0, 10000, 0, 0, 1, 0, 0));
startQuestTimer("SPAWN30", 2000, null, null);
break;
}
@@ -514,7 +480,6 @@ public class Beleth extends AbstractNpcAI
_beleth.deleteMe();
_camera2 = addSpawn(29121, new Location(14056, 213170, -9357));
startQuestTimer("SPAWN31", 3500, null, null);
break;
}
@@ -528,7 +493,6 @@ public class Beleth extends AbstractNpcAI
ZONE.broadcastPacket(new StaticObject(door2, false));
ZONE.broadcastPacket(new DoorStatusUpdate(door2));
DoorData.getInstance().getDoor(DOOR3).openMe();
_camera1.deleteMe();
@@ -603,7 +567,6 @@ public class Beleth extends AbstractNpcAI
npc.setTarget(player);
npc.doCast(HORN_OF_RISING.getSkill());
}
return null;
}
@@ -620,7 +583,6 @@ public class Beleth extends AbstractNpcAI
npc.setTarget(player);
npc.doCast(FIREBALL.getSkill());
}
return null;
}
@@ -673,7 +635,6 @@ public class Beleth extends AbstractNpcAI
{
npc.getSpawn().setRespawnDelay(0);
}
return null;
}
@@ -684,16 +645,13 @@ public class Beleth extends AbstractNpcAI
if ((_killer != null) && (player.getObjectId() == _killer.getObjectId()))
{
_killer = null;
giveItems(player, RING);
html = "32470a.htm";
}
else
{
html = "32470b.htm";
}
return HtmCache.getInstance().getHtm(player, "data/html/default/" + html);
}
@@ -747,7 +705,6 @@ public class Beleth extends AbstractNpcAI
if (npc.getId() == REAL_BELETH)
{
cancelQuestTimer("CHECK_ATTACK", null, null);
setBelethKiller(killer);
GrandBossManager.getInstance().setBossStatus(REAL_BELETH, DEAD);
final long respawnTime = (Config.BELETH_SPAWN_INTERVAL + getRandom(-Config.BELETH_SPAWN_RANDOM, Config.BELETH_SPAWN_RANDOM)) * 3600000;
@@ -755,7 +712,6 @@ public class Beleth extends AbstractNpcAI
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
GrandBossManager.getInstance().setStatSet(REAL_BELETH, info);
startQuestTimer("BELETH_UNLOCK", respawnTime, null, null);
deleteAll();
npc.deleteMe();
@@ -776,7 +732,6 @@ public class Beleth extends AbstractNpcAI
_priest.decayMe();
_stone = addSpawn(STONE_COFFIN, new Location(12470, 215607, -9381, 49152));
startQuestTimer("SPAWN26", 1000, null, null);
}
else if (npc.getObjectId() == _allowedObjId)

View File

@@ -84,7 +84,6 @@ public class Core extends AbstractNpcAI
private Core()
{
registerMobs(CORE, DEATH_KNIGHT, DOOM_WRAITH, SUSCEPTOR);
_firstAttacked = false;
final StatSet info = GrandBossManager.getInstance().getStatSet(CORE);
if (GrandBossManager.getInstance().getBossStatus(CORE) == DEAD)
@@ -201,7 +200,6 @@ public class Core extends AbstractNpcAI
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SYSTEM_IS_BEING_SHUT_DOWN));
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npc.getId(), NpcStringId.EMPTY));
_firstAttacked = false;
GrandBossManager.getInstance().setBossStatus(CORE, DEAD);
// Calculate Min and Max respawn times randomly.
final long respawnTime = (Config.CORE_SPAWN_INTERVAL + getRandom(-Config.CORE_SPAWN_RANDOM, Config.CORE_SPAWN_RANDOM)) * 3600000;

View File

@@ -59,7 +59,6 @@ public class DrChaos extends AbstractNpcAI
{
addFirstTalkId(DOCTOR_CHAOS); // Different HTMs following actual humor.
addSpawnId(DOCTOR_CHAOS); // Timer activation at 30sec + paranoia activity.
addKillId(CHAOS_GOLEM); // Message + despawn.
addAttackId(CHAOS_GOLEM); // Random messages when he attacks.
@@ -91,7 +90,6 @@ public class DrChaos extends AbstractNpcAI
final int heading = info.getInt("heading");
final int hp = info.getInt("currentHP");
final int mp = info.getInt("currentMP");
final GrandBossInstance golem = (GrandBossInstance) addSpawn(CHAOS_GOLEM, loc_x, loc_y, loc_z, heading, false, 0, false);
GrandBossManager.getInstance().addBoss(golem);
@@ -198,11 +196,9 @@ public class DrChaos extends AbstractNpcAI
public String onFirstTalk(Npc npc, PlayerInstance player)
{
String htmltext = "";
if (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL)
{
_pissedOffTimer -= 1 + Rnd.get(5); // remove 1-5 secs.
if ((_pissedOffTimer > 20) && (_pissedOffTimer <= 30))
{
htmltext = "<html><body>Doctor Chaos:<br>What?! Who are you? How did you come here?<br>You really look suspicious... Aren't those filthy members of Black Anvil guild send you? No? Mhhhhh... I don't trust you!</body></html>";
@@ -220,7 +216,6 @@ public class DrChaos extends AbstractNpcAI
crazyMidgetBecomesAngry(npc);
}
}
return htmltext;
}
@@ -232,7 +227,6 @@ public class DrChaos extends AbstractNpcAI
// Initialization of the paranoia.
startQuestTimer("paranoia_activity", 1000, npc, null, true);
return null;
}
@@ -244,7 +238,6 @@ public class DrChaos extends AbstractNpcAI
// "lock" Dr. Chaos for regular RB time (36H fixed +- 24H random)
final long respawnTime = (36 + Rnd.get(-24, 24)) * 3600000;
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, DEAD);
startQuestTimer("reset_drchaos", respawnTime, null, null, false);
@@ -252,7 +245,6 @@ public class DrChaos extends AbstractNpcAI
final StatSet info = GrandBossManager.getInstance().getStatSet(CHAOS_GOLEM);
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
GrandBossManager.getInstance().setStatSet(CHAOS_GOLEM, info);
return null;
}

View File

@@ -504,7 +504,6 @@ public class Frintezza extends AbstractNpcAI
else if (event.equalsIgnoreCase("camera_1"))
{
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, FIGHTING);
_frintezzaDummy = addSpawn(29052, 174240, -89805, -5022, 16048, false, 0);
_frintezzaDummy.setInvul(true);
_frintezzaDummy.setImmobilized(true);
@@ -543,34 +542,28 @@ public class Frintezza extends AbstractNpcAI
else if (event.equalsIgnoreCase("camera_3"))
{
_zone.broadcastPacket(new SpecialCamera(_overheadDummy, 300, 90, -10, 6500, 7000, 0, 0, 1, 0, 0));
_frintezza = (GrandBossInstance) addSpawn(FRINTEZZA, 174240, -89805, -5022, 16048, false, 0);
GrandBossManager.getInstance().addBoss(_frintezza);
_frintezza.setImmobilized(true);
_frintezza.setInvul(true);
_frintezza.disableAllSkills();
// _Zone.updateKnownList(frintezza);
_demon2 = (MonsterInstance) addSpawn(29051, 175876, -88713, -5100, 28205, false, 0);
_demon2.setImmobilized(true);
_demon2.disableAllSkills();
// _Zone.updateKnownList(demon2);
_demon3 = (MonsterInstance) addSpawn(29051, 172608, -88702, -5100, 64817, false, 0);
_demon3.setImmobilized(true);
_demon3.disableAllSkills();
// _Zone.updateKnownList(demon3);
_demon1 = (MonsterInstance) addSpawn(29050, 175833, -87165, -5100, 35048, false, 0);
_demon1.setImmobilized(true);
_demon1.disableAllSkills();
// _Zone.updateKnownList(demon1);
_demon4 = (MonsterInstance) addSpawn(29050, 172634, -87165, -5100, 57730, false, 0);
_demon4.setImmobilized(true);
_demon4.disableAllSkills();
// _Zone.updateKnownList(demon4);
startQuestTimer("camera_4", 6500, _overheadDummy, null);
}
else if (event.equalsIgnoreCase("camera_4"))
@@ -614,7 +607,6 @@ public class Frintezza extends AbstractNpcAI
{
_zone.broadcastPacket(new SocialAction(_demon1.getObjectId(), 1));
_zone.broadcastPacket(new SocialAction(_demon4.getObjectId(), 1));
for (Creature pc : _zone.getCharactersInside())
{
if (pc.isPlayer())
@@ -662,7 +654,6 @@ public class Frintezza extends AbstractNpcAI
_portraitDummy3.deleteMe();
_portraitDummy1 = null;
_portraitDummy3 = null;
startQuestTimer("camera_12", 4500, _frintezza, null);
}
else if (event.equalsIgnoreCase("camera_12"))
@@ -700,14 +691,12 @@ public class Frintezza extends AbstractNpcAI
{
_zone.broadcastPacket(new SpecialCamera(_overheadDummy, 600, 180, -25, 0, 10000, 0, 0, 1, 0, 0));
_zone.broadcastPacket(new MagicSkillUse(_scarletDummy, _overheadDummy, 5004, 1, 5800, 0));
_weakScarlet = (GrandBossInstance) addSpawn(29046, 174232, -88020, -5110, 16384, false, 0, true);
_weakScarlet.setInvul(true);
_weakScarlet.setImmobilized(true);
_weakScarlet.disableAllSkills();
// _Zone.updateKnownList(weakScarlet);
_activeScarlet = _weakScarlet;
startQuestTimer("camera_19", 2400, _scarletDummy, null);
startQuestTimer("camera_19b", 5000, _scarletDummy, null);
}
@@ -736,27 +725,22 @@ public class Frintezza extends AbstractNpcAI
_portrait2.setImmobilized(true);
_portrait2.disableAllSkills();
// _Zone.updateKnownList(portrait2);
_portrait3 = (MonsterInstance) addSpawn(29049, 172608, -88702, -5000, 64817, false, 0);
_portrait3.setImmobilized(true);
_portrait3.disableAllSkills();
// _Zone.updateKnownList(portrait3);
_portrait1 = (MonsterInstance) addSpawn(29048, 175833, -87165, -5000, 35048, false, 0);
_portrait1.setImmobilized(true);
_portrait1.disableAllSkills();
// _Zone.updateKnownList(portrait1);
_portrait4 = (MonsterInstance) addSpawn(29048, 172634, -87165, -5000, 57730, false, 0);
_portrait4.setImmobilized(true);
_portrait4.disableAllSkills();
// _Zone.updateKnownList(portrait4);
_overheadDummy.deleteMe();
_scarletDummy.deleteMe();
_overheadDummy = null;
_scarletDummy = null;
startQuestTimer("camera_23", 2000, _weakScarlet, null);
startQuestTimer("start_pc", 2000, _weakScarlet, null);
startQuestTimer("loc_check", 60000, _weakScarlet, null, true);
@@ -881,7 +865,6 @@ public class Frintezza extends AbstractNpcAI
else if (event.equalsIgnoreCase("morph_06"))
{
_zone.broadcastPacket(new SpecialCamera(_frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
cancelQuestTimers("loc_check");
_scarletX = _weakScarlet.getX();
@@ -897,7 +880,6 @@ public class Frintezza extends AbstractNpcAI
_weakScarlet.disableAllSkills();
_weakScarlet.setRHandId(7903);
// _Zone.updateKnownList(weakScarlet);
startQuestTimer("morph_07", 7000, _frintezza, null);
}
else if (event.equalsIgnoreCase("morph_07"))
@@ -925,7 +907,6 @@ public class Frintezza extends AbstractNpcAI
{
_weakScarlet.doDie(_weakScarlet);
_zone.broadcastPacket(new SpecialCamera(_weakScarlet, 450, _angle, 14, 8000, 8000, 0, 0, 1, 0, 0));
startQuestTimer("morph_12", 6250, _weakScarlet, null);
startQuestTimer("morph_13", 7200, _weakScarlet, null);
}
@@ -942,9 +923,7 @@ public class Frintezza extends AbstractNpcAI
_strongScarlet.disableAllSkills();
// _Zone.updateKnownList(strongScarlet);
_activeScarlet = _strongScarlet;
_zone.broadcastPacket(new SpecialCamera(_strongScarlet, 450, _angle, 12, 500, 14000, 0, 0, 1, 0, 0));
startQuestTimer("morph_14", 3000, _strongScarlet, null);
startQuestTimer("loc_check", 60000, _strongScarlet, null, true);
}
@@ -1115,7 +1094,6 @@ public class Frintezza extends AbstractNpcAI
{
_onMorph = 1;
_zone.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
startQuestTimer("attack_stop", 0, _frintezza, null);
startQuestTimer("stop_pc", 0, npc, null);
startQuestTimer("stop_npc", 0, npc, null);
@@ -1172,7 +1150,6 @@ public class Frintezza extends AbstractNpcAI
_weakScarlet.doCast(skill);
}
startQuestTimer("skill02", _skill[i][2] + 5000 + Rnd.get(10000), npc, null);
if (i == 5)
{
_abnormal = 1;
@@ -1202,7 +1179,6 @@ public class Frintezza extends AbstractNpcAI
_strongScarlet.doCast(skill);
}
startQuestTimer("skill03", _skill[i][2] + 5000 + Rnd.get(10000), npc, null);
if (i == 10)
{
_abnormal = 1;
@@ -1254,7 +1230,6 @@ public class Frintezza extends AbstractNpcAI
startQuestTimer("close", 1000, npc, null);
startQuestTimer("room1_del", 1000, npc, null);
startQuestTimer("room2_del", 1000, npc, null);
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
}
else if (event.equalsIgnoreCase("frintezza_despawn"))
@@ -1275,9 +1250,7 @@ public class Frintezza extends AbstractNpcAI
startQuestTimer("room2_del", 1000, npc, null);
startQuestTimer("room3_del", 1000, npc, null);
startQuestTimer("minions_despawn", 1000, npc, null);
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
cancelQuestTimers("frintezza_despawn");
}
}
@@ -1300,7 +1273,6 @@ public class Frintezza extends AbstractNpcAI
final Npc mob = addSpawn(npc.getId() + 2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0);
// mob.setIsRaidMinion(true);
_minions.add((Attackable) mob);
startQuestTimer("action", 200, mob, null);
startQuestTimer("spawn_minion", 18000, npc, null);
}
@@ -1370,12 +1342,10 @@ public class Frintezza extends AbstractNpcAI
player.destroyItemByItemId("Quest", 8073, 1, player, true);
final CommandChannel cc = player.getParty().getCommandChannel();
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, WAITING);
startQuestTimer("close", 0, npc, null);
startQuestTimer("room1_spawn", 5000, npc, null);
startQuestTimer("room_final", 2100000, npc, null);
startQuestTimer("frintezza_despawn", 60000, npc, null, true);
_lastAction = System.currentTimeMillis();
for (Party party : cc.getParties())
{
@@ -1436,10 +1406,8 @@ public class Frintezza extends AbstractNpcAI
if ((npc.getId() == SCARLET1) && (_secondMorph == 0) && (_thirdMorph == 0) && (_onMorph == 0) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.75)) && (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING))
{
startQuestTimer("attack_stop", 0, _frintezza, null);
_secondMorph = 1;
_onMorph = 1;
startQuestTimer("stop_pc", 1000, npc, null);
startQuestTimer("stop_npc", 1000, npc, null);
startQuestTimer("morph_01", 1100, npc, null);
@@ -1447,10 +1415,8 @@ public class Frintezza extends AbstractNpcAI
else if ((npc.getId() == SCARLET1) && (_secondMorph == 1) && (_thirdMorph == 0) && (_onMorph == 0) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING))
{
startQuestTimer("attack_stop", 0, _frintezza, null);
_thirdMorph = 1;
_onMorph = 1;
startQuestTimer("stop_pc", 2000, npc, null);
startQuestTimer("stop_npc", 2000, npc, null);
startQuestTimer("morph_05a", 2000, npc, null);
@@ -1473,7 +1439,6 @@ public class Frintezza extends AbstractNpcAI
npc.doCast(skill);
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@@ -1501,11 +1466,9 @@ public class Frintezza extends AbstractNpcAI
startQuestTimer("room3_del", 60000, npc, null);
startQuestTimer("minions_despawn", 60000, npc, null);
startQuestTimer("remove_players", 900000, npc, null);
GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
long respawnTime = Config.FRINTEZZA_SPAWN_INTERVAL + getRandom(-Config.FRINTEZZA_SPAWN_RANDOM, Config.FRINTEZZA_SPAWN_RANDOM);
respawnTime *= 3600000;
startQuestTimer("frintezza_unlock", respawnTime, npc, null);
// also save the respawn time so that the info is maintained past reboots
final StatSet info = GrandBossManager.getInstance().getStatSet(FRINTEZZA);
@@ -1519,7 +1482,6 @@ public class Frintezza extends AbstractNpcAI
{
startQuestTimer("room1_del", 100, npc, null);
startQuestTimer("room2_spawn", 100, npc, null);
DoorData.getInstance().getDoor(25150042).openMe();
DoorData.getInstance().getDoor(25150043).openMe();
// DoorData.getInstance().getDoor(25150045).openMe();
@@ -1570,7 +1532,6 @@ public class Frintezza extends AbstractNpcAI
if (_killDarkChoirCaptain == 8)
{
startQuestTimer("room2_del", 100, npc, null);
DoorData.getInstance().getDoor(25150045).openMe();
DoorData.getInstance().getDoor(25150046).openMe();

View File

@@ -266,7 +266,6 @@ public class QueenAnt extends AbstractNpcAI
break;
}
}
return super.onSpawn(npc);
}

View File

@@ -152,7 +152,6 @@ public class Sailren extends AbstractNpcAI
sailren.setInvul(true);
sailren.setImmobilized(true);
zone.broadcastPacket(new SpecialCamera(movieNpc, 60, 110, 30, 4000, 1500, 20000, 0, 65, 1, 0, 0));
startQuestTimer("ATTACK", 24600, sailren, null);
startQuestTimer("ANIMATION", 2000, movieNpc, null);
startQuestTimer("CAMERA_1", 4100, movieNpc, null);

View File

@@ -46,7 +46,6 @@ public class Asamah extends AbstractNpcAI
{
htmltext = event;
}
return htmltext;
}

View File

@@ -64,7 +64,6 @@ public class BlackJudge extends AbstractNpcAI
if (player.getDeathPenaltyBuffLevel() > 0)
{
final int cost = COSTS[level];
if (player.getAdena() >= cost)
{
takeItems(player, Inventory.ADENA_ID, cost);

View File

@@ -91,7 +91,6 @@ public class BlackMarketeerOfMammon extends AbstractNpcAI
htmltext = "31092-02.html";
}
}
return htmltext;
}
@@ -106,7 +105,6 @@ public class BlackMarketeerOfMammon extends AbstractNpcAI
maxtTime.set(Calendar.HOUR_OF_DAY, 23);
maxtTime.set(Calendar.MINUTE, 59);
maxtTime.set(Calendar.SECOND, 59);
return (currentTime.compareTo(minTime) >= 0) && (currentTime.compareTo(maxtTime) <= 0);
}

View File

@@ -262,7 +262,6 @@ public class CastleCourtMagician extends AbstractNpcAI
if (player.getClanId() == npc.getCastle().getOwnerId())
{
final PlayerInstance clanLeader = player.getClan().getLeader().getPlayerInstance();
if ((clanLeader != null) && clanLeader.isAffectedBySkill(CLAN_GATE))
{
if (CallPc.checkSummonTargetStatus(player, clanLeader)) // TODO: Custom one, retail dont check it but for sure lets check same conditions like when summon player by skill.

View File

@@ -55,7 +55,6 @@ public class DivineBeast extends AbstractNpcAI
cancelQuestTimer(event, npc, player);
player.getSummon().unSummon(player);
}
return super.onAdvEvent(event, npc, player);
}

View File

@@ -69,7 +69,6 @@ public class FleeMonsters extends AbstractNpcAI
final int posX = (int) (npc.getX() + (FLEE_DISTANCE * Math.cos(radians)));
final int posY = (int) (npc.getY() + (FLEE_DISTANCE * Math.sin(radians)));
final int posZ = npc.getZ();
final Location destination = GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, attacker.getInstanceId());
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, destination);
return super.onAttack(npc, attacker, damage, isSummon);

View File

@@ -93,7 +93,6 @@ public class FortressSiegeManager extends AbstractNpcAI
final Clan clan = player.getClan();
final Fort fortress = npc.getFort();
final Castle castle = npc.getCastle();
if (clan.getFortId() == fortress.getResidenceId())
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
@@ -163,7 +162,6 @@ public class FortressSiegeManager extends AbstractNpcAI
{
final Clan clan = player.getClan();
final Fort fortress = npc.getFort();
if (clan.getFortId() == fortress.getResidenceId())
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());

View File

@@ -67,7 +67,6 @@ public class GrandBossTeleporters extends AbstractNpcAI
{
String htmltext = "";
final QuestState qs = getQuestState(player, false);
if (hasQuestItems(player, VACUALITE_FLOATING_STONE))
{
player.teleToLocation(ENTER_HALL_OF_FLAMES);
@@ -93,7 +92,6 @@ public class GrandBossTeleporters extends AbstractNpcAI
if (valakasAI() != null)
{
final int status = GrandBossManager.getInstance().getBossStatus(29028);
if ((status == 0) || (status == 1))
{
if (playerCount >= 200)
@@ -104,14 +102,12 @@ public class GrandBossTeleporters extends AbstractNpcAI
{
qs.unset("allowEnter");
final BossZone zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
if (zone != null)
{
zone.allowPlayerEntry(player, 30);
}
player.teleToLocation(TELEPORT_INTO_VALAKAS_LAIR.getX() + getRandom(600), TELEPORT_INTO_VALAKAS_LAIR.getY() + getRandom(600), TELEPORT_INTO_VALAKAS_LAIR.getZ());
playerCount++;
if (status == 0)

View File

@@ -56,7 +56,6 @@ public class HuntingGroundsTeleport extends AbstractNpcAI
{
final SevenSigns ss = SevenSigns.getInstance();
final int playerCabal = ss.getPlayerCabal(player.getObjectId());
if (playerCabal == SevenSigns.CABAL_NULL)
{
return CommonUtil.contains(DAWN_NPCS, npc.getId()) ? "dawn_tele-no.htm" : "dusk_tele-no.htm";

View File

@@ -49,7 +49,6 @@ public class Katenar extends AbstractNpcAI
{
final Npc npc0 = npc.getVariables().getObject("npc0", Npc.class);
final String htmltext = null;
switch (event)
{
case "CREATED_50":

View File

@@ -125,7 +125,6 @@ public class NpcBufferAI implements Runnable
if (target.isPlayable())
{
final PlayerInstance targetPlayer = target.getActingPlayer();
if (player == targetPlayer)
{
return true;
@@ -185,7 +184,6 @@ public class NpcBufferAI implements Runnable
if (target.isPlayable())
{
final PlayerInstance targetPlayer = target.getActingPlayer();
if (!isFriendly(player, targetPlayer))
{
if (targetPlayer.getPvpFlag() != 0)

View File

@@ -126,7 +126,6 @@ public class CabaleBuffer extends AbstractNpcAI
final int winningCabal = SevenSigns.getInstance().getCabalHighestScore();
int losingCabal = SevenSigns.CABAL_NULL;
if (winningCabal == SevenSigns.CABAL_DAWN)
{
losingCabal = SevenSigns.CABAL_DUSK;
@@ -144,7 +143,6 @@ public class CabaleBuffer extends AbstractNpcAI
}
final int playerCabal = SevenSigns.getInstance().getPlayerCabal(player.getObjectId());
if ((playerCabal == winningCabal) && (playerCabal != SevenSigns.CABAL_NULL) && (_npc.getId() == SevenSigns.ORATOR_NPC_ID))
{
if (!player.isMageClass())
@@ -254,7 +252,6 @@ public class CabaleBuffer extends AbstractNpcAI
if (level == 0)
{
doCast = true;
}
else if ((level == 1) && (getRandom(100) < 5))
{

View File

@@ -156,7 +156,6 @@ public class OracleTeleport extends AbstractNpcAI
{
String htmltext = "";
final QuestState qs = getQuestState(player, true);
final int npcId = npc.getId();
if (event.equalsIgnoreCase("Return"))
{
@@ -278,7 +277,6 @@ public class OracleTeleport extends AbstractNpcAI
{
String htmltext = "";
final QuestState qs = getQuestState(player, true);
final int npcId = npc.getId();
if (CommonUtil.contains(TOWN_DAWN, npcId))
{

View File

@@ -111,7 +111,6 @@ public class Servitors extends AbstractNpcAI
final ServitorInstance target = (ServitorInstance) event.getTarget();
final PlayerInstance master = target.getOwner();
final QuestState qs = master.getQuestState(Q00230_TestOfTheSummoner.class.getSimpleName());
if ((qs != null) && hasQuestItems(master, CRYSTAL_OF_INPROGRESS_3RD))
{
final Npc killer = (Npc) event.getAttacker();

View File

@@ -56,7 +56,6 @@ public class SinEater extends AbstractNpcAI
{
final int random = getRandom(100);
final Summon summon = player.getSummon();
if (random < 20)
{
broadcastSummonSay(summon, NpcStringId.YAWWWWN_IT_S_SO_BORING_HERE_WE_SHOULD_GO_AND_FIND_SOME_ACTION);
@@ -90,7 +89,6 @@ public class SinEater extends AbstractNpcAI
{
final int random = getRandom(100);
final Summon summon = (Summon) event.getTarget();
if (random < 30)
{
broadcastSummonSay(summon, NpcStringId.OH_THIS_IS_JUST_GREAT_WHAT_ARE_YOU_GOING_TO_DO_NOW);
@@ -114,7 +112,6 @@ public class SinEater extends AbstractNpcAI
{
final int random = getRandom(100);
final Summon summon = (Summon) event.getTarget();
if (random < 35)
{
broadcastSummonSay(summon, NpcStringId.OH_THAT_SMARTS);
@@ -143,7 +140,6 @@ public class SinEater extends AbstractNpcAI
if (getRandom(100) < 10)
{
final int random = getRandom(100);
if (random < 25)
{
broadcastSummonSay(summon, NpcStringId.USING_A_SPECIAL_SKILL_HERE_COULD_TRIGGER_A_BLOODBATH);

View File

@@ -70,7 +70,6 @@ public class SteelCitadelTeleport extends AbstractNpcAI
if (zone != null)
{
GrandBossManager.getInstance().setBossStatus(BELETH, 1);
for (Party party : channel.getParties())
{
if (party == null)

View File

@@ -226,7 +226,6 @@ public class SubclassCertification extends AbstractNpcAI
{
return 6;
}
return -1;
}
@@ -239,7 +238,6 @@ public class SubclassCertification extends AbstractNpcAI
String htmltext;
final String var = variable + level + "-" + player.getClassIndex();
if (player.getVariables().hasVariable(var) && !player.getVariables().getString(var).equals("0"))
{
htmltext = "AlreadyReceived.html";

View File

@@ -106,7 +106,6 @@ public class DevastatedCastle extends ClanHallSiegeEngine
}
_missionAccomplished = true;
cancelSiegeTask();
endSiege();

View File

@@ -85,7 +85,6 @@ public class FortressOfTheDead extends ClanHallSiegeEngine
synchronized (this)
{
final Clan clan = attacker.getClan();
if ((clan != null) && checkIsAttacker(clan))
{
final int id = clan.getId();
@@ -113,7 +112,6 @@ public class FortressOfTheDead extends ClanHallSiegeEngine
}
final int npcId = npc.getId();
if ((npcId == ALFRED) || (npcId == GISELLE))
{
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
@@ -154,7 +152,6 @@ public class FortressOfTheDead extends ClanHallSiegeEngine
{
// Siege must start at night
final int hoursLeft = (GameTimeController.getInstance().getGameTime() / 60) % 24;
if ((hoursLeft < 0) || (hoursLeft > 6))
{
cancelSiegeTask();

View File

@@ -538,7 +538,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
}
final String passage = split[1];
if (!isValidPassage(passage))
{
return null;
@@ -547,7 +546,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
if (_usedTextPassages.containsKey(passage))
{
final ArrayList<Clan> list = _usedTextPassages.get(passage);
if (list.contains(clan))
{
html = "yeti_passage_used.htm";
@@ -594,7 +592,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
// html = "yeti_cannot_exchange.htm";
// }
// }
return html;
}
@@ -614,7 +611,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
final int npcId = npc.getId();
final int index = _acceptedClans.indexOf(clan);
if (npcId == CHEST)
{
shoutRandomText(npc);
@@ -643,7 +639,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
}
final WorldObject target = player.getTarget();
if (!(target instanceof Npc))
{
return null;
@@ -750,9 +745,7 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
{
final Spawn oldSpawn = _gourds[(iterator - 1) - i];
final Spawn curSpawn = tempArray[i];
_gourds[(iterator - 1) - i] = curSpawn;
curSpawn.getLastSpawn().teleToLocation(oldSpawn.getLocation());
}
}
@@ -796,7 +789,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
private void shoutRandomText(Npc npc)
{
final int length = _textPassages.length;
if (_usedTextPassages.size() >= length)
{
return;
@@ -804,7 +796,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
final int randomPos = getRandom(length);
final String message = _textPassages[randomPos];
if (_usedTextPassages.containsKey(message))
{
shoutRandomText(npc);
@@ -897,7 +888,6 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
final int day = c.get(Calendar.DAY_OF_MONTH);
final int hour = c.get(Calendar.HOUR);
final int mins = c.get(Calendar.MINUTE);
_registrationEnds = year + "-" + month + "-" + day + " " + hour + (mins < 10 ? ":0" : ":") + mins;
}

View File

@@ -37,23 +37,17 @@ public class BanditStronghold extends FlagWar
FLAG_GREEN = 35425;
FLAG_BLUE = 35426;
FLAG_PURPLE = 35427;
ALLY_1 = 35428;
ALLY_2 = 35429;
ALLY_3 = 35430;
ALLY_4 = 35431;
ALLY_5 = 35432;
TELEPORT_1 = 35560;
MESSENGER = 35437;
OUTTER_DOORS_TO_OPEN[0] = 22170001;
OUTTER_DOORS_TO_OPEN[1] = 22170002;
INNER_DOORS_TO_OPEN[0] = 22170003;
INNER_DOORS_TO_OPEN[1] = 22170004;
FLAG_COORDS[0] = new Location(83699, -17468, -1774, 19048);
FLAG_COORDS[1] = new Location(82053, -17060, -1784, 5432);
FLAG_COORDS[2] = new Location(82142, -15528, -1799, 58792);
@@ -63,7 +57,6 @@ public class BanditStronghold extends FlagWar
FLAG_COORDS[6] = new Location(84375, -17060, -1860, 27712);
final Collection<ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(ResidenceHallTeleportZone.class);
for (ResidenceHallTeleportZone teleZone : zoneList)
{
if (teleZone.getResidenceId() != BANDIT_STRONGHOLD)
@@ -72,7 +65,6 @@ public class BanditStronghold extends FlagWar
}
final int id = teleZone.getResidenceZoneId();
if ((id < 0) || (id >= 6))
{
continue;
@@ -123,7 +115,6 @@ public class BanditStronghold extends FlagWar
break;
}
}
return result;
}
@@ -160,7 +151,6 @@ public class BanditStronghold extends FlagWar
break;
}
}
return result;
}

View File

@@ -161,7 +161,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
{
String html = event;
final Clan clan = player.getClan();
if (event.startsWith("register_clan")) // Register the clan for the siege
{
if (!_hall.isRegistering())
@@ -350,7 +349,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
}
}
}
return html;
}
@@ -627,7 +625,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
index = clanId == _hall.getOwnerId() ? 5 : 6;
}
final Location loc = FLAG_COORDS[index];
data.flagInstance = new Spawn(data.flag);
data.flagInstance.setLocation(loc);
data.flagInstance.setRespawnDelay(10000);
@@ -662,7 +659,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
private void registerClan(Clan clan)
{
final int clanId = clan.getId();
final SiegeClan sc = new SiegeClan(clanId, SiegeClanType.ATTACKER);
getAttackers().put(clanId, sc);
@@ -692,7 +688,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
private final void removeParticipant(int clanId, boolean teleport)
{
final ClanData dat = _data.remove(clanId);
if (dat != null)
{
// Destroy clan flag
@@ -761,7 +756,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
while (rset.next())
{
final int clanId = rset.getInt("clan_id");
if (ClanTable.getInstance().getClan(clanId) == null)
{
LOGGER.warning(getName() + ": Loaded an unexistent clan as attacker! Clan ID: " + clanId);
@@ -771,7 +765,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
final ClanData data = new ClanData();
data.flag = rset.getInt("flag");
data.npc = rset.getInt("npc");
_data.put(clanId, data);
loadAttackerMembers(clanId);
}

View File

@@ -37,17 +37,13 @@ public class WildBeastReserve extends FlagWar
FLAG_GREEN = 35609; // Blue flag
FLAG_BLUE = 35610; // Green flag
FLAG_PURPLE = 35611; // Black flag
ALLY_1 = 35618;
ALLY_2 = 35619;
ALLY_3 = 35620;
ALLY_4 = 35621;
ALLY_5 = 35622;
TELEPORT_1 = 35612;
MESSENGER = 35627;
FLAG_COORDS[0] = new Location(56963, -92211, -1303, 60611);
FLAG_COORDS[1] = new Location(58090, -91641, -1303, 47274);
FLAG_COORDS[2] = new Location(58908, -92556, -1303, 34450);
@@ -55,15 +51,12 @@ public class WildBeastReserve extends FlagWar
FLAG_COORDS[4] = new Location(57152, -93360, -1303, 8400);
FLAG_COORDS[5] = new Location(59116, -93251, -1302, 31000);
FLAG_COORDS[6] = new Location(56432, -92864, -1303, 64000);
OUTTER_DOORS_TO_OPEN[0] = 21150003;
OUTTER_DOORS_TO_OPEN[1] = 21150004;
INNER_DOORS_TO_OPEN[0] = 21150001;
INNER_DOORS_TO_OPEN[1] = 21150002;
final Collection<ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(ResidenceHallTeleportZone.class);
for (ResidenceHallTeleportZone teleZone : zoneList)
{
if (teleZone.getResidenceId() != BEAST_FARM)
@@ -72,7 +65,6 @@ public class WildBeastReserve extends FlagWar
}
final int id = teleZone.getResidenceZoneId();
if ((id < 0) || (id >= 6))
{
continue;
@@ -123,7 +115,6 @@ public class WildBeastReserve extends FlagWar
break;
}
}
return result;
}
@@ -160,7 +151,6 @@ public class WildBeastReserve extends FlagWar
break;
}
}
return result;
}

View File

@@ -103,7 +103,6 @@ public class EchoCrystals extends AbstractNpcAI
{
String htmltext = "";
final QuestState qs = player.getQuestState(EchoCrystals.class.getSimpleName());
if ((qs != null) && Util.isDigit(event))
{
final int score = Integer.parseInt(event);
@@ -113,7 +112,6 @@ public class EchoCrystals extends AbstractNpcAI
final String ok = SCORES.get(score).getOkMsg();
final String noadena = SCORES.get(score).getNoAdenaMsg();
final String noscore = SCORES.get(score).getNoScoreMsg();
if (!hasQuestItems(player, score))
{
htmltext = npc.getId() + "-" + noscore + ".htm";
@@ -130,11 +128,6 @@ public class EchoCrystals extends AbstractNpcAI
}
}
}
else
{
return htmltext;
}
return htmltext;
}

View File

@@ -150,7 +150,6 @@ public class NewbieCoupons extends AbstractNpcAI
public String onTalk(Npc npc, PlayerInstance player)
{
getQuestState(player, true);
return "30598.htm";
}

View File

@@ -271,12 +271,10 @@ public class NpcLocationInfo extends AbstractNpcAI
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = event;
if (Util.isDigit(event))
{
htmltext = null;
final int npcId = Integer.parseInt(event);
if (CommonUtil.contains(NPCRADAR, npcId))
{
int x = 0;
@@ -302,12 +300,10 @@ public class NpcLocationInfo extends AbstractNpcAI
String htmltext = getNoQuestMsg(player);
final int npcId = npc.getId();
getQuestState(player, true);
if (CommonUtil.contains(NPC, npcId))
{
htmltext = npcId + ".htm";
}
return htmltext;
}

View File

@@ -76,7 +76,6 @@ public class RaidbossInfo extends AbstractNpcAI
{
htmltext = null;
final int bossId = Integer.parseInt(event);
if (RAIDS.contains(bossId))
{
final Spawn spawn = SpawnTable.getInstance().getAnySpawn(bossId);

View File

@@ -55,7 +55,6 @@ public class ShadowWeapons extends AbstractNpcAI
String htmltext;
final boolean hasD = hasQuestItems(player, 8869); // Shadow Item Exchange Coupon (D-Grade)
final boolean hasC = hasQuestItems(player, 8870); // Shadow Item Exchange Coupon (C-Grade)
if (hasD || hasC)
{
if (!hasD)

View File

@@ -112,7 +112,6 @@ public class SubClassSkills extends AbstractNpcAI
for (Skill s : certSkills)
{
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has cert skill on subclass :" + s.getName() + "(" + s.getId() + "/" + s.getLevel() + "), class:" + ClassListData.getInstance().getClass(player.getClassId()).getClassName(), IllegalActionPunishmentType.NONE);
if (Config.SKILL_CHECK_REMOVE)
{
player.removeSkill(s);
@@ -164,7 +163,6 @@ public class SubClassSkills extends AbstractNpcAI
try
{
id = Integer.parseInt(qValue.replace(";", ""));
Skill skill = null;
if (certSkills != null)
{

View File

@@ -96,9 +96,7 @@ public class Elpies extends Event
EVENT_ACTIVE = true;
final EventLocation randomLoc = getRandomEntry(EventLocation.values());
final long despawnDelay = EVENT_DURATION_MINUTES * 60000;
for (int i = 0; i < ELPY_AMOUNT; i++)
{
_elpies.add(addSpawn(ELPY, randomLoc.getRandomX(), randomLoc.getRandomY(), randomLoc.getZ(), 0, true, despawnDelay));
@@ -108,7 +106,6 @@ public class Elpies extends Event
Broadcast.toAllOnlinePlayers("Elpy invasion in " + randomLoc.getName());
Broadcast.toAllOnlinePlayers("Help us exterminate them!");
Broadcast.toAllOnlinePlayers("You have " + EVENT_DURATION_MINUTES + " minutes!");
_eventTask = ThreadPool.schedule(() ->
{
Broadcast.toAllOnlinePlayers("Time is up!");
@@ -126,7 +123,6 @@ public class Elpies extends Event
}
EVENT_ACTIVE = false;
if (_eventTask != null)
{
_eventTask.cancel(true);
@@ -153,14 +149,12 @@ public class Elpies extends Event
dropItem(npc, killer, DROPLIST_CONSUMABLES);
dropItem(npc, killer, DROPLIST_CRYSTALS);
if (_elpies.isEmpty())
{
Broadcast.toAllOnlinePlayers("All elpies have been killed!");
eventStop();
}
}
return super.onKill(npc, killer, isSummon);
}
@@ -221,7 +215,6 @@ public class Elpies extends Event
private void dropItem(Npc mob, PlayerInstance player, int[][] droplist)
{
final int chance = getRandom(100);
for (int[] drop : droplist)
{
if (chance >= drop[1])

View File

@@ -155,7 +155,6 @@ public class Rabbits extends Event
// Announce event end
Broadcast.toAllOnlinePlayers("Rabbits Event: Event has finished.");
return true;
}

View File

@@ -137,9 +137,7 @@ public class Race extends Event
// Schedule Event end
_eventTask = ThreadPool.schedule(this::StartRace, REGISTER_TIME * 60 * 1000);
return true;
}
protected void StartRace()
@@ -220,7 +218,6 @@ public class Race extends Event
_npcs.clear();
// Announce event end
Broadcast.toAllOnlinePlayers("* Race Event finished *");
return true;
}
@@ -323,7 +320,6 @@ public class Race extends Event
public String onFirstTalk(Npc npc, PlayerInstance player)
{
getQuestState(player, true);
if (npc.getId() == START_NPC)
{
if (_isRaceStarted)

View File

@@ -144,7 +144,6 @@ public class TvTManager extends AbstractNpcAI implements IVoicedCommandHandler
htmltext = htmltext.replace("%team2name%", Config.TVT_EVENT_TEAM_2_NAME);
htmltext = htmltext.replace("%team2playercount%", String.valueOf(teamsPlayerCounts[1]));
htmltext = htmltext.replace("%playercount%", String.valueOf(teamsPlayerCounts[0] + teamsPlayerCounts[1]));
if (!isParticipant)
{
htmltext = htmltext.replace("%fee%", TvTEvent.getParticipationFee());

View File

@@ -104,7 +104,6 @@ public class Wedding extends AbstractNpcAI
partner.setMarryRequest(true);
sendHtml(partner, "Ask.html", "%player%", player.getName());
htmltext = getHtm(player, "Requested.html");
htmltext = htmltext.replace("%player%", partner.getName());
}
@@ -151,7 +150,6 @@ public class Wedding extends AbstractNpcAI
}
Broadcast.toAllOnlinePlayers("Congratulations to " + player.getName() + " and " + partner.getName() + "! They have been married.");
htmltext = sendHtml(partner, "Accepted.html", null, null);
}
break;
@@ -165,7 +163,6 @@ public class Wedding extends AbstractNpcAI
player.sendMessage("You declined your partner's marriage request.");
partner.sendMessage("Your partner declined your marriage request.");
htmltext = sendHtml(partner, "Declined.html", null, null);
break;
}

View File

@@ -82,7 +82,6 @@ public class CharacterBirthday extends AbstractNpcAI
String htmltext = "";
final QuestState st = getQuestState(player, false);
htmltext = event;
if (event.equalsIgnoreCase("despawn_npc"))
{
npc.doDie(player);
@@ -120,7 +119,6 @@ public class CharacterBirthday extends AbstractNpcAI
// Update for next year
st.set("Birthday", String.valueOf(now.get(Calendar.YEAR) + 1));
htmltext = "32600-ok.htm";
}
}
@@ -136,7 +134,6 @@ public class CharacterBirthday extends AbstractNpcAI
}
final QuestState st = getQuestState(player, true);
if ((st != null) && (player.checkBirthDay() == 0))
{
player.sendPacket(new PlaySound(1, "HB01", 0, 0, 0, 0, 0));

View File

@@ -63,7 +63,6 @@ public class HeavyMedal extends LongTimeEvent
{
String htmltext = event;
int level = checkLevel(player);
if (event.equalsIgnoreCase("game"))
{
htmltext = getQuestItemsCount(player, GLITTERING_MEDAL) < MEDALS[level] ? "31229-no.htm" : "31229-game.htm";
@@ -77,7 +76,6 @@ public class HeavyMedal extends LongTimeEvent
else
{
takeItems(player, GLITTERING_MEDAL, MEDALS[level]);
if (getRandom(100) > WIN_CHANCE)
{
level = 0;

View File

@@ -31,7 +31,6 @@ public class ItemInstanceAction implements IActionHandler
// this causes the validate position handler to do the pickup if the location is reached.
// mercenary tickets can only be picked up by the castle owner.
final int castleId = MercTicketManager.getInstance().getTicketCastleId(target.getId());
if ((castleId > 0) && (!player.isCastleLord(castleId) || player.isInParty()))
{
if (player.isInParty())

View File

@@ -43,7 +43,6 @@ public class PetInstanceAction implements IActionHandler
}
final boolean isOwner = player.getObjectId() == ((PetInstance) target).getOwner().getObjectId();
if (isOwner && (player != ((PetInstance) target).getOwner()))
{
((PetInstance) target).updateRefOwner(player);

View File

@@ -42,16 +42,13 @@ public class DoorInstanceActionShift implements IActionShiftHandler
html.replace("%hpmax%", String.valueOf(door.getMaxHp()));
html.replace("%objid%", String.valueOf(target.getObjectId()));
html.replace("%doorid%", String.valueOf(door.getId()));
html.replace("%minx%", String.valueOf(door.getX(0)));
html.replace("%miny%", String.valueOf(door.getY(0)));
html.replace("%minz%", String.valueOf(door.getZMin()));
html.replace("%maxx%", String.valueOf(door.getX(2)));
html.replace("%maxy%", String.valueOf(door.getY(2)));
html.replace("%maxz%", String.valueOf(door.getZMax()));
html.replace("%unlock%", door.isOpenableBySkill() ? "<font color=00FF00>YES<font>" : "<font color=FF0000>NO</font>");
player.sendPacket(html);
}
return true;

View File

@@ -372,7 +372,6 @@ public class AdminAdmin implements IAdminCommandHandler
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Element Crystal</font> = " + Config.ENCHANT_CHANCE_ELEMENT_CRYSTAL + "</td><td><edit var=\"param9\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceElementCrystal $param9\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Element Jewel</font> = " + Config.ENCHANT_CHANCE_ELEMENT_JEWEL + "</td><td><edit var=\"param10\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceElementJewel $param10\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Element Energy</font> = " + Config.ENCHANT_CHANCE_ELEMENT_ENERGY + "</td><td><edit var=\"param11\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceElementEnergy $param11\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("</table></body></html>");
adminReply.setHtml(replyMSG.toString());
activeChar.sendPacket(adminReply);

View File

@@ -96,11 +96,9 @@ public class AdminBuffs implements IAdminCommandHandler
try
{
final StringTokenizer st = new StringTokenizer(command, " ");
st.nextToken();
final int objectId = Integer.parseInt(st.nextToken());
final int skillId = Integer.parseInt(st.nextToken());
removeBuff(activeChar, objectId, skillId);
return true;
}
@@ -136,9 +134,7 @@ public class AdminBuffs implements IAdminCommandHandler
try
{
final int radius = Integer.parseInt(val);
World.getInstance().forEachVisibleObjectInRange(activeChar, PlayerInstance.class, radius, Creature::stopAllEffects);
BuilderUtil.sendSysMessage(activeChar, "All effects canceled within radius " + radius);
return true;
}
@@ -152,7 +148,6 @@ public class AdminBuffs implements IAdminCommandHandler
{
final StringTokenizer st = new StringTokenizer(command, " ");
command = st.nextToken();
Creature creature = null;
if (st.hasMoreTokens())
{
@@ -344,7 +339,6 @@ public class AdminBuffs implements IAdminCommandHandler
html.append("</html>");
// Send the packet
activeChar.sendPacket(new NpcHtmlMessage(html.toString()));
if (Config.GMAUDIT)
{
GMAudit.auditGMAction(activeChar.getName() + " [" + activeChar.getObjectId() + "]", "getbuffs", target.getName() + " (" + target.getObjectId() + ")", "");

View File

@@ -163,7 +163,6 @@ public class AdminCHSiege implements IAdminCommandHandler
c.set(Calendar.HOUR_OF_DAY, h);
c.set(Calendar.MINUTE, min);
c.set(Calendar.SECOND, 0);
if (c.getTimeInMillis() > System.currentTimeMillis())
{
activeChar.sendMessage(hall.getName() + " siege: " + c.getTime());
@@ -339,7 +338,6 @@ public class AdminCHSiege implements IAdminCommandHandler
}
final SiegableHall hall = CHSiegeManager.getInstance().getSiegableHall(ch);
if (hall == null)
{
gm.sendMessage("Couldnt find the clan hall.");

View File

@@ -144,7 +144,6 @@ public class AdminClan implements IAdminCommandHandler
break;
}
final int clanId = Integer.parseInt(token);
final Clan clan = ClanTable.getInstance().getClan(clanId);
if (clan == null)
{

View File

@@ -217,7 +217,6 @@ public class AdminCreateItem implements IAdminCommandHandler
}
target.getInventory().addItem("Admin", id, num, activeChar, null);
if (activeChar != target)
{
target.sendMessage("Admin spawned " + num + " " + template.getName() + " in your inventory.");
@@ -264,7 +263,6 @@ public class AdminCreateItem implements IAdminCommandHandler
{
id = 0;
}
return id;
}
}

View File

@@ -92,7 +92,6 @@ public class AdminCursedWeapons implements IAdminCommandHandler
for (CursedWeapon cw : cwm.getCursedWeapons())
{
final int itemId = cw.getItemId();
replyMSG.append("<table width=270><tr><td>Name:</td><td>");
replyMSG.append(cw.getName());
replyMSG.append("</td></tr>");

View File

@@ -69,7 +69,6 @@ public class AdminDisconnect implements IAdminCommandHandler
else
{
BuilderUtil.sendSysMessage(activeChar, "Character " + player.getName() + " disconnected from server.");
Disconnection.of(player).defaultSequence(false);
}
}

View File

@@ -538,7 +538,6 @@ public class AdminEditChar implements IAdminCommandHandler
// Transform-untransorm player quickly to force the client to reload the character textures
TransformData.getInstance().transformPlayer(105, player);
ThreadPool.schedule(new Untransform(player), 200);
}
else if (command.startsWith("admin_setcolor"))
{
@@ -616,16 +615,13 @@ public class AdminEditChar implements IAdminCommandHandler
st.nextToken();
final boolean changeCreateExpiryTime = st.nextToken().equalsIgnoreCase("create");
final String playerName = st.nextToken();
PlayerInstance player = null;
player = World.getInstance().getPlayer(playerName);
if (player == null)
{
final Connection con = DatabaseFactory.getConnection();
final PreparedStatement ps = con.prepareStatement("UPDATE characters SET " + (changeCreateExpiryTime ? "clan_create_expiry_time" : "clan_join_expiry_time") + " WHERE char_name=? LIMIT 1");
ps.setString(1, playerName);
ps.execute();
}
@@ -1020,7 +1016,6 @@ public class AdminEditChar implements IAdminCommandHandler
{
String ip = "N/A";
final String hwid = "N/A";
if (player == null)
{
BuilderUtil.sendSysMessage(activeChar, "Player is null.");
@@ -1159,7 +1154,6 @@ public class AdminEditChar implements IAdminCommandHandler
adminReply.setFile(activeChar, "data/html/admin/charfind.htm");
final StringBuilder replyMSG = new StringBuilder(1000);
final List<PlayerInstance> players = new ArrayList<>(World.getInstance().getPlayers());
players.sort(Comparator.comparingLong(PlayerInstance::getUptime));
for (PlayerInstance player : players)
@@ -1186,7 +1180,6 @@ public class AdminEditChar implements IAdminCommandHandler
adminReply.replace("%results%", replyMSG.toString());
final String replyMSG2;
if (charactersFound == 0)
{
replyMSG2 = "s. Please try again.";
@@ -1217,7 +1210,6 @@ public class AdminEditChar implements IAdminCommandHandler
private void findCharactersPerIp(PlayerInstance activeChar, String ipAdress)
{
boolean findDisconnected = false;
if (ipAdress.equals("disconnected"))
{
findDisconnected = true;
@@ -1289,7 +1281,6 @@ public class AdminEditChar implements IAdminCommandHandler
adminReply.replace("%results%", replyMSG.toString());
final String replyMSG2;
if (charactersFound == 0)
{
replyMSG2 = "s. Maybe they got d/c? :)";
@@ -1347,7 +1338,6 @@ public class AdminEditChar implements IAdminCommandHandler
String ip = "0.0.0.0";
GameClient client;
final Map<String, Integer> dualboxIPs = new HashMap<>();
final List<PlayerInstance> players = new ArrayList<>(World.getInstance().getPlayers());
players.sort(Comparator.comparingLong(PlayerInstance::getUptime));
for (PlayerInstance player : players)
@@ -1401,7 +1391,6 @@ public class AdminEditChar implements IAdminCommandHandler
final Map<IpPack, List<PlayerInstance>> ipMap = new HashMap<>();
GameClient client;
final Map<IpPack, Integer> dualboxIPs = new HashMap<>();
final List<PlayerInstance> players = new ArrayList<>(World.getInstance().getPlayers());
players.sort(Comparator.comparingLong(PlayerInstance::getUptime));
for (PlayerInstance player : players)

View File

@@ -164,7 +164,6 @@ public class AdminEffects implements IAdminCommandHandler
final Creature target = (Creature) activeChar.getTarget();
target.setInvisible(!target.isInvisible());
BuilderUtil.sendSysMessage(activeChar, "You've made " + target.getName() + " " + (target.isInvisible() ? "invisible" : "visible") + ".");
if (target.isPlayer())
{
((PlayerInstance) target).broadcastUserInfo();
@@ -368,7 +367,6 @@ public class AdminEffects implements IAdminCommandHandler
radius = Integer.parseInt(st.nextToken());
}
final Team team = Team.valueOf(val.toUpperCase());
World.getInstance().forEachVisibleObjectInRange(activeChar, PlayerInstance.class, radius, player -> player.setTeam(team));
}
catch (Exception e)
@@ -641,7 +639,6 @@ public class AdminEffects implements IAdminCommandHandler
private void adminAtmosphere(String type, String state, int duration, PlayerInstance activeChar)
{
IClientOutgoingPacket packet = null;
if (type.equals("signsky"))
{
if (state.equals("dawn"))

View File

@@ -47,7 +47,6 @@ public class AdminElement implements IAdminCommandHandler
public boolean useAdminCommand(String command, PlayerInstance activeChar)
{
int armorType = -1;
if (command.startsWith("admin_setlh"))
{
armorType = Inventory.PAPERDOLL_HEAD;
@@ -82,7 +81,6 @@ public class AdminElement implements IAdminCommandHandler
try
{
final String[] args = command.split(" ");
final byte element = Elementals.getElementId(args[1]);
final int value = Integer.parseInt(args[2]);
if ((element < -1) || (element > 5) || (value < 0) || (value > 450))

View File

@@ -66,7 +66,6 @@ public class AdminEnchant implements IAdminCommandHandler
else
{
int armorType = -1;
if (command.startsWith("admin_seteh"))
{
armorType = Inventory.PAPERDOLL_HEAD;

View File

@@ -117,7 +117,6 @@ public class AdminEventEngine implements IAdminCommandHandler
try
{
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(Config.DATAPACK_ROOT + "/data/events/" + eventName)));
final BufferedReader inbr = new BufferedReader(new InputStreamReader(in));
adminReply.setFile(null, "data/html/mods/EventEngine/Participation.htm");
@@ -199,7 +198,6 @@ public class AdminEventEngine implements IAdminCommandHandler
}
st = new StringTokenizer(temp, "-");
Integer i = 1;
while (st.hasMoreElements())
@@ -219,7 +217,6 @@ public class AdminEventEngine implements IAdminCommandHandler
activeChar.broadcastPacket(snd);
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final String replyMSG = "<html><title>[ EVENT ENGINE ]</title><body><br><center>The event <font color=\"LEVEL\">" + GameEvent._eventName + "</font> has been announced, now you can type //event_panel to see the event panel control</center><br></body></html>";
adminReply.setHtml(replyMSG);
activeChar.sendPacket(adminReply);
@@ -240,7 +237,6 @@ public class AdminEventEngine implements IAdminCommandHandler
while (st.hasMoreElements()) // Every next ST should be a team number
{
final int teamId = Integer.parseInt(st.nextToken());
for (PlayerInstance player : GameEvent._teams.get(teamId))
{
player.setTitle(GameEvent._teamNames.get(teamId));
@@ -368,7 +364,6 @@ public class AdminEventEngine implements IAdminCommandHandler
final String[] n = st.nextToken().split("\\*");
final int itemId = Integer.parseInt(st.nextToken());
for (int teamId : teamIds)
{
rewardTeam(activeChar, teamId, Integer.parseInt(n[0]), itemId, n.length == 2 ? n[1] : "");
@@ -436,7 +431,6 @@ public class AdminEventEngine implements IAdminCommandHandler
public void showMainPage(PlayerInstance activeChar)
{
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final String replyMSG = "<html><title>[ L2J EVENT ENGINE ]</title><body><br><center><button value=\"Create NEW event \" action=\"bypass -h admin_event_new\" width=150 height=32 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><center><br><font color=LEVEL>Stored Events:</font><br></center>" + showStoredEvents() + "</body></html>";
adminReply.setHtml(replyMSG);
activeChar.sendPacket(adminReply);
@@ -445,10 +439,8 @@ public class AdminEventEngine implements IAdminCommandHandler
public void showNewEventPage(PlayerInstance activeChar)
{
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final StringBuilder replyMSG = new StringBuilder(512);
replyMSG.append("<html><title>[ L2J EVENT ENGINE ]</title><body><br><br><center><font color=LEVEL>Event name:</font><br>");
if (tempName.isEmpty())
{
replyMSG.append("You can also use //event_name text to insert a new title");
@@ -460,7 +452,6 @@ public class AdminEventEngine implements IAdminCommandHandler
}
replyMSG.append("<br><br><font color=LEVEL>Event description:</font><br></center>");
if (tempBuffer.isEmpty())
{
replyMSG.append("You can also use //add text to add text or //delete_buffer to remove the text.");
@@ -472,7 +463,6 @@ public class AdminEventEngine implements IAdminCommandHandler
replyMSG.append("<center><multiedit var=\"txt\" width=270 height=100> <button value=\"Add text\" action=\"bypass -h admin_add $txt\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
replyMSG.append("<button value=\"Remove text\" action=\"bypass -h admin_delete_buffer\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
if (!(tempName.isEmpty() && tempBuffer.isEmpty()))
{
replyMSG.append("<br><button value=\"Store Event Data\" action=\"bypass -h admin_event_store\" width=160 height=32 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
@@ -488,7 +478,6 @@ public class AdminEventEngine implements IAdminCommandHandler
{
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final StringBuilder sb = new StringBuilder();
sb.append("<html><body><title>[ L2J EVENT ENGINE ]</title><br><center> Current event: <font color=\"LEVEL\">");
sb.append(GameEvent._eventName);
sb.append("</font></center><br>INFO: To start an event, you must first set the number of teams, then type their names in the boxes and finally type the NPC ID that will be the event manager (can be any existing npc) next to the \"Announce Event!\" button.<br><table width=100%>");
@@ -535,7 +524,6 @@ public class AdminEventEngine implements IAdminCommandHandler
}
sb.append("<tr><td>&nbsp;</td></tr><tr><td><button value=\"Teleport\" action=\"bypass -h admin_event_control_teleport $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Teleports the specified team to your position</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><button value=\"Sit/Stand\" action=\"bypass -h admin_event_control_sit $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Sits/Stands up the team</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><button value=\"Kill\" action=\"bypass -h admin_event_control_kill $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Finish with the life of all the players in the selected team</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Transform*\" action=\"bypass -h admin_event_control_transform $team_number $transf_id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"transf_id\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Transforms the team into the transformation with the ID specified. Multiple IDs result in randomly chosen one for each player.</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><button value=\"UnTransform\" action=\"bypass -h admin_event_control_untransform $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Untransforms the team</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><table><tr><td width=32>Num</td><td><edit var=\"n\" width=60 height=15></td></tr><tr><td>ID</td><td><edit var=\"id\" width=60 height=15></td></tr></table></td><td><font color=\"LEVEL\">Give the specified item id to every single member of the team, you can put 5*level, 5*kills or 5 in the number field for example</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Kick Player\" action=\"bypass -h admin_event_control_kick $player_name\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"player_name\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Kicks the specified player(s) from the event. Blank field kicks target.</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><button value=\"End!\" action=\"bypass -h admin_event_control_finish\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr><tr><td>&nbsp;</td></tr></table></td></tr></table></body></html>");
adminReply.setHtml(sb.toString());
activeChar.sendPacket(adminReply);
}

View File

@@ -85,7 +85,6 @@ public class AdminFence implements IAdminCommandHandler
{
final int objId = Integer.parseInt(st.nextToken());
final int fenceTypeOrdinal = Integer.parseInt(st.nextToken());
if ((fenceTypeOrdinal < 0) || (fenceTypeOrdinal >= FenceState.values().length))
{
BuilderUtil.sendSysMessage(activeChar, "Specified FenceType is out of range. Only 0-" + (FenceState.values().length - 1) + " are permitted.");
@@ -214,7 +213,6 @@ public class AdminFence implements IAdminCommandHandler
html.setFile(activeChar, "data/html/admin/fences.htm");
html.replace("%pages%", result.getPagerTemplate().toString());
html.replace("%announcements%", result.getBodyTemplate().toString());
if (result.getPages() > 0)
{
html.replace("%pages%", "<table width=280 cellspacing=0><tr>" + result.getPagerTemplate() + "</tr></table>");

View File

@@ -117,9 +117,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
}
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final String replyMSG;
if ((npc1 != null) && (npc2 != null))
{
replyMSG = "<html><title>Selected mobs to fight</title><body><table><tr><td>First</td><td>Second</td></tr><tr><td>level " + lvl1 + "</td><td>level " + lvl2 + "</td></tr><tr><td>id " + npc1.getId() + "</td><td>id " + npc2.getId() + "</td></tr><tr><td>" + npc1.getName() + "</td><td>" + npc2.getName() + "</td></tr></table><center><br><br><br><button value=\"OK\" action=\"bypass -h admin_fight_calculator_show " + npc1.getId() + " " + npc2.getId() + "\" width=100 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></center></body></html>";
@@ -129,7 +127,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
final List<NpcTemplate> npcs = NpcData.getInstance().getAllOfLevel(lvl1);
final StringBuilder sb = new StringBuilder(50 + (npcs.size() * 200));
sb.append("<html><title>Select first mob to fight</title><body><table>");
for (NpcTemplate n : npcs)
{
sb.append("<tr><td><a action=\"bypass -h admin_fight_calculator lvl1 " + lvl1 + " lvl2 " + lvl2 + " mid1 " + n.getId() + " mid2 " + mid2 + "\">" + n.getName() + "</a></td></tr>");
@@ -143,7 +140,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
final List<NpcTemplate> npcs = NpcData.getInstance().getAllOfLevel(lvl2);
final StringBuilder sb = new StringBuilder(50 + (npcs.size() * 200));
sb.append("<html><title>Select second mob to fight</title><body><table>");
for (NpcTemplate n : npcs)
{
sb.append("<tr><td><a action=\"bypass -h admin_fight_calculator lvl1 " + lvl1 + " lvl2 " + lvl2 + " mid1 " + mid1 + " mid2 " + n.getId() + "\">" + n.getName() + "</a></td></tr>");
@@ -164,7 +160,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
private void handleShow(String params, PlayerInstance activeChar)
{
params = params.trim();
Creature npc1 = null;
Creature npc2 = null;
if (params.isEmpty())
@@ -184,7 +179,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
final StringTokenizer st = new StringTokenizer(params);
mid1 = Integer.parseInt(st.nextToken());
mid2 = Integer.parseInt(st.nextToken());
npc1 = new MonsterInstance(NpcData.getInstance().getTemplate(mid1));
npc2 = new MonsterInstance(NpcData.getInstance().getTemplate(mid2));
}
@@ -208,7 +202,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
// number of ATTACK per 100 seconds
sAtk1 = 100000 / sAtk1;
sAtk2 = 100000 / sAtk2;
for (int i = 0; i < 10000; i++)
{
final boolean calcMiss1 = Formulas.calcHitMiss(npc1, npc2);
@@ -233,7 +226,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
final double npcPdef1 = npc1.getPDef(npc2);
pdef1 += npcPdef1;
if (!calcMiss1)
{
final double calcDmg1 = Formulas.calcPhysDam(npc1, npc2, null, calcShld1, calcCrit1, false);
@@ -266,7 +258,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
final double npcPdef2 = npc2.getPDef(npc1);
pdef2 += npcPdef2;
if (!calcMiss2)
{
final double calcDmg2 = Formulas.calcPhysDam(npc2, npc1, null, calcShld2, calcCrit2, false);
@@ -294,15 +285,11 @@ public class AdminFightCalculator implements IAdminCommandHandler
// HP restored per 100 seconds
final double maxHp1 = npc1.getMaxHp();
final int hp1 = (int) ((Formulas.calcHpRegen(npc1) * 100000) / Formulas.getRegeneratePeriod(npc1));
final double maxHp2 = npc2.getMaxHp();
final int hp2 = (int) ((Formulas.calcHpRegen(npc2) * 100000) / Formulas.getRegeneratePeriod(npc2));
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
final StringBuilder replyMSG = new StringBuilder(1000);
replyMSG.append("<html><title>Selected mobs to fight</title><body><table>");
if (params.isEmpty())
{
replyMSG.append("<tr><td width=140>Parameter</td><td width=70>me</td><td width=70>target</td></tr>");
@@ -313,7 +300,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
}
replyMSG.append("<tr><td>miss</td><td>" + miss1 + "%</td><td>" + miss2 + "%</td></tr><tr><td>shld</td><td>" + shld2 + "%</td><td>" + shld1 + "%</td></tr><tr><td>crit</td><td>" + crit1 + "%</td><td>" + crit2 + "%</td></tr><tr><td>pAtk / pDef</td><td>" + (int) patk1 + " / " + (int) pdef1 + "</td><td>" + (int) patk2 + " / " + (int) pdef2 + "</td></tr><tr><td>made hits</td><td>" + sAtk1 + "</td><td>" + sAtk2 + "</td></tr><tr><td>dmg per hit</td><td>" + (int) dmg1 + "</td><td>" + (int) dmg2 + "</td></tr><tr><td>got dmg</td><td>" + tdmg2 + "</td><td>" + tdmg1 + "</td></tr><tr><td>got regen</td><td>" + hp1 + "</td><td>" + hp2 + "</td></tr><tr><td>had HP</td><td>" + (int) maxHp1 + "</td><td>" + (int) maxHp2 + "</td></tr><tr><td>die</td>");
if ((tdmg2 - hp1) > 1)
{
replyMSG.append("<td>" + ((int) ((100 * maxHp1) / (tdmg2 - hp1))) + " sec</td>");

View File

@@ -156,7 +156,6 @@ public class AdminFortSiege implements IAdminCommandHandler
final List<Fort> forts = FortManager.getInstance().getForts();
final StringBuilder cList = new StringBuilder(forts.size() * 100);
for (Fort fort : forts)
{
if (fort != null)

View File

@@ -57,7 +57,6 @@ public class AdminGeodata implements IAdminCommandHandler
final int worldZ = activeChar.getZ();
final int geoX = GeoEngine.getGeoX(worldX);
final int geoY = GeoEngine.getGeoY(worldY);
if (GeoEngine.getInstance().hasGeoPos(geoX, geoY))
{
BuilderUtil.sendSysMessage(activeChar, "WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoEngine.getInstance().getHeight(geoX, geoY, worldZ));
@@ -75,7 +74,6 @@ public class AdminGeodata implements IAdminCommandHandler
final int worldZ = activeChar.getZ();
final int geoX = GeoEngine.getGeoX(worldX);
final int geoY = GeoEngine.getGeoY(worldY);
if (GeoEngine.getInstance().hasGeoPos(geoX, geoY))
{
BuilderUtil.sendSysMessage(activeChar, "WorldX: " + worldX + ", WorldY: " + worldY + ", WorldZ: " + worldZ + ", GeoX: " + geoX + ", GeoY: " + geoY + ", GeoZ: " + GeoEngine.getInstance().getHeight(worldX, worldY, worldZ));

View File

@@ -43,7 +43,6 @@ public class AdminGmSpeed implements IAdminCommandHandler
{
final StringTokenizer st = new StringTokenizer(command);
final String cmd = st.nextToken();
if (cmd.equals("admin_gmspeed"))
{
if (!st.hasMoreTokens())
@@ -86,7 +85,6 @@ public class AdminGmSpeed implements IAdminCommandHandler
}
targetCharacter.getStat().setGmSpeedMultiplier(runSpeedBoost > 0 ? runSpeedBoost : 1);
if (targetCharacter.isPlayer())
{
((PlayerInstance) targetCharacter).broadcastUserInfo();

View File

@@ -40,7 +40,6 @@ public class AdminGraciaSeeds implements IAdminCommandHandler
{
final StringTokenizer st = new StringTokenizer(command, " ");
final String actualCommand = st.nextToken(); // Get actual command
String val = "";
if (st.countTokens() >= 1)
{

View File

@@ -86,7 +86,6 @@ public class AdminGrandBoss implements IAdminCommandHandler
if (st.hasMoreTokens())
{
final int grandBossId = Integer.parseInt(st.nextToken());
if (grandBossId == ANTHARAS)
{
antharasAi().notifyEvent("SKIP_WAITING", null, activeChar);
@@ -301,7 +300,6 @@ public class AdminGrandBoss implements IAdminCommandHandler
final StatSet info = GrandBossManager.getInstance().getStatSet(grandBossId);
final String bossRespawn = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.getLong("respawn_time"));
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
html.setHtml(HtmCache.getInstance().getHtm(activeChar, htmlPatch));
html.replace("%bossStatus%", text);

View File

@@ -82,7 +82,6 @@ public class AdminHeal implements IAdminCommandHandler
if (player != null)
{
final PlayerInstance plyr = World.getInstance().getPlayer(player);
if (plyr != null)
{
obj = plyr;

View File

@@ -41,13 +41,11 @@ public class AdminInstanceZone implements IAdminCommandHandler
{
final String target = (activeChar.getTarget() != null) ? activeChar.getTarget().getName() : "no-target";
GMAudit.auditGMAction(activeChar.getName(), command, target, "");
if (command.startsWith("admin_instancezone_clear"))
{
try
{
final StringTokenizer st = new StringTokenizer(command, " ");
st.nextToken();
final PlayerInstance player = World.getInstance().getPlayer(st.nextToken());
final int instanceId = Integer.parseInt(st.nextToken());
@@ -55,7 +53,6 @@ public class AdminInstanceZone implements IAdminCommandHandler
InstanceManager.getInstance().deleteInstanceTime(player.getObjectId(), instanceId);
BuilderUtil.sendSysMessage(activeChar, "Instance zone " + name + " cleared for player " + player.getName());
player.sendMessage("Admin cleared instance zone " + name + " for you");
return true;
}
catch (Exception e)
@@ -69,7 +66,6 @@ public class AdminInstanceZone implements IAdminCommandHandler
{
final StringTokenizer st = new StringTokenizer(command, " ");
command = st.nextToken();
if (st.hasMoreTokens())
{
PlayerInstance player = null;
@@ -119,7 +115,6 @@ public class AdminInstanceZone implements IAdminCommandHandler
private void display(PlayerInstance player, PlayerInstance activeChar)
{
final Map<Integer, Long> instanceTimes = InstanceManager.getInstance().getAllInstanceTimes(player.getObjectId());
final StringBuilder html = new StringBuilder(500 + (instanceTimes.size() * 200));
html.append("<html><center><table width=260><tr><td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Character Instances</center></td><td width=40><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br><font color=\"LEVEL\">Instances for " + player.getName() + "</font><center><br><table><tr><td width=150>Name</td><td width=50>Time</td><td width=70>Action</td></tr>");

View File

@@ -48,7 +48,6 @@ public class AdminKill implements IAdminCommandHandler
{
final StringTokenizer st = new StringTokenizer(command, " ");
st.nextToken(); // skip command
if (st.hasMoreTokens())
{
final String firstParam = st.nextToken();
@@ -86,7 +85,6 @@ public class AdminKill implements IAdminCommandHandler
try
{
final int radius = Integer.parseInt(firstParam);
World.getInstance().forEachVisibleObjectInRange(activeChar, Creature.class, radius, wo ->
{
if ((wo instanceof ControllableMobInstance) || (wo == activeChar))
@@ -146,7 +144,6 @@ public class AdminKill implements IAdminCommandHandler
}
target.reduceCurrentHp(target.getMaxHp() + 1, activeChar, null);
if (targetIsInvul)
{
target.setInvul(true);

Some files were not shown because too many files have changed in this diff Show More