Class CollectEnemyData
java.lang.Object
games.stendhal.server.maps.quests.AbstractQuest
games.stendhal.server.maps.quests.CollectEnemyData
- All Implemented Interfaces:
IQuest
QUEST: Collect Enemy Data (collect_enemy_data)
PARTICIPANTS:
- Rengard, a wandering adventurer.
- Find Rengard wandering around Faimouni.
- He will ask for information on 3 different creatures.
- Kill each creature & bring him the requested information.
- Can buy bestiary from Rengard.
- karma
- 35.0 for starting quest.
- 200.0 for completing quest.
- Not repeatable.
-
Field Summary
Fields inherited from class games.stendhal.server.maps.quests.AbstractQuest
npcs, questInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adds the quest to the game world (e.g.getAnswerForStep(Player player, Creature creature, int step)
Retrieves the correct answer for the step.int
getCurrentStep(Player player)
Retrieves currently active step.getEnemyForStep(Player player, int step)
Retrieves enemy name stored in quest slot that player must kill for step.getHistory(Player player)
Gets a the quest history for the given player, written in the first person.getName()
Returns the name of the quest.Returns the starter NPC for the quest, or null if there is nonegetQuestionForStep(Player player, int step)
Retrieves the question that will be asked for the step.getRecordedKillsForStep(Player player, int step)
Retrieves original kill count of enemy before quest was started.The slot-name in !quests.boolean
isCompleted(Player player)
Was the quest completed? Note: A quest can be completed without its status being "Done" (e.boolean
isStepDone(Player player, int step)
Checks if player has completed a step.boolean
removes a quest from the world.Methods inherited from class games.stendhal.server.maps.quests.AbstractQuest
fillQuestInfo, getFormattedHistory, getHint, getMinLevel, getQuestInfo, getRegion, isRepeatable, isStarted, isVisibleOnQuestStatus, updatePlayer
-
Field Details
-
zonesWhitelist
-
-
Constructor Details
-
CollectEnemyData
public CollectEnemyData()
-
-
Method Details
-
getCurrentStep
Retrieves currently active step.- Parameters:
player
- Player doing the quest.- Returns:
- The step index.
-
isStepDone
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
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
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
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
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
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
Description copied from class:AbstractQuest
The slot-name in !quests.- Specified by:
getSlotName
in interfaceIQuest
- Specified by:
getSlotName
in classAbstractQuest
- 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 interfaceIQuest
- Specified by:
addToWorld
in classAbstractQuest
-
removeFromWorld
public boolean removeFromWorld()Description copied from class:AbstractQuest
removes a quest from the world.- Specified by:
removeFromWorld
in interfaceIQuest
- Overrides:
removeFromWorld
in classAbstractQuest
- Returns:
- true, if the quest could be removed; false otherwise.
-
getName
Description copied from interface:IQuest
Returns the name of the quest.- Specified by:
getName
in interfaceIQuest
- Specified by:
getName
in classAbstractQuest
- Returns:
- name
-
getNPCName
Description copied from class:AbstractQuest
Returns the starter NPC for the quest, or null if there is none- Specified by:
getNPCName
in interfaceIQuest
- Overrides:
getNPCName
in classAbstractQuest
- Returns:
- NPC name, or null for quests with no starter NPC
-
isCompleted
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 interfaceIQuest
- Overrides:
isCompleted
in classAbstractQuest
- Parameters:
player
- Player- Returns:
- true, if it was completed, false otherwise
-