31 lines
749 B
Plaintext
31 lines
749 B
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Olander's - Day Night Shifting for DM
|
|
// opw_day_night
|
|
// By:Don Anderson
|
|
// dandersonru@msn.com
|
|
//
|
|
// This is placed in the Module OnActivated Event
|
|
//
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetItemActivator();
|
|
object oItem = GetItemActivated();
|
|
string sItem = GetTag(oItem);
|
|
|
|
if(sItem != "DM_DAYNIGHTTOOL") return;
|
|
|
|
int nHour = GetTimeHour();
|
|
|
|
//Set these to your Module Morning and Evening Setting
|
|
int nMorning = 6;
|
|
int nEvening = 18;
|
|
|
|
if (nHour >= 18) nHour = nMorning;
|
|
else if (nHour < 18) nHour = nEvening;
|
|
|
|
SetTime(nHour,0,0,0);
|
|
}
|