Package lineage2.gameserver.network.serverpackets.components

Examples of lineage2.gameserver.network.serverpackets.components.CustomMessage


        activeChar.sendPacket(SystemMsg.YOU_CANNOT_TELEPORT_WHILE_IN_POSSESSION_OF_A_WARD);
        return false;
      }
      if (p.isInDuel() || (p.getTeam() != TeamType.NONE))
      {
        activeChar.sendMessage(new CustomMessage("common.RecallInDuel", p));
        return false;
      }
      if (p.isInOlympiadMode())
      {
        activeChar.sendPacket(Msg.THIS_SKILL_IS_NOT_AVAILABLE_FOR_THE_OLYMPIAD_EVENT);
        return false;
      }
    }
    if (activeChar.isInZone(Zone.ZoneType.no_escape) && (activeChar.getReflection() != null) && (activeChar.getReflection().getCoreLoc() != null))
    {
      if (activeChar.isPlayer())
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.skills.skillclasses.Recall.Here", (Player) activeChar));
      }
      return false;
    }
    return super.checkCondition(activeChar, target, forceUse, dontMove, first);
  }
View Full Code Here


   * @param player Player
   * @return Map.Entry<String,String>
   */
  public Map.Entry<String, String> toString(Player player)
  {
    CustomMessage message = null;
    switch (_id)
    {
      case ACTION_RAID_KILLED:
        message = new CustomMessage("lineage2.gameserver.model.entity.Hero.RaidBossKilled", player).addString(HtmlUtils.htmlNpcName(_param));
        break;
      case ACTION_HERO_GAINED:
        message = new CustomMessage("lineage2.gameserver.model.entity.Hero.HeroGained", player);
        break;
      case ACTION_CASTLE_TAKEN:
        message = new CustomMessage("lineage2.gameserver.model.entity.Hero.CastleTaken", player).addString(HtmlUtils.htmlResidenceName(_param));
        break;
      default:
        return null;
    }
    return new AbstractMap.SimpleEntry<>(SIMPLE_FORMAT.format(_time), message.toString());
  }
View Full Code Here

        {
          SuccessRate = 1;
        }
        if (player.isGM())
        {
          player.sendMessage(new CustomMessage("lineage2.gameserver.skills.skillclasses.Harvesting.Chance", player).addNumber((long) SuccessRate));
        }
        if (!Rnd.chance(SuccessRate))
        {
          activeChar.sendPacket(Msg.THE_HARVEST_HAS_FAILED);
          monster.clearHarvest();
View Full Code Here

          Player owner = target.getPlayer();
          if (owner != null)
          {
            if (activeChar == target)
            {
              owner.sendMessage(new CustomMessage("YOU_HAVE_RESTORED_S1_HP_OF_YOUR_PET", owner, new Object[0]).addNumber(Math.round(addToHp)));
            }
            else if (owner == activeChar)
            {
              owner.sendMessage(new CustomMessage("YOU_HAVE_RESTORED_S1_HP_OF_YOUR_PET", owner, new Object[0]).addNumber(Math.round(addToHp)));
            }
            else
            {
              owner.sendMessage(new CustomMessage("S1_HAS_BEEN_RESTORED_S2_HP_OF_YOUR_PET", owner, new Object[0]).addString(activeChar.getName()).addNumber(Math.round(addToHp)));
            }
          }
        }
        getEffects(activeChar, target, getActivateRate() > 0, false);
      }
View Full Code Here

      DoorInstance door = targetDoorObject.getDoor();
      int upgradeHp = (door.getMaxHp() - door.getUpgradeHp()) * level - door.getMaxHp();

      if(price == 0 || upgradeHp < 0)
      {
        player.sendMessage(new CustomMessage("common.Error", player));
        return;
      }

      if(door.getUpgradeHp() >= upgradeHp)
      {
View Full Code Here

  @Override
  public void onBypassCommand(Player player, String bypass)
  {
    if (!Config.ALLOW_COMMUNITYBOARD_IN_COMBAT && player.isInCombat())
    {
      player.sendMessage(new CustomMessage("scripts.services.community.CommunityBoard.NotUse", player));
      return;
    }
    StringTokenizer st = new StringTokenizer(bypass, "_");
    String cmd = st.nextToken();
    String html = "";
View Full Code Here

      DoorInstance door = targetDoorObject.getDoor();
      int upgradeHp = (door.getMaxHp() - door.getUpgradeHp()) * level - door.getMaxHp();

      if(price == 0 || upgradeHp < 0)
      {
        player.sendMessage(new CustomMessage("common.Error", player));
        return;
      }

      if(door.getUpgradeHp() >= upgradeHp)
      {
View Full Code Here

        if (fisher.getName().equalsIgnoreCase(pl.getName()))
        {
          if (fisher.getLength() < len)
          {
            fisher.setLength(len);
            pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.ResultImproveOn", pl));
            recalculateMinLength();
          }
          return;
        }
      }
      _tmpPlayers.add(new Fisher(pl.getName(), len, 0));
      pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.YouInAPrizeList", pl));
      recalculateMinLength();
    }
    else if (_minFishLength < len)
    {
      for (Fisher fisher : _tmpPlayers)
      {
        if (fisher.getName().equalsIgnoreCase(pl.getName()))
        {
          if (fisher.getLength() < len)
          {
            fisher.setLength(len);
            pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.ResultImproveOn", pl));
            recalculateMinLength();
          }
          return;
        }
      }
      Fisher minFisher = null;
      double minLen = 99999.;
      for (Fisher fisher : _tmpPlayers)
      {
        if (fisher.getLength() < minLen)
        {
          minFisher = fisher;
          minLen = minFisher.getLength();
        }
      }
      _tmpPlayers.remove(minFisher);
      _tmpPlayers.add(new Fisher(pl.getName(), len, 0));
      pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.YouInAPrizeList", pl));
      recalculateMinLength();
    }
  }
View Full Code Here

    {
      return;
    }
    String append = "!Rename";
    append += "<br>";
    append += "<font color=\"LEVEL\">" + new CustomMessage("scripts.services.Rename.RenameFor", getSelf()).addString(Util.formatAdena(Config.SERVICES_CHANGE_NICK_PRICE)).addItemName(Config.SERVICES_CHANGE_NICK_ITEM) + "</font>";
    append += "<table>";
    append += "<tr><td>" + new CustomMessage("scripts.services.Rename.NewName", getSelf()) + " <edit var=\"new_name\" width=80></td></tr>";
    append += "<tr><td></td></tr>";
    append += "<tr><td><button value=\"" + new CustomMessage("scripts.services.Rename.RenameButton", getSelf()) + "\" action=\"bypass -h scripts_services.Rename:rename $new_name\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>";
    append += "</table>";
    show(append, player);
  }
View Full Code Here

      show("You must be in peace zone to use this service.", player);
      return;
    }
    String append = "!Change Character Sex";
    append += "<br>";
    append += "<font color=\"LEVEL\">" + new CustomMessage("scripts.services.SexChange.SexChangeFor", player).addString(Util.formatAdena(Config.SERVICES_CHANGE_SEX_PRICE)).addItemName(Config.SERVICES_CHANGE_SEX_ITEM) + "</font>";
    append += "<table>";
    append += "<tr><td><button value=\"" + new CustomMessage("scripts.services.SexChange.Button", player) + "\" action=\"bypass -h scripts_services.Rename:changesex\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>";
    append += "</table>";
    show(append, player);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.components.CustomMessage

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.