All pastes #510457 Raw Edit

Kingdom of Kings

public java v1 · immutable
·published 2007-05-25 22:13 UTC
rendered paste body
{                    // 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);                }