Package lineage2.gameserver.model.entity.residence

Examples of lineage2.gameserver.model.entity.residence.ClanHall


   * @return boolean
   */
  @Override
  protected boolean maybeMoveToHome()
  {
    final NpcInstance actor = getActor();
    if ((actor != null) && !BaiumManager.getZone().checkIfInZone(actor))
    {
      teleportHome();
    }
    return false;
View Full Code Here


   * Method onEvtThink.
   */
  @Override
  protected void onEvtThink()
  {
    final NpcInstance actor = getActor();
    final List<Creature> around = World.getAroundCharacters(actor, 600, 300);
    if (around.isEmpty())
    {
      return;
    }
View Full Code Here

   * @param killer Creature
   */
  @Override
  public void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    super.onEvtDead(killer);
    actor.deleteMe();
    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

   * @return boolean
   */
  @Override
  protected boolean thinkActive()
  {
    final NpcInstance actor = getActor();
    if (actor.isDead())
    {
      return true;
    }
    if ((_chatVar + chatDelay) < System.currentTimeMillis())
    {
View Full Code Here

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && Rnd.chance(5))
    {
      final int DeBuff = DeBuffs[Rnd.get(DeBuffs.length)];
      final List<Effect> effect = attacker.getEffectList().getEffectsBySkillId(DeBuff);
      if (effect != null)
View Full Code Here

    public void runImpl()
    {
      for (String element : ZONES)
      {
        Zone zone = ReflectionUtils.getZone(element);
        NpcInstance npc = getKasha(zone);
        if ((npc != null) && (zone != null))
        {
          int curseLvl = 0;
          int yearningLvl = 0;
          int despairLvl = 0;
View Full Code Here

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
View Full Code Here

   * @param aggro int
   */
  @Override
  protected void onEvtAggression(Creature attacker, int aggro)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
View Full Code Here

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if (_firstTimeAttacked)
    {
      Functions.npcSay(actor, "A non-permitted target has been discovered.");
      Functions.npcSay(actor, "Starting intruder removal system.");
      _firstTimeAttacked = false;
View Full Code Here

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
      final NpcInstance cubic1 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic1.setReflection(actor.getReflection());
      cubic1.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic1.spawnMe(CUBIC_1_POSITION);
      final NpcInstance cubic2 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic2.setReflection(actor.getReflection());
      cubic2.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic2.spawnMe(CUBIC_2_POSITION);
      ThreadPoolManager.getInstance().schedule(new DeSpawnScheduleTimerTask(cubic1, cubic2), CUBIC_DESPAWN_TIME);
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.residence.ClanHall

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.