Examples of moveToLocation()


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

    Location sloc = actor.getSpawnedLoc();
    int x = (sloc.x + Rnd.get(2 * AI_WALK_RANGE)) - AI_WALK_RANGE;
    int y = (sloc.y + Rnd.get(2 * AI_WALK_RANGE)) - AI_WALK_RANGE;
    int z = GeoEngine.getHeight(x, y, sloc.z, actor.getGeoIndex());
    actor.setRunning();
    actor.moveToLocation(x, y, z, 0, true);
    return true;
  }
}
View Full Code Here

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

    actor.setRunning();
    if ((actor.getTarget() == null) || (currentState >= coords.length) || (currentState == 0))
    {
      if (currentState < coords.length)
      {
        actor.moveToLocation(coords[currentState][0], coords[currentState][1], coords[currentState][2], Rnd.get(0, 50), true);
        if (actor.getDestination() == null)
        {
          ++currentState;
        }
      }
View Full Code Here

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

      int x = octavis.getX() + Rnd.get(2 * DRIFT_DISTANCE) - DRIFT_DISTANCE;
      int y = octavis.getY() + Rnd.get(2 * DRIFT_DISTANCE) - DRIFT_DISTANCE;
      int z = octavis.getZ();

      actor.setRunning();
      actor.moveToLocation(x, y, z, 0, true);

      startSkillAttackTask();

      return true;
    }
View Full Code Here

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

    actor.setRunning();
    if (isUnderState(State.AI_FOLLOW) && actor.getAggroList().isEmpty() && ((System.currentTimeMillis() - lastFollowPlayer) > 2000))
    {
      lastFollowPlayer = System.currentTimeMillis();
      actor.setFollowTarget(player);
      actor.moveToLocation(player.getLoc(), Rnd.get(200), true);
    }
    else if (isUnderState(State.AI_NEXT_STEP))
    {
      if (_step < POINTS.length)
      {
View Full Code Here

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

    else if (isUnderState(State.AI_NEXT_STEP))
    {
      if (_step < POINTS.length)
      {
        actor.setFollowTarget(player);
        actor.moveToLocation(new Location(POINTS[_step][0], POINTS[_step][1], POINTS[_step][2]), 0, true);
        ++_step;
      }
      setState(State.AI_IDLE);
    }
    else if (isUnderState(State.AI_ATTACK_GENERATOR))
View Full Code Here

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

        }
        if (actor.isMoving)
        {
          return false;
        }
        if (!actor.moveToLocation(currentTask.loc, 0, currentTask.pathfind))
        {
          clientStopMoving();
          _pathfindFails = 0;
          actor.teleToLocation(currentTask.loc);
          return maybeNextTask(currentTask);
View Full Code Here

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

    {
      final int x = (edwin.getX() + Rnd.get(2 * DRIFT_DISTANCE)) - DRIFT_DISTANCE;
      final int y = (edwin.getY() + Rnd.get(2 * DRIFT_DISTANCE)) - DRIFT_DISTANCE;
      final int z = edwin.getZ();
      actor.setRunning();
      actor.moveToLocation(x, y, z, 0, true);
      return true;
    }
    return false;
  }
 
View Full Code Here

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

    {
      return false;
    }
    Location pos = Location.findPointToStay(actor, sloc, 0, Config.MAX_DRIFT_RANGE);
    actor.setWalking();
    if (!actor.moveToLocation(pos.x, pos.y, pos.z, 0, true) && !isInRange)
    {
      teleportHome();
    }
    return true;
  }
View Full Code Here

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

    final Location sloc = actor.getSpawnedLoc();
    final int x = (sloc.x + Rnd.get(2 * PET_WALK_RANGE)) - PET_WALK_RANGE;
    final int y = (sloc.y + Rnd.get(2 * PET_WALK_RANGE)) - PET_WALK_RANGE;
    final int z = GeoEngine.getHeight(x, y, sloc.z, actor.getGeoIndex());
    actor.setRunning();
    actor.moveToLocation(x, y, z, 0, true);
    return true;
  }
 
  /**
   * Method onEvtAttacked.
View Full Code Here

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

    NpcInstance actor = getActor();
    if (actor == null)
    {
      return;
    }
    if (!actor.moveToLocation(loc, 0, false))
    {
      clientStopMoving();
      actor.teleToLocation(loc);
      continueWalkerRoute();
      }
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.