-
Notifications
You must be signed in to change notification settings - Fork 52
Quest
MMOMinion edited this page Feb 16, 2014
·
6 revisions
- Functions needed for questing.
- none
- Quest:GetQuestList()
- returns a lua table containing the players current quests. The table key is the questid. The questid is also part of the returned quest objects inside the table.
- Quest:IsLoading()
- returns true while the game is on the loading screen
- Quest:IsQuestCompleted( QuestId )
- Checks if the quest with the passed id is flagged as completed and can be turned in
- Quest:GetQuestCurrentStep( QuestId )
- Returns the current quest step (1-254). A quest step with the value 255 indicates the quest is completed
- Quest:HasQuest( QuestId )
- Checks if the quest with the passed id is currently in the journal of the player
- Quest:AcceptQuest()
- Accepts the quest currently open in the quest accept dialog. Returns true if the dialog was open, false else
- Quest:DeclineQuest()
- Declines the quest currently open in the quest accept dialog. Returns true if the dialog was open, false else
- Quest:IsQuestAcceptDialogOpen( questid )
- Checks if the quest accept dialog is open. if a questid is passed it also checks that the quest id of the dialog matches it. Returns true if so, false else
- Quest:GetSelectedJournalQuest()
- Returns the quest currently selected in the quest journal. If the journal is closed or none is selected, nil is returned
- Quest:IsRequestDialogOpen()
- Checks if the item turn in request dialog is currently open. This dialog pops up when you have to deliver items to a npc. You can use the items HandOver() function to deliver them. You still need to call RequestHandOver() to close the dialog after you handed over the item
- Quest:RequestHandOver()
- Closes the request dialog by pressing the "Hand over" button
- Quest:RequestCancel()
- Closes the request dialog by pressing the "Cancel" button
- Quest:IsQuestRewardDialogOpen()
- Checks if the reward dialog is currently open. returns true/false
- Quest:CompleteQuestReward( {itemindex} )
- Completes the currently open reward dialog. if the dialog contains reward items to choose from, an item index must be passed. the leftmost item starts with index 0. If the quest has no items to choose from, just call the function without any parameters.
- Quest:DeclineQuestReward()
- Closes the reward dialog by pressing the "Decline" button
Quest/Event items are stored in the bag-type 2004. You can request the list of item by using the Inventory object ( d(Intentory("type=2004")) ). Every event item has a HandOver() function that can be used to turn that item in at any npc when the request dialog is open. Some quest may require you to turn in multiple items, just call the HandOver() function on each of them. The Dev-Tools module can display the event items too, if you select the right bag-type.