what this does

<aside> 🎯

<aside> 🔥

how to make

omwscripts file

<aside> ⚙

# scripts to load on quest reward

PLAYER: quest_local.lua
GLOBAL: quest_global.lua  

</aside>

<aside> ⚠️

You can then put this file somewhere into selected data files or make a new folder and select it in the launcher.

omwcscripts file should show up in the data files tab. you can select it active now or any stage of script making for testing.

making the player script

<aside> ✅

-- this happens registering the handler in a script with a return
return { engineHandlers = { onQuestUpdate = onQuestUpdate } } 

</aside>

<aside> 🎸

local questid = { MS_FargothRing = 10 } -- quest and stage

local function onQuestUpdate( questid ) 
	-- do stuff
end

</aside>


so code can be looking like this atm

local questid = { MS_FargothRing = 10 }

local function onQuestUpdate( questid )

end

return { engineHandlers = { onQuestUpdate = onQuestUpdate } } 

-- commented out code, single line
-- [[ commented out code, can be multiline ]]

<aside> ♻️

now let’s bring in some requires on top of the script

-- for prefencing the player 
		local self = require('openmw.self')
		
-- and for sending the event 
		local core = require('openmw.core')

</aside>