Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage2


      return;
    }
    if (_response == 0)
    {
      request.cancel();
      requestor.sendPacket(new SystemMessage2(SystemMsg.C1_HAS_DENIED_YOUR_REQUEST_TO_TRADE).addString(activeChar.getName()));
      return;
    }
    if (!activeChar.isInRangeZ(requestor, Creature.INTERACTION_DISTANCE))
    {
      request.cancel();
      activeChar.sendPacket(SystemMsg.YOUR_TARGET_IS_OUT_OF_RANGE);
      return;
    }
    if (requestor.isActionsDisabled())
    {
      request.cancel();
      activeChar.sendPacket(new SystemMessage2(SystemMsg.C1_IS_ON_ANOTHER_TASK).addString(requestor.getName()));
      activeChar.sendActionFailed();
      return;
    }
    try
    {
      new Request(L2RequestType.TRADE, activeChar, requestor);
      requestor.setTradeList(new CopyOnWriteArrayList<TradeItem>());
      requestor.sendPacket(new SystemMessage2(SystemMsg.YOU_BEGIN_TRADING_WITH_C1).addString(activeChar.getName()), new TradeStart(requestor, activeChar));
      activeChar.setTradeList(new CopyOnWriteArrayList<TradeItem>());
      activeChar.sendPacket(new SystemMessage2(SystemMsg.YOU_BEGIN_TRADING_WITH_C1).addString(requestor.getName()), new TradeStart(activeChar, requestor));
    }
    finally
    {
      request.done();
    }
View Full Code Here


      case MULTI_SERVITOR:
      case SIEGE_SUMMON:
      case TREE:
        if (player.isMounted() || !player.getSummonList().canSummon(_summonType, _summonPoint))
        {
          player.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        break;
      case AGATHION:
        if ((player.getAgathionId() > 0) && (_npcId != 0))
View Full Code Here

    if ((objectId > 0) && notify)
    {
      Player otherSideMentee = World.getPlayer(name);
      if (otherSideMentee != null)
      {
        otherSideMentee.sendPacket(new SystemMessage2(SystemMsg.THE_MENTORING_RELATIONSHIP_WITH_S1_HAS_BEEN_CANCELED).addString(isMentor ? _owner.getName() : name ));
      }
      _owner.sendPacket(new SystemMessage2(SystemMsg.THE_MENTORING_RELATIONSHIP_WITH_S1_HAS_BEEN_CANCELED).addString(isMentor ? name : _owner.getName()));
    }
  }
View Full Code Here

          continue;
        }
        thisMentee.update(_owner, login);
        if (login)
        {
          menteePlayer.sendPacket(new SystemMessage2(mentee.isMentor() ? SystemMsg.YOU_MENTEE_S1_HAS_CONNECTED : SystemMsg.YOU_MENTOR_S1_HAS_CONNECTED).addString(_owner.getName()));
        }
        else
        {
          menteePlayer.sendPacket(new SystemMessage2(mentee.isMentor() ? SystemMsg.YOU_MENTEE_S1_HAS_DISCONNECTED : SystemMsg.YOU_MENTOR_S1_HAS_DISCONNECTED).addString(_owner.getName()));
        }
        mentee.update(menteePlayer, login);
        menteePlayer.sendPacket(new ExMentorList(menteePlayer));
      }
    }
View Full Code Here

    startCollapseTimer(15 * 60 * 1000L);
    if(win)
      setReenterTime(System.currentTimeMillis());
    for(Player p : getPlayers())
    {
      p.sendPacket(new SystemMessage2(SystemMsg.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addInteger(15));
      p.sendPacket(new ExShowScreenMessage(win ? NpcString.CONGRATULATIONS_YOU_HAVE_SUCCEEDED_AT_S1_S2_THE_INSTANCE_WILL_SHORTLY_EXPIRE : NpcString.YOU_HAVE_FAILED_AT_S1_S2, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HALL_OF_EROSION.getId(), "#" + NpcString.ATTACK.getId()));
    }
    for(NpcInstance npc : getNpcs())
      if(npc.getNpcId() == AliveTumor || npc.getNpcId() == DeadTumor)
        npc.deleteMe();
View Full Code Here

      case OUTPOST:
      case NORMAL:
      case ADVANCED:
        if (player.isInZone(Zone.ZoneType.RESIDENCE))
        {
          player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        SiegeEvent<?, ?> siegeEvent = activeChar.getEvent(SiegeEvent.class);
        if (siegeEvent == null)
        {
          player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        boolean inZone = false;
        List<ZoneObject> zones = siegeEvent.getObjects(SiegeEvent.FLAG_ZONES);
        for (ZoneObject zone : zones)
        {
          if (player.isInZone(zone.getZone()))
          {
            inZone = true;
          }
        }
        if (!inZone)
        {
          player.sendPacket(SystemMsg.YOU_CANNOT_SET_UP_A_BASE_HERE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        SiegeClanObject siegeClan = siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, player.getClan());
        if (siegeClan == null)
        {
          player.sendPacket(SystemMsg.YOU_CANNOT_SUMMON_THE_ENCAMPMENT_BECAUSE_YOU_ARE_NOT_A_MEMBER_OF_THE_SIEGE_CLAN_INVOLVED_IN_THE_CASTLE__FORTRESS__HIDEOUT_SIEGE, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        if (siegeClan.getFlag() != null)
        {
          player.sendPacket(SystemMsg.AN_OUTPOST_OR_HEADQUARTERS_CANNOT_BE_BUILT_BECAUSE_ONE_ALREADY_EXISTS, new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
          return false;
        }
        break;
    }
    return true;
View Full Code Here

        player.sendPacket(SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
        return;
      }
      player.reduceAdena(neededmoney, true);
      player.setCurrentCp(player.getMaxCp());
      player.sendPacket(new SystemMessage2(SystemMsg.S1_CP_HAS_BEEN_RESTORED).addName(player));
    }
    else if (command.equals("HPRecovery"))
    {
      if (player.isCursedWeaponEquipped() || player.isInZone(Zone.ZoneType.battle_zone))
      {
        return;
      }
      int neededmoney = 1000;
      long currentmoney = player.getAdena();
      if (neededmoney > currentmoney)
      {
        player.sendPacket(SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
        return;
      }
      player.reduceAdena(neededmoney, true);
      player.setCurrentHp(player.getMaxHp(), false);
      player.sendPacket(new SystemMessage2(SystemMsg.S1_HP_HAS_BEEN_RESTORED).addName(player));
    }
    else
    {
      super.onBypassFeedback(player, command);
    }
View Full Code Here

        getDoor(DoorOutside).openMe();
        getDoor(DoorInside).openMe();
      }else if (self.isNpc() && self.getNpcId() == RB1 && self.getNpcId() == RB2) {
      for (Player p : getPlayers()){
        p.sendPacket(new ExSendUIEvent(p, 1, 1, 0, 0));
        p.sendPacket(new SystemMessage2(SystemMsg.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addInteger(5));}
        startCollapseTimer(5 * 60 * 1000L)
        addSpawnWithoutRespawn(Exchanger, RB2Loc, 0);
      }
    }
View Full Code Here

    startCollapseTimer(15 * 60 * 1000L);
    if(win)
      setReenterTime(System.currentTimeMillis());
    for(Player p : getPlayers())
    {
      p.sendPacket(new SystemMessage2(SystemMsg.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addInteger(15));
      p.sendPacket(new ExShowScreenMessage(win ? NpcString.CONGRATULATIONS_YOU_HAVE_SUCCEEDED_AT_S1_S2_THE_INSTANCE_WILL_SHORTLY_EXPIRE : NpcString.YOU_HAVE_FAILED_AT_S1_S2, 8000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_CENTER, false, 1, -1, false, "#" + NpcString.HEART_OF_IMMORTALITY.getId(), "#" + NpcString.ATTACK.getId()));
      p.showQuestMovie(win ? ExStartScenePlayer.SCENE_ECHMUS_SUCCESS : ExStartScenePlayer.SCENE_ECHMUS_FAIL);
    }
    for(NpcInstance npc : getNpcs())
      if(npc.getNpcId() == AliveTumor || npc.getNpcId() == DeadTumor || npc.getNpcId() == RegenerationCoffin)
View Full Code Here

    {
      startCollapseTimer(300000L);
      doCleanup();
      for (Player p : getPlayers())
      {
        p.sendPacket(new SystemMessage2(SystemMsg.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addInteger(5.0D));
      }
    }
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.