You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:Quests"
John adams (talk | contribs) |
|||
| Line 1: | Line 1: | ||
| − | + | Quest scripts are what makes quests work, there are only 4 core functions however custom functions are needed for a quest to work properly. These custom functions can be declared with [[LUA:AddQuestStepCompleteAction|AddQuestStepCompleteAction()]] and [[LUA:SetQuestCompleteAction|SetQuestCompleteAction()]], in both cases the first parameter is the quest the second is the player. | |
| + | |||
| + | == Accepted == | ||
| + | Accepted is called when the player accepts the quest | ||
| + | |||
| + | <pre> | ||
| + | function Accepted(Quest, Spawn) | ||
| + | end | ||
| + | </pre> | ||
| + | == Declined == | ||
| + | Declined is called when the player declines the quest | ||
| + | |||
| + | <pre> | ||
| + | function Declined(Quest, Spawn) | ||
| + | end | ||
| + | </pre> | ||
| + | == Deleted == | ||
| + | Deleted is called when a player deletes a quest | ||
| + | |||
| + | <pre> | ||
| + | function Deleted(Quest, Spawn) | ||
| + | end | ||
| + | </pre> | ||
| + | == Reload == | ||
| + | Reload is called when a player logs in with an incomplete quest, the third parameter is the step id the player is on | ||
| + | |||
| + | <pre> | ||
| + | function Reload(Quest, Spawn, int32) | ||
| + | end | ||
| + | </pre> | ||
Revision as of 22:25, 27 December 2013
Quest scripts are what makes quests work, there are only 4 core functions however custom functions are needed for a quest to work properly. These custom functions can be declared with AddQuestStepCompleteAction() and SetQuestCompleteAction(), in both cases the first parameter is the quest the second is the player.
Contents
Accepted
Accepted is called when the player accepts the quest
function Accepted(Quest, Spawn) end
Declined
Declined is called when the player declines the quest
function Declined(Quest, Spawn) end
Deleted
Deleted is called when a player deletes a quest
function Deleted(Quest, Spawn) end
Reload
Reload is called when a player logs in with an incomplete quest, the third parameter is the step id the player is on
function Reload(Quest, Spawn, int32) end