Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.L2NpcTemplate


      NamedNodeMap attrs;
      int type;
      int roomId;
      int mobId, delay, count;
      L2Spawn spawnDat;
      L2NpcTemplate template;
      Location tele = new Location();
      int xMin = 0, xMax = 0, yMin = 0, yMax = 0, zMin = 0, zMax = 0;
      boolean isBossRoom;
      for(Node rift = doc.getFirstChild(); rift != null; rift = rift.getNextSibling())
      {
View Full Code Here


  private static final int DESPAWN_TIME = 600000; //10 min

  public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
  {
    L2Player activeChar = (L2Player) playable;
    L2NpcTemplate template = null;
    int itemId = item.getItemId();
    for(int i = 0; i < _itemIds.length; i++)
    {
      if(_itemIds[i] == itemId)
      {
View Full Code Here

    if(activeChar.isInZone(ZoneType.OlympiadStadia))
    {
      activeChar.sendMessage("Нельзя взращивать тыкву на стадионе");
      return;
    }
    L2NpcTemplate template = null;
    int itemId = item.getItemId();
    for(int i = 0; i < _itemIds.length; i++)
    {
      if(_itemIds[i] == itemId)
      {
View Full Code Here

    _stage = 2;
  }

  private static void spawn(int id, GArray<Location> points)
  {
    L2NpcTemplate template = NpcTable.getTemplate(id);
    L2MonsterInstance monster = new L2MonsterInstance(IdFactory.getInstance().getNextId(), template);
    monster.setCurrentHpMp(monster.getMaxHp(), monster.getMaxMp(), true);
    monster.setXYZ(points.get(0).x, points.get(0).y, points.get(0).z);
    MonstersAI ai = new MonstersAI(monster);
    monster.setAI(ai);
View Full Code Here

    L2NpcInstance target = L2ObjectsStorage.getByNpcId(Gilmore);
    if(target != null)
    {
      oldGilmore = target.getStoredId();
      target.decayMe();
      L2NpcTemplate template = NpcTable.getTemplate(Gilmore);
      L2MonsterInstance monster = new L2MonsterInstance(IdFactory.getInstance().getNextId(), template);
      monster.setCurrentHpMp(monster.getMaxHp(), monster.getMaxMp(), true);
      monster.setXYZ(73329, 117705, -3741);
      GilmoreAI ai = new GilmoreAI(monster);
      monster.setAI(ai);
View Full Code Here

      loc = ((L2Player) _effected).getGroundSkillLoc();
      ((L2Player) _effected).setGroundSkillLoc(null);
    }
    _territory = new L2RoundTerritoryWithSkill(_effected.getObjectId(), loc.x, loc.y, _skill.getSkillRadius(), loc.z - 200, loc.z + 200, _effector, skill);
    L2World.addTerritory(_territory);
    L2NpcTemplate template = NpcTable.getTemplate(_skill.getSymbolId());
    try
    {
      L2Spawn spawn = new L2Spawn(template);
      spawn.setLoc(loc);
      spawn.setReflection(_effected.getReflection().getId());
View Full Code Here

   * Спавнит эвент менеджеров
   */
  private void spawnEventManagers()
  {
    final int EVENT_MANAGERS[][] = {{82545, 148600, -3505, -3395}};
    L2NpcTemplate template = NpcTable.getTemplate(32130);
    for(int[] element : EVENT_MANAGERS)
    {
      try
      {
        L2Spawn sp = new L2Spawn(template);
View Full Code Here

    for(int i = 0; i < 20 && !GeoEngine.canSeeCoord(rewarded, spawnLoc.x, spawnLoc.y, spawnLoc.z, false); i++)
    {
      spawnLoc = Location.getAroundPosition(rewarded, rewarded, 300, 400, 10);
    }
    // Спауним
    L2NpcTemplate template = NpcTable.getTemplate(EVENT_REWARDER_ID);
    if(template == null)
    {
      System.out.println("WARNING! events.SavingSnowman.spawnRewarder template is null for npc: " + EVENT_REWARDER_ID);
      Thread.dumpStack();
      return;
View Full Code Here

      player.sendPacket(new SystemMessage(SystemMessage.S2_S1).addZoneName(spawnPoint).addString("Ищите Снеговика в "));
      // Убираем и ставим флажок на карте и стрелку на компасе
      player.sendPacket(new RadarControl(2, 2, spawnPoint), new RadarControl(0, 1, spawnPoint));
    }
    // Спауним снеговика
    L2NpcTemplate template = NpcTable.getTemplate(SNOWMAN_ID);
    if(template == null)
    {
      System.out.println("WARNING! events.SavingSnowman.captureSnowman template is null for npc: " + SNOWMAN_ID);
      Thread.dumpStack();
      return;
View Full Code Here

        }
        if(activeChar.getPet() != null || activeChar.isMounted())
        {
          return;
        }
        L2NpcTemplate summonTemplate = NpcTable.getTemplate(getNpcId());
        if(summonTemplate == null)
        {
          System.out.println("Null summon template for skill " + this);
          return;
        }
        L2SummonInstance summon = new L2SummonInstance(IdFactory.getInstance().getNextId(), summonTemplate, activeChar, _lifeTime, _itemConsumeIdInTime, _itemConsumeCountInTime, _itemConsumeDelay);
        summon.setTitle(activeChar.getName());
        summon.setExpPenalty(_expPenalty);
        summon.setExp(Experience.LEVEL[Math.min(summon.getLevel(), Experience.LEVEL.length - 1)]);
        summon.setCurrentHp(summon.getMaxHp(), false);
        summon.setCurrentMp(summon.getMaxMp());
        summon.setHeading(activeChar.getHeading());
        summon.setRunning();
        activeChar.setPet(summon);
        summon.spawnMe(loc == null ? GeoEngine.findPointToStay(activeChar.getX(), activeChar.getY(), activeChar.getZ(), 100, 150, activeChar.getReflection().getGeoIndex()) : loc);
        if(summon.getSkillLevel(4140) > 0)
        {
          summon.altUseSkill(SkillTable.getInstance().getInfo(4140, summon.getSkillLevel(4140)), activeChar);
        }
        if(summon.getName().equalsIgnoreCase("Shadow"))
        {
          summon.addStatFunc(new FuncAdd(Stats.ABSORB_DAMAGE_PERCENT, 0x40, this, 15));
        }
        summon.setFollowStatus(true, true);
        break;
      case DECOY:
        if(activeChar.getPet() != null || activeChar.isMounted())
        {
          return;
        }
        L2NpcTemplate DecoyTemplate = NpcTable.getTemplate(getNpcId());
        L2DecoyInstance decoy = new L2DecoyInstance(IdFactory.getInstance().getNextId(), DecoyTemplate, activeChar, _lifeTime);
        decoy.setCurrentHp(decoy.getMaxHp(), false);
        decoy.setCurrentMp(decoy.getMaxMp());
        decoy.setHeading(activeChar.getHeading());
        decoy.setReflection(activeChar.getReflection());
        activeChar.setDecoy(decoy);
        decoy.spawnMe(activeChar.getLoc());
        break;
      case MERCHANT:
        if(activeChar.getPet() != null || activeChar.isMounted())
        {
          return;
        }
        L2NpcTemplate merchantTemplate = NpcTable.getTemplate(getNpcId());
        L2MerchantInstance merchant = new L2MerchantInstance(IdFactory.getInstance().getNextId(), merchantTemplate);
        merchant.setCurrentHp(merchant.getMaxHp(), false);
        merchant.setCurrentMp(merchant.getMaxMp());
        merchant.setHeading(activeChar.getHeading());
        merchant.setReflection(activeChar.getReflection());
View Full Code Here

TOP

Related Classes of l2p.gameserver.templates.L2NpcTemplate

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.