Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage2


      if (_oldOwner != newOwner)
      {
        newOwner.broadcastToOnlineMembers(PlaySound.SIEGE_VICTORY);
        newOwner.incReputation(1700, false, toString());
      }
      broadcastTo(new SystemMessage2(SystemMsg.S1_CLAN_HAS_DEFEATED_S2).addString(newOwner.getName()).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
      broadcastTo(new SystemMessage2(SystemMsg.THE_SIEGE_OF_S1_IS_FINISHED).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
    }
    else
    {
      broadcastTo(new SystemMessage2(SystemMsg.THE_PRELIMINARY_MATCH_OF_S1_HAS_ENDED_IN_A_DRAW).addResidenceName(getResidence()), ATTACKERS);
    }
    updateParticles(false, ATTACKERS, DEFENDERS);
    removeObjects(DEFENDERS);
    removeObjects(ATTACKERS);
    super.stopEvent(step);
View Full Code Here


      }
    }
    Player player = (Player) activeChar;
    if (player.getClan() == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    FortressSiegeEvent siegeEvent = player.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (player.isMounted())
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    ItemAttachment attach = player.getActiveWeaponFlagAttachment();
    if (!(attach instanceof FortressCombatFlagObject) || (((FortressCombatFlagObject) attach).getEvent() != siegeEvent))
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (!player.isInRangeZ(target, getCastRange()))
    {
      player.sendPacket(SystemMsg.YOUR_TARGET_IS_OUT_OF_RANGE);
      return false;
    }
    if (first)
    {
      siegeEvent.broadcastTo(new SystemMessage2(SystemMsg.S1_CLAN_IS_TRYING_TO_DISPLAY_A_FLAG).addString(player.getClan().getName()), SiegeEvent.DEFENDERS);
    }
    return true;
  }
View Full Code Here

      return false;
    }
    Player player = (Player) activeChar;
    if ((player.getClan() == null) || !player.isClanLeader())
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    CastleSiegeEvent siegeEvent = player.getEvent(CastleSiegeEvent.class);
    if (siegeEvent == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, player.getClan()) == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (player.isMounted())
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (!player.isInRangeZ(target, 185))
    {
      player.sendPacket(SystemMsg.YOUR_TARGET_IS_OUT_OF_RANGE);
View Full Code Here

        }
        Player player = (Player) activeChar;
        CastleSiegeEvent siegeEvent = player.getEvent(CastleSiegeEvent.class);
        if (siegeEvent != null)
        {
          siegeEvent.broadcastTo(new SystemMessage2(SystemMsg.CLAN_S1_HAS_SUCCESSFULLY_ENGRAVED_THE_HOLY_ARTIFACT).addString(player.getClan().getName()), SiegeEvent.ATTACKERS, SiegeEvent.DEFENDERS);
          siegeEvent.takeCastle(player.getClan(), _side); //processStep(player.getClan());
        }
      }
    }
  }
View Full Code Here

    {
      player.sendPacket(notValidMessage());
      return false;
    }
   
    return addMember0(player, new SystemMessage2(enterMessage()).addName(player));
  }
View Full Code Here

    }
    else
    {
      L2GameServerPacket infoPacket = infoRoomPacket();
      SystemMsg exitMessage0 = exitMessage(true, oust);
      L2GameServerPacket exitMessage = exitMessage0 != null ? new SystemMessage2(exitMessage0).addName(member) : null;
      for (Player player : this)
      {
        player.sendPacket(infoPacket, removeMemberPacket(player, member), exitMessage);
      }
    }
View Full Code Here

  protected IStaticPacket canDuel0(Player requestor, Player target)
  {
    IStaticPacket packet = null;
    if (target.isInCombat())
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_BATTLE).addName(target);
    }
    else if (target.isDead() || target.isAlikeDead() || (target.getCurrentHpPercents() < 50) || (target.getCurrentMpPercents() < 50) || (target.getCurrentCpPercents() < 50))
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1S_HP_OR_MP_IS_BELOW_50).addName(target);
    }
    else if (target.getEvent(DuelEvent.class) != null)
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_ALREADY_ENGAGED_IN_A_DUEL).addName(target);
    }
    else if ((target.getEvent(ClanHallSiegeEvent.class) != null) || (target.getEvent(ClanHallNpcSiegeEvent.class) != null))
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_A_CLAN_HALL_WAR).addName(target);
    }
    else if (target.getEvent(SiegeEvent.class) != null)
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_A_SIEGE_WAR).addName(target);
    }
    else if (target.isInOlympiadMode())
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_PARTICIPATING_IN_THE_OLYMPIAD).addName(target);
    }
    else if (target.isCursedWeaponEquipped() || (target.isChaotic()) || (target.getPvpFlag() > 0))
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_IN_A_CHAOTIC_STATE).addName(target);
    }
    else if (target.isInStoreMode())
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_ENGAGED_IN_A_PRIVATE_STORE_OR_MANUFACTURE).addName(target);
    }
    else if (target.isMounted() || target.isInBoat())
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_RIDING_A_BOAT_STEED_OR_STRIDER).addName(target);
    }
    else if (target.isFishing())
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_FISHING).addName(target);
    }
    else if (target.isInCombatZone() || target.isInPeaceZone() || target.isInWater() || target.isInZone(Zone.ZoneType.no_restart))
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_MAKE_A_CHALLENGE_TO_A_DUEL_BECAUSE_C1_IS_CURRENTLY_IN_A_DUELPROHIBITED_AREA_PEACEFUL_ZONE__SEVEN_SIGNS_ZONE__NEAR_WATER__RESTART_PROHIBITED_AREA).addName(target);
    }
    else if (!requestor.isInRangeZ(target, 1200))
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_RECEIVE_A_DUEL_CHALLENGE_BECAUSE_C1_IS_TOO_FAR_AWAY).addName(target);
    }
    else if (target.getTransformation() != 0)
    {
      packet = new SystemMessage2(SystemMsg.C1_CANNOT_DUEL_BECAUSE_C1_IS_CURRENTLY_POLYMORPHED).addName(target);
    }
    return packet;
  }
View Full Code Here

   * @param i int
   */
  @Override
  public void announce(int i)
  {
    sendPacket(new SystemMessage2(SystemMsg.THE_DUEL_WILL_BEGIN_IN_S1_SECONDS).addInteger(i));
  }
View Full Code Here

    boolean res = _condition.test(env);
    if (!res && (_condition.getSystemMsg() != null))
    {
      if (_condition.getSystemMsg().size() > 0)
      {
        player.sendPacket(new SystemMessage2(_condition.getSystemMsg()).addItemName(getItemId()));
      }
      else
      {
        player.sendPacket(_condition.getSystemMsg());
      }
View Full Code Here

    Clan oldOwner = getResidence().getOwner();
    AuctionSiegeClanObject winnerSiegeClan = clans.length > 0 ? clans[0] : null;
   
    if (winnerSiegeClan != null)
    {
      SystemMessage2 msg = new SystemMessage2(SystemMsg.THE_CLAN_HALL_WHICH_WAS_PUT_UP_FOR_AUCTION_HAS_BEEN_AWARDED_TO_S1_CLAN).addString(winnerSiegeClan.getClan().getName());
      for (AuctionSiegeClanObject $siegeClan : siegeClanObjects)
      {
        Player player = $siegeClan.getClan().getLeader().getPlayer();
        if (player != null)
        {
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.SystemMessage2

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.