Package marauroa.common.game

Examples of marauroa.common.game.IRPZone


   * @param player to be rewarded
   */
  private void placeSoupFor(final Player player) {
    final Item soup = SingletonRepository.getEntityManager()
        .getItem("soup");
    final IRPZone zone = SingletonRepository.getRPWorld().getZone("int_fado_tavern");
    // place on table (for effect only :) )
    soup.setPosition(17, 23);
    // only allow player who made soup to eat the soup
    soup.setBoundTo(player.getName());
    // here the soup is altered to have the same heal value as the player's
    // base HP. soup is already persistent so it will last.
    soup.put("amount", player.getBaseHP());
    zone.add(soup);
  }
View Full Code Here


   * @param player
   *            the player to teleport out
   */
  private void teleportAway(final Player player) {
    if (player != null) {
      final IRPZone playerZone = player.getZone();
      if (playerZone.equals(zone)) {
        player.teleport(zone, 15, 16, Direction.DOWN, player);

        // complete the quest if it already started
        if (player.hasQuest(QUEST_SLOT)) {
          player.setQuest(QUEST_SLOT, "done");
View Full Code Here

    reward.add(new EquipItemAction("potion",10));
    reward.add(new ChatAction() {
      public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
        final Item soup = SingletonRepository.getEntityManager()
        .getItem("fish soup");
        final IRPZone zone = SingletonRepository.getRPWorld().getZone("int_ados_farm_house_1");
        // place on table
        soup.setPosition(32, 5);
        // only allow Hughie, our npc, to eat the soup
        soup.setBoundTo("Hughie");
        zone.add(soup);
      }
    });
   
    npc.add(ConversationStates.QUEST_ITEM_BROUGHT,
      ConversationPhrases.YES_MESSAGES,
View Full Code Here

      // we have to compare it to the player who started this timer

      final Player playerTemp = timerPlayer.get();

      if (playerTemp != null) {
        final IRPZone playerZone = playerTemp.getZone();

        if (playerZone.equals(zone)) {
          if (counter > 0) {
            npc.say(playerTemp.getTitle() + ", you have "
                + TimeUtil.timeUntil(counter) + " left.");
            counter = counter - 10 * 6;
            SingletonRepository.getTurnNotifier().notifyInTurns(10 * 3 * 6, this);
View Full Code Here

   * @param player to be rewarded
   */
  private void placeSoupFor(final Player player) {
    final Item soup = SingletonRepository.getEntityManager()
        .getItem("fish soup");
    final IRPZone zone = SingletonRepository.getRPWorld().getZone("0_ados_city_n2");
    // place on market table
    soup.setPosition(64, 15);
    // only allow player who made soup to eat the soup
    soup.setBoundTo(player.getName());
    // here the soup is altered to have the same heal value as the player's
    // base HP. soup is already persistent so it will last.
    soup.put("amount", player.getBaseHP());
    zone.add(soup);
  }
View Full Code Here

   *
   * @param objectid specifed object
   * @return MarboardZone
   */
  public MarboardZone getMarboardZone(RPObject.ID objectid) {
    IRPZone zone = super.getRPZone(objectid);

    if (zone == null) {
      return null;
    }

    if (zone instanceof MarboardZone) {
      return (MarboardZone) zone;
    }
   
    throw new IllegalArgumentException("Excepted a MarboardZone but got something of class " + zone.getClass().getName() + ": " + zone);
  }
View Full Code Here

TOP

Related Classes of marauroa.common.game.IRPZone

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.