Package org.moparscape.msc.gs.model

Examples of org.moparscape.msc.gs.model.Point


  public Shop toShop() {
    List<String> opts = new ArrayList<String>();
    for (String s : options) {
      opts.add(s);
    }
    Shop shop = new Shop(name, greeting, opts, new Point(minX, minY),
        new Point(maxX, maxY), general, respawnRate, buyModifier,
        sellModifier);
    for (InvItem i : items) {
      shop.add(i.id, i.amount, false);
    }
    return shop;
View Full Code Here


    return players != null && players.size() > 0;
  }

  private boolean specificArea() {
    boolean t = DataConversions.inPointArray(Formulae.noremoveTiles,
        new Point(this.getX(), this.getY()));
    return t;
  }
View Full Code Here

    if (player.isBusy()) {
      player.resetPath();
      return;
    }
    player.resetAll();
    Point location = Point.location(p.readShort(), p.readShort());
    int id = p.readShort();
    final ActiveTile tile = world.getTile(location);
    final Item item = getItem(id, tile, player);

    if (item == null) {
      // player.setSuspiciousPlayer(true);
      player.resetPath();
      return;
    }

    if (!item.getDef().canTrade()) {
      if (item.droppedby() != 0
          && org.moparscape.msc.gs.tools.DataConversions
              .usernameToHash(player.getUsername()) != item
              .droppedby()) {
        player.getActionSender().sendMessage(
            "This item is non-tradable.");
        return;
      }
    }

    if (player.isPMod() && !player.isMod())
      return;
    if (item.getDef().isMembers() && !World.isMembers()) {
      player.getActionSender().sendMessage(
          "This feature is only avaliable on a members server");
      return;
    }

    player.setStatus(Action.TAKING_GITEM);
    boolean blocked = false;
    try {
      PathHandler pa = new PathHandler(player);
      for (int i : new int[] { 1, 2, 4, 8 }) {
        if (pa.isBlocking(location.getX(), location.getY(), i)) {
          blocked = true;
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

        player.resetPath();
        return;
      }
      // incExp
      player.resetAll();
      Point location = Point.location(p.readShort(), p.readShort());
      int id = p.readShort();
      final ActiveTile tile = world.getTile(location);
      if (tile == null)
        return;
      final InvItem myItem = player.getInventory().getSlot(p.readShort());
View Full Code Here

        if (p.readByte() == 1) {
          Logger.mod(mod.getUsername() + " requested information on "
              + DataConversions.hashToUsername(user));

          int world = p.readShort();
          Point location = Point.location(p.readShort(),
              p.readShort());
          long loginDate = p.readLong();
          int lastMoved = (int) ((GameEngine.getTime() - p.readLong()) / 1000);
          boolean chatBlock = p.readByte() == 1;
          int fatigue = p.readShort();
          String state = p.readString();

          mod.getActionSender().sendAlert(
              "@whi@" + DataConversions.hashToUsername(user)
                  + " is currently on world @or1@" + world
                  + "@whi@ at @or1@" + location.toString()
                  + "@whi@ (@or1@"
                  + location.getDescription()
                  + "@whi@). State is @or1@" + state
                  + "@whi@. Logged in @or1@"
                  + DataConversions.timeSince(loginDate)
                  + "@whi@ ago. Last moved @or1@" + lastMoved
                  + " secs @whi@ ago. Chat block is @or1@"
View Full Code Here

        player.setBusy(true);
        player.getActionSender().sendMessage(
            "You open and plant the seed.");
        world.registerGameObject(new GameObject(player.getLocation(),
            490, 0, 0));
        final Point location = player.getLocation();
        Instance.getDelayedEventHandler().add(
            new DelayedEvent(null, 180000) {
              GameObject object = world.getTile(location)
                  .getGameObject();
View Full Code Here

              // return;
              // }
              owner.resetAll();
              String command = (click == 0 ? def.getCommand1()
                  : def.getCommand2()).toLowerCase();
              Point telePoint = EntityHandler.getObjectTelePoint(
                  object.getLocation(), command);

              if (telePoint != null) {
                owner.teleport(telePoint.getX(),
                    telePoint.getY(), false);
              }

              else {

                if (command.equals("pick lock")) {
View Full Code Here

TOP

Related Classes of org.moparscape.msc.gs.model.Point

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.