Package lineage2.gameserver.templates

Examples of lineage2.gameserver.templates.CubicTemplate$SkillInfo


    {
      return;
    }
    if (!Config.ALT_ALLOW_SHADOW_WEAPONS)
    {
      show(new CustomMessage("common.Disabled", player), player);
      return;
    }
    if ((player.getLevel() > 39) || (player.getClassLevel() > 2))
    {
      show("Your level is too high!", player);
View Full Code Here


      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
    }
    else
    {
      _log.info("Telnet server is currently disabled.");
    }
View Full Code Here

      _selectorThreads[i].start();
    }
    LoginServerCommunication.getInstance().start();
    if (Config.SERVICES_OFFLINE_TRADE_RESTORE_AFTER_RESTART)
    {
      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
View Full Code Here

    {
      Element cubicElement = (Element) iterator.next();
      int id = Integer.parseInt(cubicElement.attributeValue("id"));
      int level = Integer.parseInt(cubicElement.attributeValue("level"));
      int delay = Integer.parseInt(cubicElement.attributeValue("delay"));
      CubicTemplate template = new CubicTemplate(id, level, delay);
      getHolder().addCubicTemplate(template);
      for (Iterator<?> skillsIterator = cubicElement.elementIterator(); skillsIterator.hasNext();)
      {
        Element skillsElement = (Element) skillsIterator.next();
        int chance = Integer.parseInt(skillsElement.attributeValue("chance"));
        List<CubicTemplate.SkillInfo> skills = new ArrayList<>(1);
        for (Iterator<?> skillIterator = skillsElement.elementIterator(); skillIterator.hasNext();)
        {
          Element skillElement = (Element) skillIterator.next();
          int id2 = Integer.parseInt(skillElement.attributeValue("id"));
          int level2 = Integer.parseInt(skillElement.attributeValue("level"));
          int chance2 = skillElement.attributeValue("chance") == null ? 0 : Integer.parseInt(skillElement.attributeValue("chance"));
          boolean canAttackDoor = Boolean.parseBoolean(skillElement.attributeValue("can_attack_door"));
          CubicTemplate.ActionType type = CubicTemplate.ActionType.valueOf(skillElement.attributeValue("action_type"));
          TIntIntHashMap set = new TIntIntHashMap();
          for (Iterator<?> chanceIterator = skillElement.elementIterator(); chanceIterator.hasNext();)
          {
            Element chanceElement = (Element) chanceIterator.next();
            int min = Integer.parseInt(chanceElement.attributeValue("min"));
            int max = Integer.parseInt(chanceElement.attributeValue("max"));
            int value = Integer.parseInt(chanceElement.attributeValue("value"));
            for (int i = min; i <= max; i++)
            {
              set.put(i, value);
            }
          }
          if ((chance2 == 0) && set.isEmpty())
          {
            warn("Wrong skill chance. Cubic: " + id + "/" + level);
          }
          Skill skill = SkillTable.getInstance().getInfo(id2, level2);
          if (skill != null)
          {
            skill.setCubicSkill(true);
            skills.add(new CubicTemplate.SkillInfo(skill, chance2, type, canAttackDoor, set));
          }
        }
        template.putSkills(chance, skills);
      }
    }
  }
View Full Code Here

   * @param template NpcTemplate
   */
  public Kama26BossInstance(int objectId, NpcTemplate template)
  {
    super(objectId, template);
    getMinionList().addMinion(new MinionData(18556, 1));
  }
View Full Code Here

    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
        if (template != null)
        {
          final NpcInstance a = template.getNewInstance();
          a.setCurrentHpMp(a.getMaxHp(), a.getMaxMp());
          a.spawnMe(actor.getLoc());
        }
      }
    }, 10000L);
View Full Code Here

      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
View Full Code Here

      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
    {
      if (player != null)
      {
        player.teleToLocation(new Location(207559, 86429, -1000));
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.templates.CubicTemplate$SkillInfo

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.