Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.ActionFailed


                    // player.startAttack(this);
                }
                else
                {
                    // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
                    player.sendPacket(new ActionFailed());
                }
            }
            else if(!isAutoAttackable(player))
            {
                // Calculate the distance between the L2PcInstance and the L2NpcInstance
                if (!canInteract(player))
                {
                    // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
                    player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
                }
                else
                {
                    // 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(isEventMob){ L2Event.showEventHtml(player, String.valueOf(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);
                    }
                }
            }
            else
                player.sendPacket(new ActionFailed());
        }
    }
View Full Code Here


            html.setHtml(html1.toString());
            player.sendPacket(html);
        }

        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

    {
        //if (canInteract(player))
        {
            if (isBusy() && getBusyMessage().length()>0)
            {
                player.sendPacket( new ActionFailed() );

                NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
                html.setFile("data/html/npcbusy.htm");
                html.replace("%busymessage%", getBusyMessage());
                html.replace("%npcname%", getName());
View Full Code Here

        // Send a Server->Client packet NpcHtmlMessage to the L2PcInstance in order to display the message of the L2NpcInstance
        if (content != null)
            insertObjectIdAndShowChatWindow(player, content);
       
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket( new ActionFailed() );
    }
View Full Code Here

              continue;

          _target = (L2MonsterInstance) targetList[0];

          if (_target.isSeeded()) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          if ( _target.isDead()) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          if (_target.getSeeder() != _activeChar) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          _seedId = _target.getSeedType();
          if (_seedId == 0) {
            _activeChar.sendPacket(new ActionFailed());
              continue;
          }

          L2ItemInstance item = _activeChar.getInventory().getItemByItemId(_seedId);
          //Consuming used seed
View Full Code Here

        html.replace("%prize2%", "" + Config.ALT_LOTTERY_2_AND_1_NUMBER_PRIZE);
        html.replace("%enddate%", "" + DateFormat.getDateInstance().format(Lottery.getInstance().getEndDate()));
        player.sendPacket(html);
            
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

      if (html != null)
      {
        NpcHtmlMessage pkDenyMsg = new NpcHtmlMessage(getObjectId());
        pkDenyMsg.setHtml(html);
        player.sendPacket(pkDenyMsg);
        player.sendPacket(new ActionFailed());
        return true;
      }

      return false;
    }
View Full Code Here

        html.replace("%objectId%", String.valueOf(getObjectId()));
        html.replace("%festivalMins%", SevenSignsFestival.getInstance().getTimeToNextFestivalStr());       
        player.sendPacket(html);
       
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket( new ActionFailed() );
    }
View Full Code Here

        html.setFile(filename);
        html.replace("%objectId%",String.valueOf(getObjectId()));
        player.sendPacket(html);
       
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket( new ActionFailed() );
    }
View Full Code Here

            {
                showMessageWindow(player);
            }
        }
        // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
        player.sendPacket(new ActionFailed());
    }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.ActionFailed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.