{ // Send a Server->Client packet SocialAction to the all L2PcInstance on the _knownPlayer of the L2NpcInstance // to display a social action of the L2NpcInstance on their client SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8)); broadcastPacket(sa); // Open a chat window on client with the text of the L2NpcInstance if (this.isEventMob) L2Event.showEventHtml(player, String.valueOf(this.getObjectId())); else if (_isEventMobTvT) TvT.showEventHtml(player, String.valueOf(this.getObjectId())); else if (_isEventMobCTF) CTF.showEventHtml(player, String.valueOf(this.getObjectId())); else if (this._isEventVIPNPC) VIP.showJoinHTML(player, String.valueOf(this.getObjectId())); else if (this._isEventVIPNPCEnd) VIP.showEndHTML(player, String.valueOf(this.getObjectId())); else { Quest[] qlst = getTemplate().getEventQuests(Quest.QuestEventType.NPC_FIRST_TALK); if ( (qlst != null) && qlst.length == 1) qlst[0].notifyFirstTalk(this, player); else showChatWindow(player, 0); } // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(new ActionFailed()); // player.setCurrentState(L2Character.STATE_IDLE); }