Class ReverseArrow

java.lang.Object
games.stendhal.server.maps.quests.AbstractQuest
games.stendhal.server.maps.quests.ReverseArrow
All Implemented Interfaces:
LoginListener, Token.TokenMoveListener<Token>, IQuest

public class ReverseArrow extends AbstractQuest implements Token.TokenMoveListener<Token>, LoginListener
A quest where the player has to invert an arrow build out of stones by moving only up to 3 tokens.
Author:
hendrik
  • Field Details

  • Constructor Details

    • ReverseArrow

      public ReverseArrow()
  • Method Details

    • getSlotName

      public String getSlotName()
      Description copied from class: AbstractQuest
      The slot-name in !quests.
      Specified by:
      getSlotName in interface IQuest
      Specified by:
      getSlotName in class AbstractQuest
      Returns:
      the slot's name
    • getName

      public String getName()
      Description copied from interface: IQuest
      Returns the name of the quest.
      Specified by:
      getName in interface IQuest
      Specified by:
      getName in class AbstractQuest
      Returns:
      name
    • onLoggedIn

      public void onLoggedIn(Player player)
      Description copied from interface: LoginListener
      Is called after a player logged into the game.
      Specified by:
      onLoggedIn in interface LoginListener
      Parameters:
      player - the player who has logged in
    • onTokenMoved

      public void onTokenMoved(Player player, Token token)
      The player moved a token.
      Specified by:
      onTokenMoved in interface Token.TokenMoveListener<Token>
      Parameters:
      player - Player
      token - Token
    • start

      public void start(Player player)
      A player entered the zone.
      Parameters:
      player - Player
    • finish

      protected void finish(boolean reset, Player player)
      Finishes the quest and teleports the player out.
      Parameters:
      reset - reset it for the next player (set to false on login)
      player - the player to teleport out
    • addToWorld

      public void addToWorld()
      Description copied from interface: IQuest
      adds the quest to the game world (e.g. by placing SpeakerNPCs there)
      Specified by:
      addToWorld in interface IQuest
      Specified by:
      addToWorld in class AbstractQuest
    • getHistory

      public List<String> getHistory(Player player)
      Description copied from interface: IQuest
      Gets a the quest history for the given player, written in the first person.
      Specified by:
      getHistory in interface IQuest
      Parameters:
      player - Player
      Returns:
      list of history item-names
    • getNPCName

      public String getNPCName()
      Description copied from class: AbstractQuest
      Returns the starter NPC for the quest, or null if there is none
      Specified by:
      getNPCName in interface IQuest
      Overrides:
      getNPCName in class AbstractQuest
      Returns:
      NPC name, or null for quests with no starter NPC
    • getRegion

      public String getRegion()
      Description copied from class: AbstractQuest
      Returns the region where the quest adventure takes place (or begins), or null for global quests
      Specified by:
      getRegion in interface IQuest
      Overrides:
      getRegion in class AbstractQuest
      Returns:
      region, or null for global quests