Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.CommandChannel


        }
        if (!haveSkill && !haveItem)
        {
          return;
        }
        CommandChannel channel = new CommandChannel(requestor);
        requestor.sendPacket(Msg.THE_COMMAND_CHANNEL_HAS_BEEN_FORMED);
        channel.addParty(activeChar.getParty());
      }
    }
    finally
    {
      request.done();
View Full Code Here


      if (player.getParty().getCommandChannel().getChannelLeader() != player)
      {
        player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Stone Coffin:<br><br>You are not leader or the Command Channel."));
        return;
      }
      CommandChannel channel = player.getParty().getCommandChannel();
      Functions.addItem(player, RING, 1);
      SystemMessage smsg = new SystemMessage(SystemMessage.S1_HAS_OBTAINED_S2);
      smsg.addString(player.getName());
      smsg.addItemName(RING);
      channel.broadCast(smsg);
      BelethManager.setRingAvailable(false);
      deleteMe();
    }
    else
    {
View Full Code Here

    if ((ccleader.getParty() == null) || !ccleader.getParty().isInCommandChannel())
    {
      ccleader.sendPacket(Msg.YOU_CANNOT_ENTER_BECAUSE_YOU_ARE_NOT_IN_A_CURRENT_COMMAND_CHANNEL);
      return;
    }
    CommandChannel cc = ccleader.getParty().getCommandChannel();
    if (cc.getChannelLeader() != ccleader)
    {
      ccleader.sendPacket(Msg.ONLY_THE_ALLIANCE_CHANNEL_LEADER_CAN_ATTEMPT_ENTRY);
      return;
    }
    if (cc.getMemberCount() > 200)
    {
      ccleader.sendMessage("The maximum of 200 players can invade the Valakas Nest");
      return;
    }
    if (_state.getState() != EpicBossState.State.NOTSPAWN)
View Full Code Here

    if ((ccleader.getParty() == null) || !ccleader.getParty().isInCommandChannel())
    {
      ccleader.sendPacket(Msg.YOU_CANNOT_ENTER_BECAUSE_YOU_ARE_NOT_IN_A_CURRENT_COMMAND_CHANNEL);
      return;
    }
    final CommandChannel cc = ccleader.getParty().getCommandChannel();
    if (!cc.getChannelLeader().equals(ccleader))
    {
      ccleader.sendPacket(Msg.ONLY_THE_ALLIANCE_CHANNEL_LEADER_CAN_ATTEMPT_ENTRY);
      return;
    }
    if (cc.getMemberCount() > 200)
    {
      ccleader.sendMessage("The maximum of 200 players can invade the Antharas Nest");
      return;
    }
    if (_state.getState() != EpicBossState.State.NOTSPAWN)
View Full Code Here

    if (player == null)
    {
      return;
    }
    Party party = player.getParty();
    CommandChannel channel = party != null ? party.getCommandChannel() : null;
    if ((channel != null) && (channel.getChannelLeader() == player))
    {
      if (channel.getMatchingRoom() == null)
      {
        CCMatchingRoom room = new CCMatchingRoom(player, 1, player.getLevel(), 50, party.getLootDistribution(), player.getName());
        channel.setMatchingRoom(room);
      }
    }
    else if ((channel != null) && !channel.getParties().contains(party))
    {
      player.sendPacket(SystemMsg.THE_COMMAND_CHANNEL_AFFILIATED_PARTYS_PARTY_MEMBER_CANNOT_USE_THE_MATCHING_SCREEN);
    }
    else if ((party != null) && !party.isLeader(player))
    {
View Full Code Here

          member.teleToLocation(iz.getTeleportCoord(), r);
        }
        break;
      case COMMAND_CHANNEL:
        Party commparty = invoker.getParty();
        CommandChannel cc = commparty.getCommandChannel();
        cc.setReflection(r);
        r.setCommandChannel(cc);
        for (Player member : cc)
        {
          if (iz.getRemovedItemId() > 0)
          {
View Full Code Here

    {
      teleportHome();
      return false;
    }
    clearTasks();
    Creature target = prepareTarget();
    if (target == null)
    {
      return false;
    }
    if (!BaiumManager.getZone().checkIfInZone(target))
View Full Code Here

      kama.addKilledKanabion(type);
      spawnPossible = kama.isSpawnPossible();
    }
    if (spawnPossible && (nextId > 0))
    {
      Creature player = null;
      if (!killer.isPlayer())
      {
        for (Player pl : World.getAroundPlayers(actor))
        {
          player = pl;
View Full Code Here

  {
    if (param.length < 4)
    {
      throw new IllegalArgumentException();
    }
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    final long price = Long.parseLong(param[param.length - 1]);
    if (!NpcInstance.canBypassCheck(player, player.getLastNpc()))
    {
      return;
    }
    if ((price > 0) && (player.getAdena() < price))
    {
      player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
      return;
    }
    if (player.getMountType() == 2)
    {
      player.sendMessage("Телепортаци�? верхом на виверне невозможна.");
      return;
    }
    if (player.getLastNpc() != null)
    {
      final int npcId = player.getLastNpc().getNpcId();
      switch (npcId)
      {
        case 30483:
          if (player.getLevel() >= Config.CRUMA_GATEKEEPER_LVL)
          {
            show("teleporter/30483-no.htm", player);
            return;
          }
          break;
        case 32864:
        case 32865:
        case 32866:
        case 32867:
        case 32868:
        case 32869:
        case 32870:
          if (player.getLevel() < 80)
          {
            show("teleporter/" + npcId + "-no.htm", player);
            return;
          }
          break;
      }
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final int castleId = (param.length > 4) ? Integer.parseInt(param[3]) : 0;
    if (player.getReflection().isDefault())
    {
      final Castle castle = (castleId > 0) ? ResidenceHolder.getInstance().getResidence(Castle.class, castleId) : null;
      if ((castle != null) && castle.getSiegeEvent().isInProgress())
      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
  }
View Full Code Here

  {
    if (param.length < 5)
    {
      throw new IllegalArgumentException();
    }
    final Player player = getSelf();
    if (player == null)
    {
      return;
    }
    final long count = Long.parseLong(param[3]);
    final int item = Integer.parseInt(param[4]);
    if (!NpcInstance.canBypassCheck(player, player.getLastNpc()))
    {
      return;
    }
    if (count > 0)
    {
      if (!player.getInventory().destroyItemByItemId(item, count))
      {
        player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_REQUIRED_ITEMS);
        return;
      }
      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.CommandChannel

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.