FANDOM


function time_myag_hub()

{

GlobalPer("time_hr") += 1;

GlobalPer("time_min") += 10;

time();

} function time()

{

GlobalPer("time_sec") = Rnd(1,59);

If (GlobalPer("time_min") >= 60)

{

GlobalPer("time_min") = 0;

GlobalPer("time_hr") += 1;

}

If (GlobalPer("time_hr") >= 24)

{

GlobalPer("time_hr") = 0;

GlobalPer("time_day") += 1;

}

If (GlobalPer("time_day") = 30)

{

GlobalPer("time_mnth") += 1;

GlobalPer("time_day") = 1;

}

If (GlobalPer("time_mnth") == 12)

{

GlobalPer("time_pass") += 1;

}

}

function PrintTime()

{

echo("The time is:");

echo(GlobalPer("time_hr") + ":" + GlobalPer("time_min") + ":" + GlobalPer("time_sec"));

echo("Day: " + GlobalPer("time_day");

}

function OnFirstEnter()

{

echo("Talk to the 'Time' NPC to get the time.");

echo("Alternatively you can Use a watch");

}

//time npc script

function OnDialog()

{

ClearOptions();

AddOption(0,"<Get Time>","PrintTime()","0");

AddOption(0,"<Leave>","","");

ProcessOptions();

}


//Watch Item Script

function OnUse()

{

PrintTime();

}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.