Creating New Quests [How To]

Keshire

Modder
Here we go. Here's how to start a new quest script.

You'll need to modify 2 files and add a new one.
luaenums.lua to add the scriptcode (There's more than enough unused for now though)
scriptactivation.lua to add the scriptactivation

And the new quest script.
The quest script has to be the same name as the questname your using in the scriptactivation

I'm using a scriptcode that isn't used at the moment.
scriptactivation.lua
Code:
-- QO810 Test
ScriptActivation[ScriptCode.QO810] = {}
ScriptActivation[ScriptCode.QO810].name = "QO810_KesQuest"
ScriptActivation[ScriptCode.QO810].display_name = "Kes Test Quest"
ScriptActivation[ScriptCode.QO810].start_chap = Chapters.Start
ScriptActivation[ScriptCode.QO810].end_chap = Chapters.End
ScriptActivation[ScriptCode.QO810].states = 
{
    "START"
}
ScriptActivation[ScriptCode.QO810].AbleToRun = nil
scripts/quests/QO810_KesQuest.lua
Code:
module(...,package.seeall)

QuestManager.NewQuestQuestThread("QO810_KesQuest")

function QO810_KesQuest:Init()
end

function QO810_KesQuest:State_START_SkipTo()
end

function QO810_KesQuest:State_START_Main()
    while true do
        coroutine.yield()
    end
end

function QO810_KesQuest:OnExit()
end
And now the quest is active from startgame to endgame.

I'll list how to register it in the hero's quest table next.
 
Top