Underground update.
This commit is contained in:
@@ -1,329 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SocialAction;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SpecialCamera;
|
||||
import com.l2jserver.util.Rnd;
|
||||
|
||||
/**
|
||||
* Dr. Chaos is a boss @ Pavel's Ruins. Some things to know :
|
||||
* <ul>
|
||||
* <li>As a mad scientist, he thinks all are spies, and for so if you stand too much longer near him you're considered as an "assassin from Black Anvil Guild".</li>
|
||||
* <li>You can chat with him, but if you try too much he will become angry.</li>
|
||||
* <li>That adaptation sends a decent cinematic made with the different social actions too.</li>
|
||||
* <li>The status of the RB is saved under GBs table, in order to retrieve the state if server restarts.</li>
|
||||
* <li>The spawn of the different NPCs (Dr. Chaos / War golem) is handled by that script aswell.</li>
|
||||
* </ul>
|
||||
* @author Kerberos, Tryskell.
|
||||
*/
|
||||
public class DrChaos extends AbstractNpcAI
|
||||
{
|
||||
private static final int DOCTOR_CHAOS = 32033;
|
||||
private static final int CHAOS_GOLEM = 25512;
|
||||
|
||||
private static final byte NORMAL = 0; // Dr. Chaos is in NPC form.
|
||||
private static final byte CRAZY = 1; // Dr. Chaos entered on golem form.
|
||||
private static final byte DEAD = 2; // Dr. Chaos has been killed and has not yet spawned.
|
||||
|
||||
private long _lastAttackVsGolem = 0;
|
||||
private int _pissedOffTimer;
|
||||
|
||||
public DrChaos()
|
||||
{
|
||||
super(DrChaos.class.getSimpleName(), "ai");
|
||||
|
||||
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.
|
||||
|
||||
StatsSet info = GrandBossManager.getInstance().getStatsSet(CHAOS_GOLEM);
|
||||
int status = GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM);
|
||||
|
||||
// Load the reset date and time for Dr. Chaos from DB.
|
||||
if (status == DEAD)
|
||||
{
|
||||
long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
|
||||
if (temp > 0)
|
||||
{
|
||||
startQuestTimer("reset_drchaos", temp, null, null, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The time has already expired while the server was offline. Delete the saved time and
|
||||
// immediately spawn Dr. Chaos. Also the state need to be changed for NORMAL
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false);
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL);
|
||||
}
|
||||
}
|
||||
// Spawn the war golem.
|
||||
else if (status == CRAZY)
|
||||
{
|
||||
int loc_x = info.getInt("loc_x");
|
||||
int loc_y = info.getInt("loc_y");
|
||||
int loc_z = info.getInt("loc_z");
|
||||
int heading = info.getInt("heading");
|
||||
final int hp = info.getInt("currentHP");
|
||||
final int mp = info.getInt("currentMP");
|
||||
|
||||
L2GrandBossInstance golem = (L2GrandBossInstance) addSpawn(CHAOS_GOLEM, loc_x, loc_y, loc_z, heading, false, 0, false);
|
||||
GrandBossManager.getInstance().addBoss(golem);
|
||||
|
||||
final L2Npc _golem = golem;
|
||||
|
||||
_golem.setCurrentHpMp(hp, mp);
|
||||
_golem.setRunning();
|
||||
|
||||
// start monitoring Dr. Chaos's inactivity
|
||||
_lastAttackVsGolem = System.currentTimeMillis();
|
||||
startQuestTimer("golem_despawn", 60000, _golem, null, true);
|
||||
}
|
||||
// Spawn the regular NPC.
|
||||
else
|
||||
{
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equalsIgnoreCase("reset_drchaos"))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL);
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false);
|
||||
}
|
||||
// despawn the live Dr. Chaos after 30 minutes of inactivity
|
||||
else if (event.equalsIgnoreCase("golem_despawn") && (npc != null))
|
||||
{
|
||||
if (npc.getId() == CHAOS_GOLEM)
|
||||
{
|
||||
if ((_lastAttackVsGolem + 1800000) < System.currentTimeMillis())
|
||||
{
|
||||
// Despawn the war golem.
|
||||
npc.deleteMe();
|
||||
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more
|
||||
cancelQuestTimer("golem_despawn", npc, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("1"))
|
||||
{
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 2));
|
||||
npc.broadcastPacket(new SpecialCamera(npc, 1, -200, 15, 5500, 1000, 13500, 0, 0, 0, 0, 0));
|
||||
}
|
||||
else if (event.equalsIgnoreCase("2"))
|
||||
{
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 3));
|
||||
}
|
||||
else if (event.equalsIgnoreCase("3"))
|
||||
{
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
}
|
||||
else if (event.equalsIgnoreCase("4"))
|
||||
{
|
||||
npc.broadcastPacket(new SpecialCamera(npc, 1, -150, 10, 3500, 1000, 5000, 0, 0, 0, 0, 0));
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(95928, -110671, -3340, 0));
|
||||
}
|
||||
else if (event.equalsIgnoreCase("5"))
|
||||
{
|
||||
// Delete Dr. Chaos && spawn the war golem.
|
||||
npc.deleteMe();
|
||||
L2GrandBossInstance golem = (L2GrandBossInstance) addSpawn(CHAOS_GOLEM, 96080, -110822, -3343, 0, false, 0, false);
|
||||
GrandBossManager.getInstance().addBoss(golem);
|
||||
|
||||
// The "npc" variable attribution is now for the golem.
|
||||
npc = golem;
|
||||
npc.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0));
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
npc.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0));
|
||||
|
||||
// start monitoring Dr. Chaos's inactivity
|
||||
_lastAttackVsGolem = System.currentTimeMillis();
|
||||
startQuestTimer("golem_despawn", 60000, npc, null, true);
|
||||
}
|
||||
// Check every sec if someone is in range, if found, launch one task to decrease the timer.
|
||||
else if (event.equalsIgnoreCase("paranoia_activity"))
|
||||
{
|
||||
if (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL)
|
||||
{
|
||||
for (L2PcInstance obj : npc.getKnownList().getKnownPlayersInRadius(500))
|
||||
{
|
||||
if (obj.isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
_pissedOffTimer -= 1;
|
||||
|
||||
// Make him speak.
|
||||
if (_pissedOffTimer == 15)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "How dare you trespass into my territory! Have you no fear?");
|
||||
}
|
||||
|
||||
// That was "too much" for that time.
|
||||
if (_pissedOffTimer <= 0)
|
||||
{
|
||||
crazyMidgetBecomesAngry(npc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance 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>";
|
||||
}
|
||||
else if ((_pissedOffTimer > 10) && (_pissedOffTimer <= 20))
|
||||
{
|
||||
htmltext = "<html><body>Doctor Chaos:<br>Why are you standing here? Don't you see it's a private propertie? Don't look at him with those eyes... Did you smile?! Don't make fun of me! He will ... destroy ... you ... if you continue!</body></html>";
|
||||
}
|
||||
else if ((_pissedOffTimer > 0) && (_pissedOffTimer <= 10))
|
||||
{
|
||||
htmltext = "<html><body>Doctor Chaos:<br>I know why you are here, traitor! He discovered your plans! You are assassin ... sent by the Black Anvil guild! But you won't kill the Emperor of Evil!</body></html>";
|
||||
}
|
||||
else if (_pissedOffTimer <= 0)
|
||||
{
|
||||
crazyMidgetBecomesAngry(npc);
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
// 30 seconds timer at initialization.
|
||||
_pissedOffTimer = 30;
|
||||
|
||||
// Initialization of the paranoia.
|
||||
startQuestTimer("paranoia_activity", 1000, npc, null, true);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
|
||||
{
|
||||
cancelQuestTimer("golem_despawn", npc, null);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "Urggh! You will pay dearly for this insult.");
|
||||
|
||||
// "lock" Dr. Chaos for regular RB time (36H fixed +- 24H random)
|
||||
long respawnTime = (36 + Rnd.get(-24, 24)) * 3600000;
|
||||
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, DEAD);
|
||||
startQuestTimer("reset_drchaos", respawnTime, null, null, false);
|
||||
|
||||
// also save the respawn time so that the info is maintained past reboots
|
||||
StatsSet info = GrandBossManager.getInstance().getStatsSet(CHAOS_GOLEM);
|
||||
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
|
||||
GrandBossManager.getInstance().setStatsSet(CHAOS_GOLEM, info);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(L2Npc npc, L2PcInstance victim, int damage, boolean isPet)
|
||||
{
|
||||
int chance = Rnd.get(300);
|
||||
|
||||
// Choose a message from 3 choices (1/100)
|
||||
if (chance < 3)
|
||||
{
|
||||
String message = "";
|
||||
switch (chance)
|
||||
{
|
||||
case 0:
|
||||
message = "Bwah-ha-ha! Your doom is at hand! Behold the Ultra Secret Super Weapon!";
|
||||
break;
|
||||
case 1:
|
||||
message = "Foolish, insignificant creatures! How dare you challenge me!";
|
||||
break;
|
||||
default:
|
||||
message = "I see that none will challenge me now!";
|
||||
break;
|
||||
}
|
||||
|
||||
// Make him speak.
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Launches the complete animation.
|
||||
* @param npc the midget.
|
||||
*/
|
||||
private void crazyMidgetBecomesAngry(L2Npc npc)
|
||||
{
|
||||
if (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL)
|
||||
{
|
||||
// Set the status to "crazy".
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, CRAZY);
|
||||
|
||||
// Cancels the paranoia timer.
|
||||
cancelQuestTimer("paranoia_activity", npc, null);
|
||||
|
||||
// Makes the NPC moves near the Strange Box speaking.
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(96323, -110914, -3328, 0));
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "Fools! Why haven't you fled yet? Prepare to learn a lesson!");
|
||||
|
||||
// Delayed animation timers.
|
||||
startQuestTimer("1", 2000, npc, null, false); // 2 secs, time to launch dr.C anim 2. Cam 1 on.
|
||||
startQuestTimer("2", 4000, npc, null, false); // 2,5 secs, time to launch dr.C anim 3.
|
||||
startQuestTimer("3", 6500, npc, null, false); // 6 secs, time to launch dr.C anim 1.
|
||||
startQuestTimer("4", 12500, npc, null, false); // 4,5 secs to make the NPC moves to the grotto. Cam 2 on.
|
||||
startQuestTimer("5", 17000, npc, null, false); // 4 secs for golem spawn, and golem anim. Cam 3 on.
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new DrChaos();
|
||||
}
|
||||
}
|
64
trunk/dist/game/data/scripts/ai/individual/Lailly.java
vendored
Normal file
64
trunk/dist/game/data/scripts/ai/individual/Lailly.java
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.individual;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.enums.ChatType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Lailly AI.
|
||||
* @author Stayway
|
||||
*/
|
||||
public final class Lailly extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int LAILLY = 34181;
|
||||
|
||||
private Lailly()
|
||||
{
|
||||
super(Lailly.class.getSimpleName(), "ai/individual");
|
||||
addSpawnId(LAILLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.READY_TO_LISTEN_TO_A_STORY_COME_NOW, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 180000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Lailly();
|
||||
}
|
||||
}
|
@@ -233,11 +233,11 @@ public final class AwakeningMaster extends AbstractNpcAI
|
||||
player.setClassId(newClass.getId());
|
||||
if (player.isDualClassActive())
|
||||
{
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass());
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setBaseClass(player.getActiveClass());
|
||||
player.setBaseClassId(player.getActiveClassId());
|
||||
}
|
||||
player.sendPacket(SystemMessageId.CONGRATULATIONS_YOU_VE_COMPLETED_A_CLASS_TRANSFER);
|
||||
final UserInfo ui = new UserInfo(player, false);
|
||||
|
@@ -644,7 +644,7 @@ public final class Raina extends AbstractNpcAI
|
||||
*/
|
||||
private Set<PlayerClass> getAvailableSubClasses(L2PcInstance player)
|
||||
{
|
||||
final int currentBaseId = player.getBaseClass();
|
||||
final int currentBaseId = player.getBaseClassId();
|
||||
final ClassId baseCID = ClassId.getClassId(currentBaseId);
|
||||
int baseClassId = (baseCID.level() > 2) ? baseCID.getParent().ordinal() : currentBaseId;
|
||||
|
||||
@@ -700,7 +700,7 @@ public final class Raina extends AbstractNpcAI
|
||||
}
|
||||
|
||||
// get player base class
|
||||
final int currentBaseId = player.getBaseClass();
|
||||
final int currentBaseId = player.getBaseClassId();
|
||||
final ClassId baseCID = ClassId.getClassId(currentBaseId);
|
||||
|
||||
// we need 2nd occupation ID
|
||||
@@ -755,7 +755,7 @@ public final class Raina extends AbstractNpcAI
|
||||
private List<PlayerClass> getDualClasses(L2PcInstance player, CategoryType cType)
|
||||
{
|
||||
final List<PlayerClass> tempList = new ArrayList<>();
|
||||
final int baseClassId = player.getBaseClass();
|
||||
final int baseClassId = player.getBaseClassId();
|
||||
final int dualClassId = player.getClassId().getId();
|
||||
|
||||
for (PlayerClass temp : dualClassList)
|
||||
|
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.npc.Teleports.GainakUndergroundEntrance;
|
||||
|
||||
import ai.npc.AbstractNpcAI;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.zone.L2ZoneType;
|
||||
|
||||
/**
|
||||
* Gainak Underground Entrance teleport AI.
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class GainakUndergroundEntrance extends AbstractNpcAI
|
||||
{
|
||||
// Zones
|
||||
private static final int ZONE_ID_1 = 200207;
|
||||
private static final int ZONE_ID_2 = 200208;
|
||||
private static final int ZONE_ID_3 = 200209;
|
||||
private static final int ZONE_ID_4 = 200210;
|
||||
private static final int ZONE_ID_5 = 200211;
|
||||
private static final int ZONE_ID_6 = 200212;
|
||||
// Teleport Locations
|
||||
private static final Location TELEPORT_LOC_1 = new Location(-49596, -150715, -14472);
|
||||
private static final Location TELEPORT_LOC_2 = new Location(17600, -113803, -312);
|
||||
private static final Location TELEPORT_LOC_3 = new Location(-55283, -147410, -14728);
|
||||
private static final Location TELEPORT_LOC_4 = new Location(17067, -111738, -320);
|
||||
private static final Location TELEPORT_LOC_5 = new Location(-46867, -149309, -14216);
|
||||
private static final Location TELEPORT_LOC_6 = new Location(18784, -115648, -248);
|
||||
|
||||
private GainakUndergroundEntrance()
|
||||
{
|
||||
super(GainakUndergroundEntrance.class.getSimpleName(), "ai/npc/Teleports");
|
||||
addEnterZoneId(ZONE_ID_1, ZONE_ID_2, ZONE_ID_3, ZONE_ID_4, ZONE_ID_5, ZONE_ID_6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onEnterZone(L2Character character, L2ZoneType zone)
|
||||
{
|
||||
if (character.isPlayer())
|
||||
{
|
||||
switch (zone.getId())
|
||||
{
|
||||
case ZONE_ID_1:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_1);
|
||||
break;
|
||||
}
|
||||
case ZONE_ID_2:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_2);
|
||||
break;
|
||||
}
|
||||
case ZONE_ID_3:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_3);
|
||||
break;
|
||||
}
|
||||
case ZONE_ID_4:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_4);
|
||||
break;
|
||||
}
|
||||
case ZONE_ID_5:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_5);
|
||||
break;
|
||||
}
|
||||
case ZONE_ID_6:
|
||||
{
|
||||
character.teleToLocation(TELEPORT_LOC_6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onEnterZone(character, zone);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new GainakUndergroundEntrance();
|
||||
}
|
||||
}
|
@@ -34,6 +34,7 @@ import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jserver.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
@@ -359,11 +360,17 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
|
||||
if (player.isSubClassActive())
|
||||
{
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass());
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setBaseClass(player.getActiveClass());
|
||||
player.setBaseClassId(player.getActiveClassId());
|
||||
player.setInitialClassId(ClassId.getInitialClassId(player));
|
||||
}
|
||||
|
||||
if (player.getBaseClass().getRace().equals(Race.ERTHEIA))
|
||||
{
|
||||
player.getAppearance().setSex(true);
|
||||
}
|
||||
|
||||
final String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName();
|
||||
@@ -991,7 +998,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClassId()).getClientCode());
|
||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||
adminReply.replace("%y%", String.valueOf(player.getY()));
|
||||
adminReply.replace("%z%", String.valueOf(player.getZ()));
|
||||
|
@@ -139,7 +139,7 @@ public final class CallPc extends AbstractEffect
|
||||
|
||||
if (target.inObserverMode())
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING_OR_TELEPORTING2);
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING_OR_TELEPORTING);
|
||||
sm.addCharName(target);
|
||||
activeChar.sendPacket(sm);
|
||||
return false;
|
||||
|
@@ -140,7 +140,7 @@ public class ItemSkillsTemplate implements IItemHandler
|
||||
{
|
||||
if (!playable.destroyItem("Consume", item.getObjectId(), 1, playable, false))
|
||||
{
|
||||
playable.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
playable.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -261,39 +261,39 @@ public class Q00177_SplitDestiny extends Quest
|
||||
{
|
||||
htmltext = "33344-02.htm";
|
||||
}
|
||||
else if (!CategoryData.getInstance().isInCategory(CategoryType.AWAKEN_GROUP, player.getBaseClass()))
|
||||
else if (!CategoryData.getInstance().isInCategory(CategoryType.AWAKEN_GROUP, player.getBaseClassId()))
|
||||
{
|
||||
htmltext = "33344-03.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.SIGEL_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.SIGEL_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.SIGEL_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.SIGEL_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-sigel.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.TYRR_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.TYRR_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.TYRR_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.TYRR_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-tyrr.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.OTHELL_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.OTHELL_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.OTHELL_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.OTHELL_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-othell.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.YUL_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.YUL_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.YUL_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.YUL_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-yul.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.FEOH_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.FEOH_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.FEOH_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.FEOH_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-feoh.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.ISS_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.ISS_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.ISS_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.ISS_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-iss.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.WYNN_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.WYNN_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.WYNN_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.WYNN_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-wynn.htm";
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.AEORE_GROUP, player.getBaseClass()) && player.isInCategory(CategoryType.AEORE_CANDIDATE))
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.AEORE_GROUP, player.getBaseClassId()) && player.isInCategory(CategoryType.AEORE_CANDIDATE))
|
||||
{
|
||||
htmltext = "33344-aeore.htm";
|
||||
}
|
||||
|
@@ -177,7 +177,7 @@ public class Q10331_StartOfFate extends Quest
|
||||
return null;
|
||||
}
|
||||
final int classId = Integer.parseInt(event.replace("change_to_", ""));
|
||||
player.setBaseClass(classId);
|
||||
player.setBaseClassId(classId);
|
||||
player.setClassId(classId);
|
||||
switch (classId)
|
||||
{
|
||||
|
@@ -145,7 +145,7 @@ public class BoatGludinRune implements Runnable
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY2);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
|
Reference in New Issue
Block a user