Class LuaQuestHelper
java.lang.Object
games.stendhal.server.core.scripting.lua.LuaQuestHelper
Exposes quest creation & handling to Lua.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest
create()
Creates a new quest instance.games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest
Creates a new quest instance.games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest
Creates a new quest instance.games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest
Creates a new quest instance.static LuaQuestHelper
get()
Retrieves the static instance.getCompleted(Player player)
getDescription(Player player, String questName)
getDescriptionForUnstartedInRegionFromNPCName(Player player, String region, String name)
getIncomplete(Player player, String region)
getLevelWarning(Player player, String questName)
getNPCNamesForUnstartedInRegionForLevel(Player player, String region)
getProgressDetails(Player player, String questName)
Retrieves the IQuest object for a named quest.getQuestFromSlot(String questSlot)
getRepeatable(Player player)
boolean
Checks if a quest has been loaded.Creates a report on a specified quest for a specified player.List all quests the player knows about.listStates(Player player)
Dumps the internal quest states for the specified player.void
Adds a quest to the world.void
Deprecated.UseLuaQuest.register
.void
Removes a qeust from the world.
-
Field Details
-
simple
-
-
Method Details
-
get
Retrieves the static instance.- Returns:
- Static QuestHelper instance.
-
create
public games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest create()Creates a new quest instance.- Returns:
- New LuaQuest instance.
-
create
Creates a new quest instance.- Parameters:
slotName
- The slot identifier.- Returns:
- New LuaQuest instance.
-
create
public games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest create(String slotName, String name)Creates a new quest instance.- Parameters:
name
- The quest name.slotName
- The slot identifier.minLevel
- Recommended minimum level.- Returns:
- New LuaQuest instance.
-
create
public games.stendhal.server.core.scripting.lua.LuaQuestHelper.LuaQuest create(String slotName, String name, String desc)Creates a new quest instance.- Parameters:
slotName
- The slot identifier.name
- Reader friendly name.desc
- Quest description.- Returns:
- New LuaQuest instance.
-
load
Adds a quest to the world.- Parameters:
quest
- Quest to be loaded.
-
unload
Removes a qeust from the world.- Parameters:
questName
- String name of the quest.
-
cache
Deprecated.UseLuaQuest.register
.Caches a quest for loading at startup.- Parameters:
quest
- Quest to be cached.
-
register
Deprecated.UseLuaQuest.register
.Caches a quest for loading at startup.- Parameters:
quest
- Quest to be cached.
-
isLoaded
Checks if a quest has been loaded.- Parameters:
quest
- Quest instance to be checked.- Returns:
true
if the instances matches stored quests.
-
listAll
List all quests the player knows about.- Parameters:
player
- Player to create the report for.- Returns:
- Report.
-
list
Creates a report on a specified quest for a specified player.- Parameters:
player
- Player to create the report for.questName
- Name of quest to be reported.- Returns:
- Report.
-
listStates
Dumps the internal quest states for the specified player. This is used for the InspectAction.- Parameters:
player
- Player to create report for.- Returns:
- Report.
-
getQuest
Retrieves the IQuest object for a named quest.- Parameters:
questName
- Name of quest.- Returns:
- IQuest or
null
if it does not exist.
-
getQuestFromSlot
- Parameters:
questSlot
-- Returns:
-
getOpen
- Parameters:
player
-- Returns:
-
getCompleted
- Parameters:
player
-- Returns:
-
getIncomplete
- Parameters:
player
-region
-- Returns:
-
getRepeatable
- Parameters:
player
-- Returns:
-
getDescription
- Parameters:
player
-questName
-- Returns:
-
getLevelWarning
- Parameters:
player
-questName
-- Returns:
-
getProgressDetails
- Parameters:
player
-questName
-- Returns:
-
getNPCNamesForUnstartedInRegionForLevel
- Parameters:
player
-region
-- Returns:
-
getDescriptionForUnstartedInRegionFromNPCName
public List<String> getDescriptionForUnstartedInRegionFromNPCName(Player player, String region, String name)- Parameters:
player
-region
-name
-- Returns:
-
LuaQuest.register
.