Package lineage2.gameserver.model.instances

Examples of lineage2.gameserver.model.instances.NpcInstance.followToCharacter()


        setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
        return;
      }
      if (!actor.isInRange(target, offset + 20) && (!actor.isFollow || (actor.getFollowTarget() != target)))
      {
        actor.followToCharacter(target, offset, false);
      }
      _followTask = ThreadPoolManager.getInstance().schedule(this, 250L);
    }
  }
}
View Full Code Here


        setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
        return;
      }
      if (!actor.isInRange(target, offset + 20) && (!actor.isFollow || (actor.getFollowTarget() != target)))
      {
        actor.followToCharacter(target, offset, false);
      }
      _followTask = ThreadPoolManager.getInstance().schedule(this, 250L);
    }
  }
 
View Full Code Here

        return;
      }
      if (!actor.isInRange(target, Config.FOLLOW_RANGE + 20) && (!actor.isFollow || (!actor.getFollowTarget().equals(target))))
      {
        final Location loc = new Location(target.getX() + Rnd.get(-60, 60), target.getY() + Rnd.get(-60, 60), target.getZ());
        actor.followToCharacter(loc, target, Config.FOLLOW_RANGE, false);
      }
      _followTask = ThreadPoolManager.getInstance().schedule(this, 250L);
    }
  }
 
View Full Code Here

          setIntention(CtrlIntention.AI_INTENTION_FOLLOW);
        }
        if (master != null && actor.getDistance(master.getLoc()) > 300)
        {
          final Location loc = new Location(master.getX() + Rnd.get(-120, 120), master.getY() + Rnd.get(-120, 120), master.getZ());
          actor.followToCharacter(loc, master, Config.FOLLOW_RANGE, false);
          actor.setRunning();
        }
      }
    }
    super.onEvtThink();
View Full Code Here

   * @return boolean
   */
  protected boolean tryMoveToTarget(Creature target, int range)
  {
    NpcInstance actor = getActor();
    if (!actor.followToCharacter(target, actor.getPhysicalAttackRange(), true))
    {
      _pathfindFails++;
    }
    if ((_pathfindFails >= getMaxPathfindFails()) && (System.currentTimeMillis() > ((getAttackTimeout() - getMaxAttackTimeout()) + getTeleportTimeout())) && actor.isInRange(target, MAX_PURSUE_RANGE))
    {
View Full Code Here

        return;
      }
      if (!actor.isInRange(target, Config.FOLLOW_RANGE + 20) && (!actor.isFollow || (!actor.getFollowTarget().equals(target))))
      {
        final Location loc = new Location(target.getX() + Rnd.get(-60, 60), target.getY() + Rnd.get(-60, 60), target.getZ());
        actor.followToCharacter(loc, target, Config.FOLLOW_RANGE, false);
      }
      _followTask = ThreadPoolManager.getInstance().schedule(this, 250L);
    }
  }
}
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.