Example of new quest
From Mashinky
{ "value1", "value2"}
value1 = 0 -- Global variable
function OnStart() -- callback when you add this script (usualy startinf conditions, values and some work for texts)
UpdateCaption("Name of Quest") UpdateText("Quest text")
AddButton("Button1", 0, -1, true) -- Add button with tag = 0
return true end
function OnLoad() -- Code loaded after you load a game file (write text, define tables, etc.)
-- enter the code here
return true end
-- Use some of game callbacks or your own functions (for example OnDay, OnCargoUnalod, OnSecond,...)
function OnButton(tag) -- When you click ok button if (tag == 0) then -- If button has tag 0
-- enter code here end
return tag end