Package lineage2.gameserver.templates

Examples of lineage2.gameserver.templates.StatsSet


    int bossId = raidboss.getNpcId();
    if (!_spawntable.containsKey(bossId))
    {
      return;
    }
    StatsSet info = _storedInfo.get(bossId);
    if ((info != null) && (info.getDouble("current_hp") > 1))
    {
      raidboss.setCurrentHp(info.getDouble("current_hp"), false);
      raidboss.setCurrentMp(info.getDouble("current_mp"));
    }
    GmListTable.broadcastMessageToGMs("Spawning RaidBoss " + raidboss.getName());
  }
View Full Code Here


    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element doorElement = iterator.next();
      if ("door".equals(doorElement.getName()))
      {
        StatsSet doorSet = initBaseStats();
        StatsSet aiParams = null;
        doorSet.set("door_type", doorElement.attributeValue("type"));
        Element posElement = doorElement.element("pos");
        Location doorPos;
        int x = Integer.parseInt(posElement.attributeValue("x"));
        int y = Integer.parseInt(posElement.attributeValue("y"));
        int z = Integer.parseInt(posElement.attributeValue("z"));
        doorSet.set("pos", doorPos = new Location(x, y, z));
        Polygon shape = new Polygon();
        int minz = 0, maxz = 0;
        Element shapeElement = doorElement.element("shape");
        minz = Integer.parseInt(shapeElement.attributeValue("minz"));
        maxz = Integer.parseInt(shapeElement.attributeValue("maxz"));
        shape.add(Integer.parseInt(shapeElement.attributeValue("ax")), Integer.parseInt(shapeElement.attributeValue("ay")));
        shape.add(Integer.parseInt(shapeElement.attributeValue("bx")), Integer.parseInt(shapeElement.attributeValue("by")));
        shape.add(Integer.parseInt(shapeElement.attributeValue("cx")), Integer.parseInt(shapeElement.attributeValue("cy")));
        shape.add(Integer.parseInt(shapeElement.attributeValue("dx")), Integer.parseInt(shapeElement.attributeValue("dy")));
        shape.setZmin(minz);
        shape.setZmax(maxz);
        doorSet.set("shape", shape);
        doorPos.setZ(minz + 32);
        for (Iterator<Element> i = doorElement.elementIterator(); i.hasNext();)
        {
          Element n = i.next();
          if ("set".equals(n.getName()))
          {
            doorSet.set(n.attributeValue("name"), n.attributeValue("value"));
          }
          else if ("ai_params".equals(n.getName()))
          {
            if (aiParams == null)
            {
              aiParams = new StatsSet();
              doorSet.set("ai_params", aiParams);
            }
            for (Iterator<Element> aiParamsIterator = n.elementIterator(); aiParamsIterator.hasNext();)
            {
              Element aiParamElement = aiParamsIterator.next();
              aiParams.set(aiParamElement.attributeValue("name"), aiParamElement.attributeValue("value"));
            }
          }
        }
        doorSet.set("uid", doorElement.attributeValue("id"));
        doorSet.set("name", doorElement.attributeValue("name"));
View Full Code Here

   * Method setHero.
   * @param player Player
   */
  public void setHero(Player player)
  {
    StatsSet hero = new StatsSet();
    hero.set(Olympiad.CLASS_ID, player.getClassId());
    hero.set(Olympiad.CHAR_ID, player.getObjectId());
    hero.set(Olympiad.CHAR_NAME, player.getName());
    hero.set(Hero.ACTIVE, 1);
    List<StatsSet> heroesToBe = new ArrayList<StatsSet>();
    heroesToBe.add(hero);
    Hero.getInstance().computeNewHeroes(heroesToBe);
    player.setHero(true);
    Hero.addSkills(player);
View Full Code Here

        if (player == null)
        {
          activeChar.sendMessage("Character " + wordList[1] + " not found in game.");
          return false;
        }
        StatsSet hero = new StatsSet();
        hero.set(Olympiad.CLASS_ID, player.getBaseClassId());
        hero.set(Olympiad.CHAR_ID, player.getObjectId());
        hero.set(Olympiad.CHAR_NAME, player.getName());
        List<StatsSet> heroesToBe = new ArrayList<>();
        heroesToBe.add(hero);
        Hero.getInstance().computeNewHeroes(heroesToBe);
        activeChar.sendMessage("Hero status added to player " + player.getName());
        break;
View Full Code Here

   */
  public void setParameter(String str, Object val)
  {
    if (_parameters == StatsSet.EMPTY)
    {
      _parameters = new StatsSet();
    }
    _parameters.set(str, val);
  }
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

      {
        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.StatsSet

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.