Partial sync L2jUnity free release Feb 20th 2015.
This commit is contained in:
@@ -16,15 +16,11 @@
|
||||
*/
|
||||
package ai;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
* Abstract NPC AI class for datapack based AIs.
|
||||
@@ -70,60 +66,6 @@ public abstract class AbstractNpcAI extends Quest
|
||||
addFactionCallId(mobs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts NpcSay packet to all known players with custom string.
|
||||
* @param npc
|
||||
* @param type
|
||||
* @param text
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, String text)
|
||||
{
|
||||
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), text));
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts NpcSay packet to all known players with npc string id.
|
||||
* @param npc
|
||||
* @param type
|
||||
* @param stringId
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId)
|
||||
{
|
||||
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts NpcSay packet to all known players with npc string id.
|
||||
* @param npc
|
||||
* @param type
|
||||
* @param stringId
|
||||
* @param parameters
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId, String... parameters)
|
||||
{
|
||||
final NpcSay say = new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId);
|
||||
if (parameters != null)
|
||||
{
|
||||
for (String parameter : parameters)
|
||||
{
|
||||
say.addStringParameter(parameter);
|
||||
}
|
||||
}
|
||||
Broadcast.toKnownPlayers(npc, say);
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts NpcSay packet to all known players with npc string id in specific radius.
|
||||
* @param npc
|
||||
* @param type
|
||||
* @param stringId
|
||||
* @param radius
|
||||
*/
|
||||
protected void broadcastNpcSay(L2Npc npc, ChatType type, NpcStringId stringId, int radius)
|
||||
{
|
||||
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId), radius);
|
||||
}
|
||||
|
||||
public void spawnMinions(L2Npc npc, String spawnName)
|
||||
{
|
||||
for (MinionHolder is : npc.getTemplate().getParameters().getMinionList(spawnName))
|
||||
|
@@ -51,19 +51,19 @@ public final class AdenReconstructorManager extends AbstractNpcAI
|
||||
{
|
||||
case "SPAM_TEXT":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILEN_S_DESTRUCTION);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_LAND_OF_ADEN_IS_IN_NEED_OF_MATERIALS_TO_REBUILD_FROM_SHILEN_S_DESTRUCTION);
|
||||
startQuestTimer("SPAM_TEXT2", 1000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT2":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.PLEASE_DONATE_ANY_UNUSED_MATERIALS_YOU_HAVE_TO_HELP_REBUILD_ADEN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.PLEASE_DONATE_ANY_UNUSED_MATERIALS_YOU_HAVE_TO_HELP_REBUILD_ADEN);
|
||||
startQuestTimer("SPAM_TEXT3", 1000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT3":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_LL_RECEIVE_A_GIFT_FOR_ANY_APPLICABLE_DONATION);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_LL_RECEIVE_A_GIFT_FOR_ANY_APPLICABLE_DONATION);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2TamedBeastInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
@@ -430,13 +429,8 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
// also, perform a rare random chat
|
||||
if (getRandom(20) == 0)
|
||||
{
|
||||
final NpcStringId message = NpcStringId.getNpcStringId(getRandom(2024, 2029));
|
||||
final NpcSay packet = new NpcSay(nextNpc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0) // player name, $s1
|
||||
{
|
||||
packet.addStringParameter(player.getName());
|
||||
}
|
||||
npc.broadcastPacket(packet);
|
||||
NpcStringId message = NpcStringId.getNpcStringId(getRandom(2024, 2029));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, message, message.getParamCount() > 0 ? player.getName() : null);
|
||||
}
|
||||
// @formatter:off
|
||||
/*
|
||||
@@ -546,13 +540,8 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
// rare random talk...
|
||||
if (getRandom(20) == 0)
|
||||
{
|
||||
final NpcStringId message = TEXT[growthLevel][getRandom(TEXT[growthLevel].length)];
|
||||
final NpcSay packet = new NpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0) // player name, $s1
|
||||
{
|
||||
packet.addStringParameter(caster.getName());
|
||||
}
|
||||
npc.broadcastPacket(packet);
|
||||
NpcStringId message = TEXT[growthLevel][getRandom(TEXT[growthLevel].length)];
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, message, message.getParamCount() > 0 ? caster.getName() : null);
|
||||
}
|
||||
|
||||
if ((growthLevel > 0) && (FEED_INFO.get(objectId) != caster.getObjectId()))
|
||||
@@ -574,13 +563,8 @@ public final class FeedableBeasts extends AbstractNpcAI
|
||||
if (skillId == beast.getFoodType())
|
||||
{
|
||||
beast.onReceiveFood();
|
||||
final NpcStringId message = TAMED_TEXT[getRandom(TAMED_TEXT.length)];
|
||||
final NpcSay packet = new NpcSay(npc, ChatType.NPC_GENERAL, message);
|
||||
if (message.getParamCount() > 0)
|
||||
{
|
||||
packet.addStringParameter(caster.getName());
|
||||
}
|
||||
beast.broadcastPacket(packet);
|
||||
NpcStringId message = TAMED_TEXT[getRandom(TAMED_TEXT.length)];
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, message, message.getParamCount() > 0 ? caster.getName() : null);
|
||||
}
|
||||
}
|
||||
return super.onSkillSee(npc, caster, skill, targets, isSummon);
|
||||
|
@@ -51,11 +51,11 @@ public final class GiantsCave extends AbstractNpcAI
|
||||
{
|
||||
if (npc.getId() == SCOUTS[0]) // Gamlin
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.INTRUDER_DETECTED);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.INTRUDER_DETECTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.OH_GIANTS_AN_INTRUDER_HAS_BEEN_DISCOVERED);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.OH_GIANTS_AN_INTRUDER_HAS_BEEN_DISCOVERED);
|
||||
}
|
||||
|
||||
for (L2Character characters : npc.getKnownList().getKnownCharactersInRadius(450))
|
||||
@@ -93,11 +93,11 @@ public final class GiantsCave extends AbstractNpcAI
|
||||
npc.setScriptValue(1);
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_GUYS_ARE_DETECTED);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_GUYS_ARE_DETECTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHAT_KIND_OF_CREATURES_ARE_YOU);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHAT_KIND_OF_CREATURES_ARE_YOU);
|
||||
}
|
||||
startQuestTimer("ATTACK", 6000, npc, player);
|
||||
startQuestTimer("CLEAR", 120000, npc, null);
|
||||
|
@@ -80,7 +80,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.WHO_S_THERE_IF_YOU_DISTURB_THE_TEMPER_OF_THE_GREAT_LAND_DRAGON_ANTHARAS_I_WILL_NEVER_FORGIVE_YOU);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.WHO_S_THERE_IF_YOU_DISTURB_THE_TEMPER_OF_THE_GREAT_LAND_DRAGON_ANTHARAS_I_WILL_NEVER_FORGIVE_YOU);
|
||||
}
|
||||
return super.onAggroRangeEnter(npc, player, isSummon);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc newKnight = addSpawn(DRAGON_KNIGHT2, npc, false, 0, true);
|
||||
npc.deleteMe();
|
||||
broadcastNpcSay(newKnight, ChatType.NPC_SHOUT, NpcStringId.THOSE_WHO_SET_FOOT_IN_THIS_PLACE_SHALL_NOT_LEAVE_ALIVE);
|
||||
newKnight.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.THOSE_WHO_SET_FOOT_IN_THIS_PLACE_SHALL_NOT_LEAVE_ALIVE);
|
||||
addAttackDesire(newKnight, killer);
|
||||
}
|
||||
break;
|
||||
@@ -107,7 +107,7 @@ public final class LairOfAntharas extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc eliteKnight = addSpawn(ELITE_DRAGON_KNIGHT, npc, false, 0, true);
|
||||
npc.deleteMe();
|
||||
broadcastNpcSay(eliteKnight, ChatType.NPC_SHOUT, NpcStringId.IF_YOU_WISH_TO_SEE_HELL_I_WILL_GRANT_YOU_YOUR_WISH);
|
||||
eliteKnight.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.IF_YOU_WISH_TO_SEE_HELL_I_WILL_GRANT_YOU_YOUR_WISH);
|
||||
addAttackDesire(eliteKnight, killer);
|
||||
}
|
||||
break;
|
||||
|
@@ -438,7 +438,7 @@ public final class MinionSpawnManager extends AbstractNpcAI
|
||||
{
|
||||
addMinion((L2MonsterInstance) npc, is.getId());
|
||||
}
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ON_ATTACK_MSG[getRandom(ON_ATTACK_MSG.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, ON_ATTACK_MSG[getRandom(ON_ATTACK_MSG.length)]);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
if ((character.getId() == CAPTAIN) && (getRandom(100) < 10) && npc.isScriptValue(0))
|
||||
{
|
||||
final L2Npc captain = (L2Npc) character;
|
||||
broadcastNpcSay(captain, ChatType.NPC_GENERAL, SOLINA_KNIGHTS_MSG[getRandom(SOLINA_KNIGHTS_MSG.length)]);
|
||||
captain.broadcastSay(ChatType.NPC_GENERAL, SOLINA_KNIGHTS_MSG[getRandom(SOLINA_KNIGHTS_MSG.length)]);
|
||||
captain.setScriptValue(1);
|
||||
startQuestTimer("TIMER", 10000, captain, null);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
npc.doCast(KNIGHT_BLESS.getSkill());
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.FOR_THE_GLORY_OF_SOLINA);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.FOR_THE_GLORY_OF_SOLINA);
|
||||
addAttackDesire(addSpawn(KNIGHT, npc), player);
|
||||
}
|
||||
break;
|
||||
@@ -249,7 +249,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
|
||||
if (!npc.isInCombat())
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CANNOT_CARRY_A_WEAPON_WITHOUT_AUTHORIZATION);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CANNOT_CARRY_A_WEAPON_WITHOUT_AUTHORIZATION);
|
||||
}
|
||||
|
||||
addAttackDesire(npc, player);
|
||||
@@ -266,7 +266,7 @@ public final class MonasteryOfSilence extends AbstractNpcAI
|
||||
{
|
||||
if (obj.equals(npc))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, DIVINITY_MSG[getRandom(DIVINITY_MSG.length)], caster.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, DIVINITY_MSG[getRandom(DIVINITY_MSG.length)], caster.getName());
|
||||
addAttackDesire(npc, caster);
|
||||
break;
|
||||
}
|
||||
|
@@ -69,11 +69,11 @@ public final class PlainsOfDion extends AbstractNpcAI
|
||||
final int i = getRandom(5);
|
||||
if (i < 2)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MONSTERS_MSG[i], player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, MONSTERS_MSG[i], player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, MONSTERS_MSG[i]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, MONSTERS_MSG[i]);
|
||||
}
|
||||
|
||||
for (L2Character obj : npc.getKnownList().getKnownCharactersInRadius(npc.getTemplate().getClanHelpRange()))
|
||||
@@ -82,7 +82,7 @@ public final class PlainsOfDion extends AbstractNpcAI
|
||||
{
|
||||
final L2Npc monster = (L2Npc) obj;
|
||||
addAttackDesire(monster, player);
|
||||
broadcastNpcSay(monster, ChatType.NPC_GENERAL, MONSTERS_ASSIST_MSG[getRandom(3)]);
|
||||
monster.broadcastSay(ChatType.NPC_GENERAL, MONSTERS_ASSIST_MSG[getRandom(3)]);
|
||||
}
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
@@ -89,14 +89,14 @@ public final class PrisonGuards extends AbstractNpcAI
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(STONE.getSkill());
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_NOT_EASY_TO_OBTAIN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IT_S_NOT_EASY_TO_OBTAIN);
|
||||
}
|
||||
}
|
||||
else if (!player.isAffectedBySkill(TIMER) && (npc.calculateDistance(npc.getSpawn().getLocation(), false, false) < 2000))
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.doCast(STONE.getSkill());
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_RE_OUT_OF_YOUR_MIND_COMING_HERE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_RE_OUT_OF_YOUR_MIND_COMING_HERE);
|
||||
}
|
||||
return super.onAttack(npc, player, damage, isSummon);
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ public final class SilentValley extends AbstractNpcAI
|
||||
if (!isSummon && npc.isScriptValue(0))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_BE_CURSED_FOR_SEEKING_THE_TREASURE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_BE_CURSED_FOR_SEEKING_THE_TREASURE);
|
||||
npc.setTarget(player);
|
||||
npc.doCast(BETRAYAL.getSkill());
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ public final class TurekOrcs extends AbstractNpcAI
|
||||
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.5)) && (npc.getCurrentHp() > (npc.getMaxHp() * 0.3)) && (attacker.getCurrentHp() > (attacker.getMaxHp() * 0.25)) && npc.hasAIValue("fleeX") && npc.hasAIValue("fleeY") && npc.hasAIValue("fleeZ") && (npc.getVariables().getInt("state") == 0) && (getRandom(100) < 10))
|
||||
{
|
||||
// Say and flee
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.getNpcStringId(getRandom(1000007, 1000027)));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.getNpcStringId(getRandom(1000007, 1000027)));
|
||||
npc.disableCoreAI(true); // to avoid attacking behaviour, while flee
|
||||
npc.setIsRunning(true);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(npc.getAIValue("fleeX"), npc.getAIValue("fleeY"), npc.getAIValue("fleeZ")));
|
||||
|
@@ -88,7 +88,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
final L2PcInstance target = obj.getActingPlayer();
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_SPAWN[getRandom(NPC_STRINGS_ON_SPAWN.length)], target.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NPC_STRINGS_ON_SPAWN[getRandom(NPC_STRINGS_ON_SPAWN.length)], target.getName());
|
||||
addAttackDesire(npc, target);
|
||||
|
||||
startQuestTimer("DESPAWN", DESPAWN_TIME * 1000, npc, target);
|
||||
@@ -109,7 +109,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) < CHANCE_TO_SHOUT_ON_ATTACK)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_ATTACK[getRandom(NPC_STRINGS_ON_ATTACK.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NPC_STRINGS_ON_ATTACK[getRandom(NPC_STRINGS_ON_ATTACK.length)]);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public final class WarriorFishingBlock extends AbstractNpcAI
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NPC_STRINGS_ON_KILL[getRandom(NPC_STRINGS_ON_KILL.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NPC_STRINGS_ON_KILL[getRandom(NPC_STRINGS_ON_KILL.length)]);
|
||||
cancelQuestTimer("DESPAWN", npc, killer);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
@@ -270,7 +270,7 @@ public final class Baium extends AbstractNpcAI
|
||||
if ((player != null) && player.isInsideRadius(npc, 16000, true, false))
|
||||
{
|
||||
zone.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_WAKE_ME_NOW_YOU_SHALL_DIE, player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_WAKE_ME_NOW_YOU_SHALL_DIE, player.getName());
|
||||
npc.setTarget(player);
|
||||
npc.doCast(BAIUM_PRESENT.getSkill());
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
@@ -163,14 +162,14 @@ public final class Core extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) == 0)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.REMOVING_INTRUDERS));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.REMOVING_INTRUDERS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_firstAttacked = true;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.A_NON_PERMITTED_TARGET_HAS_BEEN_DISCOVERED));
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.INTRUDER_REMOVAL_SYSTEM_INITIATED));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.A_NON_PERMITTED_TARGET_HAS_BEEN_DISCOVERED);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.INTRUDER_REMOVAL_SYSTEM_INITIATED);
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@@ -181,11 +180,10 @@ public final class Core extends AbstractNpcAI
|
||||
{
|
||||
if (npc.getId() == CORE)
|
||||
{
|
||||
final int objId = npc.getObjectId();
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, objId, npc.getX(), npc.getY(), npc.getZ()));
|
||||
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_GENERAL, npc.getId(), NpcStringId.A_FATAL_ERROR_HAS_OCCURRED));
|
||||
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));
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.A_FATAL_ERROR_HAS_OCCURRED);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SYSTEM_IS_BEING_SHUT_DOWN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EMPTY);
|
||||
_firstAttacked = false;
|
||||
|
||||
GrandBossManager.getInstance().setBossStatus(CORE, DEAD);
|
||||
|
@@ -83,7 +83,7 @@ public final class CrimsonHatuOtis extends AbstractNpcAI
|
||||
}
|
||||
else if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.3)))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_VE_HAD_IT_UP_TO_HERE_WITH_YOU_I_LL_TAKE_CARE_OF_YOU);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_VE_HAD_IT_UP_TO_HERE_WITH_YOU_I_LL_TAKE_CARE_OF_YOU);
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("BUFF", 1000, npc, null);
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.2)) && npc.isScriptValue(1))
|
||||
{
|
||||
startQuestTimer("reward", 10000, npc, attacker);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WAIT_WAIT_STOP_SAVE_ME_AND_I_LL_GIVE_YOU_10_000_000_ADENA);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAIT_WAIT_STOP_SAVE_ME_AND_I_LL_GIVE_YOU_10_000_000_ADENA);
|
||||
npc.setScriptValue(2);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@@ -72,7 +72,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.UGH_A_CURSE_UPON_YOU : NpcStringId.I_REALLY_DIDN_T_WANT_TO_FIGHT;
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, msg);
|
||||
cancelQuestTimer("say", npc, null);
|
||||
cancelQuestTimer("reward", npc, player);
|
||||
return super.onKill(npc, player, isSummon);
|
||||
@@ -91,7 +91,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
return null;
|
||||
}
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.I_DON_T_WANT_TO_FIGHT : NpcStringId.IS_THIS_REALLY_NECESSARY;
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, msg);
|
||||
break;
|
||||
}
|
||||
case "reward":
|
||||
@@ -101,7 +101,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
if (getRandom(100000) < CHANCE2)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.TH_THANKS_I_COULD_HAVE_BECOME_GOOD_FRIENDS_WITH_YOU : NpcStringId.I_LL_GIVE_YOU_10_000_000_ADENA_LIKE_I_PROMISED_I_MIGHT_BE_AN_ORC_WHO_KEEPS_MY_PROMISES;
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, msg);
|
||||
npc.setScriptValue(3);
|
||||
npc.doCast(SKILL.getSkill());
|
||||
for (int i = 0; i < 10; i++)
|
||||
@@ -112,7 +112,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
else if (getRandom(100000) < CHANCE)
|
||||
{
|
||||
final NpcStringId msg = getRandomBoolean() ? NpcStringId.TH_THANKS_I_COULD_HAVE_BECOME_GOOD_FRIENDS_WITH_YOU : NpcStringId.SORRY_BUT_THIS_IS_ALL_I_HAVE_GIVE_ME_A_BREAK;
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, msg);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, msg);
|
||||
npc.setScriptValue(3);
|
||||
npc.doCast(SKILL.getSkill());
|
||||
for (int i = 0; i < 10; i++)
|
||||
@@ -122,7 +122,7 @@ public final class FrightenedRagnaOrc extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, getRandomBoolean() ? NpcStringId.THANKS_BUT_THAT_THING_ABOUT_10_000_000_ADENA_WAS_A_LIE_SEE_YA : NpcStringId.YOU_RE_PRETTY_DUMB_TO_BELIEVE_ME);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, getRandomBoolean() ? NpcStringId.THANKS_BUT_THAT_THING_ABOUT_10_000_000_ADENA_WAS_A_LIE_SEE_YA : NpcStringId.YOU_RE_PRETTY_DUMB_TO_BELIEVE_ME);
|
||||
}
|
||||
startQuestTimer("despawn", 1000, npc, null);
|
||||
}
|
||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2BossZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
@@ -245,9 +244,7 @@ public final class Orfen extends AbstractNpcAI
|
||||
final L2Character originalCaster = isSummon ? caster.getServitors().values().stream().findFirst().orElse(caster.getPet()) : caster;
|
||||
if ((skill.getEffectPoint() > 0) && (getRandom(5) == 0) && npc.isInsideRadius(originalCaster, 1000, false, false))
|
||||
{
|
||||
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), TEXT[getRandom(4)]);
|
||||
packet.addStringParameter(caster.getName().toString());
|
||||
npc.broadcastPacket(packet);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, TEXT[getRandom(4)], caster.getName());
|
||||
originalCaster.teleToLocation(npc.getLocation());
|
||||
npc.setTarget(originalCaster);
|
||||
npc.doCast(SkillData.getInstance().getSkill(4064, 1));
|
||||
@@ -300,9 +297,7 @@ public final class Orfen extends AbstractNpcAI
|
||||
}
|
||||
else if (npc.isInsideRadius(attacker, 1000, false, false) && !npc.isInsideRadius(attacker, 300, false, false) && (getRandom(10) == 0))
|
||||
{
|
||||
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npcId, TEXT[getRandom(3)]);
|
||||
packet.addStringParameter(attacker.getName().toString());
|
||||
npc.broadcastPacket(packet);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, TEXT[getRandom(3)], attacker.getName());
|
||||
attacker.teleToLocation(npc.getLocation());
|
||||
npc.setTarget(attacker);
|
||||
npc.doCast(SkillData.getInstance().getSkill(4064, 1));
|
||||
|
@@ -71,7 +71,7 @@ public final class QueenShyeed extends AbstractNpcAI
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.SHYEED_S_CRY_IS_STEADILY_DYING_DOWN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SHYEED_S_CRY_IS_STEADILY_DYING_DOWN);
|
||||
startRespawn();
|
||||
PC_BUFF_ZONE.setEnabled(true);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
|
@@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
@@ -73,7 +72,7 @@ public final class SinWardens extends AbstractNpcAI
|
||||
|
||||
if (killedCount == 5)
|
||||
{
|
||||
master.broadcastPacket(new NpcSay(master.getObjectId(), ChatType.NPC_GENERAL, master.getId(), NpcStringId.WE_MIGHT_NEED_NEW_SLAVES_I_LL_BE_BACK_SOON_SO_WAIT));
|
||||
master.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WE_MIGHT_NEED_NEW_SLAVES_I_LL_BE_BACK_SOON_SO_WAIT);
|
||||
master.doDie(killer);
|
||||
killedMinionsCount.remove(master.getObjectId());
|
||||
}
|
||||
|
@@ -155,7 +155,7 @@ public final class Venom extends AbstractNpcAI
|
||||
if (CastleManager.getInstance().getCastleById(CASTLE).getSiege().getControlTowerCount() <= 1)
|
||||
{
|
||||
changeLocation(MoveTo.THRONE);
|
||||
broadcastNpcSay(_massymore, ChatType.NPC_SHOUT, NpcStringId.OH_NO_THE_DEFENSES_HAVE_FAILED_IT_IS_TOO_DANGEROUS_TO_REMAIN_INSIDE_THE_CASTLE_FLEE_EVERY_MAN_FOR_HIMSELF);
|
||||
_massymore.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.OH_NO_THE_DEFENSES_HAVE_FAILED_IT_IS_TOO_DANGEROUS_TO_REMAIN_INSIDE_THE_CASTLE_FLEE_EVERY_MAN_FOR_HIMSELF);
|
||||
cancelQuestTimer("tower_check", npc, null);
|
||||
startQuestTimer("raid_check", 10000, npc, null, true);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ public final class Venom extends AbstractNpcAI
|
||||
_venom.disableSkill(VENOM_TELEPORT.getSkill(), -1);
|
||||
_venom.disableSkill(RANGE_TELEPORT.getSkill(), -1);
|
||||
_venom.doRevive();
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.WHO_DARES_TO_COVET_THE_THRONE_OF_OUR_CASTLE_LEAVE_IMMEDIATELY_OR_YOU_WILL_PAY_THE_PRICE_OF_YOUR_AUDACITY_WITH_YOUR_VERY_OWN_BLOOD);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.WHO_DARES_TO_COVET_THE_THRONE_OF_OUR_CASTLE_LEAVE_IMMEDIATELY_OR_YOU_WILL_PAY_THE_PRICE_OF_YOUR_AUDACITY_WITH_YOUR_VERY_OWN_BLOOD);
|
||||
((L2Attackable) _venom).setCanReturnToSpawnPoint(false);
|
||||
if (checkStatus() == DEAD)
|
||||
{
|
||||
@@ -335,7 +335,7 @@ public final class Venom extends AbstractNpcAI
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
updateStatus(DEAD);
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.IT_S_NOT_OVER_YET_IT_WON_T_BE_OVER_LIKE_THIS_NEVER);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.IT_S_NOT_OVER_YET_IT_WON_T_BE_OVER_LIKE_THIS_NEVER);
|
||||
if (!CastleManager.getInstance().getCastleById(CASTLE).getSiege().isInProgress())
|
||||
{
|
||||
final L2Npc cube = addSpawn(TELEPORT_CUBE, CUBE, false, 0);
|
||||
|
@@ -59,19 +59,19 @@ public final class Alarm extends AbstractNpcAI
|
||||
case "SELF_DESTRUCT_IN_60":
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_30", 30000, npc, null);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_60_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_60_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "SELF_DESTRUCT_IN_30":
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_10", 20000, npc, null);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_30_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_30_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "SELF_DESTRUCT_IN_10":
|
||||
{
|
||||
startQuestTimer("RECORDER_CRUSHED", 10000, npc, null);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_10_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_10_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
case "RECORDER_CRUSHED":
|
||||
@@ -81,7 +81,7 @@ public final class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
if (player0 != null)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.RECORDER_CRUSHED);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.RECORDER_CRUSHED);
|
||||
if (verifyMemoState(player0, ART_OF_PERSUASION_ID, -1))
|
||||
{
|
||||
setMemoState(player0, ART_OF_PERSUASION_ID, 5);
|
||||
@@ -225,7 +225,7 @@ public final class Alarm extends AbstractNpcAI
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SELF_DESTRUCT_IN_60", 60000, npc, null);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.INTRUDER_ALERT_THE_ALARM_WILL_SELF_DESTRUCT_IN_2_MINUTES);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.INTRUDER_ALERT_THE_ALARM_WILL_SELF_DESTRUCT_IN_2_MINUTES);
|
||||
final L2PcInstance player = npc.getVariables().getObject("player0", L2PcInstance.class);
|
||||
if (player != null)
|
||||
{
|
||||
|
@@ -94,22 +94,22 @@ public final class Rooney extends AbstractNpcAI
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HURRY_HURRY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HURRY_HURRY);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_AM_NOT_THAT_TYPE_OF_PERSON_WHO_STAYS_IN_ONE_PLACE_FOR_A_LONG_TIME);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_AM_NOT_THAT_TYPE_OF_PERSON_WHO_STAYS_IN_ONE_PLACE_FOR_A_LONG_TIME);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_HARD_FOR_ME_TO_KEEP_STANDING_LIKE_THIS);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IT_S_HARD_FOR_ME_TO_KEEP_STANDING_LIKE_THIS);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHY_DON_T_I_GO_THAT_WAY_THIS_TIME);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHY_DON_T_I_GO_THAT_WAY_THIS_TIME);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -130,7 +130,7 @@ public final class Rooney extends AbstractNpcAI
|
||||
{
|
||||
if (creature.isPlayer() && npc.isScriptValue(0))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WELCOME);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELCOME);
|
||||
startQuestTimer("teleport", 60000, npc, null);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
|
@@ -85,19 +85,19 @@ public final class LaVieEnRose extends AbstractNpcAI
|
||||
}
|
||||
case "SPAM_TEXT":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_BEAUTY_SHOP_IS_OPEN_COME_ON_IN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_BEAUTY_SHOP_IS_OPEN_COME_ON_IN);
|
||||
startQuestTimer("SPAM_TEXT2", 2500, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT2":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_LOOK_GOOD_TOO_BUDDY_COME_ON_COME_ON);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_LOOK_GOOD_TOO_BUDDY_COME_ON_COME_ON);
|
||||
startQuestTimer("SPAM_TEXT3", 2500, npc, null);
|
||||
break;
|
||||
}
|
||||
case "SPAM_TEXT3":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.EVERYONE_COME_ON_LET_S_GO_GANGNAM_STYLE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EVERYONE_COME_ON_LET_S_GO_GANGNAM_STYLE);
|
||||
break;
|
||||
}
|
||||
case "cancel":
|
||||
|
@@ -119,7 +119,7 @@ public final class Mammons extends AbstractNpcAI
|
||||
|
||||
if (blacksmith != null)
|
||||
{
|
||||
broadcastNpcSay(blacksmith, ChatType.NPC_GENERAL, NpcStringId.I_HAVE_SOME_EXCELLENT_WEAPONS_TO_SHOW_YOU);
|
||||
blacksmith.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAVE_SOME_EXCELLENT_WEAPONS_TO_SHOW_YOU);
|
||||
}
|
||||
|
||||
if (Config.ANNOUNCE_MAMMON_SPAWN)
|
||||
|
@@ -88,7 +88,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
|
||||
takeItems(player, UNLIT_TORCHLIGHT, 1);
|
||||
giveItems(player, TORCHLIGHT, 1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_LL_START_THE_FURNACE_MECHANISM_WATCH_FOR_THE_PATTERN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_LL_START_THE_FURNACE_MECHANISM_WATCH_FOR_THE_PATTERN);
|
||||
|
||||
room.getManager().setTarget(player);
|
||||
room.setParticipant(player);
|
||||
@@ -153,7 +153,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.NOW_LIGHT_THE_FURNACES_IN_THE_CORRECT_ORDER);
|
||||
room.getManager().broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NOW_LIGHT_THE_FURNACES_IN_THE_CORRECT_ORDER);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, npc, null);
|
||||
final ConsumerEventListener listener = new ConsumerEventListener(room.getParticipant(), EventType.ON_CREATURE_SKILL_USE, (OnCreatureSkillUse listenerEvent) -> onSkillUse(listenerEvent), room);
|
||||
@@ -164,19 +164,19 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
case "hurry_up":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.ONLY_1_MINUTE_LEFT);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ONLY_1_MINUTE_LEFT);
|
||||
startQuestTimer("hurry_up2", 60000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "hurry_up2":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.JUST_10_SECONDS_LEFT);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.JUST_10_SECONDS_LEFT);
|
||||
startQuestTimer("expire", 10000, npc, null);
|
||||
break;
|
||||
}
|
||||
case "expire":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TOO_LATE_THE_TORCH_HAS_RUN_OUT_MAYBE_NEXT_TIME);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TOO_LATE_THE_TORCH_HAS_RUN_OUT_MAYBE_NEXT_TIME);
|
||||
}
|
||||
case "end":
|
||||
{
|
||||
@@ -284,7 +284,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
else
|
||||
{
|
||||
addSpawn(TREASURE_BOX, room.getParticipant().getLocation(), true, 0);
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.THAT_S_IT_YOU_VE_DONE_IT);
|
||||
room.getManager().broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THAT_S_IT_YOU_VE_DONE_IT);
|
||||
room.setCurrentPot(0);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
@@ -293,7 +293,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
else if (room.getAttemptNumber() == MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
room.getManager().broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_VE_FAILED_ANY_FURTHER_ATTEMPTS_WOULD_BE_WASTEFUL);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.getParticipant().removeListenerIf(EventType.ON_CREATURE_SKILL_USE, listener -> listener.getOwner() == room);
|
||||
@@ -301,7 +301,7 @@ public final class Minigame extends AbstractNpcAI
|
||||
}
|
||||
else if (room.getAttemptNumber() < MAX_ATTEMPTS)
|
||||
{
|
||||
broadcastNpcSay(room.getManager(), ChatType.NPC_GENERAL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
room.getManager().broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TOO_BAD_I_WILL_NOT_GIVE_UP_ON_THIS_THOUGH);
|
||||
room.burnThemAll();
|
||||
startQuestTimer("off", 2000, room.getManager(), null);
|
||||
room.setAttemptNumber(room.getAttemptNumber() + 1);
|
||||
|
@@ -102,7 +102,7 @@ public final class TeleportToFantasy extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
player.teleToLocation(RUNE_TOWNSHIP);
|
||||
}
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_I_LL_BE_SENDING_YOU_BACK_TO_THE_TOWN_OF_RUNE_WHICH_IS_THE_NEAREST_TOWN);
|
||||
player.teleToLocation(DION_CASTLE_TOWN);
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
@@ -215,7 +214,7 @@ public final class WeaverOlf extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHAT_A_PREDICAMENT_MY_ATTEMPTS_WERE_UNSUCCESSFUL));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHAT_A_PREDICAMENT_MY_ATTEMPTS_WERE_UNSUCCESSFUL);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -613,7 +613,7 @@ public final class AteliaManager extends AbstractNpcAI
|
||||
}
|
||||
else if (Util.contains(FLOOR_MOBS, npc.getId()) && (chance > 90))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ATELIA_MSG[getRandom(1)], attacker.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, ATELIA_MSG[getRandom(1)], attacker.getName());
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public final class MercenaryCaptain extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_SOUTHERN_PART_OF_DRAGON_VALLEY_IS_MUCH_MORE_DANGEROUS_THAN_THE_NORTH_BE_CAREFUL, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_SOUTHERN_PART_OF_DRAGON_VALLEY_IS_MUCH_MORE_DANGEROUS_THAN_THE_NORTH_BE_CAREFUL, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public final class Namo extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public final class Rakun extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("BROADCAST_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_SWARMS_WITH_DRAGONS_BY_DAY_AND_UNDEAD_BY_NIGHT, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
@@ -308,11 +307,6 @@ public final class TalentShow extends AbstractNpcAI
|
||||
startQuestTimer("Start", diff, null, null); // first start
|
||||
}
|
||||
|
||||
private void autoChat(L2Npc npc, NpcStringId npcString, ChatType type)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), type, npc.getId(), npcString));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
@@ -322,7 +316,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
{
|
||||
case 32433:
|
||||
{
|
||||
autoChat(npc, MESSAGES[0], ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[0]);
|
||||
startQuestTimer("1", 30000, npc, null);
|
||||
break;
|
||||
}
|
||||
@@ -384,7 +378,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
// TODO switch on event
|
||||
if (event.equalsIgnoreCase("6"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[6], ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[6]);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56511, -56647, -2008, 36863));
|
||||
npc.broadcastPacket(new PlaySound(1, "NS22_F", 0, 0, 0, 0, 0));
|
||||
addSpawn(SINGERS[0], -56344, -56328, -2008, 32768, false, 224000);
|
||||
@@ -402,7 +396,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
{
|
||||
case 32433:
|
||||
{
|
||||
autoChat(npc, MESSAGES[7], ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[7]);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56698, -56430, -2008, 32768));
|
||||
startQuestTimer("8", 12000, npc, null);
|
||||
break;
|
||||
@@ -436,7 +430,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
{
|
||||
case 32433:
|
||||
{
|
||||
autoChat(npc, MESSAGES[11], ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[11]);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(-56698, -56430, -2008, 32768));
|
||||
startQuestTimer("12", 5000, npc, null);
|
||||
break;
|
||||
@@ -455,7 +449,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("17"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[16], ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[16]);
|
||||
startQuestTimer("social1", 2000, addSpawn(INDIVIDUALS[1], -56700, -56340, -2008, 32768, false, 32000), null);
|
||||
startQuestTimer("18", 9000, npc, null);
|
||||
}
|
||||
@@ -476,7 +470,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("28"))
|
||||
{
|
||||
autoChat(npc, MESSAGES[23], ChatType.NPC_GENERAL);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, MESSAGES[23]);
|
||||
startQuestTimer("social1", 1, npc, null);
|
||||
}
|
||||
else if (event.equalsIgnoreCase("29"))
|
||||
@@ -499,7 +493,7 @@ public final class TalentShow extends AbstractNpcAI
|
||||
final ShoutInfo si = TALKS.get(event);
|
||||
if (si != null)
|
||||
{
|
||||
autoChat(npc, si.getNpcStringId(), ChatType.NPC_SHOUT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, si.getNpcStringId());
|
||||
startQuestTimer(si.getNextEvent(), si.getTime(), npc, null);
|
||||
}
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Lailly extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.READY_TO_LISTEN_TO_A_STORY_COME_NOW, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.READY_TO_LISTEN_TO_A_STORY_COME_NOW, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
62
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/El.java
vendored
Normal file
62
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/El.java
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.zones.Gracia.npcs;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* El AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class El extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int EL = 32556;
|
||||
|
||||
private El()
|
||||
{
|
||||
super(El.class.getSimpleName(), "ai/zones/Gracia/npcs");
|
||||
addSpawnId(EL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_USE_THE_JUMP_BOARD_TO_GET_STRAIGHT_TO_THE_2ND_FLOOR, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new El();
|
||||
}
|
||||
}
|
@@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.L2Spawn;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
@@ -68,13 +67,13 @@ public final class GeneralDilios extends AbstractNpcAI
|
||||
int value = Integer.parseInt(event.substring(8));
|
||||
if (value < 6)
|
||||
{
|
||||
_general.broadcastPacket(new NpcSay(_general.getObjectId(), ChatType.NPC_GENERAL, GENERAL_ID, NpcStringId.STABBING_THREE_TIMES));
|
||||
_general.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.STABBING_THREE_TIMES);
|
||||
startQuestTimer("guard_animation_0", 3400, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = -1;
|
||||
_general.broadcastPacket(new NpcSay(_general.getObjectId(), ChatType.NPC_SHOUT, GENERAL_ID, DILIOS_TEXT[getRandom(DILIOS_TEXT.length)]));
|
||||
_general.broadcastSay(ChatType.NPC_SHOUT, DILIOS_TEXT[getRandom(DILIOS_TEXT.length)]);
|
||||
}
|
||||
startQuestTimer("command_" + (value + 1), 60000, null, null);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
Airship, eh? If you want board an Airship, you need to first register for a Summon License. There's a switch on the Airship controls that proves your qualifications to summon and pilot it. Unless you obtain that license, you won't be allowed to fly.<br>
|
||||
Only <font color="LEVEL">clan lords whose clan is level 5 or higher</font> may earn the license. There is also a limit on the number of Airships.<br>
|
||||
Only <font color="LEVEL">Clan Leaders whose clan is level 5 or above</font> may earn the license. There is also a limit on the number of Airships.<br>
|
||||
If you meet the requirements, you can obtain a Airship Summon License in exchange for <font color="LEVEL">10 Energy Star Stones</font>.<br>
|
||||
An Energy Star Stone can be made by assembling Star Stones found floating in the skies over Gracia. If you thinkk this is too time-consuming, you can also buy them from Officer Tolonis right over there..<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Lekon licence">Obtain the Airship Summon License.</Button>
|
||||
An Energy Star Stone can be made by assembling Star Stones found floating in the skies over Gracia. If you think this is too time-consuming, you can also buy them from Officer Tolonis right over there..<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Lekon licence">Obtain an Airship Summon License </Button>
|
||||
</body></html>
|
@@ -1,3 +1,3 @@
|
||||
<html><body>Engineer Lekon:<br>
|
||||
Only a clan lord whose clan is level 5 or above can be issued an Airship Summon License.
|
||||
Only a Clan Leader whose clan is level 5 or above can be issued an Airship Summon License.
|
||||
</body></html>
|
@@ -64,17 +64,17 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
case "tomaris_shout1":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.HUH_THE_SKY_LOOKS_FUNNY_WHAT_S_THAT);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.HUH_THE_SKY_LOOKS_FUNNY_WHAT_S_THAT);
|
||||
break;
|
||||
}
|
||||
case "artius_shout":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.A_POWERFUL_SUBORDINATE_IS_BEING_HELD_BY_THE_BARRIER_ORB_THIS_REACTION_MEANS);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.A_POWERFUL_SUBORDINATE_IS_BEING_HELD_BY_THE_BARRIER_ORB_THIS_REACTION_MEANS);
|
||||
break;
|
||||
}
|
||||
case "tomaris_shout2":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.BE_CAREFUL_SOMETHING_S_COMING);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.BE_CAREFUL_SOMETHING_S_COMING);
|
||||
break;
|
||||
}
|
||||
case "lindvior_scene":
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<html><body>Mage Notingale:<br>
|
||||
<html><body>Mage Nottingale:<br>
|
||||
Welcome to Gracia! I am here to guide adventures who come from Aden.<br>
|
||||
It is impossible to walk around in Gracia because of the contamination caused by the Seeds. Most move via Airship, but that is also difficult -- there simply aren't enough for everyone.<br>
|
||||
The magicians of Aden crafted an alternative plan. It is called an <font color="LEVEL">Aurabird</font>. I think it is the better solution for you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-02.html">Ask what to do.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-03.html">Ask about Aerial Raid Monsters.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-04.html">Ask about major hunting grounds.</Button>
|
||||
The magicians of Aden crafted an alternative plan. It is called an <font color="LEVEL">Aura Bird</font>. I think it is the better solution for you.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-02.html">"What should I do?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-03.html">"Can you tell me about Aerial Raid Monsters?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-04.html">"Any there any major hunting grounds nearby?"</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
62
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/Plenos.java
vendored
Normal file
62
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/Plenos.java
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.zones.Gracia.npcs;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Plenos AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Plenos extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int PLENOS = 32563;
|
||||
|
||||
private Plenos()
|
||||
{
|
||||
super(Plenos.class.getSimpleName(), "ai/zones/Gracia/npcs");
|
||||
addSpawnId(PLENOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_BE_TELEPORTED_TO_EACH_SEED_IF_YOU_VOLUNTEER_WHY_NOT_TRY, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Plenos();
|
||||
}
|
||||
}
|
7
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/SeedTeleportDevice/15929.html
vendored
Normal file
7
L2J_Mobius_Test/dist/game/data/scripts/ai/zones/Gracia/npcs/SeedTeleportDevice/15929.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><head><body>Seed Teleport Device:<br>
|
||||
Let me guide you to the Seeds.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfAnnihilation">"I want to go to the Seed of Annihilation (Lv.85)."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfDestruction">"I want to go to the Seed of Destruction (Lv.93)."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfInfinity">"Can I go to the Seed of Infinity (Lv.95)?"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfHellfire">"Teleport me to the Seed of Hellfire (Lv.97)."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><head><body>Seed Teleport Device:<br>
|
||||
You must be Lv. <font color="LEVEL">97</font> or above to use the Seed of Teleport Device to the <font color="LEVEL">Seed of Hellfire</font>.
|
||||
</body></html>
|
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package ai.zones.Gracia.npcs.SeedTeleportDevice;
|
||||
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Seed Teleport Device AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class SeedTeleportDevice extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int SEED_TELEPORT_DEVICE = 15929;
|
||||
// Locations
|
||||
private static final Location SOA = new Location(-175572, 154572, 2712);
|
||||
private static final Location SOD = new Location(-247024, 251794, 4336);
|
||||
private static final Location SOI = new Location(-213699, 210686, 4408);
|
||||
private static final Location SOH = new Location(-147354, 152581, -14048);
|
||||
// Misc
|
||||
private static final int SOH_MIN_LV = 97;
|
||||
|
||||
private SeedTeleportDevice()
|
||||
{
|
||||
super(SeedTeleportDevice.class.getSimpleName(), "ai/zones/Gracia/npcs");
|
||||
addStartNpc(SEED_TELEPORT_DEVICE);
|
||||
addFirstTalkId(SEED_TELEPORT_DEVICE);
|
||||
addTalkId(SEED_TELEPORT_DEVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "seedOfAnnihilation":
|
||||
{
|
||||
player.teleToLocation(SOA);
|
||||
break;
|
||||
}
|
||||
case "seedOfDestruction":
|
||||
{
|
||||
player.teleToLocation(SOD);
|
||||
break;
|
||||
}
|
||||
case "seedOfInfinity":
|
||||
{
|
||||
player.teleToLocation(SOI);
|
||||
break;
|
||||
}
|
||||
case "seedOfHellfire":
|
||||
{
|
||||
if (player.getLevel() < SOH_MIN_LV)
|
||||
{
|
||||
return "SeedOfHellfire-noLv.html";
|
||||
}
|
||||
player.teleToLocation(SOH);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new SeedTeleportDevice();
|
||||
}
|
||||
}
|
@@ -66,7 +66,7 @@ public final class Seyo extends AbstractNpcAI
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
npc.setScriptValue(0);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, TEXT[getRandom(TEXT.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, TEXT[getRandom(TEXT.length)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -87,11 +87,11 @@ public final class Seyo extends AbstractNpcAI
|
||||
if (getRandom(100) == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 100);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AMAZING_S1_TOOK_100_OF_THESE_SOUL_STONE_FRAGMENTS_WHAT_A_COMPLETE_SWINDLER, player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AMAZING_S1_TOOK_100_OF_THESE_SOUL_STONE_FRAGMENTS_WHAT_A_COMPLETE_SWINDLER, player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HMM_HEY_DID_YOU_GIVE_S1_SOMETHING_BUT_IT_WAS_JUST_1_HAHA, player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_HEY_DID_YOU_GIVE_S1_SOMETHING_BUT_IT_WAS_JUST_1_HAHA, player.getName());
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
@@ -114,18 +114,18 @@ public final class Seyo extends AbstractNpcAI
|
||||
final int chance = getRandom(100);
|
||||
if (chance < 20)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AHEM_S1_HAS_NO_LUCK_AT_ALL_TRY_PRAYING, player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AHEM_S1_HAS_NO_LUCK_AT_ALL_TRY_PRAYING, player.getName());
|
||||
}
|
||||
else if (chance < 80)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_BETTER_THAN_LOSING_IT_ALL_RIGHT_OR_DOES_THIS_FEEL_WORSE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IT_S_BETTER_THAN_LOSING_IT_ALL_RIGHT_OR_DOES_THIS_FEEL_WORSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
final int itemCount = getRandom(10, 16);
|
||||
giveItems(player, STONE_FRAGMENT, itemCount);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.S1_PULLED_ONE_WITH_S2_DIGITS_LUCKY_NOT_BAD, player.getName(), String.valueOf(itemCount));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_PULLED_ONE_WITH_S2_DIGITS_LUCKY_NOT_BAD, player.getName(), String.valueOf(itemCount));
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
@@ -149,17 +149,17 @@ public final class Seyo extends AbstractNpcAI
|
||||
if (chance == 0)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 10000);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AH_IT_S_OVER_WHAT_KIND_OF_GUY_IS_THAT_DAMN_FINE_YOU_S1_TAKE_IT_AND_GET_OUTTA_HERE, player.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AH_IT_S_OVER_WHAT_KIND_OF_GUY_IS_THAT_DAMN_FINE_YOU_S1_TAKE_IT_AND_GET_OUTTA_HERE, player.getName());
|
||||
}
|
||||
else if (chance < 10)
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, 1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_DON_T_FEEL_BAD_RIGHT_ARE_YOU_SAD_BUT_DON_T_CRY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_DON_T_FEEL_BAD_RIGHT_ARE_YOU_SAD_BUT_DON_T_CRY);
|
||||
}
|
||||
else
|
||||
{
|
||||
giveItems(player, STONE_FRAGMENT, getRandom(1, 100));
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.A_BIG_PIECE_IS_MADE_UP_OF_LITTLE_PIECES_SO_HERE_S_A_LITTLE_PIECE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.A_BIG_PIECE_IS_MADE_UP_OF_LITTLE_PIECES_SO_HERE_S_A_LITTLE_PIECE);
|
||||
}
|
||||
startQuestTimer("TRICKERY_TIMER", 5000, npc, null);
|
||||
}
|
||||
|
@@ -37,7 +37,6 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneType;
|
||||
import com.l2jmobius.gameserver.model.zone.type.L2ScriptZone;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public abstract class AirShipController extends Quest
|
||||
@@ -101,7 +100,6 @@ public abstract class AirShipController extends Quest
|
||||
|
||||
private Future<?> _departSchedule = null;
|
||||
|
||||
private NpcSay _arrivalMessage = null;
|
||||
private static final int DEPART_INTERVAL = 300000; // 5 min
|
||||
private static final int LICENSE = 13559;
|
||||
|
||||
@@ -164,12 +162,7 @@ public abstract class AirShipController extends Quest
|
||||
ship.executePath(_arrivalPath);
|
||||
}
|
||||
|
||||
if (_arrivalMessage == null)
|
||||
{
|
||||
_arrivalMessage = new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), NpcStringId.THE_AIRSHIP_HAS_BEEN_SUMMONED_IT_WILL_AUTOMATICALLY_DEPART_IN_5_MINUTES);
|
||||
}
|
||||
|
||||
npc.broadcastPacket(_arrivalMessage);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.THE_AIRSHIP_HAS_BEEN_SUMMONED_IT_WILL_AUTOMATICALLY_DEPART_IN_5_MINUTES);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<html><body>Airship Controller:<br>
|
||||
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br>
|
||||
Using this should allow you to board the Airship headed for the continent of Gracia.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AirShipGludioGracia board">Board the Airship.</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
<html><body>Flight Device:<br>
|
||||
A floating shard of powered stone. The steady blue light appears to mean the device in functioning within normal limits.<br>
|
||||
This device grants you control of the airship.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest AirShipGludioGracia board">Board the airship</Button>
|
||||
</body></html>
|
@@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* @author DS
|
||||
@@ -129,7 +128,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
|
||||
}
|
||||
if (_atcGludio != null)
|
||||
{
|
||||
_atcGludio.broadcastPacket(new NpcSay(_atcGludio.getObjectId(), ChatType.NPC_SHOUT, _atcGludio.getId(), npcString));
|
||||
_atcGludio.broadcastSay(ChatType.NPC_SHOUT, npcString);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +141,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
|
||||
}
|
||||
if (_atcGracia != null)
|
||||
{
|
||||
_atcGracia.broadcastPacket(new NpcSay(_atcGracia.getObjectId(), ChatType.NPC_SHOUT, _atcGracia.getId(), npcStringId));
|
||||
_atcGracia.broadcastSay(ChatType.NPC_SHOUT, npcStringId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<html><body>Airship Controller:<br>
|
||||
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
|
||||
By manipulating this, you should be able to control the Airship.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController board">Board the Airship.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController summon">Summon the Airship.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController register">Register summoning license.</Button>
|
||||
<html><body>Flight Device:<br>
|
||||
A floating fragment of stone hovers in front of you, glowing in a pale blue light. It appears to be functioning and undamaged.<br>
|
||||
You have gained access to the flight controls.<br>
|
||||
You can only go to the Seed through a <font color="LEVEL">Seed Teleport Device</font>.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController board">Board the airship</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController summon">Summon the airship</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusNorthController register">Request permission to summon the airship (Airship Summoning Permit required)</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -1,8 +1,9 @@
|
||||
<html><body>Airship Controller:<br>
|
||||
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
|
||||
By manipulating this, you should be able to control the Airship.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController board">Board the Airship.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController summon">Summon the Airship.</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController register">Register summoning license.</Button>
|
||||
<html><body>Flight Device:<br>
|
||||
A floating fragment of stone hovers in front of you, glowing in a pale blue light. It appears to be functioning and undamaged.<br>
|
||||
You have gained access to the flight controls.<br>
|
||||
You can only go to the Seed through a <font color="LEVEL">Seed Teleport Device</font>.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController board">Board the airship</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController summon">Summon the airship</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KeucereusSouthController register">Request permission to summon the airship (Airship Summoning Permit required)</Button>
|
||||
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
|
||||
</body></html>
|
@@ -302,7 +302,7 @@ public final class PrimevalIsle extends AbstractNpcAI
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, "?");
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, "?");
|
||||
((L2Attackable) npc).clearAggroList();
|
||||
startQuestTimer("TREX_ATTACK", 6000, npc, player);
|
||||
}
|
||||
|
@@ -241,7 +241,7 @@ public final class SelMahumDrill extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(4) < 1)
|
||||
{
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, SOLDIER_FSTRINGS[getRandom(2)]);
|
||||
receiver.broadcastSay(ChatType.NPC_GENERAL, SOLDIER_FSTRINGS[getRandom(2)]);
|
||||
}
|
||||
if (receiver.canBeAttacked())
|
||||
{
|
||||
@@ -259,7 +259,7 @@ public final class SelMahumDrill extends AbstractNpcAI
|
||||
{
|
||||
if (Util.contains(MAHUM_CHIEFS, receiver.getId()))
|
||||
{
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, CHIEF_FSTRINGS[getRandom(2)]);
|
||||
receiver.broadcastSay(ChatType.NPC_GENERAL, CHIEF_FSTRINGS[getRandom(2)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ public final class SelMahumSquad extends AbstractNpcAI
|
||||
final L2Npc stove = addSpawn(STOVE, receiver.getX(), receiver.getY(), receiver.getZ() + 100, 0, false, 0);
|
||||
stove.setSummoner(receiver);
|
||||
startQuestTimer("notify_dinner", 2000, receiver, null); // @SCE_DINNER_EAT
|
||||
broadcastNpcSay(sender, ChatType.NPC_GENERAL, CHEF_FSTRINGS[getRandom(2)], 1250);
|
||||
sender.broadcastSay(ChatType.NPC_GENERAL, CHEF_FSTRINGS[getRandom(2)], 1250);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ public final class SelMahumSquad extends AbstractNpcAI
|
||||
receiver.setIsNoRndWalk(true); // Moving to fire - i_ai0 = 1
|
||||
receiver.getVariables().set("BUSY_STATE", 1); // Eating - i_ai3 = 1
|
||||
receiver.setIsRunning(true);
|
||||
broadcastNpcSay(receiver, ChatType.NPC_GENERAL, (getRandom(3) < 1) ? NpcStringId.LOOKS_DELICIOUS : NpcStringId.LET_S_GO_EAT);
|
||||
receiver.broadcastSay(ChatType.NPC_GENERAL, (getRandom(3) < 1) ? NpcStringId.LOOKS_DELICIOUS : NpcStringId.LET_S_GO_EAT);
|
||||
final Location loc = sender.getPointInRange(100, 200);
|
||||
loc.setHeading(receiver.getHeading());
|
||||
receiver.stopMove(null);
|
||||
|
@@ -55,12 +55,12 @@ public final class Apprentice extends AbstractNpcAI
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_T_RIDE_A_KUKURI_NOW);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_T_RIDE_A_KUKURI_NOW);
|
||||
}
|
||||
}
|
||||
else if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TRY_RIDING_A_KUKURI, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TRY_RIDING_A_KUKURI, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public final class Banette extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, BANETTE_SHOUT[getRandom(3)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, BANETTE_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Bink extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.TALKING_ISLAND_VILLAGE_IS_REALLY_BEAUTIFUL, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TALKING_ISLAND_VILLAGE_IS_REALLY_BEAUTIFUL, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ public final class Devno extends AbstractNpcAI
|
||||
{
|
||||
if (event.equalsIgnoreCase("npc_move") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, DEVNO_SHOUT[getRandom(3)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, DEVNO_SHOUT[getRandom(3)], 1000);
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
addMoveToDesire(npc, DEVNO_LOC[getRandom(10)], 0);
|
||||
|
@@ -63,7 +63,7 @@ public final class Eleve extends AbstractNpcAI
|
||||
{
|
||||
if (event.equalsIgnoreCase("npc_move") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ELEVE_SHOUT[getRandom(2)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, ELEVE_SHOUT[getRandom(2)], 1000);
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
addMoveToDesire(npc, ELEVE_LOC[getRandom(10)], 0);
|
||||
|
@@ -49,7 +49,7 @@ public final class Gagabu extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, GAGABU_SHOUT[getRandom(2)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, GAGABU_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public final class Heymond extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, HEYMOND_SHOUT[getRandom(3)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, HEYMOND_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -65,12 +65,12 @@ public final class Karonf extends AbstractNpcAI
|
||||
{
|
||||
if (getRandom(100) > 40)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)], 1000);
|
||||
addMoveToDesire(npc, KARONF_LOC[getRandom(10)], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, KARONF_SHOUT[getRandom(2)]);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@@ -50,7 +50,7 @@ public final class Lumi extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, LUMI_SHOUT[getRandom(3)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, LUMI_SHOUT[getRandom(3)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Mahram extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.ALCHEMY_IS_A_SCIENCE_AND_AN_ART, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ALCHEMY_IS_A_SCIENCE_AND_AN_ART, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Mai extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.EVERY_RACE_BUILT_A_PIECE_OF_THIS_VILLAGE, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.EVERY_RACE_BUILT_A_PIECE_OF_THIS_VILLAGE, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class MarinSmith extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HMM_IS_THIS_STILL_A_DECENT_WEAPON, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HMM_IS_THIS_STILL_A_DECENT_WEAPON, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public final class Milia extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equals("TEXT_SPAM") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.SPEAK_WITH_ME_ABOUT_TRAVELING_AROUND_ADEN, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SPEAK_WITH_ME_ABOUT_TRAVELING_AROUND_ADEN, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Oris extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_HAVEN_T_FELT_THIS_GOOD_IN_AGES, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_HAVEN_T_FELT_THIS_GOOD_IN_AGES, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ public final class Pantheon extends AbstractNpcAI
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IS_IT_BETTER_TO_END_DESTINY_OR_START_DESTINY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IS_IT_BETTER_TO_END_DESTINY_OR_START_DESTINY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Shannon extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LOOK_AT_ALL_THE_NEWBIES_HA_HA_HA, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOK_AT_ALL_THE_NEWBIES_HA_HA_HA, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public final class Sodian extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, SODIAN_SHOUT[getRandom(2)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, SODIAN_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public final class Stiller extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, STILLER_SHOUT[getRandom(2)], 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, STILLER_SHOUT[getRandom(2)], 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ public final class Theodore extends AbstractNpcAI
|
||||
{
|
||||
if (event.equals("SPAM_TEXT") && (npc != null))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.AND_NOW_YOUR_JOURNEY_BEGINS, 1000);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.AND_NOW_YOUR_JOURNEY_BEGINS, 1000);
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@@ -58,11 +58,11 @@ public final class DevastatedCastle extends ClanHallSiegeEngine
|
||||
{
|
||||
if (npc.getId() == MIKHAIL)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.GLORY_TO_ADEN_THE_KINGDOM_OF_THE_LION_GLORY_TO_SIR_GUSTAV_OUR_IMMORTAL_LORD);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.GLORY_TO_ADEN_THE_KINGDOM_OF_THE_LION_GLORY_TO_SIR_GUSTAV_OUR_IMMORTAL_LORD);
|
||||
}
|
||||
else if (npc.getId() == DIETRICH)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SOLDIERS_OF_GUSTAV_GO_FORTH_AND_DESTROY_THE_INVADERS);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SOLDIERS_OF_GUSTAV_GO_FORTH_AND_DESTROY_THE_INVADERS);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public final class DevastatedCastle extends ClanHallSiegeEngine
|
||||
|
||||
if ((npc.getCurrentHp() < GUSTAV_TRIGGER_HP) && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THIS_IS_UNBELIEVABLE_HAVE_I_REALLY_BEEN_DEFEATED_I_SHALL_RETURN_AND_TAKE_YOUR_HEAD);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_IS_UNBELIEVABLE_HAVE_I_REALLY_BEEN_DEFEATED_I_SHALL_RETURN_AND_TAKE_YOUR_HEAD);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_CAST, SkillData.getInstance().getSkill(4235, 1), npc);
|
||||
}
|
||||
}
|
||||
|
@@ -61,15 +61,15 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine
|
||||
{
|
||||
if (npc.getId() == LIDIA)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.HMM_THOSE_WHO_ARE_NOT_OF_THE_BLOODLINE_ARE_COMING_THIS_WAY_TO_TAKE_OVER_THE_CASTLE_HUMPH_THE_BITTER_GRUDGES_OF_THE_DEAD_YOU_MUST_NOT_MAKE_LIGHT_OF_THEIR_POWER);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.HMM_THOSE_WHO_ARE_NOT_OF_THE_BLOODLINE_ARE_COMING_THIS_WAY_TO_TAKE_OVER_THE_CASTLE_HUMPH_THE_BITTER_GRUDGES_OF_THE_DEAD_YOU_MUST_NOT_MAKE_LIGHT_OF_THEIR_POWER);
|
||||
}
|
||||
else if (npc.getId() == ALFRED)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.HEH_HEH_I_SEE_THAT_THE_FEAST_HAS_BEGUN_BE_WARY_THE_CURSE_OF_THE_HELLMANN_FAMILY_HAS_POISONED_THIS_LAND);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.HEH_HEH_I_SEE_THAT_THE_FEAST_HAS_BEGUN_BE_WARY_THE_CURSE_OF_THE_HELLMANN_FAMILY_HAS_POISONED_THIS_LAND);
|
||||
}
|
||||
else if (npc.getId() == GISELLE)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.ARISE_MY_FAITHFUL_SERVANTS_YOU_MY_PEOPLE_WHO_HAVE_INHERITED_THE_BLOOD_IT_IS_THE_CALLING_OF_MY_DAUGHTER_THE_FEAST_OF_BLOOD_WILL_NOW_BEGIN);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.ARISE_MY_FAITHFUL_SERVANTS_YOU_MY_PEOPLE_WHO_HAVE_INHERITED_THE_BLOOD_IT_IS_THE_CALLING_OF_MY_DAUGHTER_THE_FEAST_OF_BLOOD_WILL_NOW_BEGIN);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -114,11 +114,11 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine
|
||||
|
||||
if ((npcId == ALFRED) || (npcId == GISELLE))
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
|
||||
}
|
||||
if (npcId == LIDIA)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.GRARR_FOR_THE_NEXT_2_MINUTES_OR_SO_THE_GAME_ARENA_ARE_WILL_BE_CLEANED_THROW_ANY_ITEMS_YOU_DON_T_NEED_TO_THE_FLOOR_NOW);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.GRARR_FOR_THE_NEXT_2_MINUTES_OR_SO_THE_GAME_ARENA_ARE_WILL_BE_CLEANED_THROW_ANY_ITEMS_YOU_DON_T_NEED_TO_THE_FLOOR_NOW);
|
||||
_missionAccomplished = true;
|
||||
synchronized (this)
|
||||
{
|
||||
|
@@ -24,8 +24,10 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
@@ -53,7 +55,6 @@ import com.l2jmobius.gameserver.model.entity.clanhall.SiegeStatus;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Broadcast;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@@ -262,7 +263,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
|
||||
static Map<Integer, Long> _warDecreesCount = new HashMap<>();
|
||||
static List<L2Clan> _acceptedClans = new ArrayList<>(4);
|
||||
private static Map<String, ArrayList<L2Clan>> _usedTextPassages = new HashMap<>();
|
||||
private static Map<String, Set<L2Clan>> _usedTextPassages = new HashMap<>();
|
||||
private static Map<L2Clan, Integer> _pendingItemToGet = new HashMap<>();
|
||||
|
||||
static SiegableHall _rainbow;
|
||||
@@ -536,7 +537,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
|
||||
if (_usedTextPassages.containsKey(passage))
|
||||
{
|
||||
final ArrayList<L2Clan> list = _usedTextPassages.get(passage);
|
||||
Set<L2Clan> list = _usedTextPassages.get(passage);
|
||||
|
||||
if (list.contains(clan))
|
||||
{
|
||||
@@ -790,22 +791,24 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
|
||||
private static void shoutRandomText(L2Npc npc)
|
||||
{
|
||||
final int length = _textPassages.length;
|
||||
int length = _textPassages.length;
|
||||
|
||||
if (_usedTextPassages.size() >= length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int randomPos = getRandom(length);
|
||||
if (_usedTextPassages.containsKey(_textPassages[randomPos]))
|
||||
int randomPos = getRandom(length);
|
||||
String message = _textPassages[randomPos];
|
||||
|
||||
if (_usedTextPassages.containsKey(message))
|
||||
{
|
||||
shoutRandomText(npc);
|
||||
}
|
||||
else
|
||||
{
|
||||
_usedTextPassages.put(_textPassages[randomPos], new ArrayList<L2Clan>());
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), _textPassages[randomPos]));
|
||||
_usedTextPassages.put(message, new HashSet<>());
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -117,7 +117,7 @@ public final class FactionManager extends AbstractNpcAI
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, TEXTS[getRandom(TEXTS.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, TEXTS[getRandom(TEXTS.length)]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
@@ -335,7 +334,7 @@ abstract class Chamber extends AbstractInstance
|
||||
{
|
||||
if (npc.getId() == ROOM_GATEKEEPER_LAST)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.MINUTES_ARE_ADDED_TO_THE_REMAINING_TIME_IN_THE_INSTANT_ZONE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.MINUTES_ARE_ADDED_TO_THE_REMAINING_TIME_IN_THE_INSTANT_ZONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
@@ -675,11 +674,11 @@ public final class DarkCloudMansion extends AbstractInstance
|
||||
FifthRoom.npcList.add(thisnpc);
|
||||
if ((temp[idx] == 1) && (getRandom(100) < 95))
|
||||
{
|
||||
thisnpc.npc.broadcastPacket(new NpcSay(thisnpc.npc.getObjectId(), ChatType.NPC_GENERAL, thisnpc.npc.getId(), _spawnChat[getRandom(_spawnChat.length)]));
|
||||
thisnpc.npc.broadcastSay(ChatType.NPC_GENERAL, _spawnChat[getRandom(_spawnChat.length)]);
|
||||
}
|
||||
else if ((temp[idx] != 1) && (getRandom(100) < 67))
|
||||
{
|
||||
thisnpc.npc.broadcastPacket(new NpcSay(thisnpc.npc.getObjectId(), ChatType.NPC_GENERAL, thisnpc.npc.getId(), _spawnChat[getRandom(_spawnChat.length)]));
|
||||
thisnpc.npc.broadcastSay(ChatType.NPC_GENERAL, _spawnChat[getRandom(_spawnChat.length)]);
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
@@ -762,14 +761,14 @@ public final class DarkCloudMansion extends AbstractInstance
|
||||
mob.count = 1;
|
||||
if (mob.status == 1)
|
||||
{
|
||||
mob.npc.broadcastPacket(new NpcSay(mob.npc.getObjectId(), ChatType.NPC_GENERAL, mob.npc.getId(), _successChat[getRandom(_successChat.length)]));
|
||||
mob.npc.broadcastSay(ChatType.NPC_GENERAL, _successChat[getRandom(_successChat.length)]);
|
||||
FifthRoom.founded += 1;
|
||||
startQuestTimer("decayMe", 1500, npc, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
FifthRoom.reset = 1;
|
||||
mob.npc.broadcastPacket(new NpcSay(mob.npc.getObjectId(), ChatType.NPC_GENERAL, mob.npc.getId(), _faildChat[getRandom(_faildChat.length)]));
|
||||
mob.npc.broadcastSay(ChatType.NPC_GENERAL, _faildChat[getRandom(_faildChat.length)]);
|
||||
startQuestTimer("decayChatBelethSamples", 4000, npc, player);
|
||||
startQuestTimer("decayBelethSamples", 4500, npc, player);
|
||||
}
|
||||
@@ -928,7 +927,7 @@ public final class DarkCloudMansion extends AbstractInstance
|
||||
{
|
||||
if (mob.status == 1)
|
||||
{
|
||||
mob.npc.broadcastPacket(new NpcSay(mob.npc.getObjectId(), ChatType.NPC_GENERAL, mob.npc.getId(), _decayChat[getRandom(_decayChat.length)]));
|
||||
mob.npc.broadcastSay(ChatType.NPC_GENERAL, _decayChat[getRandom(_decayChat.length)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -233,12 +233,12 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (caster.isScriptValue(0))
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.YOU_SUCH_A_FOOL_THE_VICTORY_OVER_THIS_WAR_BELONGS_TO_SHILEN));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.YOU_SUCH_A_FOOL_THE_VICTORY_OVER_THIS_WAR_BELONGS_TO_SHILEN);
|
||||
caster.setScriptValue(1);
|
||||
}
|
||||
else if (getRandom(100) < 10)
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), LILITH_SHOUT[getRandom(3)]));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, LILITH_SHOUT[getRandom(3)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,10 +252,10 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (caster.isScriptValue(0))
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.FOR_THE_ETERNITY_OF_EINHASAD));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.FOR_THE_ETERNITY_OF_EINHASAD);
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.MY_POWER_S_WEAKENING_HURRY_AND_TURN_ON_THE_SEALING_DEVICE));
|
||||
player.sendPacket(new NpcSay(caster, ChatType.NPC_WHISPER, NpcStringId.MY_POWER_S_WEAKENING_HURRY_AND_TURN_ON_THE_SEALING_DEVICE));
|
||||
}
|
||||
caster.setScriptValue(1);
|
||||
}
|
||||
@@ -265,28 +265,28 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_SHILLIEN_S_OFFSPRINGS_YOU_ARE_NOT_CAPABLE_OF_CONFRONTING_US));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.DEAR_SHILLIEN_S_OFFSPRINGS_YOU_ARE_NOT_CAPABLE_OF_CONFRONTING_US);
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.ALL_4_SEALING_DEVICES_MUST_BE_TURNED_ON));
|
||||
player.sendPacket(new NpcSay(caster, ChatType.NPC_WHISPER, NpcStringId.ALL_4_SEALING_DEVICES_MUST_BE_TURNED_ON));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.I_LL_SHOW_YOU_THE_REAL_POWER_OF_EINHASAD));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.I_LL_SHOW_YOU_THE_REAL_POWER_OF_EINHASAD);
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.LILITH_ATTACK_IS_GETTING_STRONGER_GO_AHEAD_AND_TURN_IT_ON));
|
||||
player.sendPacket(new NpcSay(caster, ChatType.NPC_WHISPER, NpcStringId.LILITH_ATTACK_IS_GETTING_STRONGER_GO_AHEAD_AND_TURN_IT_ON));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_MILITARY_FORCE_OF_LIGHT_GO_DESTROY_THE_OFFSPRINGS_OF_SHILLIEN));
|
||||
caster.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.DEAR_MILITARY_FORCE_OF_LIGHT_GO_DESTROY_THE_OFFSPRINGS_OF_SHILLIEN);
|
||||
if (Util.checkIfInRange(2000, caster, player, true))
|
||||
{
|
||||
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.DEAR_S1_GIVE_ME_MORE_STRENGTH).addStringParameter(player.getName()));
|
||||
player.sendPacket(new NpcSay(caster, ChatType.NPC_WHISPER, NpcStringId.DEAR_S1_GIVE_ME_MORE_STRENGTH).addStringParameter(player.getName()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THIS_PLACE_ONCE_BELONGED_TO_LORD_SHILEN));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_PLACE_ONCE_BELONGED_TO_LORD_SHILEN);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
@@ -322,7 +322,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHO_DARES_ENTER_THIS_PLACE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHO_DARES_ENTER_THIS_PLACE);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
@@ -332,7 +332,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THOSE_WHO_ARE_AFRAID_SHOULD_GET_AWAY_AND_THOSE_WHO_ARE_BRAVE_SHOULD_FIGHT));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THOSE_WHO_ARE_AFRAID_SHOULD_GET_AWAY_AND_THOSE_WHO_ARE_BRAVE_SHOULD_FIGHT);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
@@ -341,7 +341,7 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_NOW));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LEAVE_NOW);
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
@@ -392,19 +392,19 @@ public final class DisciplesNecropolisPast extends AbstractInstance
|
||||
case LILIM_MAGUS:
|
||||
case LILIM_GREAT_MAGUS:
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LORD_SHILEN_SOME_DAY_YOU_WILL_ACCOMPLISH_THIS_MISSION));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LORD_SHILEN_SOME_DAY_YOU_WILL_ACCOMPLISH_THIS_MISSION);
|
||||
break;
|
||||
}
|
||||
case LILIM_KNIGHT_ERRANT:
|
||||
case LILIM_KNIGHT:
|
||||
case LILIM_GUARD_KNIGHT:
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHY_ARE_YOU_GETTING_IN_OUR_WAY));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHY_ARE_YOU_GETTING_IN_OUR_WAY);
|
||||
break;
|
||||
}
|
||||
case LILIM_SLAYER:
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.FOR_SHILEN));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.FOR_SHILEN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -151,42 +151,42 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
}
|
||||
case "razkan_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.COME_ATTACK_ME_IF_YOU_DARE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.COME_ATTACK_ME_IF_YOU_DARE);
|
||||
break;
|
||||
}
|
||||
case "bathus_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_THE_END_FOR_YOU_TRAITOR);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.IT_S_THE_END_FOR_YOU_TRAITOR);
|
||||
break;
|
||||
}
|
||||
case "bamonti_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
|
||||
break;
|
||||
}
|
||||
case "carcass_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
|
||||
break;
|
||||
}
|
||||
case "khan_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_LL_HAVE_TO_KILL_US_FIRST);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_LL_HAVE_TO_KILL_US_FIRST);
|
||||
break;
|
||||
}
|
||||
case "seknus_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LETS_SEE_WHAT_YOU_ARE_MADE_OF);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LETS_SEE_WHAT_YOU_ARE_MADE_OF);
|
||||
break;
|
||||
}
|
||||
case "lotus_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.REPENT_AND_YOUR_DEATH_WILL_BE_QUICK);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.REPENT_AND_YOUR_DEATH_WILL_BE_QUICK);
|
||||
break;
|
||||
}
|
||||
case "ele_say":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.DIE_TRAITOR);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DIE_TRAITOR);
|
||||
break;
|
||||
}
|
||||
case "spawn_npc1":
|
||||
@@ -202,7 +202,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
{
|
||||
world.currentNpc = RAKZAN;
|
||||
razkan.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(razkan, ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_AGAINST_THE_WILL_OF_LIGHT);
|
||||
razkan.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_AGAINST_THE_WILL_OF_LIGHT);
|
||||
startQuestTimer("razkan_say", 1600, razkan, player);
|
||||
}
|
||||
world.setStatus(1);
|
||||
@@ -399,7 +399,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
spawnedNpcs = spawnGroup("seal", world.getInstanceId());
|
||||
for (L2Npc spawnedNpc : spawnedNpcs)
|
||||
{
|
||||
broadcastNpcSay(spawnedNpc, ChatType.NPC_GENERAL, NpcStringId.DISABLE_DEVICE_WILL_GO_OUT_OF_CONTROL_IN_1_MINUTE);
|
||||
spawnedNpc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DISABLE_DEVICE_WILL_GO_OUT_OF_CONTROL_IN_1_MINUTE);
|
||||
startQuestTimer("seal_say", 10000, spawnedNpc, player);
|
||||
}
|
||||
}
|
||||
@@ -436,52 +436,52 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING41);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING41);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING42);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING42);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING43);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING43);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING44);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING44);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING45);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING45);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS2);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS2);
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS3);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS3);
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS4);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECONDS4);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECOND);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.SECOND);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -512,8 +512,8 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.I_HERMUNCUS_GIVE_MY_POWER_TO_THOSE_WHO_FIGHT_FOR_ME, ExShowScreenMessage.TOP_CENTER, 5000);
|
||||
|
||||
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.RECEIVE_THIS_POWER_FORM_THE_ANCIENT_GIANT);
|
||||
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.USE_THIS_NEW_POWER_WHEN_THE_TIME_IS_RIGHT);
|
||||
npc.broadcastSay(ChatType.WHISPER, NpcStringId.RECEIVE_THIS_POWER_FORM_THE_ANCIENT_GIANT);
|
||||
npc.broadcastSay(ChatType.WHISPER, NpcStringId.USE_THIS_NEW_POWER_WHEN_THE_TIME_IS_RIGHT);
|
||||
|
||||
startQuestTimer("message4", 3000, npc, player);
|
||||
}
|
||||
@@ -564,7 +564,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (bathius != null)
|
||||
{
|
||||
bathius.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(bathius, ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_PLANNING_TO_BETRAY_THE_GODS_AND_FOLLOW_A_GIANT);
|
||||
bathius.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_PLANNING_TO_BETRAY_THE_GODS_AND_FOLLOW_A_GIANT);
|
||||
startQuestTimer("bathus_say", 2600, bathius, killer);
|
||||
world.currentNpc = KRAKIA_BATHUS;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (bamonti != null)
|
||||
{
|
||||
bamonti.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(bamonti, ChatType.NPC_GENERAL, NpcStringId.HAHA);
|
||||
bamonti.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HAHA);
|
||||
startQuestTimer("bamonti_say", 2600, bamonti, killer);
|
||||
world.currentNpc = BAMONTI;
|
||||
}
|
||||
@@ -588,7 +588,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (carcass != null)
|
||||
{
|
||||
carcass.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(carcass, ChatType.NPC_GENERAL, NpcStringId.HAHA);
|
||||
carcass.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HAHA);
|
||||
startQuestTimer("carcass_say", 2600, carcass, killer);
|
||||
world.currentNpc = KRAKIA_CARCASS;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (khan != null)
|
||||
{
|
||||
khan.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(khan, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NOT_FREE_HERMUNCUS);
|
||||
khan.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NOT_FREE_HERMUNCUS);
|
||||
startQuestTimer("khan_say", 2600, khan, killer);
|
||||
world.currentNpc = WEISS_KHAN;
|
||||
}
|
||||
@@ -612,7 +612,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (seknus != null)
|
||||
{
|
||||
seknus.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(seknus, ChatType.NPC_GENERAL, NpcStringId.MORTAL);
|
||||
seknus.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.MORTAL);
|
||||
startQuestTimer("seknus_say", 2600, seknus, killer);
|
||||
world.currentNpc = SEKNUS;
|
||||
}
|
||||
@@ -624,7 +624,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (lotus != null)
|
||||
{
|
||||
lotus.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(lotus, ChatType.NPC_GENERAL, NpcStringId.TRYING_TO_FREE_HERMUNCUS);
|
||||
lotus.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.TRYING_TO_FREE_HERMUNCUS);
|
||||
startQuestTimer("lotus_say", 2600, lotus, killer);
|
||||
world.currentNpc = KRAKIA_LOTUS;
|
||||
}
|
||||
@@ -636,7 +636,7 @@ public final class HarnakUndergroundRuins extends AbstractInstance
|
||||
if (ele != null)
|
||||
{
|
||||
ele.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
|
||||
broadcastNpcSay(ele, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NEVER_BREAK_THE_SEAL);
|
||||
ele.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NEVER_BREAK_THE_SEAL);
|
||||
startQuestTimer("ele_say", 2600, ele, killer);
|
||||
world.currentNpc = WEISS_ELE;
|
||||
}
|
||||
|
@@ -100,7 +100,7 @@ public final class IceQueensCastle extends AbstractInstance
|
||||
}
|
||||
case "TIMER_BLIZZARD":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_CAN_NO_LONGER_STAND_BY);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_NO_LONGER_STAND_BY);
|
||||
npc.stopMove(null);
|
||||
npc.setTarget(player);
|
||||
npc.doCast(ETHERNAL_BLIZZARD.getSkill());
|
||||
@@ -148,7 +148,7 @@ public final class IceQueensCastle extends AbstractInstance
|
||||
startQuestTimer("ATTACK_KNIGHT", 5000, npc, null);
|
||||
}
|
||||
}
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.S1_MAY_THE_PROTECTION_OF_THE_GODS_BE_UPON_YOU, creature.getName());
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_MAY_THE_PROTECTION_OF_THE_GODS_BE_UPON_YOU, creature.getName());
|
||||
}
|
||||
return super.onSeeCreature(npc, creature, isSummon);
|
||||
}
|
||||
|
@@ -686,22 +686,22 @@ public final class IceQueensCastleBattle extends AbstractInstance
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.SHOUT, NpcStringId.ARCHER_GIVE_YOUR_BREATH_FOR_THE_INTRUDER);
|
||||
npc.broadcastSay(ChatType.SHOUT, NpcStringId.ARCHER_GIVE_YOUR_BREATH_FOR_THE_INTRUDER);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.SHOUT, NpcStringId.MY_KNIGHTS_SHOW_YOUR_LOYALTY);
|
||||
npc.broadcastSay(ChatType.SHOUT, NpcStringId.MY_KNIGHTS_SHOW_YOUR_LOYALTY);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.SHOUT, NpcStringId.I_CAN_TAKE_IT_NO_LONGER);
|
||||
npc.broadcastSay(ChatType.SHOUT, NpcStringId.I_CAN_TAKE_IT_NO_LONGER);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.SHOUT, NpcStringId.ARCHER_HEED_MY_CALL);
|
||||
npc.broadcastSay(ChatType.SHOUT, NpcStringId.ARCHER_HEED_MY_CALL);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
final L2Attackable breath = (L2Attackable) addSpawn(BREATH, npc.getLocation(), true, 0, false, world.getInstanceId());
|
||||
|
@@ -128,7 +128,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
if (world.getStatus() == 1)
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.LET_ME_KNOW_WHEN_YOU_RE_ALL_READY, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.LET_ME_KNOW_WHEN_YOU_RE_ALL_READY, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LET_ME_KNOW_WHEN_YOU_RE_ALL_READY, 1000);
|
||||
startQuestTimer("officer_wait_1", 5000, world.terian, player);
|
||||
}
|
||||
break;
|
||||
@@ -191,7 +191,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
world.terian.setHeading(world.terian.getHeading() + 32500);
|
||||
world.terian.broadcastInfo();
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.HEY_YOU_RE_NOT_ALL_BAD_LET_ME_KNOW_WHEN_YOU_RE_READY, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HEY_YOU_RE_NOT_ALL_BAD_LET_ME_KNOW_WHEN_YOU_RE_READY, 1000);
|
||||
world.setStatus(4);
|
||||
}
|
||||
break;
|
||||
@@ -215,7 +215,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
openDoor(DOOR_5, player.getInstanceId());
|
||||
world.assistPlayer = false;
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.COME_ON_ONTO_THE_NEXT_PLACE, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.COME_ON_ONTO_THE_NEXT_PLACE, 1000);
|
||||
startQuestTimer("officer_goto_3", 5000, world.terian, player);
|
||||
return "33215-02.html";
|
||||
}
|
||||
@@ -250,7 +250,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
world.terian.setHeading(world.terian.getHeading() + 32500);
|
||||
world.terian.broadcastInfo();
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.READY_LET_ME_KNOW, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.READY_LET_ME_KNOW, 1000);
|
||||
world.setStatus(6);
|
||||
}
|
||||
break;
|
||||
@@ -266,13 +266,13 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
}
|
||||
openDoor(DOOR_6, player.getInstanceId());
|
||||
world.terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_3_INSIDE);
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
|
||||
startQuestTimer("room_3_spawns", 10000, world.terian, player);
|
||||
return null;
|
||||
}
|
||||
case "room_3_spawns":
|
||||
{
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
showOnScreenMsg(player, NpcStringId.BEHIND_YOU_THE_ENEMY_IS_AMBUSHING_YOU, ExShowScreenMessage.TOP_CENTER, 10000);
|
||||
@@ -312,7 +312,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
}
|
||||
openDoor(DOOR_7, player.getInstanceId());
|
||||
showOnScreenMsg(player, NpcStringId.ELECTRONIC_DEVICE_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 7000);
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.DEVICE_DESTROYED_LET_S_GO_ONTO_THE_NEXT, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.DEVICE_DESTROYED_LET_S_GO_ONTO_THE_NEXT, 1000);
|
||||
startQuestTimer("officer_goto_4", 1000, world.terian, player);
|
||||
}
|
||||
break;
|
||||
@@ -343,7 +343,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
world.terian.setHeading(world.terian.getHeading() + 32500);
|
||||
world.terian.broadcastInfo();
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.SOMETHING_OMINOUS_IN_THERE_I_HOPE_YOU_RE_REALLY_READY_FOR_THIS_LET_ME_KNOW, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.SOMETHING_OMINOUS_IN_THERE_I_HOPE_YOU_RE_REALLY_READY_FOR_THIS_LET_ME_KNOW, 1000);
|
||||
world.setStatus(13);
|
||||
}
|
||||
break;
|
||||
@@ -474,7 +474,7 @@ public final class LabyrinthOfBelis extends AbstractInstance
|
||||
{
|
||||
world.assistPlayer = false;
|
||||
openDoor(DOOR_3, npc.getInstanceId());
|
||||
broadcastNpcSay(world.terian, ChatType.NPC_GENERAL, NpcStringId.ALL_RIGHT_LET_S_MOVE_OUT, 1000);
|
||||
world.terian.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ALL_RIGHT_LET_S_MOVE_OUT, 1000);
|
||||
startQuestTimer("officer_goto_2", 100, world.terian, killer);
|
||||
}
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ public final class LibraryOfSages extends AbstractInstance
|
||||
{
|
||||
npc.setIsRunning(true);
|
||||
npc.getAI().startFollow(player);
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ELCADIA_DIALOGS[getRandom(ELCADIA_DIALOGS.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, ELCADIA_DIALOGS[getRandom(ELCADIA_DIALOGS.length)]);
|
||||
startQuestTimer("FOLLOW", 10000, npc, player);
|
||||
break;
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ public final class MithrilMine extends AbstractInstance
|
||||
kegor.setWalking();
|
||||
kegor.setTarget(player);
|
||||
kegor.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
broadcastNpcSay(kegor, ChatType.NPC_GENERAL, NpcStringId.I_CAN_FINALLY_TAKE_A_BREATHER_BY_THE_WAY_WHO_ARE_YOU_HMM_I_THINK_I_KNOW_WHO_SENT_YOU);
|
||||
kegor.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.I_CAN_FINALLY_TAKE_A_BREATHER_BY_THE_WAY_WHO_ARE_YOU_HMM_I_THINK_I_KNOW_WHO_SENT_YOU);
|
||||
}
|
||||
}
|
||||
InstanceManager.getInstance().getInstance(world.getInstanceId()).setDuration(3000);
|
||||
@@ -159,7 +159,7 @@ public final class MithrilMine extends AbstractInstance
|
||||
|
||||
if (npc.getId() == KEGOR)
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HOW_COULD_I_FALL_IN_A_PLACE_LIKE_THIS);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_COULD_I_FALL_IN_A_PLACE_LIKE_THIS);
|
||||
InstanceManager.getInstance().getInstance(world.getInstanceId()).setDuration(1000);
|
||||
}
|
||||
else
|
||||
|
@@ -169,13 +169,13 @@ public final class MonasteryOfSilence1 extends AbstractInstance
|
||||
npc.getAI().startFollow(player);
|
||||
if (player.isInCombat())
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
|
||||
npc.setTarget(player);
|
||||
npc.doCast(BUFFS[getRandom(BUFFS.length)].getSkill());
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, ELCADIA_DIALOGS[getRandom(ELCADIA_DIALOGS.length)]);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, ELCADIA_DIALOGS[getRandom(ELCADIA_DIALOGS.length)]);
|
||||
}
|
||||
startQuestTimer("FOLLOW", 10000, npc, player);
|
||||
break;
|
||||
|
@@ -89,7 +89,7 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
if (world.toyron.calculateDistance(player.getTarget(), false, false) > 50)
|
||||
{
|
||||
world.toyron.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation());
|
||||
broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME);
|
||||
world.toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME);
|
||||
}
|
||||
else if (world.toyron.getTarget() != player.getTarget())
|
||||
{
|
||||
|
@@ -85,7 +85,7 @@ public final class PailakaSongOfIceAndFire extends AbstractInstance
|
||||
}
|
||||
case "GARGOS_LAUGH":
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.OHH_OH_OH);
|
||||
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.OHH_OH_OH);
|
||||
break;
|
||||
}
|
||||
case "TELEPORT":
|
||||
|
@@ -113,17 +113,17 @@ public final class SanctumOftheLordsOfDawn extends AbstractInstance
|
||||
{
|
||||
case GUARDS_OF_THE_DAWN:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.INTRUDER_PROTECT_THE_PRIESTS_OF_DAWN);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.INTRUDER_PROTECT_THE_PRIESTS_OF_DAWN);
|
||||
break;
|
||||
}
|
||||
case GUARDS_OF_THE_DAWN_2:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_INTRUDE_WITH_THAT_TRANSFORMATION_GET_LOST);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HOW_DARE_YOU_INTRUDE_WITH_THAT_TRANSFORMATION_GET_LOST);
|
||||
break;
|
||||
}
|
||||
case GUARDS_OF_THE_DAWN_3:
|
||||
{
|
||||
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHO_ARE_YOU_A_NEW_FACE_LIKE_YOU_CAN_T_APPROACH_THIS_PLACE);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHO_ARE_YOU_A_NEW_FACE_LIKE_YOU_CAN_T_APPROACH_THIS_PLACE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import quests.Q00121_PavelTheGiant.Q00121_PavelTheGiant;
|
||||
|
||||
@@ -233,7 +232,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest
|
||||
if ((golem == null) || ((golem != null) && golem.isDead()))
|
||||
{
|
||||
golem = (L2Attackable) addSpawn(GUARDIAN, 96977, -110625, -3280, 0, false, 0);
|
||||
golem.broadcastPacket(new NpcSay(golem.getObjectId(), ChatType.NPC_GENERAL, golem.getId(), NpcStringId.YOU_S1_YOU_ATTACKED_WENDY_PREPARE_TO_DIE).addStringParameter(player.getName()));
|
||||
golem.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_S1_YOU_ATTACKED_WENDY_PREPARE_TO_DIE, player.getName());
|
||||
addAttackDesire(golem, player);
|
||||
qs.set("spawned", "1");
|
||||
startQuestTimer("golem_despawn", 300000, null, player);
|
||||
@@ -327,7 +326,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest
|
||||
case "golem_despawn":
|
||||
{
|
||||
qs.unset("spawned");
|
||||
golem.broadcastPacket(new NpcSay(golem.getObjectId(), ChatType.NPC_GENERAL, golem.getId(), NpcStringId.S1_YOUR_ENEMY_WAS_DRIVEN_OUT_I_WILL_NOW_WITHDRAW_AND_AWAIT_YOUR_NEXT_COMMAND).addStringParameter(player.getName()));
|
||||
golem.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_YOUR_ENEMY_WAS_DRIVEN_OUT_I_WILL_NOW_WITHDRAW_AND_AWAIT_YOUR_NEXT_COMMAND, player.getName());
|
||||
golem.deleteMe();
|
||||
golem = null;
|
||||
htmltext = null;
|
||||
@@ -393,7 +392,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest
|
||||
|
||||
if ((qs != null) && qs.isCond(10) && (qs.getInt("spawned") == 1))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THIS_ENEMY_IS_FAR_TOO_POWERFUL_FOR_ME_TO_FIGHT_I_MUST_WITHDRAW));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THIS_ENEMY_IS_FAR_TOO_POWERFUL_FOR_ME_TO_FIGHT_I_MUST_WITHDRAW);
|
||||
qs.setCond(11, true);
|
||||
qs.unset("spawned");
|
||||
cancelQuestTimers("golem_despawn");
|
||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import quests.Q00192_SevenSignsSeriesOfDoubt.Q00192_SevenSignsSeriesOfDoubt;
|
||||
|
||||
@@ -69,7 +68,7 @@ public final class Q00193_SevenSignsDyingMessage extends Quest
|
||||
if (!npc.isDead())
|
||||
{
|
||||
isBusy = false;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
@@ -157,12 +156,10 @@ public final class Q00193_SevenSignsDyingMessage extends Quest
|
||||
if (qs.isCond(4))
|
||||
{
|
||||
isBusy = true;
|
||||
final NpcSay ns = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP);
|
||||
ns.addStringParameter(player.getName());
|
||||
npc.broadcastPacket(ns);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP, player.getName());
|
||||
startQuestTimer("heal", 30000 - getRandom(20000), npc, player);
|
||||
final L2MonsterInstance monster = (L2MonsterInstance) addSpawn(SHILENS_EVIL_THOUGHTS, 82425, 47232, -3216, 0, false, 0, false);
|
||||
monster.broadcastPacket(new NpcSay(monster.getObjectId(), ChatType.NPC_GENERAL, monster.getId(), NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM));
|
||||
monster.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM);
|
||||
addAttackDesire(monster, player);
|
||||
startQuestTimer("despawn", 300000, monster, null);
|
||||
}
|
||||
@@ -172,9 +169,7 @@ public final class Q00193_SevenSignsDyingMessage extends Quest
|
||||
{
|
||||
if (!npc.isInsideRadius(player, 600, true, false))
|
||||
{
|
||||
final NpcSay ns = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LOOK_HERE_S1_DON_T_FALL_TOO_FAR_BEHIND);
|
||||
ns.addStringParameter(player.getName());
|
||||
npc.broadcastPacket(ns);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOK_HERE_S1_DON_T_FALL_TOO_FAR_BEHIND, player.getName());
|
||||
}
|
||||
else if (!player.isDead())
|
||||
{
|
||||
@@ -225,7 +220,7 @@ public final class Q00193_SevenSignsDyingMessage extends Quest
|
||||
isBusy = false;
|
||||
cancelQuestTimers("despawn");
|
||||
cancelQuestTimers("heal");
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU).addStringParameter(partyMember.getName()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU, partyMember.getName());
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@ import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import quests.Q00195_SevenSignsSecretRitualOfThePriests.Q00195_SevenSignsSecretRitualOfThePriests;
|
||||
|
||||
@@ -64,7 +63,7 @@ public final class Q00196_SevenSignsSealOfTheEmperor extends Quest
|
||||
if ((npc.getId() == MERCHANT_OF_MAMMON) && "DESPAWN".equals(event))
|
||||
{
|
||||
isBusy = false;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THE_ANCIENT_PROMISE_TO_THE_EMPEROR_HAS_BEEN_FULFILLED));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_ANCIENT_PROMISE_TO_THE_EMPEROR_HAS_BEEN_FULFILLED);
|
||||
npc.deleteMe();
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
@@ -100,7 +99,7 @@ public final class Q00196_SevenSignsSealOfTheEmperor extends Quest
|
||||
isBusy = true;
|
||||
npc.setScriptValue(1);
|
||||
final L2Npc merchant = addSpawn(MERCHANT_OF_MAMMON, 109743, 219975, -3512, 0, false, 0, false);
|
||||
merchant.broadcastPacket(new NpcSay(merchant.getObjectId(), ChatType.NPC_GENERAL, merchant.getId(), NpcStringId.WHO_DARES_SUMMON_THE_MERCHANT_OF_MAMMON));
|
||||
merchant.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHO_DARES_SUMMON_THE_MERCHANT_OF_MAMMON);
|
||||
htmltext = "30969-06.html";
|
||||
startQuestTimer("DESPAWN", 120000, merchant, null);
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import quests.Q00196_SevenSignsSealOfTheEmperor.Q00196_SevenSignsSealOfTheEmperor;
|
||||
|
||||
@@ -66,7 +65,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
if (!npc.isDead())
|
||||
{
|
||||
isBusy = false;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
@@ -167,9 +166,9 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
isBusy = true;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP).addStringParameter(player.getName()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP, player.getName());
|
||||
final L2MonsterInstance monster = (L2MonsterInstance) addSpawn(SHILENS_EVIL_THOUGHTS, 152520, -57502, -3408, 0, false, 0, false);
|
||||
monster.broadcastPacket(new NpcSay(monster.getObjectId(), ChatType.NPC_GENERAL, monster.getId(), NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM));
|
||||
monster.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM);
|
||||
addAttackDesire(monster, player);
|
||||
startQuestTimer("despawn", 300000, monster, null);
|
||||
}
|
||||
@@ -236,7 +235,7 @@ public final class Q00197_SevenSignsTheSacredBookOfSeal extends Quest
|
||||
|
||||
isBusy = false;
|
||||
cancelQuestTimers("despawn");
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU).addStringParameter(partyMember.getName()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU, partyMember.getName());
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
import quests.Q00197_SevenSignsTheSacredBookOfSeal.Q00197_SevenSignsTheSacredBookOfSeal;
|
||||
|
||||
@@ -68,7 +67,7 @@ public final class Q00198_SevenSignsEmbryo extends Quest
|
||||
if (!npc.isDead())
|
||||
{
|
||||
isBusy = false;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.NEXT_TIME_YOU_WILL_NOT_ESCAPE);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
@@ -105,10 +104,10 @@ public final class Q00198_SevenSignsEmbryo extends Quest
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
isBusy = true;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP).addStringParameter(player.getName()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_THAT_STRANGER_MUST_BE_DEFEATED_HERE_IS_THE_ULTIMATE_HELP, player.getName());
|
||||
startQuestTimer("heal", 30000 - getRandom(20000), npc, player);
|
||||
final L2MonsterInstance monster = (L2MonsterInstance) addSpawn(SHILENS_EVIL_THOUGHTS, -23734, -9184, -5384, 0, false, 0, false, npc.getInstanceId());
|
||||
monster.broadcastPacket(new NpcSay(monster.getObjectId(), ChatType.NPC_GENERAL, monster.getId(), NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM));
|
||||
L2MonsterInstance monster = (L2MonsterInstance) addSpawn(SHILENS_EVIL_THOUGHTS, -23734, -9184, -5384, 0, false, 0, false, npc.getInstanceId());
|
||||
monster.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_ARE_NOT_THE_OWNER_OF_THAT_ITEM);
|
||||
addAttackDesire(monster, player);
|
||||
startQuestTimer("despawn", 300000, monster, null);
|
||||
}
|
||||
@@ -118,9 +117,7 @@ public final class Q00198_SevenSignsEmbryo extends Quest
|
||||
{
|
||||
if (!npc.isInsideRadius(player, 600, true, false))
|
||||
{
|
||||
final NpcSay ns = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LOOK_HERE_S1_DON_T_FALL_TOO_FAR_BEHIND);
|
||||
ns.addStringParameter(player.getName());
|
||||
npc.broadcastPacket(ns);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOK_HERE_S1_DON_T_FALL_TOO_FAR_BEHIND, player.getName());
|
||||
}
|
||||
else if (!player.isDead())
|
||||
{
|
||||
@@ -147,7 +144,7 @@ public final class Q00198_SevenSignsEmbryo extends Quest
|
||||
takeItems(player, SCULPTURE_OF_DOUBT, -1);
|
||||
qs.setCond(3, true);
|
||||
htmltext = event;
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WE_WILL_BE_WITH_YOU_ALWAYS));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WE_WILL_BE_WITH_YOU_ALWAYS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -185,7 +182,7 @@ public final class Q00198_SevenSignsEmbryo extends Quest
|
||||
isBusy = false;
|
||||
cancelQuestTimers("despawn");
|
||||
cancelQuestTimers("heal");
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU).addStringParameter(partyMember.getName()));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU, partyMember.getName());
|
||||
npc.deleteMe();
|
||||
partyMember.showQuestMovie(14);
|
||||
return super.onKill(npc, player, isSummon);
|
||||
|
@@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* Little Wing (420)
|
||||
@@ -422,7 +421,7 @@ public final class Q00420_LittleWing extends Quest
|
||||
{
|
||||
takeItems(attacker, DELUXE_FAIRY_STONE, -1);
|
||||
playSound(attacker, QuestSound.ITEMSOUND_QUEST_MIDDLE);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.THE_STONE_THE_ELVEN_STONE_BROKE));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THE_STONE_THE_ELVEN_STONE_BROKE);
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -398,7 +397,7 @@ public final class Q00421_LittleWingsBigAdventure extends Quest
|
||||
}
|
||||
else if ((getRandom(100) < 2) && hasQuestItems(attacker, FAIRY_LEAF))
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.GIVE_ME_A_FAIRY_LEAF));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.GIVE_ME_A_FAIRY_LEAF);
|
||||
takeItems(attacker, FAIRY_LEAF, 1);
|
||||
qs.setMemoState(qs.getMemoState() + data.memoStateValue);
|
||||
qs.unset("hits");
|
||||
@@ -415,13 +414,13 @@ public final class Q00421_LittleWingsBigAdventure extends Quest
|
||||
switch (getRandom(3))
|
||||
{
|
||||
case 0:
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.WHY_DO_YOU_BOTHER_ME_AGAIN));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHY_DO_YOU_BOTHER_ME_AGAIN);
|
||||
break;
|
||||
case 1:
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, data.message));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, data.message);
|
||||
break;
|
||||
case 2:
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LEAVE_NOW_BEFORE_YOU_INCUR_THE_WRATH_OF_THE_GUARDIAN_GHOST));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LEAVE_NOW_BEFORE_YOU_INCUR_THE_WRATH_OF_THE_GUARDIAN_GHOST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* Grave Robber Rescue (450)
|
||||
@@ -166,11 +165,11 @@ public class Q00450_GraveRobberRescue extends Quest
|
||||
{
|
||||
if (getRandom(100) < 50)
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GRUNT_OH));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.GRUNT_OH);
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GRUNT_WHAT_S_WRONG_WITH_ME));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.GRUNT_WHAT_S_WRONG_WITH_ME);
|
||||
}
|
||||
npc.deleteMe();
|
||||
htmltext = null;
|
||||
|
@@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -351,9 +350,6 @@ public final class Q00456_DontKnowDontCare extends Quest
|
||||
|
||||
giveItems(player, reward, count);
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(reward);
|
||||
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_RECEIVED_A_S2_ITEM_AS_A_REWARD_FROM_THE_SEPARATED_SOUL);
|
||||
packet.addStringParameter(player.getName());
|
||||
packet.addStringParameter(item.getName());
|
||||
npc.broadcastPacket(packet);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.S1_RECEIVED_A_S2_ITEM_AS_A_REWARD_FROM_THE_SEPARATED_SOUL, player.getName(), item.getName());
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,6 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
* I Must Be a Genius (463)<br>
|
||||
@@ -189,11 +188,7 @@ public class Q00463_IMustBeaGenius extends Quest
|
||||
|
||||
if (msg)
|
||||
{
|
||||
final NpcSay ns = new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.ATT_ATTACK_S1_RO_ROGUE_S2);
|
||||
ns.addStringParameter(player.getName());
|
||||
ns.addStringParameter(String.valueOf(number));
|
||||
npc.broadcastPacket(ns);
|
||||
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ATT_ATTACK_S1_RO_ROGUE_S2, player.getName(), String.valueOf(number));
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (getQuestItemsCount(player, CORPSE_LOG) == qs.getInt("number"))
|
||||
{
|
||||
|
@@ -33,7 +33,6 @@ import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.model.skills.AbnormalType;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -287,27 +286,30 @@ public final class Q00501_ProofOfClanAlliance extends Quest
|
||||
if ((lqs.getInt("flag") == 3) && arthea.isScriptValue(15))
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.BINGO));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BINGO);
|
||||
}
|
||||
else if ((lqs.getInt("flag") == 2) && arthea.isScriptValue(14))
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.BINGO));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BINGO);
|
||||
}
|
||||
else if ((lqs.getInt("flag") == 1) && arthea.isScriptValue(13))
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.BINGO));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BINGO);
|
||||
}
|
||||
else if ((lqs.getInt("flag") == 0) && arthea.isScriptValue(12))
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.BINGO));
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BINGO);
|
||||
}
|
||||
else if ((lqs.getInt("flag") < 4) && (getRandom(4) == 0))
|
||||
else if (lqs.getInt("flag") < 4)
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastPacket(new NpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.BINGO));
|
||||
if (getRandom(4) == 0)
|
||||
{
|
||||
lqs.set("flag", lqs.getInt("flag") + 1);
|
||||
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.BINGO);
|
||||
}
|
||||
}
|
||||
arthea.setScriptValue(arthea.getScriptValue() + 1);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user