generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
30
_module/nss/opw_day_night.nss
Normal file
30
_module/nss/opw_day_night.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user