Class GuessKills

java.lang.Object
games.stendhal.server.maps.quests.AbstractQuest
games.stendhal.server.maps.quests.GuessKills
All Implemented Interfaces:
IQuest

public class GuessKills extends AbstractQuest
QUEST: The Guessing Game PARTICIPANTS:
  • Crearid, an old lady found in Nalwor city
STEPS:
  • Crearid asks if you want to play a game
  • She picks a random creature you have killed and asks you to guess how many of those you killed
  • You get three guesses and get rewarded if your guess exactly matches the number or a lower reward if your guess is close to the correct number
SLOTS: (subtract from list index to get slot index)
  1. Quest state: done, 1, 2 or 3 (where 1, 2 and 3 represent what guess the player is on)
  2. Timestamp: last time quest was completed
  3. Creature: the creature that was asked about if quest was not completed
REWARD:
  • 150 XP if guess is exact
  • 90 XP if guess is close
REPETITIONS:
  • Weekly
  • Field Details

  • Constructor Details

    • GuessKills

      public GuessKills()
      Create new quest instance.
  • Method Details

    • 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
    • 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
    • isRepeatable

      public boolean isRepeatable(Player player)
      Description copied from interface: IQuest
      May the quest be repeated?
      Specified by:
      isRepeatable in interface IQuest
      Overrides:
      isRepeatable in class AbstractQuest
      Parameters:
      player - Player
      Returns:
      true, if it can be repeated, false otherwise
    • 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
    • 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.
      Parameters:
      player - Player
      Returns:
      list of history item-names
    • prepareQuestStep

      public void prepareQuestStep()
      Sets the FSM for the NPC with all required responses and interactions
    • 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