Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance


  public void find(String[] var)
  {
    int countPerPage = 9;
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(var.length < 4 || var.length > 8)
View Full Code Here


  }

  @Override
  protected boolean thinkActive()
  {
    L2NpcInstance actor = getActor();
    if(actor == null || actor.isDead())
    {
      return true;
    }
    if(_def_think)
    {
View Full Code Here

  }

  @Override
  protected void onEvtAttacked(L2Character attacker, int damage)
  {
    L2NpcInstance actor = getActor();
    if(actor == null)
    {
      return;
    }
    if(!actor.isDead() && _firstTimeAttacked)
    {
      _firstTimeAttacked = false;
      Functions.npcSay(actor, "Покажитесь мне!");
      for(int bro : BROTHERS)
      {
        try
        {
          L2NpcInstance npc = NpcTable.getTemplate(bro).getNewInstance();
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
        }
        catch(Exception e)
        {
          e.printStackTrace();
        }
View Full Code Here

  }

  public void LeaveKamaloka(String[] param)
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(player.getParty() == null || !player.getParty().isLeader(player))
View Full Code Here

  }

  public void toDC()
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(!L2NpcInstance.canBypassCheck(player, npc))
View Full Code Here

  }

  public void fromDC()
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(!L2NpcInstance.canBypassCheck(player, npc))
View Full Code Here

  }

  @Override
  protected void onEvtAttacked(L2Character attacker, int damage)
  {
    L2NpcInstance actor = getActor();
    if(actor == null)
    {
      return;
    }
    if(_firstTimeAttacked)
View Full Code Here

  }

  @Override
  protected void onEvtAttacked(L2Character attacker, int damage)
  {
    L2NpcInstance actor = (L2NpcInstance) getActor();
    if(actor == null || attacker == null || attacker.getPlayer() == null)
    {
      return;
    }
    // Ругаемся не чаще, чем раз в 15 секунд
    if(System.currentTimeMillis() - _lastAction > 15000)
    {
      _lastAction = System.currentTimeMillis();
      Functions.npcSayCustomMessage(actor, "scripts.ai.FieldMachine." + actor.getNpcId());
      GArray<L2NpcInstance> around = actor.getAroundNpc(1500, 300);
      if(around != null && !around.isEmpty())
      {
        for(L2NpcInstance npc : around)
        {
          if(npc.isMonster() && npc.getNpcId() >= 22656 && npc.getNpcId() <= 22659)
View Full Code Here

  }

  @Override
  protected boolean thinkActive()
  {
    L2NpcInstance actor = getActor();
    if(actor == null || actor.isDead())
    {
      return true;
    }
    if(_def_think)
    {
View Full Code Here

  {
    BaiumManager.setLastAttackTime();
    if(_firstTimeAttacked)
    {
      _firstTimeAttacked = false;
      L2NpcInstance actor = getActor();
      if(actor == null || attacker == null)
      {
        return;
      }
      if(attacker.isPlayer() && attacker.getPet() != null)
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.instances.L2NpcInstance

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.