https://github.com/aura-project/melia/blob/master/src/ChannelServer/Scripting/ScriptManager.cs#L1488
Though I'd like to mention that quests are often times their own system, and might not require manual variable setting, depending on TOS's quest system and our implementation, which will have a huge impact on how counters, timers, etc. work.
Phasing, I guess that's more of a core feature, even though the scripts need to be able to control it.
Those are certainly functions Melia will need in some way or form, but I thought you had basic NPC functions in mind that will be needed to write basic NPCs^^ I think before systems to save quest progress and phasing are implemented in scripts somehow, they should be properly researched, for them to be implemented in the optimal way. I imagine both will be mainly controlled by the core, with scripts only having some simple access functions in the script manager, like startquest and completequest.