New Quest LUA Functions
Posted: Sun Jul 20, 2014 9:01 pm
New lua that adds support for timers, removing steps from a quest, and step failures
SetQuestTimer
RemoveQuestStep
ResetQuestStep
SetQuestTimerComplete
AddQuestStepFailureAction
SetStepFailed
Here is an example (cut and paste of my test script)
SetQuestTimer
RemoveQuestStep
ResetQuestStep
SetQuestTimerComplete
AddQuestStepFailureAction
SetStepFailed
Here is an example (cut and paste of my test script)
Code: Select all
function test(Quest, QuestGiver, Player)
UpdateQuestTaskGroupDescription(Quest, 1, "I'm supposed to help Trapper Borgus get the provisions his family requires, I should get them back to him as soon as I am done.")
ResetQuestStep(Quest, 1, "Reset Test", "I'm supposed to help Trapper Borgus get the provisions his family requires, I should get them back to him as soon as I am done.")
SetQuestTimerComplete(Quest, Player)
RemoveQuestStep(Player, Quest, 2)
Say(Player, "Timer Expired!")
end
function FinishedKilling(Quest, QuestGiver, Player)
SetQuestTimer(Quest, Player, 2, 20, "test")
UpdateQuestTaskGroupDescription(Quest, 1, "I've slain quite a few of the local Steppes creatures, this should be enough for the needed provisions.")
AddQuestStepChat(Quest, 2, "I should return to Trapper Borgus on the road to Antonica in the Thundering Steppes.", 1, "I should report back to Trapper Borgus.", 11, 2490327)
AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
SetCompleteFlag(Quest)
end