Package lineage2.gameserver.templates

Examples of lineage2.gameserver.templates.Henna


    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    Henna temp = HennaHolder.getInstance().getHenna(_symbolId);
    if ((temp == null) || !temp.isForThisClass(player))
    {
      player.sendPacket(Msg.THE_SYMBOL_CANNOT_BE_DRAWN);
      return;
    }
    long adena = player.getAdena();
    long countDye = player.getInventory().getCountOf(temp.getDyeId());
    if ((countDye >= temp.getDrawCount()) && (adena >= temp.getPrice()))
    {
      if (player.consumeItem(temp.getDyeId(), temp.getDrawCount()) && player.reduceAdena(temp.getPrice()))
      {
        player.sendPacket(SystemMsg.THE_SYMBOL_HAS_BEEN_ADDED);
        player.addHenna(temp);
      }
    }
View Full Code Here


          continue;
        }
        final int symbol_id = rset.getInt("symbol_id");
        if (symbol_id != 0)
        {
          final Henna tpl = HennaHolder.getInstance().getHenna(symbol_id);
          if (tpl != null)
          {
            _henna[slot - 1] = tpl;
            if (tpl.getSkillId() > 0)
            {
              Skill skill = SkillTable.getInstance().getInfo(tpl.getSkillId(), 1);
              if (skill != null)
              {
                addSkill(skill, true);
              }
            }
View Full Code Here

    slot--;
    if (_henna[slot] == null)
    {
      return false;
    }
    final Henna henna = _henna[slot];
    final int dyeID = henna.getDyeId();
    _henna[slot] = null;
    Connection con = null;
    PreparedStatement statement = null;
    try
    {
      con = DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM character_hennas where char_obj_id=? and slot=? and class_index=?");
      statement.setInt(1, getObjectId());
      statement.setInt(2, slot + 1);
      statement.setInt(3, getActiveClassId());
      statement.execute();
    }
    catch (final Exception e)
    {
      _log.warn("could not remove char henna: " + e, e);
    }
    finally
    {
      DbUtils.closeQuietly(con, statement);
    }
    if (henna.getSkillId() > 0)
    {
      removeSkillById(henna.getSkillId());
    }
    recalcHennaStats();
    sendPacket(new HennaInfo(this));
    sendUserInfo();
    ItemFunctions.addItem(this, dyeID, henna.getDrawCount() / 2, true);
    return true;
  }
View Full Code Here

    _hennaMEN = 0;
    _hennaWIT = 0;
    _hennaDEX = 0;
    for (int i = 0; i < 3; i++)
    {
      Henna henna = _henna[i];
      if (henna == null)
      {
        continue;
      }
      if (!henna.isForThisClass(this))
      {
        continue;
      }
      _hennaINT += henna.getStatINT();
      _hennaSTR += henna.getStatSTR();
      _hennaMEN += henna.getStatMEN();
      _hennaCON += henna.getStatCON();
      _hennaWIT += henna.getStatWIT();
      _hennaDEX += henna.getStatDEX();
    }
    if (_hennaINT > 15)
    {
      _hennaINT = 15;
    }
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.Henna

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.