Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.sendPacket()


              }
              else {
                activeChar.sendMessage("You failed to open Altar Entrance.");
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13));
            PlaySound playSound = new PlaySound("interfacesound.system_close_01");
            activeChar.sendPacket(playSound);
              }
            }
      else{
        activeChar.sendMessage("Incorrect Door.");
      }
View Full Code Here


              }
              else {
                activeChar.sendMessage("You failed to open Door of Darkness.");
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13));
            PlaySound playSound = new PlaySound("interfacesound.system_close_01");
            activeChar.sendPacket(playSound);
              }
            }
      else{
        activeChar.sendMessage("Incorrect Door.");
      }
View Full Code Here

      return;

    if (activeChar.isAllSkillsDisabled())
    {
            ActionFailed af = new ActionFailed();
            activeChar.sendPacket(af);
      return;
    }

    switch (itemId) {
    case 5235:
View Full Code Here

        {
          systemMessage = new SystemMessage(SystemMessageId.EARNED_ITEM);
          systemMessage.addItemName(reward[0]);
        }

        playerInstance.sendPacket(systemMessage);
      }

      StatusUpdate statusUpdate = new StatusUpdate(playerInstance.getObjectId());

      statusUpdate.addAttribute(StatusUpdate.CUR_LOAD, playerInstance.getCurrentLoad());
View Full Code Here

      }

      StatusUpdate statusUpdate = new StatusUpdate(playerInstance.getObjectId());

      statusUpdate.addAttribute(StatusUpdate.CUR_LOAD, playerInstance.getCurrentLoad());
      playerInstance.sendPacket(statusUpdate);

      NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(0);

      npcHtmlMessage.setHtml("<html><head><title>TvT Event</title></head><body>Your team won the event. Look in your inventory, there should be your reward.</body></html>");
      playerInstance.sendPacket(npcHtmlMessage);
View Full Code Here

        // You cannot do anything else while fishing
        if (activeChar.isFishing())
        {
            SystemMessage sm = new SystemMessage(SystemMessageId.CANNOT_DO_WHILE_FISHING_3);
            activeChar.sendPacket(sm);
            sm = null;
            return;
        }

        // check if its the actionId is allowed
View Full Code Here

      playerInstance.sendPacket(statusUpdate);

      NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(0);

      npcHtmlMessage.setHtml("<html><head><title>TvT Event</title></head><body>Your team won the event. Look in your inventory, there should be your reward.</body></html>");
      playerInstance.sendPacket(npcHtmlMessage);
    }

    return "TvT Event: Event finish. Team " + team.getName() + " won with " + team.getPoints() + " kills.";
  }
View Full Code Here

     if (!(activeChar instanceof L2PcInstance)) return; // currently not implemented for others
     L2PcInstance activePlayer = (L2PcInstance)activeChar;

     if (activePlayer.isInOlympiadMode())
     {
       activePlayer.sendPacket(new SystemMessage(SystemMessageId.THIS_ITEM_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT));
       return;
        }

     // Checks summoner not in arenas, siege zones, jail
         if (activePlayer.isInsideZone(L2Character.ZONE_PVP))
View Full Code Here

        }

     // Checks summoner not in arenas, siege zones, jail
         if (activePlayer.isInsideZone(L2Character.ZONE_PVP))
         {
           activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_SUMMON_IN_COMBAT));
          return;
        }

        // check for summoner not in raid areas
         FastList<L2Object> objects = L2World.getInstance().getVisibleObjects(activeChar, 5000);
View Full Code Here

        {
          for (L2Object object : objects)
          {
            if (object instanceof L2RaidBossInstance)
            {
              activePlayer.sendPacket(new SystemMessage(SystemMessageId.YOU_MAY_NOT_SUMMON_FROM_YOUR_CURRENT_LOCATION));
                    return;
            }
          }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.