Package lineage2.gameserver.model.instances

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


      }
      final Creature target = actor.getFollowTarget();
      if ((target == null) || (actor.getDistance(target) > 4000))
      {
        setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
        actor.teleToLocation(120664, -86968, -3392);
        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());
View Full Code Here


            ++currentState;
          }
        }
        else
        {
          actor.teleToLocation(-112776, 234072, -3097);
          st.set("zone", 2);
        }
      }
      else if (((lastSayTime + SAY_INTERVAL) < System.currentTimeMillis()) && (actor.getDestination() == null))
      {
View Full Code Here

        {
          @Override
          public void runImpl()
          {
            Location loc = Location.findAroundPosition(177134, -18807, -2256, 50, 100, npc.getGeoIndex());
            npc.teleToLocation(loc);
            if (npc == GustavInstance.this)
            {
              npc.reduceCurrentHp(npc.getCurrentHp(), 0, npc, null, false, false, false, false, false, false, false);
            }
          }
View Full Code Here

      if (leader != null)
      {
        double distance = actor.getDistance(leader.getX(), leader.getY());
        if (distance > 1000)
        {
          actor.teleToLocation(leader.getMinionPosition());
        }
        else if (distance > 200)
        {
          addTaskMove(leader.getMinionPosition(), false);
        }
View Full Code Here

    if (_lastPoint >= _points.length)
    {
      _lastPoint = 0;
      if (ArrayUtils.contains(_teleporters, npc.getNpcId()))
      {
        npc.teleToLocation(_points[_lastPoint]);
      }
    }
    npc.setRunning();
    if (Rnd.chance(30))
    {
View Full Code Here

      Location loc = GeoEngine.moveCheckForAI(target.getLoc(), actor.getLoc(), actor.getGeoIndex());
      if (!GeoEngine.canMoveToCoord(actor.getX(), actor.getY(), actor.getZ(), loc.x, loc.y, loc.z, actor.getGeoIndex()))
      {
        loc = target.getLoc();
      }
      actor.teleToLocation(loc);
    }
    return true;
  }
 
  /**
 
View Full Code Here

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

    setAttackTarget(null);
    changeIntention(CtrlIntention.AI_INTENTION_ACTIVE, null, null);
    if (teleport)
    {
      actor.broadcastPacketToOthers(new MagicSkillUse(actor, actor, 2036, 1, 500, 0));
      actor.teleToLocation(sloc.x, sloc.y, GeoEngine.getHeight(sloc, actor.getGeoIndex()));
    }
    else
    {
      if (!clearAggro)
      {
View Full Code Here

      return;
    }
    if (!actor.moveToLocation(loc, 0, false))
    {
      clientStopMoving();
      actor.teleToLocation(loc);
      continueWalkerRoute();
      }
  }

  public NpcInstance getActor()
View Full Code Here

    public void runImpl()
    {
      NpcInstance actor = getActor();
      if (actor != null)
      {
        actor.teleToLocation(_destination);
      }
    }
  }
 
  /**
 
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.