Addition of proper chat type enum.
This commit is contained in:
parent
83301a78ee
commit
8be467ada1
@ -21,6 +21,7 @@ import java.util.Collection;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
@ -282,7 +283,7 @@ public class Benom extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
@ -203,14 +204,14 @@ public class Core extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) == 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
_firstAttacked = true;
|
_firstAttacked = true;
|
||||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, npc.getName(), "A non-permitted target has been discovered."));
|
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, 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(), "Starting intruder removal system."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onAttack(npc, attacker, damage, isPet);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
@ -224,9 +225,9 @@ public class Core extends Quest
|
|||||||
if (npcId == CORE)
|
if (npcId == CORE)
|
||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
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(), ChatType.GENERAL, 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(), ChatType.GENERAL, name, "System is being shut down..."));
|
||||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), 0, name, "......"));
|
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, name, "......"));
|
||||||
_firstAttacked = false;
|
_firstAttacked = false;
|
||||||
|
|
||||||
addSpawn(31842, 16502, 110165, -6394, 0, false, 900000);
|
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.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
@ -1363,7 +1364,7 @@ public class Frintezza extends Quest
|
|||||||
}
|
}
|
||||||
else if (event.equals("room_final"))
|
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();
|
_zone.oustAllPlayers();
|
||||||
|
|
||||||
cancelQuestTimer("waiting", npc, null);
|
cancelQuestTimer("waiting", npc, null);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -46,7 +47,7 @@ public class CatsEyeBandit extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
@ -61,7 +62,7 @@ public class CatsEyeBandit extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 80)
|
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);
|
return super.onKill(npc, killer, isPet);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class DeluLizardmanSpecialAgent extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class DeluLizardmanSpecialCommander extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
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.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
@ -416,7 +417,7 @@ public class FeedableBeasts extends Quest
|
|||||||
final int rand = Rnd.get(20);
|
final int rand = Rnd.get(20);
|
||||||
if (rand < 5)
|
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
|
else
|
||||||
@ -523,7 +524,7 @@ public class FeedableBeasts extends Quest
|
|||||||
// Rare random talk...
|
// Rare random talk...
|
||||||
if (Rnd.get(20) == 0)
|
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()))
|
if ((growthLevel > 0) && (FEED_INFO.getOrDefault(objectId, 0) != caster.getObjectId()))
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,7 +46,7 @@ public class KarulBugbear extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 4)
|
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
|
else
|
||||||
@ -53,7 +54,7 @@ public class KarulBugbear extends Quest
|
|||||||
npc.setScriptValue(1);
|
npc.setScriptValue(1);
|
||||||
if (Rnd.get(100) < 4)
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
|
@ -23,6 +23,7 @@ import java.util.List;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -75,7 +76,7 @@ public class Monastery extends Quest
|
|||||||
if ((player.getActiveWeaponInstance() != null) && !player.isSilentMoving())
|
if ((player.getActiveWeaponInstance() != null) && !player.isSilentMoving())
|
||||||
{
|
{
|
||||||
npc.setTarget(player);
|
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())
|
switch (npc.getNpcId())
|
||||||
{
|
{
|
||||||
@ -132,7 +133,7 @@ public class Monastery extends Quest
|
|||||||
if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
|
if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
|
||||||
{
|
{
|
||||||
npc.setTarget(target);
|
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())
|
switch (npc.getNpcId())
|
||||||
{
|
{
|
||||||
case 22124:
|
case 22124:
|
||||||
@ -171,7 +172,7 @@ public class Monastery extends Quest
|
|||||||
|
|
||||||
if (Util.contains(MOBS_2, npc.getNpcId()) && (skill.getSkillType() == SkillType.AGGDAMAGE))
|
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);
|
((Attackable) npc).addDamageHate(player, 0, 999);
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class OlMahumGeneral extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 10)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ package ai.others;
|
|||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
@ -68,7 +69,7 @@ public class RetreatOnAttack extends Quest
|
|||||||
{
|
{
|
||||||
if (npcId == OL_MAHUM_GUARD)
|
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 posX = npc.getX();
|
||||||
int posY = npc.getY();
|
int posY = npc.getY();
|
||||||
|
@ -26,6 +26,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
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.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@ -243,7 +244,7 @@ public class SummonMinions extends Quest
|
|||||||
}
|
}
|
||||||
if (npcId == 20767)
|
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;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,7 +46,7 @@ public class TimakOrcOverlord extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 50)
|
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
|
else
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,7 +46,7 @@ public class TimakOrcTroopLeader extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 50)
|
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
|
else
|
||||||
|
@ -21,6 +21,7 @@ import java.util.ArrayList;
|
|||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
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.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
@ -146,7 +147,7 @@ public class Transform extends Quest
|
|||||||
{
|
{
|
||||||
if (monster.getMessage() != 0)
|
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();
|
npc.onDecay();
|
||||||
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
|
final Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
|
||||||
@ -176,7 +177,7 @@ public class Transform extends Quest
|
|||||||
{
|
{
|
||||||
if (monster.getMessage() != 0)
|
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 Attackable newNpc = (Attackable) addSpawn(monster.getIdPoly(), npc);
|
||||||
final Creature originalAttacker = isPet ? killer.getPet() : killer;
|
final Creature originalAttacker = isPet ? killer.getPet() : killer;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class TurekOrcFootman extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class TurekOrcSupplier extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package ai.others;
|
package ai.others;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -45,13 +46,13 @@ public class TurekOrcWarlord extends Quest
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) < 40)
|
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
|
else
|
||||||
{
|
{
|
||||||
npc.setScriptValue(1);
|
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);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package quests.Q024_InhabitantsOfTheForrestOfTheDead;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -275,7 +276,7 @@ public class Q024_InhabitantsOfTheForrestOfTheDead extends Quest
|
|||||||
|
|
||||||
for (PlayerInstance nearby : npc.getKnownList().getKnownPlayers().values())
|
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;
|
package quests.Q025_HidingBehindTheTruth;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
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.Attackable;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@ -123,7 +124,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
|||||||
{
|
{
|
||||||
qs.set("step", "1");
|
qs.set("step", "1");
|
||||||
final NpcInstance triol = qs.addSpawn(TRIOL, 59712, -47568, -2712, 300000);
|
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();
|
triol.setRunning();
|
||||||
((Attackable) triol).addDamageHate(player, 0, 999);
|
((Attackable) triol).addDamageHate(player, 0, 999);
|
||||||
triol.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
triol.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||||
@ -438,7 +439,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
|||||||
{
|
{
|
||||||
qs.playSound("ItemSound.quest_itemget");
|
qs.playSound("ItemSound.quest_itemget");
|
||||||
qs.set("cond", "8");
|
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.giveItems(TOTEM_DOLL, 1);
|
||||||
qs.set("step", "2");
|
qs.set("step", "2");
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package quests.Q115_TheOtherSideOfTruth;
|
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.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
@ -141,7 +142,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
|||||||
qs.playSound("ItemSound.quest_middle");
|
qs.playSound("ItemSound.quest_middle");
|
||||||
qs.set("cond", "9");
|
qs.set("cond", "9");
|
||||||
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 104562, -107598, -3688, 0, false, 4000);
|
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);
|
startQuestTimer("2", 3700, man, player);
|
||||||
qs.giveItems(REPORT, 1);
|
qs.giveItems(REPORT, 1);
|
||||||
break;
|
break;
|
||||||
@ -158,7 +159,7 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
|||||||
qs.playSound("ItemSound.quest_middle");
|
qs.playSound("ItemSound.quest_middle");
|
||||||
qs.set("cond", "8");
|
qs.set("cond", "8");
|
||||||
final NpcInstance man = qs.addSpawn(SUSPICIOUS, 117890, -126478, -2584, 0, false, 4000);
|
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);
|
startQuestTimer("1", 3700, man, player);
|
||||||
htmltext = "Sculpture-04.htm";
|
htmltext = "Sculpture-04.htm";
|
||||||
if ((qs.getInt("" + SCULPTURE1) == 0) && (qs.getInt("" + SCULPTURE2) == 0))
|
if ((qs.getInt("" + SCULPTURE1) == 0) && (qs.getInt("" + SCULPTURE2) == 0))
|
||||||
@ -174,12 +175,12 @@ public class Q115_TheOtherSideOfTruth extends Quest
|
|||||||
}
|
}
|
||||||
case "1":
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case "2":
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* 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 org.l2jmobius.gameserver.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author St3eT
|
||||||
|
*/
|
||||||
|
public enum ChatType
|
||||||
|
{
|
||||||
|
GENERAL(0),
|
||||||
|
SHOUT(1),
|
||||||
|
WHISPER(2),
|
||||||
|
PARTY(3),
|
||||||
|
CLAN(4),
|
||||||
|
GM(5),
|
||||||
|
PETITION_PLAYER(6),
|
||||||
|
PETITION_GM(7),
|
||||||
|
TRADE(8),
|
||||||
|
ALLIANCE(9),
|
||||||
|
ANNOUNCEMENT(10),
|
||||||
|
BOAT(11),
|
||||||
|
FRIEND(12),
|
||||||
|
MSNCHAT(13),
|
||||||
|
PARTYMATCH_ROOM(14),
|
||||||
|
PARTYROOM_COMMANDER(15),
|
||||||
|
PARTYROOM_ALL(16),
|
||||||
|
HERO_VOICE(17),
|
||||||
|
CRITICAL_ANNOUNCE(18);
|
||||||
|
|
||||||
|
private final int _clientId;
|
||||||
|
|
||||||
|
private ChatType(int clientId)
|
||||||
|
{
|
||||||
|
_clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the client id.
|
||||||
|
*/
|
||||||
|
public int getClientId()
|
||||||
|
{
|
||||||
|
return _clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds the {@code ChatType} by its clientId
|
||||||
|
* @param clientId the clientId
|
||||||
|
* @return the {@code ChatType} if its found, {@code null} otherwise.
|
||||||
|
*/
|
||||||
|
public static ChatType findByClientId(int clientId)
|
||||||
|
{
|
||||||
|
for (ChatType ChatType : values())
|
||||||
|
{
|
||||||
|
if (ChatType.getClientId() == clientId)
|
||||||
|
{
|
||||||
|
return ChatType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -30,6 +30,7 @@ import java.util.logging.Logger;
|
|||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@ -787,7 +788,7 @@ public class AutoChatHandler implements SpawnListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final CreatureSay cs = new CreatureSay(chatNpc.getObjectId(), 0, creatureName, text);
|
final CreatureSay cs = new CreatureSay(chatNpc.getObjectId(), ChatType.GENERAL, creatureName, text);
|
||||||
for (PlayerInstance nearbyPlayer : nearbyPlayers)
|
for (PlayerInstance nearbyPlayer : nearbyPlayers)
|
||||||
{
|
{
|
||||||
nearbyPlayer.sendPacket(cs);
|
nearbyPlayer.sendPacket(cs);
|
||||||
|
@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
|||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.handler.AutoAnnouncementHandler;
|
import org.l2jmobius.gameserver.handler.AutoAnnouncementHandler;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.entity.Announcements;
|
import org.l2jmobius.gameserver.model.entity.Announcements;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||||
@ -156,7 +156,7 @@ public class AdminAnnouncements implements IAdminCommandHandler
|
|||||||
{
|
{
|
||||||
text1 = activeChar.getName() + ": " + text1;
|
text1 = activeChar.getName() + ": " + text1;
|
||||||
}
|
}
|
||||||
Broadcast.toAllOnlinePlayers(new CreatureSay(activeChar.getObjectId(), Say2.CRITICAL_ANNOUNCE, "", text1));
|
Broadcast.toAllOnlinePlayers(new CreatureSay(activeChar.getObjectId(), ChatType.CRITICAL_ANNOUNCE, "", text1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "admin_list_autoannouncements":
|
case "admin_list_autoannouncements":
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -102,21 +102,15 @@ public class AdminGmChat implements IAdminCommandHandler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int offset = 0;
|
final int offset = command.contains("menu") ? 17 : 13;
|
||||||
|
final String text = command.substring(offset);
|
||||||
String text;
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
|
|
||||||
if (command.contains("menu"))
|
|
||||||
{
|
{
|
||||||
offset = 17;
|
if (player.isGM())
|
||||||
|
{
|
||||||
|
player.sendPacket(new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
offset = 13;
|
|
||||||
}
|
|
||||||
|
|
||||||
text = command.substring(offset);
|
|
||||||
AdminData.broadcastToGMs(new CreatureSay(0, 9, activeChar.getName(), text));
|
|
||||||
}
|
}
|
||||||
catch (StringIndexOutOfBoundsException e)
|
catch (StringIndexOutOfBoundsException e)
|
||||||
{
|
{
|
||||||
|
@ -104,15 +104,15 @@ public class AdminTownWar implements IAdminCommandHandler
|
|||||||
// Announce for all towns
|
// Announce for all towns
|
||||||
if (Config.TW_ALL_TOWNS)
|
if (Config.TW_ALL_TOWNS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("Town War Event!");
|
Announcements.getInstance().criticalAnnounceToAll("Town War Event!");
|
||||||
Announcements.getInstance().gameAnnounceToAll("All towns have been set to war zone by " + activeChar.getName() + ".");
|
Announcements.getInstance().criticalAnnounceToAll("All towns have been set to war zone by " + activeChar.getName() + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce for one town
|
// Announce for one town
|
||||||
if (!Config.TW_ALL_TOWNS)
|
if (!Config.TW_ALL_TOWNS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("Town War Event!");
|
Announcements.getInstance().criticalAnnounceToAll("Town War Event!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set to war zone by " + activeChar.getName() + ".");
|
Announcements.getInstance().criticalAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set to war zone by " + activeChar.getName() + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,13 +179,13 @@ public class AdminTownWar implements IAdminCommandHandler
|
|||||||
// Announce for all towns
|
// Announce for all towns
|
||||||
if (Config.TW_ALL_TOWNS)
|
if (Config.TW_ALL_TOWNS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("All towns have been set back to normal by " + activeChar.getName() + ".");
|
Announcements.getInstance().criticalAnnounceToAll("All towns have been set back to normal by " + activeChar.getName() + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Announce for one town
|
// Announce for one town
|
||||||
if (!Config.TW_ALL_TOWNS)
|
if (!Config.TW_ALL_TOWNS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set back to normal by " + activeChar.getName() + ".");
|
Announcements.getInstance().criticalAnnounceToAll(MapRegionData.getInstance().getTown(Config.TW_TOWN_ID).getName() + " has been set back to normal by " + activeChar.getName() + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -545,7 +546,7 @@ public class ChristmasManager
|
|||||||
*/
|
*/
|
||||||
protected CreatureSay getXMasMessage()
|
protected CreatureSay getXMasMessage()
|
||||||
{
|
{
|
||||||
return new CreatureSay(0, 17, getRandomSender(), getRandomXMasMessage());
|
return new CreatureSay(0, ChatType.HERO_VOICE, getRandomSender(), getRandomXMasMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,10 +26,10 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||||
@ -507,7 +507,7 @@ public class PetitionManager
|
|||||||
|
|
||||||
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
|
if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
|
||||||
{
|
{
|
||||||
cs = new CreatureSay(player.getObjectId(), Say2.PETITION_PLAYER, player.getName(), messageText);
|
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
|
||||||
currPetition.addLogMessage(cs);
|
currPetition.addLogMessage(cs);
|
||||||
|
|
||||||
currPetition.sendResponderPacket(cs);
|
currPetition.sendResponderPacket(cs);
|
||||||
@ -518,7 +518,7 @@ public class PetitionManager
|
|||||||
|
|
||||||
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
|
if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
|
||||||
{
|
{
|
||||||
cs = new CreatureSay(player.getObjectId(), Say2.PETITION_GM, player.getName(), messageText);
|
cs = new CreatureSay(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
|
||||||
currPetition.addLogMessage(cs);
|
currPetition.addLogMessage(cs);
|
||||||
|
|
||||||
currPetition.sendResponderPacket(cs);
|
currPetition.sendResponderPacket(cs);
|
||||||
@ -580,7 +580,7 @@ public class PetitionManager
|
|||||||
|
|
||||||
// Notify all GMs that a new petition has been submitted.
|
// Notify all GMs that a new petition has been submitted.
|
||||||
final String msgContent = petitioner.getName() + " has submitted a new petition."; // (ID: " + newPetitionId + ").";
|
final String msgContent = petitioner.getName() + " has submitted a new petition."; // (ID: " + newPetitionId + ").";
|
||||||
AdminData.broadcastToGMs(new CreatureSay(petitioner.getObjectId(), 17, "Petition System", msgContent));
|
AdminData.broadcastToGMs(new CreatureSay(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||||
|
|
||||||
return newPetitionId;
|
return newPetitionId;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.ai.FortSiegeGuardAI;
|
|||||||
import org.l2jmobius.gameserver.ai.SiegeGuardAI;
|
import org.l2jmobius.gameserver.ai.SiegeGuardAI;
|
||||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ManorSeedData;
|
import org.l2jmobius.gameserver.datatables.xml.ManorSeedData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
import org.l2jmobius.gameserver.model.DropCategory;
|
import org.l2jmobius.gameserver.model.DropCategory;
|
||||||
@ -60,7 +61,6 @@ import org.l2jmobius.gameserver.model.quest.EventType;
|
|||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
@ -454,7 +454,7 @@ public class Attackable extends NpcInstance
|
|||||||
_commandChannelTimer = new CommandChannelTimer(this);
|
_commandChannelTimer = new CommandChannelTimer(this);
|
||||||
_commandChannelLastAttack = System.currentTimeMillis();
|
_commandChannelLastAttack = System.currentTimeMillis();
|
||||||
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
|
||||||
_firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
_firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,16 +231,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This will return true if the player is GM,<br>
|
|
||||||
* but if the player is not GM it will return false.
|
|
||||||
* @return GM status
|
|
||||||
*/
|
|
||||||
public boolean charIsGM()
|
|
||||||
{
|
|
||||||
return (this instanceof PlayerInstance) && ((PlayerInstance) this).isGM();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of Creature.<BR>
|
* Constructor of Creature.<BR>
|
||||||
* <BR>
|
* <BR>
|
||||||
|
@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
|
|
||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.gameserver.GameTimeController;
|
import org.l2jmobius.gameserver.GameTimeController;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.knownlist.BoatKnownList;
|
import org.l2jmobius.gameserver.model.actor.knownlist.BoatKnownList;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||||
@ -30,7 +31,6 @@ import org.l2jmobius.gameserver.model.holders.BoatPathHolder;
|
|||||||
import org.l2jmobius.gameserver.model.holders.BoatPathHolder.BoatPoint;
|
import org.l2jmobius.gameserver.model.holders.BoatPathHolder.BoatPoint;
|
||||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.OnVehicleCheckLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.OnVehicleCheckLocation;
|
||||||
@ -263,11 +263,11 @@ public class BoatInstance extends Creature
|
|||||||
{
|
{
|
||||||
if (cycle == 1)
|
if (cycle == 1)
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess10);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess10);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess10);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess10);
|
||||||
}
|
}
|
||||||
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
|
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
|
||||||
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
||||||
@ -287,11 +287,11 @@ public class BoatInstance extends Creature
|
|||||||
{
|
{
|
||||||
if (cycle == 1)
|
if (cycle == 1)
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess5);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess5);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess5);
|
||||||
}
|
}
|
||||||
ps = new PlaySound(0, "itemsound.ship_5min", this);
|
ps = new PlaySound(0, "itemsound.ship_5min", this);
|
||||||
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
||||||
@ -309,11 +309,11 @@ public class BoatInstance extends Creature
|
|||||||
{
|
{
|
||||||
if (cycle == 1)
|
if (cycle == 1)
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess1);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess1);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess1);
|
||||||
}
|
}
|
||||||
ps = new PlaySound(0, "itemsound.ship_1min", this);
|
ps = new PlaySound(0, "itemsound.ship_1min", this);
|
||||||
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
||||||
@ -331,11 +331,11 @@ public class BoatInstance extends Creature
|
|||||||
{
|
{
|
||||||
if (cycle == 1)
|
if (cycle == 1)
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmess0);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmess0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmess0);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmess0);
|
||||||
}
|
}
|
||||||
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
if ((knownPlayers == null) || knownPlayers.isEmpty())
|
||||||
{
|
{
|
||||||
@ -351,11 +351,11 @@ public class BoatInstance extends Creature
|
|||||||
{
|
{
|
||||||
if (cycle == 1)
|
if (cycle == 1)
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathA.npc, pathA.sysmessb);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathA.npc, pathA.sysmessb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sm = new CreatureSay(0, Say2.SHOUT, pathB.npc, pathB.sysmessb);
|
sm = new CreatureSay(0, ChatType.SHOUT, pathB.npc, pathB.sysmessb);
|
||||||
}
|
}
|
||||||
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
|
ps = new PlaySound(0, "itemsound.ship_arrival_departure", this);
|
||||||
for (PlayerInstance player : knownPlayers)
|
for (PlayerInstance player : knownPlayers)
|
||||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
|||||||
import org.l2jmobius.gameserver.datatables.sql.HelperBuffTable;
|
import org.l2jmobius.gameserver.datatables.sql.HelperBuffTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CustomNpcInstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.CustomNpcInstanceManager;
|
||||||
@ -79,7 +80,6 @@ import org.l2jmobius.gameserver.model.spawn.Spawn;
|
|||||||
import org.l2jmobius.gameserver.model.zone.type.TownZone;
|
import org.l2jmobius.gameserver.model.zone.type.TownZone;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowVariationCancelWindow;
|
import org.l2jmobius.gameserver.network.serverpackets.ExShowVariationCancelWindow;
|
||||||
@ -1929,7 +1929,7 @@ public class NpcInstance extends Creature
|
|||||||
*/
|
*/
|
||||||
public void broadcastNpcSay(String message)
|
public void broadcastNpcSay(String message)
|
||||||
{
|
{
|
||||||
broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), message));
|
broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +20,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.l2jmobius.gameserver.ai.CreatureAI;
|
import org.l2jmobius.gameserver.ai.CreatureAI;
|
||||||
import org.l2jmobius.gameserver.ai.NpcWalkerAI;
|
import org.l2jmobius.gameserver.ai.NpcWalkerAI;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
@ -81,7 +82,7 @@ public class NpcWalkerInstance extends NpcInstance
|
|||||||
// we send message to known players only!
|
// we send message to known players only!
|
||||||
if (!knownPlayers.isEmpty())
|
if (!knownPlayers.isEmpty())
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(getObjectId(), 0, getName(), chat);
|
final CreatureSay cs = new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), chat);
|
||||||
|
|
||||||
// we interact and list players here
|
// we interact and list players here
|
||||||
for (PlayerInstance players : knownPlayers.values())
|
for (PlayerInstance players : knownPlayers.values())
|
||||||
|
@ -19,10 +19,10 @@ package org.l2jmobius.gameserver.model.actor.instance;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
|
|
||||||
public class PenaltyMonsterInstance extends MonsterInstance
|
public class PenaltyMonsterInstance extends MonsterInstance
|
||||||
@ -58,7 +58,7 @@ public class PenaltyMonsterInstance extends MonsterInstance
|
|||||||
{
|
{
|
||||||
if (Rnd.get(100) <= 80)
|
if (Rnd.get(100) <= 80)
|
||||||
{
|
{
|
||||||
broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), "mmm your bait was delicious"));
|
broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "mmm your bait was delicious"));
|
||||||
}
|
}
|
||||||
_ptk = ptk;
|
_ptk = ptk;
|
||||||
addDamageHate(ptk, 10, 10);
|
addDamageHate(ptk, 10, 10);
|
||||||
@ -76,7 +76,7 @@ public class PenaltyMonsterInstance extends MonsterInstance
|
|||||||
|
|
||||||
if (Rnd.get(100) <= 75)
|
if (Rnd.get(100) <= 75)
|
||||||
{
|
{
|
||||||
broadcastPacket(new CreatureSay(getObjectId(), Say2.ALL, getName(), "I will tell fishes not to take your bait"));
|
broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "I will tell fishes not to take your bait"));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
|
|||||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.RecipeData;
|
import org.l2jmobius.gameserver.datatables.xml.RecipeData;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.enums.Race;
|
import org.l2jmobius.gameserver.enums.Race;
|
||||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
@ -6353,7 +6354,7 @@ public class PlayerInstance extends Playable
|
|||||||
CTF.removeFlagFromPlayer(this);
|
CTF.removeFlagFromPlayer(this);
|
||||||
broadcastUserInfo();
|
broadcastUserInfo();
|
||||||
_haveFlagCTF = false;
|
_haveFlagCTF = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(CTF.getEventName() + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");
|
Announcements.getInstance().criticalAnnounceToAll(CTF.getEventName() + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -6788,7 +6789,7 @@ public class PlayerInstance extends Playable
|
|||||||
if ((_heroConsecutiveKillCount == Config.KILLS_TO_GET_WAR_LEGEND_AURA) && Config.WAR_LEGEND_AURA)
|
if ((_heroConsecutiveKillCount == Config.KILLS_TO_GET_WAR_LEGEND_AURA) && Config.WAR_LEGEND_AURA)
|
||||||
{
|
{
|
||||||
setHeroAura(true);
|
setHeroAura(true);
|
||||||
Announcements.getInstance().gameAnnounceToAll(getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!");
|
Announcements.getInstance().criticalAnnounceToAll(getName() + " becames War Legend with " + Config.KILLS_TO_GET_WAR_LEGEND_AURA + " PvP!!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6827,7 +6828,7 @@ public class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
if (Config.ENABLE_ANTI_PVP_FARM_MSG)
|
if (Config.ENABLE_ANTI_PVP_FARM_MSG)
|
||||||
{
|
{
|
||||||
final CreatureSay cs12 = new CreatureSay(0, 15, "", getName() + " 5 consecutive kill! Only Gm."); // 8D
|
final CreatureSay cs12 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " 5 consecutive kill! Only Gm."); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline() && player.isGM())
|
if ((player != null) && player.isOnline() && player.isGM())
|
||||||
@ -6840,7 +6841,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 15, "", getName() + " is Dominating!"); // 8D
|
final CreatureSay cs = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Dominating!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6852,7 +6853,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
{
|
{
|
||||||
final CreatureSay cs2 = new CreatureSay(0, 15, "", getName() + " is on a Rampage!"); // 8D
|
final CreatureSay cs2 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Rampage!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6864,7 +6865,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 14:
|
case 14:
|
||||||
{
|
{
|
||||||
final CreatureSay cs3 = new CreatureSay(0, 15, "", getName() + " is on a Killing Spree!"); // 8D
|
final CreatureSay cs3 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Killing Spree!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6876,7 +6877,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 18:
|
case 18:
|
||||||
{
|
{
|
||||||
final CreatureSay cs4 = new CreatureSay(0, 15, "", getName() + " is on a Monster Kill!"); // 8D
|
final CreatureSay cs4 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Monster Kill!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6888,7 +6889,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 22:
|
case 22:
|
||||||
{
|
{
|
||||||
final CreatureSay cs5 = new CreatureSay(0, 15, "", getName() + " is Unstoppable!"); // 8D
|
final CreatureSay cs5 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Unstoppable!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6900,7 +6901,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 25:
|
case 25:
|
||||||
{
|
{
|
||||||
final CreatureSay cs6 = new CreatureSay(0, 15, "", getName() + " is on an Ultra Kill!"); // 8D
|
final CreatureSay cs6 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on an Ultra Kill!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6912,7 +6913,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 28:
|
case 28:
|
||||||
{
|
{
|
||||||
final CreatureSay cs7 = new CreatureSay(0, 15, "", getName() + " God Blessed!"); // 8D
|
final CreatureSay cs7 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " God Blessed!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6924,7 +6925,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 32:
|
case 32:
|
||||||
{
|
{
|
||||||
final CreatureSay cs8 = new CreatureSay(0, 15, "", getName() + " is Wicked Sick!"); // 8D
|
final CreatureSay cs8 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is Wicked Sick!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6936,7 +6937,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 35:
|
case 35:
|
||||||
{
|
{
|
||||||
final CreatureSay cs9 = new CreatureSay(0, 15, "", getName() + " is on a Ludricrous Kill!"); // 8D
|
final CreatureSay cs9 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is on a Ludricrous Kill!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -6948,7 +6949,7 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
case 40:
|
case 40:
|
||||||
{
|
{
|
||||||
final CreatureSay cs10 = new CreatureSay(0, 15, "", getName() + " is GodLike!"); // 8D
|
final CreatureSay cs10 = new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", getName() + " is GodLike!"); // 8D
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
@ -13873,11 +13874,11 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastSnoop(int type, String name, String text, CreatureSay cs)
|
public void broadcastSnoop(ChatType _chatType, String name, String text, CreatureSay cs)
|
||||||
{
|
{
|
||||||
if (!_snoopListener.isEmpty())
|
if (!_snoopListener.isEmpty())
|
||||||
{
|
{
|
||||||
final Snoop sn = new Snoop(this, type, name, text);
|
final Snoop sn = new Snoop(this, _chatType, name, text);
|
||||||
for (PlayerInstance pci : _snoopListener)
|
for (PlayerInstance pci : _snoopListener)
|
||||||
{
|
{
|
||||||
if (pci != null)
|
if (pci != null)
|
||||||
|
@ -21,6 +21,7 @@ import java.util.concurrent.ScheduledFuture;
|
|||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
@ -87,7 +88,7 @@ public class ProtectorInstance extends NpcInstance
|
|||||||
final int objId = _caster.getObjectId();
|
final int objId = _caster.getObjectId();
|
||||||
skill.getEffects(_caster, player, false, false, false);
|
skill.getEffects(_caster, player, false, false, false);
|
||||||
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
|
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
|
||||||
broadcastPacket(new CreatureSay(objId, 0, getName(), Config.PROTECTOR_MESSAGE));
|
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -109,7 +110,7 @@ public class ProtectorInstance extends NpcInstance
|
|||||||
final int objId = _caster.getObjectId();
|
final int objId = _caster.getObjectId();
|
||||||
skill.getEffects(_caster, player, false, false, false);
|
skill.getEffects(_caster, player, false, false, false);
|
||||||
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
|
broadcastPacket(new MagicSkillUse(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
|
||||||
broadcastPacket(new CreatureSay(objId, 0, getName(), Config.PROTECTOR_MESSAGE));
|
broadcastPacket(new CreatureSay(objId, ChatType.GENERAL, getName(), Config.PROTECTOR_MESSAGE));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import java.util.concurrent.Future;
|
|||||||
|
|
||||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
@ -370,7 +371,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcastPacket(new CreatureSay(getObjectId(), 0, getName(), "forgive me!!"));
|
broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "forgive me!!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +398,7 @@ public class SepulcherMonsterInstance extends MonsterInstance
|
|||||||
}
|
}
|
||||||
|
|
||||||
FourSepulchersManager.getInstance().spawnKeyBox(_activeChar);
|
FourSepulchersManager.getInstance().spawnKeyBox(_activeChar);
|
||||||
broadcastPacket(new CreatureSay(getObjectId(), 0, getName(), "Many thanks for rescue me."));
|
broadcastPacket(new CreatureSay(getObjectId(), ChatType.GENERAL, getName(), "Many thanks for rescue me."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
import org.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||||
@ -436,7 +437,7 @@ public class SepulcherNpcInstance extends NpcInstance
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final CreatureSay sm = new CreatureSay(0, 1, getName(), msg);
|
final CreatureSay sm = new CreatureSay(0, ChatType.SHOUT, getName(), msg);
|
||||||
for (PlayerInstance player : knownPlayers)
|
for (PlayerInstance player : knownPlayers)
|
||||||
{
|
{
|
||||||
if (player == null)
|
if (player == null)
|
||||||
|
@ -901,7 +901,7 @@ public class CreatureStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
val /= _creature.getArmourExpertisePenalty();
|
val /= _creature.getArmourExpertisePenalty();
|
||||||
if ((val > Config.MAX_RUN_SPEED) && !_creature.charIsGM())
|
if ((val > Config.MAX_RUN_SPEED) && !(_creature.isPlayer() && !_creature.getActingPlayer().isGM()))
|
||||||
{
|
{
|
||||||
val = Config.MAX_RUN_SPEED;
|
val = Config.MAX_RUN_SPEED;
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,10 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.cache.HtmCache;
|
import org.l2jmobius.gameserver.cache.HtmCache;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
@ -73,7 +73,7 @@ public class Announcements
|
|||||||
{
|
{
|
||||||
for (String _announcement : _announcements)
|
for (String _announcement : _announcements)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(0, Say2.ANNOUNCEMENT, player.getName(), _announcement.replace("%name%", player.getName())));
|
player.sendPacket(new CreatureSay(0, ChatType.ANNOUNCEMENT, player.getName(), _announcement.replace("%name%", player.getName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (List<Object> entry : _eventAnnouncements)
|
for (List<Object> entry : _eventAnnouncements)
|
||||||
@ -225,18 +225,16 @@ public class Announcements
|
|||||||
|
|
||||||
public void announceToAll(String text)
|
public void announceToAll(String text)
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.ANNOUNCEMENT, "", text);
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
player.sendPacket(cs);
|
player.sendPacket(cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Colored Announcements 8D
|
public void criticalAnnounceToAll(String text)
|
||||||
// Used for events
|
|
||||||
public void gameAnnounceToAll(String text)
|
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 18, null, text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, null, text);
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if ((player != null) && player.isOnline())
|
if ((player != null) && player.isOnline())
|
||||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
|||||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
@ -321,7 +322,7 @@ public class Rebirth
|
|||||||
player.addSkill(bonusSkill, false);
|
player.addSkill(bonusSkill, false);
|
||||||
|
|
||||||
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
// If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage();
|
||||||
rebirthText = new CreatureSay(0, 18, "Rebirth Manager ", " Granted you [ " + bonusSkill.getName() + " ] level [ " + bonusSkill.getLevel() + " ]!");
|
rebirthText = new CreatureSay(0, ChatType.HERO_VOICE, "Rebirth Manager ", " Granted you [ " + bonusSkill.getName() + " ] level [ " + bonusSkill.getLevel() + " ]!");
|
||||||
player.sendPacket(rebirthText);
|
player.sendPacket(rebirthText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.datatables.ItemTable;
|
|||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import org.l2jmobius.gameserver.model.Effect;
|
import org.l2jmobius.gameserver.model.Effect;
|
||||||
import org.l2jmobius.gameserver.model.Inventory;
|
import org.l2jmobius.gameserver.model.Inventory;
|
||||||
@ -744,17 +745,17 @@ public class CTF implements EventTask
|
|||||||
_inProgress = true;
|
_inProgress = true;
|
||||||
_joining = true;
|
_joining = true;
|
||||||
spawnEventNpc();
|
spawnEventNpc();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
||||||
if (Config.CTF_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
if (Config.CTF_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
||||||
}
|
}
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + ".");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + ".");
|
||||||
|
|
||||||
if (Config.CTF_COMMAND)
|
if (Config.CTF_COMMAND)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Commands .ctfjoin .ctfleave .ctfinfo!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Commands .ctfjoin .ctfleave .ctfinfo!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -781,7 +782,7 @@ public class CTF implements EventTask
|
|||||||
}
|
}
|
||||||
else if (Config.CTF_EVEN_TEAMS.equals("SHUFFLE") && !checkMinPlayers(_playersShuffle.size()))
|
else if (Config.CTF_EVEN_TEAMS.equals("SHUFFLE") && !checkMinPlayers(_playersShuffle.size()))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
||||||
if (Config.CTF_STATS_LOGGER)
|
if (Config.CTF_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
||||||
@ -792,7 +793,7 @@ public class CTF implements EventTask
|
|||||||
}
|
}
|
||||||
else if (!checkMinPlayers(_players.size()))
|
else if (!checkMinPlayers(_players.size()))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _players.size());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _players.size());
|
||||||
if (Config.CTF_STATS_LOGGER)
|
if (Config.CTF_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _players.size());
|
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _players.size());
|
||||||
@ -801,7 +802,7 @@ public class CTF implements EventTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
_joining = false;
|
_joining = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||||
|
|
||||||
setUserData();
|
setUserData();
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
@ -889,7 +890,7 @@ public class CTF implements EventTask
|
|||||||
|
|
||||||
afterStartOperations();
|
afterStartOperations();
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Started. Go Capture the Flags!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Started. Go Capture the Flags!");
|
||||||
_started = true;
|
_started = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -925,7 +926,7 @@ public class CTF implements EventTask
|
|||||||
_aborted = false;
|
_aborted = false;
|
||||||
final long delay = _intervalBetweenMatches;
|
final long delay = _intervalBetweenMatches;
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
||||||
|
|
||||||
waiter(delay);
|
waiter(delay);
|
||||||
|
|
||||||
@ -937,7 +938,7 @@ public class CTF implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": next event aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": next event aborted!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -972,21 +973,21 @@ public class CTF implements EventTask
|
|||||||
|
|
||||||
if (Config.CTF_ANNOUNCE_TEAM_STATS)
|
if (Config.CTF_ANNOUNCE_TEAM_STATS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + " Team Statistics:");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + " Team Statistics:");
|
||||||
for (String team : _teams)
|
for (String team : _teams)
|
||||||
{
|
{
|
||||||
final int _flags_ = teamPointsCount(team);
|
final int _flags_ = teamPointsCount(team);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Team: " + team + " - Flags taken: " + _flags_);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Team: " + team + " - Flags taken: " + _flags_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_topTeam != null)
|
if (_topTeam != null)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Team " + _topTeam + " wins the match, with " + _topScore + " flags taken!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Team " + _topTeam + " wins the match, with " + _topScore + " flags taken!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": The event finished with a TIE: " + _topScore + " flags taken by each team!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": The event finished with a TIE: " + _topScore + " flags taken by each team!");
|
||||||
}
|
}
|
||||||
rewardTeam(_topTeam);
|
rewardTeam(_topTeam);
|
||||||
|
|
||||||
@ -1005,7 +1006,7 @@ public class CTF implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": The event finished with a TIE: No team wins the match(nobody took flags)!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": The event finished with a TIE: No team wins the match(nobody took flags)!");
|
||||||
|
|
||||||
if (Config.CTF_STATS_LOGGER)
|
if (Config.CTF_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
@ -1047,7 +1048,7 @@ public class CTF implements EventTask
|
|||||||
cleanCTF();
|
cleanCTF();
|
||||||
_joining = false;
|
_joining = false;
|
||||||
_inProgress = false;
|
_inProgress = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_joining = false;
|
_joining = false;
|
||||||
@ -1058,7 +1059,7 @@ public class CTF implements EventTask
|
|||||||
|
|
||||||
afterFinish();
|
afterFinish();
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1076,7 +1077,7 @@ public class CTF implements EventTask
|
|||||||
public static void teleportFinish()
|
public static void teleportFinish()
|
||||||
{
|
{
|
||||||
sit();
|
sit();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
@ -1241,12 +1242,12 @@ public class CTF implements EventTask
|
|||||||
removeOfflinePlayers();
|
removeOfflinePlayers();
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1261,12 +1262,12 @@ public class CTF implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1283,15 +1284,15 @@ public class CTF implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_teleport)
|
else if (_teleport)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2639,7 +2640,7 @@ public class CTF implements EventTask
|
|||||||
{
|
{
|
||||||
if (!_started && !_aborted)
|
if (!_started && !_aborted)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Thank you For Participating At, " + _eventName + " Event.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Thank you For Participating At, " + _eventName + " Event.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2819,13 +2820,13 @@ public class CTF implements EventTask
|
|||||||
// logged off with a flag in his hands
|
// logged off with a flag in his hands
|
||||||
if (!player.isOnline() && player._haveFlagCTF)
|
if (!player.isOnline() && player._haveFlagCTF)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + player.getName() + " logged off with a CTF flag!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + player.getName() + " logged off with a CTF flag!");
|
||||||
player._haveFlagCTF = false;
|
player._haveFlagCTF = false;
|
||||||
if ((_teams.indexOf(player._teamNameHaveFlagCTF) >= 0) && _flagsTaken.get(_teams.indexOf(player._teamNameHaveFlagCTF)))
|
if ((_teams.indexOf(player._teamNameHaveFlagCTF) >= 0) && _flagsTaken.get(_teams.indexOf(player._teamNameHaveFlagCTF)))
|
||||||
{
|
{
|
||||||
_flagsTaken.set(_teams.indexOf(player._teamNameHaveFlagCTF), false);
|
_flagsTaken.set(_teams.indexOf(player._teamNameHaveFlagCTF), false);
|
||||||
spawnFlag(player._teamNameHaveFlagCTF);
|
spawnFlag(player._teamNameHaveFlagCTF);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + player._teamNameHaveFlagCTF + " flag now returned to place.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + player._teamNameHaveFlagCTF + " flag now returned to place.");
|
||||||
}
|
}
|
||||||
removeFlagFromPlayer(player);
|
removeFlagFromPlayer(player);
|
||||||
player._teamNameHaveFlagCTF = null;
|
player._teamNameHaveFlagCTF = null;
|
||||||
@ -2851,7 +2852,7 @@ public class CTF implements EventTask
|
|||||||
{
|
{
|
||||||
_flagsTaken.set(index, false);
|
_flagsTaken.set(index, false);
|
||||||
spawnFlag(team);
|
spawnFlag(team);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + team + " flag returned due to player error.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + team + " flag returned due to player error.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check if a player ran away from the event holding a flag:
|
// Check if a player ran away from the event holding a flag:
|
||||||
@ -2861,13 +2862,13 @@ public class CTF implements EventTask
|
|||||||
{
|
{
|
||||||
if ((player != null) && player._haveFlagCTF && isOutsideCTFArea(player))
|
if ((player != null) && player._haveFlagCTF && isOutsideCTFArea(player))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + player.getName() + " escaped from the event holding a flag!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + player.getName() + " escaped from the event holding a flag!");
|
||||||
player._haveFlagCTF = false;
|
player._haveFlagCTF = false;
|
||||||
if ((_teams.indexOf(player._teamNameHaveFlagCTF) >= 0) && _flagsTaken.get(_teams.indexOf(player._teamNameHaveFlagCTF)))
|
if ((_teams.indexOf(player._teamNameHaveFlagCTF) >= 0) && _flagsTaken.get(_teams.indexOf(player._teamNameHaveFlagCTF)))
|
||||||
{
|
{
|
||||||
_flagsTaken.set(_teams.indexOf(player._teamNameHaveFlagCTF), false);
|
_flagsTaken.set(_teams.indexOf(player._teamNameHaveFlagCTF), false);
|
||||||
spawnFlag(player._teamNameHaveFlagCTF);
|
spawnFlag(player._teamNameHaveFlagCTF);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + player._teamNameHaveFlagCTF + " flag now returned to place.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + player._teamNameHaveFlagCTF + " flag now returned to place.");
|
||||||
}
|
}
|
||||||
removeFlagFromPlayer(player);
|
removeFlagFromPlayer(player);
|
||||||
player._teamNameHaveFlagCTF = null;
|
player._teamNameHaveFlagCTF = null;
|
||||||
@ -2915,7 +2916,7 @@ public class CTF implements EventTask
|
|||||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 16)); // Amazing glow
|
player.broadcastPacket(new SocialAction(player.getObjectId(), 16)); // Amazing glow
|
||||||
player._haveFlagCTF = true;
|
player._haveFlagCTF = true;
|
||||||
player.broadcastUserInfo();
|
player.broadcastUserInfo();
|
||||||
player.sendPacket(new CreatureSay(player.getObjectId(), 15, ":", "You got it! Run back! ::"));
|
player.sendPacket(new CreatureSay(player.getObjectId(), ChatType.PARTYROOM_COMMANDER, ":", "You got it! Run back! ::"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3149,7 +3150,7 @@ public class CTF implements EventTask
|
|||||||
player.broadcastUserInfo();
|
player.broadcastUserInfo();
|
||||||
removeFlagFromPlayer(player);
|
removeFlagFromPlayer(player);
|
||||||
_teamPointsCount.set(indexOwn, teamPointsCount(team) + 1);
|
_teamPointsCount.set(indexOwn, teamPointsCount(team) + 1);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + player.getName() + " scores for " + player._teamNameCTF + ".");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + player.getName() + " scores for " + player._teamNameCTF + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3164,7 +3165,7 @@ public class CTF implements EventTask
|
|||||||
addFlagToPlayer(player);
|
addFlagToPlayer(player);
|
||||||
player.broadcastUserInfo();
|
player.broadcastUserInfo();
|
||||||
player._haveFlagCTF = true;
|
player._haveFlagCTF = true;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + team + " flag taken by " + player.getName() + "...");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + team + " flag taken by " + player.getName() + "...");
|
||||||
pointTeamTo(player, team);
|
pointTeamTo(player, team);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -704,20 +704,20 @@ public class DM implements EventTask
|
|||||||
_inProgress = true;
|
_inProgress = true;
|
||||||
_joining = true;
|
_joining = true;
|
||||||
spawnEventNpc();
|
spawnEventNpc();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
||||||
if (Config.DM_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
if (Config.DM_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
||||||
}
|
}
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName);
|
||||||
|
|
||||||
if (Config.DM_COMMAND)
|
if (Config.DM_COMMAND)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Commands .dmjoin .dmleave .dminfo");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Commands .dmjoin .dmleave .dminfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": FULL BUFF Event: be ready with your buffs, they won't be deleted!!!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": FULL BUFF Event: be ready with your buffs, they won't be deleted!!!");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -742,7 +742,7 @@ public class DM implements EventTask
|
|||||||
final int size = _players.size();
|
final int size = _players.size();
|
||||||
if (!checkMinPlayers(size))
|
if (!checkMinPlayers(size))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + size);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + size);
|
||||||
if (Config.DM_STATS_LOGGER)
|
if (Config.DM_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + size);
|
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + size);
|
||||||
@ -754,7 +754,7 @@ public class DM implements EventTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
_joining = false;
|
_joining = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||||
|
|
||||||
setUserData();
|
setUserData();
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
@ -830,7 +830,7 @@ public class DM implements EventTask
|
|||||||
|
|
||||||
afterStartOperations();
|
afterStartOperations();
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Started. Go to kill your enemies!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Started. Go to kill your enemies!");
|
||||||
_started = true;
|
_started = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -873,7 +873,7 @@ public class DM implements EventTask
|
|||||||
_aborted = false;
|
_aborted = false;
|
||||||
final long delay = _intervalBetweenMatches;
|
final long delay = _intervalBetweenMatches;
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
||||||
|
|
||||||
waiter(delay);
|
waiter(delay);
|
||||||
|
|
||||||
@ -885,7 +885,7 @@ public class DM implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": next event aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": next event aborted!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -925,7 +925,7 @@ public class DM implements EventTask
|
|||||||
{
|
{
|
||||||
winners = winners + " " + winner.getName();
|
winners = winners + " " + winner.getName();
|
||||||
}
|
}
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + winners + " win the match! " + _topKills + " kills.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + winners + " win the match! " + _topKills + " kills.");
|
||||||
rewardPlayer();
|
rewardPlayer();
|
||||||
|
|
||||||
if (Config.DM_STATS_LOGGER)
|
if (Config.DM_STATS_LOGGER)
|
||||||
@ -936,7 +936,7 @@ public class DM implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": No players win the match(nobody killed).");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": No players win the match(nobody killed).");
|
||||||
if (Config.DM_STATS_LOGGER)
|
if (Config.DM_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
LOGGER.info(_eventName + ": No players win the match(nobody killed).");
|
LOGGER.info(_eventName + ": No players win the match(nobody killed).");
|
||||||
@ -970,7 +970,7 @@ public class DM implements EventTask
|
|||||||
cleanDM();
|
cleanDM();
|
||||||
_joining = false;
|
_joining = false;
|
||||||
_inProgress = false;
|
_inProgress = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_joining = false;
|
_joining = false;
|
||||||
@ -981,7 +981,7 @@ public class DM implements EventTask
|
|||||||
|
|
||||||
afterFinish();
|
afterFinish();
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -999,7 +999,7 @@ public class DM implements EventTask
|
|||||||
{
|
{
|
||||||
sit();
|
sit();
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||||
|
|
||||||
removeUserData();
|
removeUserData();
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
@ -1155,12 +1155,12 @@ public class DM implements EventTask
|
|||||||
removeOfflinePlayers();
|
removeOfflinePlayers();
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1175,12 +1175,12 @@ public class DM implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1197,15 +1197,15 @@ public class DM implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_teleport)
|
else if (_teleport)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2034,7 +2034,7 @@ public class DM implements EventTask
|
|||||||
{
|
{
|
||||||
if (!_started && !_aborted)
|
if (!_started && !_aborted)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Thank you For participating!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Thank you For participating!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,11 +30,11 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||||
@ -281,7 +281,7 @@ public class GameEvent
|
|||||||
|
|
||||||
public static void announceAllPlayers(String text)
|
public static void announceAllPlayers(String text)
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.ANNOUNCEMENT, "", text);
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
player.sendPacket(cs);
|
player.sendPacket(cs);
|
||||||
|
@ -709,17 +709,17 @@ public class TvT implements EventTask
|
|||||||
_inProgress = true;
|
_inProgress = true;
|
||||||
_joining = true;
|
_joining = true;
|
||||||
spawnEventNpc();
|
spawnEventNpc();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Event " + _eventName + "!");
|
||||||
if (Config.TVT_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
if (Config.TVT_ANNOUNCE_REWARD && (ItemTable.getInstance().getTemplate(_rewardId) != null))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Reward: " + _rewardAmount + " " + ItemTable.getInstance().getTemplate(_rewardId).getName());
|
||||||
}
|
}
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Recruiting levels: " + _minlvl + " to " + _maxlvl);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + ".");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + ".");
|
||||||
|
|
||||||
if (Config.TVT_COMMAND)
|
if (Config.TVT_COMMAND)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Commands .tvtjoin .tvtleave .tvtinfo");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Commands .tvtjoin .tvtleave .tvtinfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -744,7 +744,7 @@ public class TvT implements EventTask
|
|||||||
}
|
}
|
||||||
else if (Config.TVT_EVEN_TEAMS.equals("SHUFFLE") && !checkMinPlayers(_playersShuffle.size()))
|
else if (Config.TVT_EVEN_TEAMS.equals("SHUFFLE") && !checkMinPlayers(_playersShuffle.size()))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
||||||
if (Config.CTF_STATS_LOGGER)
|
if (Config.CTF_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
LOGGER.info(_eventName + ":Not enough players for event. Min Requested : " + _minPlayers + ", Participating : " + _playersShuffle.size());
|
||||||
@ -754,7 +754,7 @@ public class TvT implements EventTask
|
|||||||
}
|
}
|
||||||
|
|
||||||
_joining = false;
|
_joining = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport to team spot in 20 seconds!");
|
||||||
|
|
||||||
setUserData();
|
setUserData();
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
@ -826,7 +826,7 @@ public class TvT implements EventTask
|
|||||||
closeAdenColosseumDoors();
|
closeAdenColosseumDoors();
|
||||||
}
|
}
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Started. Go to kill your enemies!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Started. Go to kill your enemies!");
|
||||||
_started = true;
|
_started = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -844,7 +844,7 @@ public class TvT implements EventTask
|
|||||||
_aborted = false;
|
_aborted = false;
|
||||||
final long delay = _intervalBetweenMatches;
|
final long delay = _intervalBetweenMatches;
|
||||||
|
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": joining period will be avaible again in " + _intervalBetweenMatches + " minute(s)!");
|
||||||
|
|
||||||
waiter(delay);
|
waiter(delay);
|
||||||
|
|
||||||
@ -856,7 +856,7 @@ public class TvT implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": next event aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": next event aborted!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -895,30 +895,30 @@ public class TvT implements EventTask
|
|||||||
|
|
||||||
if (Config.TVT_ANNOUNCE_TEAM_STATS)
|
if (Config.TVT_ANNOUNCE_TEAM_STATS)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + " Team Statistics:");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + " Team Statistics:");
|
||||||
for (String team : _teams)
|
for (String team : _teams)
|
||||||
{
|
{
|
||||||
final int _kills = teamKillsCount(team);
|
final int _kills = teamKillsCount(team);
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Team: " + team + " - Kills: " + _kills);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Team: " + team + " - Kills: " + _kills);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bestKiller != null)
|
if (bestKiller != null)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Top killer: " + bestKiller.getName() + " - Kills: " + bestKiller._countTvTkills);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Top killer: " + bestKiller.getName() + " - Kills: " + bestKiller._countTvTkills);
|
||||||
}
|
}
|
||||||
if ((looser != null) && (!looser.equals(bestKiller)))
|
if ((looser != null) && (!looser.equals(bestKiller)))
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Top looser: " + looser.getName() + " - Dies: " + looser._countTvTdies);
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Top looser: " + looser.getName() + " - Dies: " + looser._countTvTdies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_topTeam != null)
|
if (_topTeam != null)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + _topTeam + "'s win the match! " + _topKills + " kills.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + _topTeam + "'s win the match! " + _topKills + " kills.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": The event finished with a TIE: " + _topKills + " kills by each team!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": The event finished with a TIE: " + _topKills + " kills by each team!");
|
||||||
}
|
}
|
||||||
rewardTeam(_topTeam, bestKiller, looser);
|
rewardTeam(_topTeam, bestKiller, looser);
|
||||||
|
|
||||||
@ -946,7 +946,7 @@ public class TvT implements EventTask
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": The event finished with a TIE: No team wins the match(nobody killed)!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": The event finished with a TIE: No team wins the match(nobody killed)!");
|
||||||
|
|
||||||
if (Config.TVT_STATS_LOGGER)
|
if (Config.TVT_STATS_LOGGER)
|
||||||
{
|
{
|
||||||
@ -997,7 +997,7 @@ public class TvT implements EventTask
|
|||||||
cleanTvT();
|
cleanTvT();
|
||||||
_joining = false;
|
_joining = false;
|
||||||
_inProgress = false;
|
_inProgress = false;
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_joining = false;
|
_joining = false;
|
||||||
@ -1005,7 +1005,7 @@ public class TvT implements EventTask
|
|||||||
_started = false;
|
_started = false;
|
||||||
_aborted = true;
|
_aborted = true;
|
||||||
unspawnEventNpc();
|
unspawnEventNpc();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Match aborted!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Match aborted!");
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1015,7 +1015,7 @@ public class TvT implements EventTask
|
|||||||
public static void teleportFinish()
|
public static void teleportFinish()
|
||||||
{
|
{
|
||||||
sit();
|
sit();
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Teleport back to participation NPC in 20 seconds!");
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
@ -1179,12 +1179,12 @@ public class TvT implements EventTask
|
|||||||
removeOfflinePlayers();
|
removeOfflinePlayers();
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60 / 60) + " hour(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1199,12 +1199,12 @@ public class TvT implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Joinable in " + _joiningLocationName + "!");
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + (seconds / 60) + " minute(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1221,15 +1221,15 @@ public class TvT implements EventTask
|
|||||||
{
|
{
|
||||||
if (_joining)
|
if (_joining)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till registration close!");
|
||||||
}
|
}
|
||||||
else if (_teleport)
|
else if (_teleport)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " seconds(s) till start fight!");
|
||||||
}
|
}
|
||||||
else if (_started)
|
else if (_started)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": " + seconds + " second(s) till event finish!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2524,7 +2524,7 @@ public class TvT implements EventTask
|
|||||||
{
|
{
|
||||||
if (!_started && !_aborted)
|
if (!_started && !_aborted)
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll(_eventName + ": Thank you For Participating At, " + _eventName + " Event.");
|
Announcements.getInstance().criticalAnnounceToAll(_eventName + ": Thank you For Participating At, " + _eventName + " Event.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ public class VIP
|
|||||||
|
|
||||||
_inProgress = true;
|
_inProgress = true;
|
||||||
_joining = true;
|
_joining = true;
|
||||||
Announcements.getInstance().gameAnnounceToAll("Vip event has started.Use .vipjoin to join or .vipleave to leave.");
|
Announcements.getInstance().criticalAnnounceToAll("Vip event has started.Use .vipjoin to join or .vipleave to leave.");
|
||||||
spawnJoinNPC();
|
spawnJoinNPC();
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
@ -361,22 +361,22 @@ public class VIP
|
|||||||
|
|
||||||
public static void startEvent()
|
public static void startEvent()
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("Registration for the VIP event involving " + _teamName + " has ended.");
|
Announcements.getInstance().criticalAnnounceToAll("Registration for the VIP event involving " + _teamName + " has ended.");
|
||||||
Announcements.getInstance().gameAnnounceToAll("Players will be teleported to their locations in 20 seconds.");
|
Announcements.getInstance().criticalAnnounceToAll("Players will be teleported to their locations in 20 seconds.");
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
teleportPlayers();
|
teleportPlayers();
|
||||||
chooseVIP();
|
chooseVIP();
|
||||||
setUserData();
|
setUserData();
|
||||||
Announcements.getInstance().gameAnnounceToAll("Players have been teleported for the VIP event.");
|
Announcements.getInstance().criticalAnnounceToAll("Players have been teleported for the VIP event.");
|
||||||
Announcements.getInstance().gameAnnounceToAll("VIP event will start in 20 seconds.");
|
Announcements.getInstance().criticalAnnounceToAll("VIP event will start in 20 seconds.");
|
||||||
spawnEndNPC();
|
spawnEndNPC();
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("VIP event has started. " + _teamName + "'s VIP must get to the starter city and talk with " + getNPCName(_endNPC, null) + ". The opposing team must kill the VIP. All players except the VIP will respawn at their current locations.");
|
Announcements.getInstance().criticalAnnounceToAll("VIP event has started. " + _teamName + "'s VIP must get to the starter city and talk with " + getNPCName(_endNPC, null) + ". The opposing team must kill the VIP. All players except the VIP will respawn at their current locations.");
|
||||||
Announcements.getInstance().gameAnnounceToAll("VIP event will end if the " + _teamName + " team makes it to their town or when " + (_time / 1000 / 60) + " mins have elapsed.");
|
Announcements.getInstance().criticalAnnounceToAll("VIP event will end if the " + _teamName + " team makes it to their town or when " + (_time / 1000 / 60) + " mins have elapsed.");
|
||||||
VIP.sit();
|
VIP.sit();
|
||||||
|
|
||||||
ThreadPool.schedule(VIP::endEventTime, _time);
|
ThreadPool.schedule(VIP::endEventTime, _time);
|
||||||
@ -394,7 +394,7 @@ public class VIP
|
|||||||
|
|
||||||
_started = false;
|
_started = false;
|
||||||
unspawnEventNpcs();
|
unspawnEventNpcs();
|
||||||
Announcements.getInstance().gameAnnounceToAll("The VIP has died. The opposing team has won.");
|
Announcements.getInstance().criticalAnnounceToAll("The VIP has died. The opposing team has won.");
|
||||||
rewardNotVIP();
|
rewardNotVIP();
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ public class VIP
|
|||||||
|
|
||||||
_started = false;
|
_started = false;
|
||||||
unspawnEventNpcs();
|
unspawnEventNpcs();
|
||||||
Announcements.getInstance().gameAnnounceToAll("The time has run out and the " + _teamName + "'s have not made it to their goal. Everybody on the opposing team wins.");
|
Announcements.getInstance().criticalAnnounceToAll("The time has run out and the " + _teamName + "'s have not made it to their goal. Everybody on the opposing team wins.");
|
||||||
rewardNotVIP();
|
rewardNotVIP();
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
@ -478,7 +478,7 @@ public class VIP
|
|||||||
|
|
||||||
_started = false;
|
_started = false;
|
||||||
unspawnEventNpcs();
|
unspawnEventNpcs();
|
||||||
Announcements.getInstance().gameAnnounceToAll("The VIP has made it to the goal. " + _teamName + " has won. Everybody on that team wins.");
|
Announcements.getInstance().criticalAnnounceToAll("The VIP has made it to the goal. " + _teamName + " has won. Everybody on that team wins.");
|
||||||
rewardVIP();
|
rewardVIP();
|
||||||
teleportFinish();
|
teleportFinish();
|
||||||
}
|
}
|
||||||
@ -631,7 +631,7 @@ public class VIP
|
|||||||
|
|
||||||
public static void teleportFinish()
|
public static void teleportFinish()
|
||||||
{
|
{
|
||||||
Announcements.getInstance().gameAnnounceToAll("Teleporting VIP players back to the Registration area in 20 seconds.");
|
Announcements.getInstance().criticalAnnounceToAll("Teleporting VIP players back to the Registration area in 20 seconds.");
|
||||||
|
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.datatables.HeroSkillTable;
|
import org.l2jmobius.gameserver.datatables.HeroSkillTable;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.Skill;
|
import org.l2jmobius.gameserver.model.Skill;
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
@ -1016,7 +1017,7 @@ class OlympiadGame
|
|||||||
{
|
{
|
||||||
final int objId = manager.getLastSpawn().getObjectId();
|
final int objId = manager.getLastSpawn().getObjectId();
|
||||||
final String npcName = manager.getLastSpawn().getName();
|
final String npcName = manager.getLastSpawn().getName();
|
||||||
manager.getLastSpawn().broadcastPacket(new CreatureSay(objId, 1, npcName, "Olympiad is going to begin in Arena " + (_stadiumID + 1) + " in a moment."));
|
manager.getLastSpawn().broadcastPacket(new CreatureSay(objId, ChatType.SHOUT, npcName, "Olympiad is going to begin in Arena " + (_stadiumID + 1) + " in a moment."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
|||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
@ -4168,10 +4169,10 @@ public class SevenSignsFestival implements SpawnListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureSay cs = new CreatureSay(_dawnChatGuide.getObjectId(), 1, senderName, message);
|
CreatureSay cs = new CreatureSay(_dawnChatGuide.getObjectId(), ChatType.SHOUT, senderName, message);
|
||||||
_dawnChatGuide.broadcastPacket(cs);
|
_dawnChatGuide.broadcastPacket(cs);
|
||||||
|
|
||||||
cs = new CreatureSay(_duskChatGuide.getObjectId(), 1, senderName, message);
|
cs = new CreatureSay(_duskChatGuide.getObjectId(), ChatType.SHOUT, senderName, message);
|
||||||
_duskChatGuide.broadcastPacket(cs);
|
_duskChatGuide.broadcastPacket(cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4747,7 +4748,7 @@ public class SevenSignsFestival implements SpawnListener
|
|||||||
{
|
{
|
||||||
if (!_participants.isEmpty())
|
if (!_participants.isEmpty())
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(_witchInst.getObjectId(), 0, "Festival Witch", message);
|
final CreatureSay cs = new CreatureSay(_witchInst.getObjectId(), ChatType.GENERAL, "Festival Witch", message);
|
||||||
for (PlayerInstance participant : _participants)
|
for (PlayerInstance participant : _participants)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -28,6 +28,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@ -552,7 +553,7 @@ public class BanditStrongholdSiege extends ClanHallSiege
|
|||||||
{
|
{
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 1, "Journal", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.SHOUT, "Journal", text);
|
||||||
for (String clanName : getRegisteredClans())
|
for (String clanName : getRegisteredClans())
|
||||||
{
|
{
|
||||||
final Clan clan = ClanTable.getInstance().getClanByName(clanName);
|
final Clan clan = ClanTable.getInstance().getClanByName(clanName);
|
||||||
@ -568,7 +569,7 @@ public class BanditStrongholdSiege extends ClanHallSiege
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 1, "Journal", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.SHOUT, "Journal", text);
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if (player.getInstanceId() == 0)
|
if (player.getInstanceId() == 0)
|
||||||
|
@ -28,6 +28,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
|||||||
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
import org.l2jmobius.gameserver.datatables.xml.DoorData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@ -540,7 +541,7 @@ public class WildBeastFarmSiege extends ClanHallSiege
|
|||||||
{
|
{
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 1, "Journal", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.SHOUT, "Journal", text);
|
||||||
for (String clanName : getRegisteredClans())
|
for (String clanName : getRegisteredClans())
|
||||||
{
|
{
|
||||||
final Clan clan = ClanTable.getInstance().getClanByName(clanName);
|
final Clan clan = ClanTable.getInstance().getClanByName(clanName);
|
||||||
@ -556,7 +557,7 @@ public class WildBeastFarmSiege extends ClanHallSiege
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final CreatureSay cs = new CreatureSay(0, 1, "Journal", text);
|
final CreatureSay cs = new CreatureSay(0, ChatType.SHOUT, "Journal", text);
|
||||||
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
for (PlayerInstance player : World.getInstance().getAllPlayers())
|
||||||
{
|
{
|
||||||
if (player.getInstanceId() == 0)
|
if (player.getInstanceId() == 0)
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 org.l2jmobius.gameserver.network;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Beetle
|
|
||||||
*/
|
|
||||||
public enum SystemChatChannelId
|
|
||||||
{
|
|
||||||
CHAT_NORMAL("ALL"), // id = 0 , white
|
|
||||||
CHAT_SHOUT("SHOUT"), // ! id = 1 , dark orange
|
|
||||||
CHAT_TELL("WHISPER"), // " id = 2, purple
|
|
||||||
CHAT_PARTY("PARTY"), // # id = 3, green
|
|
||||||
CHAT_CLAN("CLAN"), // @ id = 4, blue/purple
|
|
||||||
CHAT_SYSTEM("EMOTE"), // ( id = 5
|
|
||||||
CHAT_USER_PET("USERPET"), // * id = 6
|
|
||||||
CHAT_GM_PET("GMPET"), // * id = 7
|
|
||||||
CHAT_MARKET("TRADE"), // + id = 8 pink
|
|
||||||
CHAT_ALLIANCE("ALLIANCE"), // $ id = 9 light green
|
|
||||||
CHAT_ANNOUNCE("ANNOUNCE"), // id = 10 light cyan
|
|
||||||
CHAT_CUSTOM("CRASH"), // id = 11 --> Crashes client
|
|
||||||
CHAT_L2FRIEND("L2FRIEND"), // id = 12
|
|
||||||
CHAT_MSN("MSN"), // id = 13
|
|
||||||
CHAT_PARTY_ROOM("PARTYROOM"), // id = 14
|
|
||||||
CHAT_COMMANDER("COMMANDER"), // id = 15
|
|
||||||
CHAT_INNER_PARTYMASTER("INNERPARTYMASTER"), // id = 16
|
|
||||||
CHAT_HERO("HERO"), // % id = 17 blue
|
|
||||||
CHAT_CRITICAL_ANNOUNCE("CRITANNOUNCE"), // id = 18 dark cyan
|
|
||||||
CHAT_UNKNOWN("UNKNOWN"), // id = 19
|
|
||||||
CHAT_BATTLEFIELD("BATTLEFIELD"), // ^ id = 20
|
|
||||||
CHAT_NONE("NONE");
|
|
||||||
private String _channelName;
|
|
||||||
|
|
||||||
private SystemChatChannelId(String channelName)
|
|
||||||
{
|
|
||||||
_channelName = channelName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId()
|
|
||||||
{
|
|
||||||
return ordinal();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return _channelName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static SystemChatChannelId getChatType(int channelId)
|
|
||||||
{
|
|
||||||
for (SystemChatChannelId channel : SystemChatChannelId.values())
|
|
||||||
{
|
|
||||||
if (channel.getId() == channelId)
|
|
||||||
{
|
|
||||||
return channel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return SystemChatChannelId.CHAT_NONE;
|
|
||||||
}
|
|
||||||
}
|
|
@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.GameTimeController;
|
|||||||
import org.l2jmobius.gameserver.communitybbs.Manager.MailBBSManager;
|
import org.l2jmobius.gameserver.communitybbs.Manager.MailBBSManager;
|
||||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
import org.l2jmobius.gameserver.instancemanager.ClanHallManager;
|
||||||
@ -153,7 +154,7 @@ public class EnterWorld extends GameClientPacket
|
|||||||
notifyPartner(player);
|
notifyPartner(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterGM(player);
|
enterGM(player);
|
||||||
|
|
||||||
Quest.playerEnter(player);
|
Quest.playerEnter(player);
|
||||||
player.sendPacket(new QuestList(player));
|
player.sendPacket(new QuestList(player));
|
||||||
@ -561,7 +562,7 @@ public class EnterWorld extends GameClientPacket
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnterGM(PlayerInstance player)
|
private void enterGM(PlayerInstance player)
|
||||||
{
|
{
|
||||||
if (player.isGM())
|
if (player.isGM())
|
||||||
{
|
{
|
||||||
@ -659,8 +660,8 @@ public class EnterWorld extends GameClientPacket
|
|||||||
|
|
||||||
if (Config.PM_MESSAGE_ON_START)
|
if (Config.PM_MESSAGE_ON_START)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(2, Say2.HERO_VOICE, Config.PM_TEXT1, Config.PM_SERVER_NAME));
|
player.sendPacket(new CreatureSay(2, ChatType.HERO_VOICE, Config.PM_TEXT1, Config.PM_SERVER_NAME));
|
||||||
player.sendPacket(new CreatureSay(15, Say2.PARTYROOM_COMMANDER, player.getName(), Config.PM_TEXT2));
|
player.sendPacket(new CreatureSay(15, ChatType.PARTYROOM_COMMANDER, player.getName(), Config.PM_TEXT2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.SERVER_TIME_ON_START)
|
if (Config.SERVER_TIME_ON_START)
|
||||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.PetitionManager;
|
import org.l2jmobius.gameserver.instancemanager.PetitionManager;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@ -70,7 +71,7 @@ public class RequestPetitionCancel extends GameClientPacket
|
|||||||
|
|
||||||
// Notify all GMs that the player's pending petition has been cancelled.
|
// Notify all GMs that the player's pending petition has been cancelled.
|
||||||
final String msgContent = player.getName() + " has canceled a pending petition.";
|
final String msgContent = player.getName() + " has canceled a pending petition.";
|
||||||
AdminData.broadcastToGMs(new CreatureSay(player.getObjectId(), 17, "Petition System", msgContent));
|
AdminData.broadcastToGMs(new CreatureSay(player.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.network.clientpackets;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
@ -110,7 +111,7 @@ public class RequestPrivateStoreManageBuy extends GameClientPacket
|
|||||||
|
|
||||||
if (Config.SELL_BY_ITEM)
|
if (Config.SELL_BY_ITEM)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(0, 15, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
player.sendPacket(new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
player.setPrivateStoreType(PlayerInstance.STORE_PRIVATE_BUY + 1);
|
player.setPrivateStoreType(PlayerInstance.STORE_PRIVATE_BUY + 1);
|
||||||
|
@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.network.clientpackets;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
@ -110,7 +111,7 @@ public class RequestPrivateStoreManageSell extends GameClientPacket
|
|||||||
|
|
||||||
if (Config.SELL_BY_ITEM)
|
if (Config.SELL_BY_ITEM)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(0, 15, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
player.sendPacket(new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
player.setPrivateStoreType(PlayerInstance.STORE_PRIVATE_SELL + 1);
|
player.setPrivateStoreType(PlayerInstance.STORE_PRIVATE_SELL + 1);
|
||||||
|
@ -16,15 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.clientpackets;
|
package org.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import java.nio.BufferUnderflowException;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.LogRecord;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
|
import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
|
import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
|
||||||
import org.l2jmobius.gameserver.handler.VoicedCommandHandler;
|
import org.l2jmobius.gameserver.handler.VoicedCommandHandler;
|
||||||
import org.l2jmobius.gameserver.instancemanager.PetitionManager;
|
import org.l2jmobius.gameserver.instancemanager.PetitionManager;
|
||||||
@ -33,7 +31,6 @@ import org.l2jmobius.gameserver.model.WorldObject;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.PunishLevel;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.PunishLevel;
|
||||||
import org.l2jmobius.gameserver.network.SystemChatChannelId;
|
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
@ -41,101 +38,84 @@ import org.l2jmobius.gameserver.util.Util;
|
|||||||
|
|
||||||
public class Say2 extends GameClientPacket
|
public class Say2 extends GameClientPacket
|
||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(Say2.class.getName());
|
private static final Logger LOGGER_CHAT = Logger.getLogger("chat");
|
||||||
private static Logger _logChat = Logger.getLogger("chat");
|
|
||||||
|
|
||||||
public static final int ALL = 0;
|
private static final String[] WALKER_COMMAND_LIST =
|
||||||
public static final int SHOUT = 1; // !
|
|
||||||
public static final int TELL = 2;
|
|
||||||
public static final int PARTY = 3; // #
|
|
||||||
public static final int CLAN = 4; // @
|
|
||||||
public static final int GM = 5; // //gmchat
|
|
||||||
public static final int PETITION_PLAYER = 6; // used for petition
|
|
||||||
public static final int PETITION_GM = 7; // * used for petition
|
|
||||||
public static final int TRADE = 8; // +
|
|
||||||
public static final int ALLIANCE = 9; // $
|
|
||||||
public static final int ANNOUNCEMENT = 10; // //announce
|
|
||||||
public static final int PARTYROOM_ALL = 16; // (Red)
|
|
||||||
public static final int PARTYROOM_COMMANDER = 15; // (Yellow)
|
|
||||||
public static final int HERO_VOICE = 17; // %
|
|
||||||
public static final int CRITICAL_ANNOUNCE = 18;
|
|
||||||
|
|
||||||
private static final String[] CHAT_NAMES =
|
|
||||||
{
|
{
|
||||||
"ALL ",
|
"USESKILL",
|
||||||
"SHOUT",
|
"USEITEM",
|
||||||
"TELL ",
|
"BUYITEM",
|
||||||
"PARTY",
|
"SELLITEM",
|
||||||
"CLAN ",
|
"SAVEITEM",
|
||||||
"GM ",
|
"LOADITEM",
|
||||||
"PETITION_PLAYER",
|
"MSG",
|
||||||
"PETITION_GM",
|
"SET",
|
||||||
"TRADE",
|
"DELAY",
|
||||||
"ALLIANCE",
|
"LABEL",
|
||||||
"ANNOUNCEMENT", // 10
|
"JMP",
|
||||||
"WILLCRASHCLIENT:)",
|
"CALL",
|
||||||
"FAKEALL?",
|
"RETURN",
|
||||||
"FAKEALL?",
|
"MOVETO",
|
||||||
"FAKEALL?",
|
"NPCSEL",
|
||||||
"PARTYROOM_ALL",
|
"NPCDLG",
|
||||||
"PARTYROOM_COMMANDER",
|
"DLGSEL",
|
||||||
"CRITICAL_ANNOUNCE",
|
"CHARSTATUS",
|
||||||
"HERO_VOICE"
|
"POSOUTRANGE",
|
||||||
|
"POSINRANGE",
|
||||||
|
"GOHOME",
|
||||||
|
"SAY",
|
||||||
|
"EXIT",
|
||||||
|
"PAUSE",
|
||||||
|
"STRINDLG",
|
||||||
|
"STRNOTINDLG",
|
||||||
|
"CHANGEWAITTYPE",
|
||||||
|
"FORCEATTACK",
|
||||||
|
"ISMEMBER",
|
||||||
|
"REQUESTJOINPARTY",
|
||||||
|
"REQUESTOUTPARTY",
|
||||||
|
"QUITPARTY",
|
||||||
|
"MEMBERSTATUS",
|
||||||
|
"CHARBUFFS",
|
||||||
|
"ITEMCOUNT",
|
||||||
|
"FOLLOWTELEPORT"
|
||||||
};
|
};
|
||||||
|
|
||||||
private String _text;
|
private String _text;
|
||||||
private int _type;
|
private int _type;
|
||||||
private SystemChatChannelId _type2Check;
|
|
||||||
private String _target;
|
private String _target;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readImpl()
|
protected void readImpl()
|
||||||
{
|
{
|
||||||
_text = readS();
|
_text = readS();
|
||||||
try
|
_type = readD();
|
||||||
{
|
_target = _type == ChatType.WHISPER.getClientId() ? readS() : null;
|
||||||
_type = readD();
|
|
||||||
_type2Check = SystemChatChannelId.getChatType(_type);
|
|
||||||
}
|
|
||||||
catch (BufferUnderflowException e)
|
|
||||||
{
|
|
||||||
_type = CHAT_NAMES.length;
|
|
||||||
_type2Check = SystemChatChannelId.CHAT_NONE;
|
|
||||||
}
|
|
||||||
_target = _type == TELL ? readS() : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void runImpl()
|
protected void runImpl()
|
||||||
{
|
{
|
||||||
if ((_type < 0) || (_type >= CHAT_NAMES.length))
|
|
||||||
{
|
|
||||||
LOGGER.warning("Say2: Invalid type: " + _type);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final PlayerInstance player = getClient().getPlayer();
|
final PlayerInstance player = getClient().getPlayer();
|
||||||
|
|
||||||
// Anti-PHX Announce
|
|
||||||
if ((_type2Check == SystemChatChannelId.CHAT_NONE) || (_type2Check == SystemChatChannelId.CHAT_ANNOUNCE) || (_type2Check == SystemChatChannelId.CHAT_CRITICAL_ANNOUNCE) || (_type2Check == SystemChatChannelId.CHAT_SYSTEM) || (_type2Check == SystemChatChannelId.CHAT_CUSTOM) || ((_type2Check == SystemChatChannelId.CHAT_GM_PET) && !player.isGM()))
|
|
||||||
{
|
|
||||||
LOGGER.warning("[Anti-PHX Announce] Illegal Chat ( " + _type2Check + " ) channel was used by character: [" + player.getName() + "]");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
LOGGER.warning("[Say2.java] Active Character is null.");
|
LOGGER.warning("[Say2.java] Active Character is null.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isChatBanned() && !player.isGM() && (_type != CLAN) && (_type != ALLIANCE) && (_type != PARTY))
|
ChatType chatType = ChatType.findByClientId(_type);
|
||||||
|
if (chatType == null)
|
||||||
|
{
|
||||||
|
LOGGER.warning("Say2: Invalid type: " + _type + " Player : " + player.getName() + " text: " + _text);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.isChatBanned() && !player.isGM() && (chatType != ChatType.CLAN) && (chatType != ChatType.ALLIANCE) && (chatType != ChatType.PARTY))
|
||||||
{
|
{
|
||||||
player.sendMessage("You may not chat while a chat ban is in effect.");
|
player.sendMessage("You may not chat while a chat ban is in effect.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isInJail() && Config.JAIL_DISABLE_CHAT && ((_type == TELL) || (_type == SHOUT) || (_type == TRADE) || (_type == HERO_VOICE)))
|
if (player.isInJail() && Config.JAIL_DISABLE_CHAT && ((chatType == ChatType.WHISPER) || (chatType == ChatType.SHOUT) || (chatType == ChatType.TRADE) || (chatType == ChatType.HERO_VOICE)))
|
||||||
{
|
{
|
||||||
player.sendMessage("You can not chat with players outside of the jail.");
|
player.sendMessage("You can not chat with players outside of the jail.");
|
||||||
return;
|
return;
|
||||||
@ -147,15 +127,15 @@ public class Say2 extends GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.isCursedWeaponEquiped() && ((_type == TRADE) || (_type == SHOUT)))
|
if (player.isCursedWeaponEquiped() && ((chatType == ChatType.TRADE) || (chatType == ChatType.SHOUT)))
|
||||||
{
|
{
|
||||||
player.sendMessage("Shout and trade chatting cannot be used while possessing a cursed weapon.");
|
player.sendMessage("Shout and trade chatting cannot be used while possessing a cursed weapon.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((_type == PETITION_PLAYER) && player.isGM())
|
if ((chatType == ChatType.PETITION_PLAYER) && player.isGM())
|
||||||
{
|
{
|
||||||
_type = PETITION_GM;
|
chatType = ChatType.PETITION_GM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_text.length() > Config.MAX_CHAT_LENGTH)
|
if (_text.length() > Config.MAX_CHAT_LENGTH)
|
||||||
@ -166,30 +146,17 @@ public class Say2 extends GameClientPacket
|
|||||||
|
|
||||||
if (Config.LOG_CHAT)
|
if (Config.LOG_CHAT)
|
||||||
{
|
{
|
||||||
final LogRecord record = new LogRecord(Level.INFO, _text);
|
if (chatType == ChatType.WHISPER)
|
||||||
record.setLoggerName("chat");
|
|
||||||
|
|
||||||
if (_type == TELL)
|
|
||||||
{
|
{
|
||||||
record.setParameters(new Object[]
|
LOGGER_CHAT.info(chatType.name() + " [" + player + " to " + _target + "] " + _text);
|
||||||
{
|
|
||||||
CHAT_NAMES[_type],
|
|
||||||
"[" + player.getName() + " to " + _target + "]"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
record.setParameters(new Object[]
|
LOGGER_CHAT.info(chatType.name() + " [" + player + "] " + _text);
|
||||||
{
|
|
||||||
CHAT_NAMES[_type],
|
|
||||||
"[" + player.getName() + "]"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_logChat.log(record);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.L2WALKER_PROTECTION && (_type == TELL) && checkBot(_text))
|
if (Config.L2WALKER_PROTECTION && (chatType == ChatType.WHISPER) && checkBot(_text))
|
||||||
{
|
{
|
||||||
Util.handleIllegalPlayerAction(player, "Client Emulator Detect: Player " + player.getName() + " using l2walker.", Config.DEFAULT_PUNISH);
|
Util.handleIllegalPlayerAction(player, "Client Emulator Detect: Player " + player.getName() + " using l2walker.", Config.DEFAULT_PUNISH);
|
||||||
return;
|
return;
|
||||||
@ -210,7 +177,7 @@ public class Say2 extends GameClientPacket
|
|||||||
_type = 0;
|
_type = 0;
|
||||||
final Collection<WorldObject> list = saymode.getKnownList().getKnownObjects().values();
|
final Collection<WorldObject> list = saymode.getKnownList().getKnownObjects().values();
|
||||||
|
|
||||||
final CreatureSay cs = new CreatureSay(actor, _type, name, _text);
|
final CreatureSay cs = new CreatureSay(actor, chatType, name, _text);
|
||||||
for (WorldObject obj : list)
|
for (WorldObject obj : list)
|
||||||
{
|
{
|
||||||
if (!(obj instanceof Creature))
|
if (!(obj instanceof Creature))
|
||||||
@ -223,10 +190,10 @@ public class Say2 extends GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final CreatureSay cs = new CreatureSay(player.getObjectId(), _type, player.getName(), _text);
|
final CreatureSay cs = new CreatureSay(player.getObjectId(), chatType, player.getName(), _text);
|
||||||
switch (_type)
|
switch (chatType)
|
||||||
{
|
{
|
||||||
case TELL:
|
case WHISPER:
|
||||||
{
|
{
|
||||||
final PlayerInstance receiver = World.getInstance().getPlayer(_target);
|
final PlayerInstance receiver = World.getInstance().getPlayer(_target);
|
||||||
if (receiver == null)
|
if (receiver == null)
|
||||||
@ -256,7 +223,7 @@ public class Say2 extends GameClientPacket
|
|||||||
if (!receiver.isInRefusalMode())
|
if (!receiver.isInRefusalMode())
|
||||||
{
|
{
|
||||||
receiver.sendPacket(cs);
|
receiver.sendPacket(cs);
|
||||||
player.sendPacket(new CreatureSay(player.getObjectId(), _type, "->" + receiver.getName(), _text));
|
player.sendPacket(new CreatureSay(player.getObjectId(), chatType, "->" + receiver.getName(), _text));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -440,7 +407,7 @@ public class Say2 extends GameClientPacket
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ALL:
|
case GENERAL:
|
||||||
{
|
{
|
||||||
if (_text.startsWith("."))
|
if (_text.startsWith("."))
|
||||||
{
|
{
|
||||||
@ -568,46 +535,6 @@ public class Say2 extends GameClientPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] WALKER_COMMAND_LIST =
|
|
||||||
{
|
|
||||||
"USESKILL",
|
|
||||||
"USEITEM",
|
|
||||||
"BUYITEM",
|
|
||||||
"SELLITEM",
|
|
||||||
"SAVEITEM",
|
|
||||||
"LOADITEM",
|
|
||||||
"MSG",
|
|
||||||
"SET",
|
|
||||||
"DELAY",
|
|
||||||
"LABEL",
|
|
||||||
"JMP",
|
|
||||||
"CALL",
|
|
||||||
"RETURN",
|
|
||||||
"MOVETO",
|
|
||||||
"NPCSEL",
|
|
||||||
"NPCDLG",
|
|
||||||
"DLGSEL",
|
|
||||||
"CHARSTATUS",
|
|
||||||
"POSOUTRANGE",
|
|
||||||
"POSINRANGE",
|
|
||||||
"GOHOME",
|
|
||||||
"SAY",
|
|
||||||
"EXIT",
|
|
||||||
"PAUSE",
|
|
||||||
"STRINDLG",
|
|
||||||
"STRNOTINDLG",
|
|
||||||
"CHANGEWAITTYPE",
|
|
||||||
"FORCEATTACK",
|
|
||||||
"ISMEMBER",
|
|
||||||
"REQUESTJOINPARTY",
|
|
||||||
"REQUESTOUTPARTY",
|
|
||||||
"QUITPARTY",
|
|
||||||
"MEMBERSTATUS",
|
|
||||||
"CHARBUFFS",
|
|
||||||
"ITEMCOUNT",
|
|
||||||
"FOLLOWTELEPORT"
|
|
||||||
};
|
|
||||||
|
|
||||||
private boolean checkBot(String text)
|
private boolean checkBot(String text)
|
||||||
{
|
{
|
||||||
for (String botCommand : WALKER_COMMAND_LIST)
|
for (String botCommand : WALKER_COMMAND_LIST)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,20 +25,20 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|||||||
public class CreatureSay extends GameServerPacket
|
public class CreatureSay extends GameServerPacket
|
||||||
{
|
{
|
||||||
private final int _objectId;
|
private final int _objectId;
|
||||||
private final int _textType;
|
private final ChatType _chatType;
|
||||||
private final String _charName;
|
private final String _charName;
|
||||||
private final String _text;
|
private final String _text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param objectId
|
* @param objectId
|
||||||
* @param messageType
|
* @param chatType
|
||||||
* @param charName
|
* @param charName
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
public CreatureSay(int objectId, int messageType, String charName, String text)
|
public CreatureSay(int objectId, ChatType chatType, String charName, String text)
|
||||||
{
|
{
|
||||||
_objectId = objectId;
|
_objectId = objectId;
|
||||||
_textType = messageType;
|
_chatType = chatType;
|
||||||
_charName = charName;
|
_charName = charName;
|
||||||
_text = text;
|
_text = text;
|
||||||
}
|
}
|
||||||
@ -47,14 +48,14 @@ public class CreatureSay extends GameServerPacket
|
|||||||
{
|
{
|
||||||
writeC(0x4a);
|
writeC(0x4a);
|
||||||
writeD(_objectId);
|
writeD(_objectId);
|
||||||
writeD(_textType);
|
writeD(_chatType.getClientId());
|
||||||
writeS(_charName);
|
writeS(_charName);
|
||||||
writeS(_text);
|
writeS(_text);
|
||||||
|
|
||||||
final PlayerInstance player = getClient().getPlayer();
|
final PlayerInstance player = getClient().getPlayer();
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
player.broadcastSnoop(_textType, _charName, _text, this);
|
player.broadcastSnoop(_chatType, _charName, _text, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.TradeList;
|
import org.l2jmobius.gameserver.model.TradeList;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ public class PrivateStoreListBuy extends GameServerPacket
|
|||||||
|
|
||||||
if (Config.SELL_BY_ITEM)
|
if (Config.SELL_BY_ITEM)
|
||||||
{
|
{
|
||||||
_player.sendPacket(new CreatureSay(0, 15, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
_player.sendPacket(new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
||||||
_playerAdena = _player.getItemCount(Config.SELL_ITEM, -1);
|
_playerAdena = _player.getItemCount(Config.SELL_ITEM, -1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.TradeList;
|
import org.l2jmobius.gameserver.model.TradeList;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ public class PrivateStoreListSell extends GameServerPacket
|
|||||||
|
|
||||||
if (Config.SELL_BY_ITEM)
|
if (Config.SELL_BY_ITEM)
|
||||||
{
|
{
|
||||||
_player.sendPacket(new CreatureSay(0, 15, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
_player.sendPacket(new CreatureSay(0, ChatType.PARTYROOM_COMMANDER, "", "ATTENTION: Store System is not based on Adena, be careful!"));
|
||||||
_playerAdena = _player.getItemCount(Config.SELL_ITEM, -1);
|
_playerAdena = _player.getItemCount(Config.SELL_ITEM, -1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -16,31 +16,27 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CDSDDSS -> (0xd5)(objId)(name)(0x00)(type)(speaker)(name)
|
* CDSDDSS -> (0xd5)(objId)(name)(0x00)(type)(speaker)(name)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Snoop extends GameServerPacket
|
public class Snoop extends GameServerPacket
|
||||||
{
|
{
|
||||||
private final PlayerInstance _snooped;
|
private final PlayerInstance _snooped;
|
||||||
private final int _type;
|
private final ChatType _type;
|
||||||
private final String _speaker;
|
private final String _speaker;
|
||||||
private final String _msg;
|
private final String _msg;
|
||||||
|
|
||||||
public Snoop(PlayerInstance snooped, int type, String speaker, String msg)
|
public Snoop(PlayerInstance snooped, ChatType _chatType, String speaker, String msg)
|
||||||
{
|
{
|
||||||
_snooped = snooped;
|
_snooped = snooped;
|
||||||
_type = type;
|
_type = _chatType;
|
||||||
_speaker = speaker;
|
_speaker = speaker;
|
||||||
_msg = msg;
|
_msg = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#writeImpl()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void writeImpl()
|
protected void writeImpl()
|
||||||
{
|
{
|
||||||
@ -48,7 +44,7 @@ public class Snoop extends GameServerPacket
|
|||||||
writeD(_snooped.getObjectId());
|
writeD(_snooped.getObjectId());
|
||||||
writeS(_snooped.getName());
|
writeS(_snooped.getName());
|
||||||
writeD(0); // ??
|
writeD(0); // ??
|
||||||
writeD(_type);
|
writeD(_type.getClientId());
|
||||||
writeS(_speaker);
|
writeS(_speaker);
|
||||||
writeS(_msg);
|
writeS(_msg);
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ import org.l2jmobius.commons.util.LimitLinesDocumentListener;
|
|||||||
import org.l2jmobius.commons.util.SplashScreen;
|
import org.l2jmobius.commons.util.SplashScreen;
|
||||||
import org.l2jmobius.gameserver.Shutdown;
|
import org.l2jmobius.gameserver.Shutdown;
|
||||||
import org.l2jmobius.gameserver.cache.HtmCache;
|
import org.l2jmobius.gameserver.cache.HtmCache;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.multisell.Multisell;
|
import org.l2jmobius.gameserver.model.multisell.Multisell;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.util.Broadcast;
|
import org.l2jmobius.gameserver.util.Broadcast;
|
||||||
import org.l2jmobius.gameserver.util.Util;
|
import org.l2jmobius.gameserver.util.Util;
|
||||||
@ -209,7 +209,7 @@ public class Gui
|
|||||||
final String message = ((String) input).trim();
|
final String message = ((String) input).trim();
|
||||||
if (!message.isEmpty())
|
if (!message.isEmpty())
|
||||||
{
|
{
|
||||||
Broadcast.toAllOnlinePlayers(new CreatureSay(-1, Say2.ANNOUNCEMENT, "", message));
|
Broadcast.toAllOnlinePlayers(new CreatureSay(-1, ChatType.ANNOUNCEMENT, "", message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -225,7 +225,7 @@ public class Gui
|
|||||||
final String message = ((String) input).trim();
|
final String message = ((String) input).trim();
|
||||||
if (!message.isEmpty())
|
if (!message.isEmpty())
|
||||||
{
|
{
|
||||||
Broadcast.toAllOnlinePlayers(new CreatureSay(-1, Say2.CRITICAL_ANNOUNCE, "", message));
|
Broadcast.toAllOnlinePlayers(new CreatureSay(-1, ChatType.CRITICAL_ANNOUNCE, "", message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
package org.l2jmobius.gameserver.util;
|
package org.l2jmobius.gameserver.util;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ public class BuilderUtil
|
|||||||
{
|
{
|
||||||
if (Config.GM_STARTUP_BUILDER_HIDE)
|
if (Config.GM_STARTUP_BUILDER_HIDE)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(0, Say2.ALL, "SYS", message));
|
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "SYS", message));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ public class BuilderUtil
|
|||||||
*/
|
*/
|
||||||
public static void sendHtmlMessage(PlayerInstance player, String message)
|
public static void sendHtmlMessage(PlayerInstance player, String message)
|
||||||
{
|
{
|
||||||
player.sendPacket(new CreatureSay(0, Say2.ALL, "HTML", message));
|
player.sendPacket(new CreatureSay(0, ChatType.GENERAL, "HTML", message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,6 +58,7 @@ import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
|||||||
import org.l2jmobius.gameserver.datatables.sql.TeleportLocationTable;
|
import org.l2jmobius.gameserver.datatables.sql.TeleportLocationTable;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
||||||
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
||||||
|
import org.l2jmobius.gameserver.enums.ChatType;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.RaidBossSpawnManager;
|
||||||
@ -75,7 +76,6 @@ import org.l2jmobius.gameserver.model.entity.Announcements;
|
|||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.model.multisell.Multisell;
|
import org.l2jmobius.gameserver.model.multisell.Multisell;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.Say2;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
@ -335,7 +335,7 @@ public class GameStatusThread extends Thread
|
|||||||
final String name = st.nextToken();
|
final String name = st.nextToken();
|
||||||
final String message = val.substring(name.length() + 1);
|
final String message = val.substring(name.length() + 1);
|
||||||
final PlayerInstance reciever = World.getInstance().getPlayer(name);
|
final PlayerInstance reciever = World.getInstance().getPlayer(name);
|
||||||
final CreatureSay cs = new CreatureSay(0, Say2.TELL, "Telnet Priv", message);
|
final CreatureSay cs = new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", message);
|
||||||
if (reciever != null)
|
if (reciever != null)
|
||||||
{
|
{
|
||||||
reciever.sendPacket(cs);
|
reciever.sendPacket(cs);
|
||||||
@ -357,7 +357,7 @@ public class GameStatusThread extends Thread
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
usrCommand = usrCommand.substring(7);
|
usrCommand = usrCommand.substring(7);
|
||||||
final CreatureSay cs = new CreatureSay(0, Say2.ALLIANCE, "Telnet GM Broadcast from " + _cSocket.getInetAddress().getHostAddress(), usrCommand);
|
final CreatureSay cs = new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast from " + _cSocket.getInetAddress().getHostAddress(), usrCommand);
|
||||||
AdminData.broadcastToGMs(cs);
|
AdminData.broadcastToGMs(cs);
|
||||||
_print.println("Your Message Has Been Sent To " + getOnlineGMs() + " GM(s).");
|
_print.println("Your Message Has Been Sent To " + getOnlineGMs() + " GM(s).");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user