Package games.stendhal.server.core.engine

Examples of games.stendhal.server.core.engine.Spot


    init(player);

  }

  private void init(final Player player) {
    Portal portal = new Teleporter(new Spot(player.getZone(), player.getX(), player.getY()));
    portal.setPosition(6, 3);
    add(portal);
    numCreatures = 0;
    int count = 0;
    // max ALLOWED_FAILS fails to place all creatures before we give up
View Full Code Here


    } catch (IOException e) {
      logger.error(e);
    }

    // Create the return portal
    portal = new ReturnTeleporter(new Spot(SingletonRepository.getRPWorld().getZone(returnZoneName), returnX, returnY));
    Point pos = getPortalPosition();
    portal.setPosition(pos.x, pos.y);
    zone.add(portal);

    // disable double click move and teleport in
View Full Code Here

    if (location == null) {
      player.sendPrivateText("You can not concentrate well enough to use this orb.");
      return false;
    }
   
    Spot spot = getRandomLocation(player).getSpot();
   
    if (spot == null) {
      logger.error("Failed to determine destination spot.");
      return false;
    }

    if (player.teleport(spot.getZone(), spot.getX(), spot.getY(), null, null)) {
      player.stop();
    }

    return true;
  }
View Full Code Here

      if (spot == null) {
        IRPZone zone = SingletonRepository.getRPWorld().getRPZone(zoneName);
        // All locations should be valid, but do not crash in case not all maps
        // are not loaded.
        if (zone != null) {
          spot = new Spot((StendhalRPZone) zone, x, y);
        } else {
          logger.error("Can not find zone: " + zoneName);
        }
      }
     
View Full Code Here

  }

  private void teleportToCowardPlace(final Player player) {
   
    if (cowardSpot == null) {
      cowardSpot = new Spot(SingletonRepository.getRPWorld().getZone(
      "0_semos_mountain_n2_w"), 104, 123);
    }
    player.teleport(cowardSpot.getZone(), cowardSpot.getX(), cowardSpot.getY(), Direction.DOWN, player);
    player.sendPrivateText("You wake up far away from the city in the mountains. But you don't know what happened.");
  }
View Full Code Here

  public AdosDeathmatch(final StendhalRPZone zone, final Area area) {
    this.zone = zone;
    arena = area;
    logger.debug("big constructor for zone", new Throwable());
    final Spot entrance = new Spot(zone, 96, 75);
    deathmatchInfo = new DeathmatchInfo(arena, zone, entrance);
    // do not let players scroll out of deathmatch
    Rectangle r = area.getShape().getBounds();
    zone.disallowOut(r.x, r.y, r.width, r.height);
  }
View Full Code Here

    init(player);

  }

  private void init(final Player player) {
    Portal portal = new Teleporter(new Spot(player.getZone(),
        player.getX(), player.getY()));
    portal.setPosition(4, 8);
    add(portal);

    chest = new PersonalChest();
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.Spot

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.