Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage2


  @Override
  public void stopEvent(boolean step)
  {
    spawnAction(COMBAT_FLAGS, false);
    updateParticles(false, ATTACKERS, DEFENDERS);
    broadcastTo(new SystemMessage2(SystemMsg.THE_FORTRESS_BATTLE_OF_S1_HAS_FINISHED).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
    Clan ownerClan = getResidence().getOwner();
    if (ownerClan != null)
    {
      if (_oldOwner != ownerClan)
      {
        ownerClan.broadcastToOnlineMembers(PlaySound.SIEGE_VICTORY);
        ownerClan.incReputation(1700, false, toString());
        broadcastTo(new SystemMessage2(SystemMsg.S1_IS_VICTORIOUS_IN_THE_FORTRESS_BATTLE_OF_S2).addString(ownerClan.getName()).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
        getResidence().getOwnDate().setTimeInMillis(System.currentTimeMillis());
        getResidence().startCycleTask();
        spawnEnvoy();
      }
    }
View Full Code Here


   * @param val int
   */
  @Override
  public void announce(int val)
  {
    SystemMessage2 msg;
    int min = val / 60;
    if (min > 0)
    {
      msg = new SystemMessage2(SystemMsg.S1_MINUTES_UNTIL_THE_FORTRESS_BATTLE_STARTS).addInteger(min);
    }
    else
    {
      msg = new SystemMessage2(SystemMsg.S1_SECONDS_UNTIL_THE_FORTRESS_BATTLE_STARTS).addInteger(val);
    }
    broadcastTo(msg, ATTACKERS, DEFENDERS);
  }
View Full Code Here

          SiegeClanDAO.getInstance().update(getResidence(), siegeClan);
        }
      }
      siegeClans.clear();
      broadcastTo(SystemMsg.THIS_CLAN_HALL_WAR_HAS_BEEN_CANCELLED, ATTACKERS);
      broadcastInZone2(new SystemMessage2(SystemMsg.THE_SIEGE_OF_S1_HAS_ENDED_IN_A_DRAW).addResidenceName(getResidence()));
      reCalcNextTime(false);
      return;
    }
    CMGSiegeClanObject[] clans = siegeClans.toArray(new CMGSiegeClanObject[siegeClans.size()]);
    Arrays.sort(clans, SiegeClanObject.SiegeClanComparatorImpl.getInstance());
View Full Code Here

      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_SIEGE_OF_S1_HAS_ENDED_IN_A_DRAW).addResidenceName(getResidence()), ATTACKERS);
    }
    updateParticles(false, ATTACKERS);
    removeObjects(ATTACKERS);
    super.stopEvent(step);
    _oldOwner = null;
View Full Code Here

    {
      spawnAction("arena_" + i, true);
    }
    _arenaClosed = true;
    updateParticles(true, ATTACKERS);
    broadcastTo(new SystemMessage2(SystemMsg.THE_SIEGE_TO_CONQUER_S1_HAS_BEGUN).addResidenceName(getResidence()), ATTACKERS);
  }
View Full Code Here

    int seconds = val % 60;
    int min = val / 60;
    if (min > 0)
    {
      SystemMsg msg = min > 10 ? SystemMsg.IN_S1_MINUTES_THE_GAME_WILL_BEGIN_ALL_PLAYERS_MUST_HURRY_AND_MOVE_TO_THE_LEFT_SIDE_OF_THE_CLAN_HALLS_ARENA : SystemMsg.IN_S1_MINUTES_THE_GAME_WILL_BEGIN_ALL_PLAYERS_PLEASE_ENTER_THE_ARENA_NOW;
      broadcastTo(new SystemMessage2(msg).addInteger(min), ATTACKERS);
    }
    else
    {
      broadcastTo(new SystemMessage2(SystemMsg.IN_S1_SECONDS_THE_GAME_WILL_BEGIN).addInteger(seconds), ATTACKERS);
    }
  }
View Full Code Here

      return;
    }
    member.setPlayerInstance(activeChar, false);
    int sponsor = activeChar.getSponsor();
    int apprentice = activeChar.getApprentice();
    L2GameServerPacket msg = new SystemMessage2(SystemMsg.CLAN_MEMBER_S1_HAS_LOGGED_INTO_GAME).addName(activeChar);
    PledgeShowMemberListUpdate memberUpdate = new PledgeShowMemberListUpdate(activeChar);
    for (Player clanMember : clan.getOnlineMembers(activeChar.getObjectId()))
    {
      clanMember.sendPacket(memberUpdate);
      if (clanMember.getObjectId() == sponsor)
      {
        clanMember.sendPacket(new SystemMessage2(SystemMsg.YOUR_APPRENTICE_C1_HAS_LOGGED_OUT).addName(activeChar));
      }
      else if (clanMember.getObjectId() == apprentice)
      {
        clanMember.sendPacket(new SystemMessage2(SystemMsg.YOUR_SPONSOR_C1_HAS_LOGGED_IN).addName(activeChar));
      }
      else
      {
        clanMember.sendPacket(msg);
      }
    }
    activeChar.getClan().startNotifyClanEnterWorld(activeChar);
    if (!activeChar.isClanLeader())
    {
      return;
    }
    ClanHall clanHall = clan.getHasHideout() > 0 ? ResidenceHolder.getInstance().getResidence(ClanHall.class, clan.getHasHideout()) : null;
    if ((clanHall == null) || (clanHall.getAuctionLength() != 0))
    {
      return;
    }
    if (clanHall.getSiegeEvent().getClass() != ClanHallAuctionEvent.class)
    {
      return;
    }
    if (clan.getWarehouse().getCountOf(ItemTemplate.ITEM_ID_ADENA) < clanHall.getRentalFee())
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_ME_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW).addLong(clanHall.getRentalFee()));
    }
  }
View Full Code Here

  public void announce(int a)
  {
    IStaticPacket p = null;
    if (a > 0)
    {
      p = new SystemMessage2(SystemMsg.S1_SECONDS_TO_GAME_END).addInteger(a);
    }
    else
    {
      p = new SystemMessage2(SystemMsg.THE_MATCH_WILL_START_IN_S1_SECONDS).addInteger(-a);
    }
   
    List<KrateisCubePlayerObject> players = getObjects(PARTICLE_PLAYERS);
    for (KrateisCubePlayerObject $player : players)
    {
View Full Code Here

    List<CTBSiegeClanObject> attackers = getObjects(ATTACKERS);
    if (attackers.isEmpty())
    {
      if (_oldOwner == null)
      {
        broadcastInZone2(new SystemMessage2(SystemMsg.THE_SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST).addResidenceName(getResidence()));
      }
      else
      {
        broadcastInZone2(new SystemMessage2(SystemMsg.S1S_SIEGE_WAS_CANCELED_BECAUSE_THERE_WERE_NO_CLANS_THAT_PARTICIPATED).addResidenceName(getResidence()));
      }
      reCalcNextTime(false);
      return;
    }
    if (_oldOwner != null)
    {
      addObject(DEFENDERS, new SiegeClanObject(DEFENDERS, _oldOwner, 0));
    }
    SiegeClanDAO.getInstance().delete(getResidence());
    SiegePlayerDAO.getInstance().delete(getResidence());
    List<CTBTeamObject> teams = getObjects(TRYOUT_PART);
    for (int i = 0; i < 5; i++)
    {
      CTBTeamObject team = teams.get(i);
      team.setSiegeClan(CollectionUtils.safeGet(attackers, i));
    }
    broadcastTo(new SystemMessage2(SystemMsg.THE_SIEGE_TO_CONQUER_S1_HAS_BEGUN).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
    broadcastTo(SystemMsg.THE_TRYOUTS_ARE_ABOUT_TO_BEGIN, ATTACKERS);
    super.startEvent();
  }
View Full Code Here

  public void announce(int val)
  {
    int minute = val / 60;
    if (minute > 0)
    {
      broadcastTo(new SystemMessage2(SystemMsg.THE_CONTEST_WILL_BEGIN_IN_S1_MINUTES).addInteger(minute), ATTACKERS, DEFENDERS);
    }
    else
    {
      broadcastTo(new SystemMessage2(SystemMsg.THE_PRELIMINARY_MATCH_WILL_BEGIN_IN_S1_SECONDS).addInteger(val), ATTACKERS, DEFENDERS);
    }
  }
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.