Beispiel #1
0
  public boolean enchanterFightTask(Creature target) {
    Player player = getActor();
    double distance = player.getDistance(target);

    if (canUseSkill(Dominator.SKILL_STEAL_ESSENCE, target, distance))
      return tryCastSkill(Dominator.SKILL_STEAL_ESSENCE, target, distance);

    return chooseTaskAndTargets(null, target, distance);
  }
Beispiel #2
0
 /**
  * Shows a movie to the players in the lair.
  *
  * @param target - L2NpcInstance target is the center of this movie
  * @param dist - int distance from target
  * @param yaw - angle of movie (north = 90, south = 270, east = 0 , west = 180)
  * @param pitch - pitch > 0 looks up / pitch < 0 looks down
  * @param time - fast ++ or slow -- depends on the value
  * @param duration - How long to watch the movie
  * @param socialAction - 1,2,3,4 social actions / other values do nothing
  */
 private void showSocialActionMovie(
     NpcInstance target, int dist, int yaw, int pitch, int time, int duration, int socialAction) {
   if (target == null) return;
   for (Player pc : getPlayers())
     if (pc.getDistance(target) <= 2550) {
       pc.enterMovieMode();
       pc.specialCamera(target, dist, yaw, pitch, time, duration);
     } else pc.leaveMovieMode();
   if (socialAction > 0 && socialAction < 5)
     target.broadcastPacket(new SocialActionPacket(target.getObjectId(), socialAction));
 }