Addition of proper chat type enum.
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@@ -282,7 +283,7 @@ public class Benom extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, "Benom", TALK[Rnd.get(4)]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, "Benom", TALK[Rnd.get(4)]));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
@@ -203,14 +204,14 @@ public class Core extends Quest
|
||||
{
|
||||
if (Rnd.get(100) == 0)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Removing intruders."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Removing intruders."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_firstAttacked = true;
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "A non-permitted target has been discovered."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Starting intruder removal system."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "A non-permitted target has been discovered."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Starting intruder removal system."));
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
@@ -224,9 +225,9 @@ public class Core extends Quest
|
||||
if (npcId == CORE)
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "A fatal error has occurred."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "System is being shut down..."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "......"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "A fatal error has occurred."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "System is being shut down..."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "......"));
|
||||
_firstAttacked = false;
|
||||
|
||||
addSpawn(31842, 16502, 110165, -6394, 0, false, 900000);
|
||||
|
@@ -24,6 +24,7 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
@@ -1363,7 +1364,7 @@ public class Frintezza extends Quest
|
||||
}
|
||||
else if (event.equals("room_final"))
|
||||
{
|
||||
_zone.broadcastPacket(new CreatureSay(npc.getObjectId(), 1, npc.getName(), "Exceeded his time limit, challenge failed!"));
|
||||
_zone.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.SHOUT, npc.getName(), "Exceeded his time limit, challenge failed!"));
|
||||
_zone.oustAllPlayers();
|
||||
|
||||
cancelQuestTimer("waiting", npc, null);
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -46,7 +47,7 @@ public class CatsEyeBandit extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You childish fool, do you think you can catch me?"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You childish fool, do you think you can catch me?"));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -61,7 +62,7 @@ public class CatsEyeBandit extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 80)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I must do something about this shameful incident..."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I must do something about this shameful incident..."));
|
||||
}
|
||||
|
||||
return super.onKill(npc, killer, isPet);
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class DeluLizardmanSpecialAgent extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Hey! We're having a duel here!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Hey! We're having a duel here!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "How dare you interrupt our fight! Hey guys, help!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "How dare you interrupt our fight! Hey guys, help!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class DeluLizardmanSpecialCommander extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Come on, Ill take you on!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Come on, Ill take you on!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "How dare you interrupt a sacred duel! You must be taught a lesson!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "How dare you interrupt a sacred duel! You must be taught a lesson!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
@@ -416,7 +417,7 @@ public class FeedableBeasts extends Quest
|
||||
final int rand = Rnd.get(20);
|
||||
if (rand < 5)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(nextNpc.getObjectId(), 0, nextNpc.getName(), SPAWN_CHATS[rand].replace("$s1", player.getName())));
|
||||
npc.broadcastPacket(new CreatureSay(nextNpc.getObjectId(), ChatType.GENERAL, nextNpc.getName(), SPAWN_CHATS[rand].replace("$s1", player.getName())));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -523,7 +524,7 @@ public class FeedableBeasts extends Quest
|
||||
// Rare random talk...
|
||||
if (Rnd.get(20) == 0)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(objectId, 0, npc.getName(), TEXT[growthLevel][Rnd.get(TEXT[growthLevel].length)]));
|
||||
npc.broadcastPacket(new CreatureSay(objectId, ChatType.GENERAL, npc.getName(), TEXT[growthLevel][Rnd.get(TEXT[growthLevel].length)]));
|
||||
}
|
||||
|
||||
if ((growthLevel > 0) && (FEED_INFO.getOrDefault(objectId, 0) != caster.getObjectId()))
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,7 +46,7 @@ public class KarulBugbear extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 4)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Your rear is practically unguarded!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Your rear is practically unguarded!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -53,7 +54,7 @@ public class KarulBugbear extends Quest
|
||||
npc.setScriptValue(1);
|
||||
if (Rnd.get(100) < 4)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Watch your back!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Watch your back!"));
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
|
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
@@ -75,7 +76,7 @@ public class Monastery extends Quest
|
||||
if ((player.getActiveWeaponInstance() != null) && !player.isSilentMoving())
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[0]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[0]));
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
@@ -132,7 +133,7 @@ public class Monastery extends Quest
|
||||
if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
|
||||
{
|
||||
npc.setTarget(target);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[0]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[0]));
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case 22124:
|
||||
@@ -171,7 +172,7 @@ public class Monastery extends Quest
|
||||
|
||||
if (Util.contains(MOBS_2, npc.getNpcId()) && (skill.getSkillType() == SkillType.AGGDAMAGE))
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), TEXT[Rnd.get(2) + 1].replace("name", player.getName())));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), TEXT[Rnd.get(2) + 1].replace("name", player.getName())));
|
||||
((Attackable) npc).addDamageHate(player, 0, 999);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class OlMahumGeneral extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 10)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I will definitely repay this humiliation!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I will definitely repay this humiliation!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
@@ -68,7 +69,7 @@ public class RetreatOnAttack extends Quest
|
||||
{
|
||||
if (npcId == OL_MAHUM_GUARD)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), OL_MAHUM_GUARD_TEXT[Rnd.get(OL_MAHUM_GUARD_TEXT.length)]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), OL_MAHUM_GUARD_TEXT[Rnd.get(OL_MAHUM_GUARD_TEXT.length)]));
|
||||
}
|
||||
int posX = npc.getX();
|
||||
int posY = npc.getY();
|
||||
|
@@ -26,6 +26,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -243,7 +244,7 @@ public class SummonMinions extends Quest
|
||||
}
|
||||
if (npcId == 20767)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npcObjId, 0, npc.getName(), "Come out, you children of darkness!"));
|
||||
npc.broadcastPacket(new CreatureSay(npcObjId, ChatType.GENERAL, npc.getName(), "Come out, you children of darkness!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,7 +46,7 @@ public class TimakOrcOverlord extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 50)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Dear ultimate power!!!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Dear ultimate power!!!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,7 +46,7 @@ public class TimakOrcTroopLeader extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 50)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Destroy the enemy, my brothers!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Destroy the enemy, my brothers!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
@@ -146,7 +147,7 @@ public class Transform extends Quest
|
||||
{
|
||||
if (monster.getMessage() != 0)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), Message[Rnd.get(monster.getMessage())]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), Message[Rnd.get(monster.getMessage())]));
|
||||
}
|
||||
npc.onDecay();
|
||||
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
|
||||
@@ -176,7 +177,7 @@ public class Transform extends Quest
|
||||
{
|
||||
if (monster.getMessage() != 0)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), Message[Rnd.get(monster.getMessage())]));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), Message[Rnd.get(monster.getMessage())]));
|
||||
}
|
||||
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
|
||||
final Creature originalAttacker = isPet ? killer.getPet() : killer;
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class TurekOrcFootman extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "There is no reason for you to kill me! I have nothing you need!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "There is no reason for you to kill me! I have nothing you need!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class TurekOrcSupplier extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You wont take me down easily."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You wont take me down easily."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "We shall see about that!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "We shall see about that!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package ai.others;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -45,13 +46,13 @@ public class TurekOrcWarlord extends Quest
|
||||
{
|
||||
if (Rnd.get(100) < 40)
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You wont take me down easily."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You wont take me down easily."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "The battle has just begun!"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "The battle has just begun!"));
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isPet);
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package quests.Q024_InhabitantsOfTheForrestOfTheDead;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -275,7 +276,7 @@ public class Q024_InhabitantsOfTheForrestOfTheDead extends Quest
|
||||
|
||||
for (PlayerInstance nearby : npc.getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
nearby.sendPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "That sign!"));
|
||||
nearby.sendPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "That sign!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package quests.Q025_HidingBehindTheTruth;
|
||||
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@@ -123,7 +124,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
{
|
||||
qs.set("step", "1");
|
||||
final NpcInstance triol = qs.addSpawn(TRIOL, 59712, -47568, -2712, 300000);
|
||||
triol.broadcastPacket(new CreatureSay(triol.getObjectId(), 0, triol.getName(), "That box was sealed by my master. Don't touch it!"));
|
||||
triol.broadcastPacket(new CreatureSay(triol.getObjectId(), ChatType.GENERAL, triol.getName(), "That box was sealed by my master. Don't touch it!"));
|
||||
triol.setRunning();
|
||||
((Attackable) triol).addDamageHate(player, 0, 999);
|
||||
triol.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
@@ -438,7 +439,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
{
|
||||
qs.playSound("ItemSound.quest_itemget");
|
||||
qs.set("cond", "8");
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "You've ended my immortal life! You've protected by the feudal lord, aren't you?"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You've ended my immortal life! You've protected by the feudal lord, aren't you?"));
|
||||
qs.giveItems(TOTEM_DOLL, 1);
|
||||
qs.set("step", "2");
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package quests.Q115_TheOtherSideOfTruth;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -141,7 +142,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "9");
|
||||
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 104562, -107598, -3688, 0, false, 4000);
|
||||
man.broadcastPacket(new CreatureSay(man.getObjectId(), 0, man.getName(), "We meet again."));
|
||||
man.broadcastPacket(new CreatureSay(man.getObjectId(), ChatType.GENERAL, man.getName(), "We meet again."));
|
||||
startQuestTimer("2", 3700, man, player);
|
||||
qs.giveItems(REPORT, 1);
|
||||
break;
|
||||
@@ -158,7 +159,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "8");
|
||||
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 117890, -126478, -2584, 0, false, 4000);
|
||||
man.broadcastPacket(new CreatureSay(man.getObjectId(), 0, man.getName(), "This looks like the right place..."));
|
||||
man.broadcastPacket(new CreatureSay(man.getObjectId(), ChatType.GENERAL, man.getName(), "This looks like the right place..."));
|
||||
startQuestTimer("1", 3700, man, player);
|
||||
htmltext = "Sculpture-04.htm";
|
||||
if ((qs.getInt("" + SCULPTURE1) == 0) && (qs.getInt("" + SCULPTURE2) == 0))
|
||||
@@ -174,12 +175,12 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
||||
}
|
||||
case "1":
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "I see someone. Is this fate?"));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "I see someone. Is this fate?"));
|
||||
break;
|
||||
}
|
||||
case "2":
|
||||
{
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "Don't bother trying to find out more about me. Follow your own destiny."));
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "Don't bother trying to find out more about me. Follow your own destiny."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user