Class CollectEnemyData

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

public class CollectEnemyData extends AbstractQuest
QUEST: Collect Enemy Data (collect_enemy_data) PARTICIPANTS:
  • Rengard, a wandering adventurer.
STEPS:
  • Find Rengard wandering around Faimouni.
  • He will ask for information on 3 different creatures.
  • Kill each creature & bring him the requested information.
REWARD:
  • Can buy bestiary from Rengard.
  • karma
    • 35.0 for starting quest.
    • 200.0 for completing quest.
REPETITIONS:
  • Not repeatable.
  • Field Details

    • zonesWhitelist

      public static final String[] zonesWhitelist
  • Constructor Details

    • CollectEnemyData

      public CollectEnemyData()
  • Method Details

    • getCurrentStep

      public int getCurrentStep(Player player)
      Retrieves currently active step.
      Parameters:
      player - Player doing the quest.
      Returns:
      The step index.
    • isStepDone

      public boolean isStepDone(Player player, int step)
      Checks if player has completed a step.
      Parameters:
      player - Player doing the quest.
      step - The current quest step.
      Returns:
      true if the player has completed the step.
    • getEnemyForStep

      public String getEnemyForStep(Player player, int step)
      Retrieves enemy name stored in quest slot that player must kill for step.
      Parameters:
      player - Player doing the quest.
      step - The current quest step.
      Returns:
      Name of enemy player is tasked to kill for step.
    • getRecordedKillsForStep

      public Integer getRecordedKillsForStep(Player player, int step)
      Retrieves original kill count of enemy before quest was started.
      Parameters:
      player - Player doing the quest.
      step - The current quest step.
      Returns:
      Recorded kill count stored in quest slot.
    • getQuestionForStep

      public String getQuestionForStep(Player player, int step)
      Retrieves the question that will be asked for the step.
      Parameters:
      player - Player doing the quest.
      step - The current quest step.
      Returns:
      Question to be asked to player.
    • getAnswerForStep

      public String getAnswerForStep(Player player, Creature creature, int step)
      Retrieves the correct answer for the step.
      Parameters:
      player - Player doing the quest.
      creature - Creature which player was tasked to kill.
      step - The current quest step.
      Returns:
      The answer to the question asked.
    • 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
    • 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
    • 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
    • removeFromWorld

      public boolean removeFromWorld()
      Description copied from class: AbstractQuest
      removes a quest from the world.
      Specified by:
      removeFromWorld in interface IQuest
      Overrides:
      removeFromWorld in class AbstractQuest
      Returns:
      true, if the quest could be removed; false otherwise.
    • 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
    • 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
    • isCompleted

      public boolean isCompleted(Player player)
      Description copied from interface: IQuest
      Was the quest completed? Note: A quest can be completed without its status being "Done" (e. g. rejected, failed).
      Specified by:
      isCompleted in interface IQuest
      Overrides:
      isCompleted in class AbstractQuest
      Parameters:
      player - Player
      Returns:
      true, if it was completed, false otherwise