Examples of NpcInstance


Examples of lineage2.gameserver.model.instances.NpcInstance

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.getMinionList().deleteMinions();
    super.onEvtDead(killer);
  }
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

      addSpawnWithoutRespawn(KartiaGuard, new Location(-111656, -15528, -11444), 0);
      addSpawnWithoutRespawn(KartiaWatchman, new Location(-111432, -15496, -11443), 0);
      addSpawnWithoutRespawn(KartiaGuard, new Location(-111192, -15512, -11444), 0);
      addSpawnWithoutRespawn(KartiaWatchman, new Location(-110968, -15512, -11444), 0);
      addSpawnWithoutRespawn(KartiaGuard, new Location(-110792, -15592, -11444), 0);
      NpcInstance kaliospawner = addSpawnWithoutRespawn(LordOfKartia, new Location(-111288, -15784, -11428), 0);
      kaliospawner.addListener(_deathListener);
    }
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && Rnd.chance(10) && _sayOnAttack)
    {
      Functions.npcSay(actor, "Don't kill me! If you show mercy I will pay you 10000 adena!");
      _sayOnAttack = false;
    }
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

  }

  @Override
  protected boolean thinkActive()
  {
    NpcInstance actor = getActor();
    if(Rnd.chance(8))
    {
      Functions.npcSay(actor, NpcString.I_CAN_HEAL_YOU_DURING_COMBAT);
    }
    return false;
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

  }

  @Override
  protected boolean thinkActive()
  {
    NpcInstance actor = getActor();
    if(Rnd.chance(8))
    {
      Functions.npcSay(actor, NpcString.I_HIT_THINGS_THEY_FALL_DEAD);
    }
    return false;
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if (_firstTimeAttacked)
    {
      _firstTimeAttacked = false;
      if (Rnd.chance(25))
      {
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

    return startAttack();
  }

  private boolean startAttack()
  {
    NpcInstance actor = getActor();
    if(target == null)
    {
      List<Creature> around = actor.getAroundCharacters(3000, 150);
      if(around != null && !around.isEmpty())
      {
        for(Creature obj : around)
        {
          if(checkTarget(obj))
          {
            if(target == null || actor.getDistance3D(obj) < actor.getDistance3D(target))
              target = obj;
          }
        }
      }
    }

    if(target != null && !actor.isAttackingNow() && !actor.isCastingNow() && !target.isDead() && GeoEngine.canSeeTarget(actor, target, false) && target.isVisible())
    {
      actor.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, target, 1);
      return true;
    }

    if(target != null && (!target.isVisible() || target.isDead() || !GeoEngine.canSeeTarget(actor, target, false)))
    {
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

    if(target.isPlayer())
      return true;
     
    if(target.isNpc())
    {
      NpcInstance npc = (NpcInstance) target;
      int _id = npc.getNpcId();
      if(_id == 27430 || _id == 27431 || _id == 27432 || _id == 27433 || _id == 27434 || _id == 27425 || _id == 33416)
        return false;     
    }
    return true;
  }
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

   * @return boolean
   */
  @Override
  protected boolean thinkActive()
  {
    final NpcInstance actor = getActor();
    if (!noCheckPlayers)
    {
      checkAroundPlayers(actor);
    }
    return true;
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance

  }

  @Override
  protected boolean thinkActive()
  {
    NpcInstance actor = getActor();
   
    if(Rnd.chance(3))
      Functions.npcSay(actor, NpcString.I_M_ON_FIRE_NO_WAIT_THAT_WOULD_BE_YOU);   
    return startAttack();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.