Class ToysCollector
java.lang.Object
games.stendhal.server.maps.quests.AbstractQuest
games.stendhal.server.maps.quests.ToysCollector
- All Implemented Interfaces:
IQuest
,BringListOfItemsQuest
QUEST: Toys Collector
PARTICIPANTS:
- Anna, a girl who live in Ados
- Anna asks for some toys
- You guess she might like a teddy, dice or dress
- You bring the toy to Anna
- Repeat until Anna received all toys. (Of course you can bring several toys at the same time.)
- Anna gives you a reward
- 3 pies
- 100 XP
- 10 Karma
- None.
-
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.askForMissingItems(List<String> missingItems)
firstAskForMissingItems(List<String> missingItems)
getHistory(Player player)
Gets a the quest history for the given player, written in the first person.double
getName()
Returns the name of the quest.getNPC()
the NPC which wants the items.Returns the starter NPC for the quest, or null if there is noneReturns the region where the quest adventure takes place (or begins), or null for global questsThe slot-name in !quests.respondToOfferOfNotExistingItem(String itemName)
respondToPlayerSayingHeHasNoItems(List<String> missingItems)
Note: This needs to include the trigger phrase which displays the list of missing items.void
rewardPlayer(Player player)
boolean
Methods inherited from class games.stendhal.server.maps.quests.AbstractQuest
fillQuestInfo, getFormattedHistory, getHint, getMinLevel, getQuestInfo, isCompleted, isRepeatable, isStarted, isVisibleOnQuestStatus, removeFromWorld, updatePlayer
-
Constructor Details
-
ToysCollector
public ToysCollector()
-
-
Method Details
-
getHistory
Description copied from interface:IQuest
Gets a the quest history for the given player, written in the first person.- Specified by:
getHistory
in interfaceIQuest
- Parameters:
player
- Player- Returns:
- list of history item-names
-
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
-
getNPC
Description copied from interface:BringListOfItemsQuest
the NPC which wants the items.- Specified by:
getNPC
in interfaceBringListOfItemsQuest
- Returns:
- SpeakerNPC
-
getNeededItems
- Specified by:
getNeededItems
in interfaceBringListOfItemsQuest
-
getSlotName
Description copied from class:AbstractQuest
The slot-name in !quests.- Specified by:
getSlotName
in interfaceBringListOfItemsQuest
- Specified by:
getSlotName
in interfaceIQuest
- Specified by:
getSlotName
in classAbstractQuest
- Returns:
- the slot's name
-
getTriggerPhraseToEnumerateMissingItems
- Specified by:
getTriggerPhraseToEnumerateMissingItems
in interfaceBringListOfItemsQuest
-
getAdditionalTriggerPhraseForQuest
- Specified by:
getAdditionalTriggerPhraseForQuest
in interfaceBringListOfItemsQuest
-
getKarmaDiffForQuestResponse
public double getKarmaDiffForQuestResponse()- Specified by:
getKarmaDiffForQuestResponse
in interfaceBringListOfItemsQuest
-
welcomeBeforeStartingQuest
- Specified by:
welcomeBeforeStartingQuest
in interfaceBringListOfItemsQuest
-
welcomeDuringActiveQuest
- Specified by:
welcomeDuringActiveQuest
in interfaceBringListOfItemsQuest
-
welcomeAfterQuestIsCompleted
- Specified by:
welcomeAfterQuestIsCompleted
in interfaceBringListOfItemsQuest
-
shouldWelcomeAfterQuestIsCompleted
public boolean shouldWelcomeAfterQuestIsCompleted()- Specified by:
shouldWelcomeAfterQuestIsCompleted
in interfaceBringListOfItemsQuest
-
respondToQuest
- Specified by:
respondToQuest
in interfaceBringListOfItemsQuest
-
respondToQuestAfterItHasAlreadyBeenCompleted
- Specified by:
respondToQuestAfterItHasAlreadyBeenCompleted
in interfaceBringListOfItemsQuest
-
respondToQuestAcception
Description copied from interface:BringListOfItemsQuest
Note: This needs to include the trigger phrase which displays the list of missing items.- Specified by:
respondToQuestAcception
in interfaceBringListOfItemsQuest
- Returns:
- response
-
respondToQuestRefusal
- Specified by:
respondToQuestRefusal
in interfaceBringListOfItemsQuest
-
firstAskForMissingItems
- Specified by:
firstAskForMissingItems
in interfaceBringListOfItemsQuest
-
askForMissingItems
- Specified by:
askForMissingItems
in interfaceBringListOfItemsQuest
-
respondToPlayerSayingHeHasNoItems
- Specified by:
respondToPlayerSayingHeHasNoItems
in interfaceBringListOfItemsQuest
-
askForItemsAfterPlayerSaidHeHasItems
- Specified by:
askForItemsAfterPlayerSaidHeHasItems
in interfaceBringListOfItemsQuest
-
respondToItemBrought
- Specified by:
respondToItemBrought
in interfaceBringListOfItemsQuest
-
respondToLastItemBrought
- Specified by:
respondToLastItemBrought
in interfaceBringListOfItemsQuest
-
rewardPlayer
- Specified by:
rewardPlayer
in interfaceBringListOfItemsQuest
-
respondToOfferOfNotExistingItem
- Specified by:
respondToOfferOfNotExistingItem
in interfaceBringListOfItemsQuest
-
respondToOfferOfNotMissingItem
- Specified by:
respondToOfferOfNotMissingItem
in interfaceBringListOfItemsQuest
-
respondToOfferOfNotNeededItem
- Specified by:
respondToOfferOfNotNeededItem
in interfaceBringListOfItemsQuest
-
getName
Description copied from interface:IQuest
Returns the name of the quest.- Specified by:
getName
in interfaceIQuest
- Specified by:
getName
in classAbstractQuest
- Returns:
- name
-
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 interfaceIQuest
- Overrides:
getRegion
in classAbstractQuest
- Returns:
- region, or null for global quests
-
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
-