id = _command.substring(4);
}
try
{
L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if(_command.substring(endOfId + 1).startsWith("event_participate"))
{
L2Event.inscribePlayer(activeChar);
}
else if(_command.substring(endOfId + 1).startsWith("tvt_player_join "))
{
String teamName = _command.substring(endOfId + 1).substring(16);
if(TvT.is_joining())
{
TvT.addPlayer(activeChar, teamName);
}
else
{
activeChar.sendMessage("The event is already started. You can not join now!");
}
}
else if(_command.substring(endOfId + 1).startsWith("tvt_player_leave"))
{
if(TvT.is_joining())
{
TvT.removePlayer(activeChar);
}
else
{
activeChar.sendMessage("The event is already started. You can not leave now!");
}
}
else if(_command.substring(endOfId+1).startsWith("dmevent_player_join"))
{
if(DM.is_joining())
DM.addPlayer(activeChar);
else
activeChar.sendMessage("The event is already started. You can't join now!");
}
else if(_command.substring(endOfId+1).startsWith("dmevent_player_leave"))
{
if(DM.is_joining())
DM.removePlayer(activeChar);
else
activeChar.sendMessage("The event is already started. You can't leave now!");
}
else if (_command.substring(endOfId+1).startsWith("raid_player_join"))
{
if (Raid._joining)
Raid.addPlayer(activeChar);
else
activeChar.sendMessage("The event has already started. You cant join now!");
}
else if (_command.substring(endOfId+1).startsWith("raid_player_leave"))
{
if (Raid._joining)
Raid.removePlayer(activeChar);
else
activeChar.sendMessage("The event has already started. You cant leave now!");
}
else if(_command.substring(endOfId+1).startsWith("ctf_player_join "))
{
String teamName = _command.substring(endOfId+1).substring(16);
if(CTF.is_joining())
CTF.addPlayer(activeChar, teamName);
else
activeChar.sendMessage("The event is already started. You can't join now!");
}
else if(_command.substring(endOfId+1).startsWith("ctf_player_leave"))
{
if(CTF.is_joining())
CTF.removePlayer(activeChar);
else
activeChar.sendMessage("The event is already started. You can't leave now!");
}
if(_command.substring(endOfId+1).startsWith("vip_joinVIPTeam"))
{
VIP.addPlayerVIP(activeChar);
}
if(_command.substring(endOfId+1).startsWith("vip_joinNotVIPTeam"))
{
VIP.addPlayerNotVIP(activeChar);
}
if(_command.substring(endOfId+1).startsWith("vip_finishVIP"))
{
VIP.vipWin(activeChar);
}
if(_command.substring(endOfId+1).startsWith("event_participate"))
{
L2Event.inscribePlayer(activeChar);
}
else if((Config.ALLOW_CLASS_MASTERS && Config.ALLOW_REMOTE_CLASS_MASTERS && object instanceof L2ClassMasterInstance)
|| (object instanceof L2NpcInstance && endOfId > 0 && activeChar.isInsideRadius(object, L2NpcInstance.INTERACTION_DISTANCE, false, false)))
{
((L2NpcInstance) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}
catch(NumberFormatException nfe)
{
if(Config.ENABLE_ALL_EXCEPTIONS)
nfe.printStackTrace();
}
}
// Draw a Symbol
else if(_command.equals("Draw"))
{
L2Object object = activeChar.getTarget();
if(object instanceof L2NpcInstance)
{
((L2SymbolMakerInstance) object).onBypassFeedback(activeChar, _command);
}
}
else if(_command.equals("RemoveList"))
{
L2Object object = activeChar.getTarget();
if(object instanceof L2NpcInstance)
{
((L2SymbolMakerInstance) object).onBypassFeedback(activeChar, _command);
}
}
else if(_command.equals("Remove "))
{
L2Object object = activeChar.getTarget();
if(object instanceof L2NpcInstance)
{
((L2SymbolMakerInstance) object).onBypassFeedback(activeChar, _command);
}
}
// Navigate throught Manor windows
else if(_command.startsWith("manor_menu_select?"))
{
L2Object object = activeChar.getTarget();
if(object instanceof L2NpcInstance)
{
((L2NpcInstance) object).onBypassFeedback(activeChar, _command);
}
}