Class AbstractQuest
java.lang.Object
games.stendhal.server.maps.quests.AbstractQuest
- All Implemented Interfaces:
IQuest
- Direct Known Subclasses:
AdMemoriaInPortfolio
,AdosDeathmatch
,AmazonPrincess
,AntivenomRing
,ArmorForDagobert
,BalloonForBobby
,BeerForHayunn
,Blackjack
,BowsForOuchit
,Campfire
,CaptureFlagQuest
,ChocolateForElisabeth
,CleanAthorsUnderground
,CleanStorageSpace
,CloakCollector
,CloakCollector2
,CloaksForBario
,ClubOfThorns
,CoalForHaunchy
,CodedMessageFromFinnFarmer
,CollectEnemyData
,CrownForTheWannaBeKing
,DailyItemQuest
,DailyMonsterQuest
,DiceGambling
,DragonLair
,EasterGiftsForChildren
,EggsForMarianne
,ElfPrincess
,ElvishArmor
,EmotionCrystals
,FindGhosts
,FindJefsMom
,FindRatChildren
,FishermansLicenseCollector
,FishermansLicenseQuiz
,FishSoup
,FishSoupForHughie
,FruitsForCoralia
,GoodiesForRudolph
,GuessKills
,HatForMonogenes
,HelpMrsYeti
,HelpTomi
,HelpWithTheHarvest
,HerbsForCarmen
,HerbsForJynath
,HouseBuying
,HungryJoshua
,IcecreamForAnnie
,ImperialPrincess
,JailedBarbarian
,JailedDwarf
,KanmararnSoldiers
,KillBlordroughs
,KillDarkElves
,KillDhohrNuggetcutter
,KillEnemyArmy
,KillGnomes
,KillMonks
,KillSpiders
,KoboldishTorcibud
,LearnAboutKarma
,LearnAboutOrbs
,LookBookforCeryl
,LookUpQuote
,Marriage
,Maze
,McPeglegIOU
,MealForGroongo
,MedicineForTad
,MeetBunny
,MeetHackim
,MeetHayunn
,MeetIo
,MeetKetteh
,MeetMarieHenri
,MeetMonogenes
,MeetSanta
,MeetZynn
,MineTownRevivalWeeks
,MineTownRevivalWeeksConstruction
,MithrilCloak
,MixtureForOrtiv
,MuseumEntranceFee
,NewsFromHackim
,ObsidianKnife
,PaperChase
,PizzaDelivery
,PlinksToy
,RainbowBeans
,RestockFlowerShop
,ReverseArrow
,RingMaker
,SadScientist
,ScubaLicenseQuiz
,SevenCherubs
,SheepGrowing
,SimpleQuestCreator.SimpleQuest
,Snowballs
,SolveRiddles
,Soup
,StuffForBaldemar
,StuffForVulcanus
,SuntanCreamForZara
,SuppliesForPhalk
,TakeGoldforGrafindle
,TheMissingBooks
,ThePiedPiper
,ToysCollector
,TrapsForKlaas
,TutorialIsland
,UltimateCollector
,VampireSword
,WaterForXhiphin
,WeaponsCollector
,WeaponsCollector2
,WeeklyItemQuest
,WizardBank
,ZekielsPracticalTestQuest
,ZooFood
Abstract class for quests. This is a default implementation of IQuest.
- Author:
- hendrik
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
adds the quest to the game world (e.g.void
fillQuestInfo(String name, String description, boolean repeatable)
fill fields of questInfo object with info about this questgetFormattedHistory(Player player)
Gets a list of possible hint-names.int
Returns the minimum level of player expected to start the quest.abstract String
getName()
Returns the name of the quest.Returns the starter NPC for the quest, or null if there is nonegetQuestInfo(Player player)
function will return information about this questReturns the region where the quest adventure takes place (or begins), or null for global questsabstract String
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
isRepeatable(Player player)
May the quest be repeated?boolean
Was the quest started?boolean
Determines whether the quest should be shown in the Quest Status/Progress logboolean
removes a quest from the world.void
updatePlayer(Player player)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface games.stendhal.server.maps.quests.IQuest
getHistory
-
Field Details
-
questInfo
-
npcs
NPCList.
-
-
Constructor Details
-
AbstractQuest
public AbstractQuest()
-
-
Method Details
-
getQuestInfo
Description copied from interface:IQuest
function will return information about this quest- Specified by:
getQuestInfo
in interfaceIQuest
- Parameters:
player
- - player for whom required quest info- Returns:
- - QuestInfo object with info about this quest
-
updatePlayer
- Specified by:
updatePlayer
in interfaceIQuest
- Parameters:
player
- Player
-
fillQuestInfo
fill fields of questInfo object with info about this quest- Parameters:
name
- - name of the questdescription
- - short description of this quest in a neutral tense (not first person)repeatable
- - is quest repeatable or not
-
getSlotName
The slot-name in !quests.- Specified by:
getSlotName
in interfaceIQuest
- Returns:
- the slot's name
-
addToWorld
public abstract 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
-
removeFromWorld
public boolean removeFromWorld()removes a quest from the world.- Specified by:
removeFromWorld
in interfaceIQuest
- Returns:
- true, if the quest could be removed; false otherwise.
-
getHint
Description copied from interface:IQuest
Gets a list of possible hint-names.The hint system will ensure that the same hint is not displayed twice. This class creates a list of useful hints (without hints about already completed parts).
-
getMinLevel
public int getMinLevel()Description copied from interface:IQuest
Returns the minimum level of player expected to start the quest. Used for choosing which hints to give. To set a hard minimum level requirement for doing the quest, use level related ChatConditions in the quest methods- Specified by:
getMinLevel
in interfaceIQuest
- Returns:
- level
-
getFormattedHistory
- Specified by:
getFormattedHistory
in interfaceIQuest
-
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
- Parameters:
player
- Player- Returns:
- true, if it was completed, false otherwise
-
isRepeatable
Description copied from interface:IQuest
May the quest be repeated?- Specified by:
isRepeatable
in interfaceIQuest
- Parameters:
player
- Player- Returns:
- true, if it can be repeated, false otherwise
-
isStarted
Description copied from interface:IQuest
Was the quest started? -
getName
Description copied from interface:IQuest
Returns the name of the quest. -
isVisibleOnQuestStatus
public boolean isVisibleOnQuestStatus()Description copied from interface:IQuest
Determines whether the quest should be shown in the Quest Status/Progress log- Specified by:
isVisibleOnQuestStatus
in interfaceIQuest
- Returns:
- true, if the quest is visible, false otherwise
-
getRegion
Returns the region where the quest adventure takes place (or begins), or null for global quests -
getNPCName
Returns the starter NPC for the quest, or null if there is none- Specified by:
getNPCName
in interfaceIQuest
- Returns:
- NPC name, or null for quests with no starter NPC
-