Valerius wrote:You can look at the sky to tell what the weather is. Best not to dwell on it much. Crops take 8 days to grow and you can't predict what the weather will be like in the future. Basically comes down to luck. Some harvests will be good, others not so much.
Vamyan wrote:The only problem lies in figuring out which server day it is...
function sqlStartDateCallback(%sqlObj)
{
if (%sqlObj.ok())
{
%sqlObj.nextRecord();
$gameDay = %sqlObj.getFieldValue("gameDay");
echo("Game Day: " @ $gameDay);
}
dbi.Remove(%sqlObj);
%sqlObj.delete();
}
function sqlStartDateQuery()
{
%gt = getGameTime();
// 26-08-2017 21:37:25
%time = nextToken(%gt,"date"," ");
%date = nextToken(%date,"day","-");
%date = nextToken(%date,"month","-");
%date = nextToken(%date,"year","-");
%sqldate = %year @ "-" @ %month @ "-" @ %day @ " " @ %time;
%nullObj= new RecordSet();
dbi.Select(%nullobj,sqlStartDateCallback,"SELECT MOD(DATEDIFF('" @ %sqldate @ "',`Begin`)+1,365) AS GameDay FROM day_version LIMIT 1");
}