Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance.doCast()


      {
        target.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
      }
    }
    // Only for displaying animation in client
    actor.doCast(SkillTable.getInstance().getInfo(5714, 1), attacker, true);
    actor.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
  }

  @Override
  protected boolean randomWalk()
View Full Code Here


    L2Player player = (L2Player) target;
    if(!((player.isInvisible() || player.isSilentMoving()) && actor.getNpcId() == 27351) && actor.isInRange(player, actor.getNpcId() == 27351 ? 400 : 150) && GeoEngine.canSeeTarget(actor, player, false))
    {
      Functions.npcSay(actor, txt[Rnd.get(txt.length)]);
      teleportTask = ThreadPoolManager.getInstance().scheduleAi(new TeleportTask(player), 3000, true);
      actor.doCast(SkillTable.getInstance().getInfo(5978, 1), player, false);
    }
  }

  @Override
  protected boolean thinkActive()
View Full Code Here

    {
      for(L2Playable target : L2World.getAroundPlayables(actor, AGGRO_RANGE, AGGRO_RANGE))
      {
        if(target != null && !target.isAlikeDead() && !target.isInvul() && target.isVisible() && GeoEngine.canSeeTarget(actor, target, false))
        {
          actor.doCast(SKILL1, target, true);
          actor.doCast(SKILL2, target, true);
          lastThrow = System.currentTimeMillis();
          break;
        }
      }
View Full Code Here

      for(L2Playable target : L2World.getAroundPlayables(actor, AGGRO_RANGE, AGGRO_RANGE))
      {
        if(target != null && !target.isAlikeDead() && !target.isInvul() && target.isVisible() && GeoEngine.canSeeTarget(actor, target, false))
        {
          actor.doCast(SKILL1, target, true);
          actor.doCast(SKILL2, target, true);
          lastThrow = System.currentTimeMillis();
          break;
        }
      }
    }
View Full Code Here

  protected void onEvtAttacked(L2Character attacker, int damage)
  {
    L2NpcInstance actor = getActor();
    if((actor.getCurrentHpPercents() <= 70))
    {
      actor.doCast(SkillTable.getInstance().getInfo(4612, 9), attacker, true);
      actor.doDie(actor);
    }
    super.onEvtAttacked(attacker, damage);
  }
}
View Full Code Here

        attacker.getPlayer().setKarma(attacker.getPlayer().getKarma() + 5);
        attacker.sendChanges();
      }
      else if(chance < 4)
      {
        actor.doCast(SkillTable.getInstance().getInfo(4578, 1), attacker, true); // Petrification
      }
      else
      {
        actor.doCast(SkillTable.getInstance().getInfo(4185, 7), attacker, true);
      } // Sleep
View Full Code Here

      {
        actor.doCast(SkillTable.getInstance().getInfo(4578, 1), attacker, true); // Petrification
      }
      else
      {
        actor.doCast(SkillTable.getInstance().getInfo(4185, 7), attacker, true);
      } // Sleep
      Functions.npcSay(actor, attacker.getName() + ", " + _txt[Rnd.get(_txt.length)]);
      _lastAction = System.currentTimeMillis();
    }
  }
View Full Code Here

        if(actor.getRealDistance(temp_attack_target) <= castRange + 60 && GeoEngine.canSeeTarget(actor, temp_attack_target, false))
        {
          clientStopMoving();
          _pathfind_fails = 0;
          actor.setAttackTimeout(getMaxAttackTimeout() + System.currentTimeMillis());
          actor.doCast(currentTask.skill, isAoE ? actor : temp_attack_target, !temp_attack_target.isPlayable());
          return maybeNextTask(currentTask);
        }
        if(actor.isMoving)
        {
          return Rnd.chance(10);
View Full Code Here

        }
        if(actor.getRealDistance(temp_attack_target) <= castRange + 60 && GeoEngine.canSeeTarget(actor, temp_attack_target, false))
        {
          clientStopMoving();
          _pathfind_fails = 0;
          actor.doCast(currentTask.skill, isAoE ? actor : temp_attack_target, !temp_attack_target.isPlayable());
          return maybeNextTask(currentTask);
        }
        if(actor.isMovementDisabled() || !getIsMobile())
        {
          return true;
View Full Code Here

      Functions.npcSay(npc, st.getPlayer().getName() + "! You may have won this time... But next time, I will surely capture you!");
      L2NpcInstance cain = L2ObjectsStorage.getByNpcId(Cain);
      if(cain != null)
      {
        Functions.npcSay(npc, "Well done. " + player.getName() + ". You help is much appreciated.");
        cain.doCast(SkillTable.getInstance().getInfo(1218, 33), player, true); // Greater Battle Heal
      }
    }
    return null;
  }
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.