I need somebody to add a line in here to set shiny to none at night and med during the day. Your quick edit would be very much apreciated as i have little experience with scripts outside of value changing.
Thank You in advance,
~Lefty
// My Light Control (no dataserver)
// Chromal Brodsky
// v0.0.4 - 2004-03-30
//
// Controls a light based upon the virtual time of day.
//
// v0.0.1 - 0.0.3 - initial revs
// v0.0.4 - uses the new llSetPrimitiveParams() call to disable client light rendering when off!
float fTime = 0;
float fDayThresh = 0.66;
float fNightThresh = 3.46;
integer iTimerSecs = 300;
string sOutPre;
init()
{
sOutPre = llGetScriptName() + ": ";
refresh();
llSetTimerEvent(iTimerSecs);
llWhisper(0, sOutPre + (string)fTime + ": startup..."
;
llWhisper(0, "Timer interval is: " + (string)iTimerSecs + " seconds."
;
}
refresh()
{
fTime = llGetTimeOfDay() / 3600.0;
}
set_light(integer iOn)
{
if (iOn == TRUE)
{
llSetPrimitiveParams( [PRIM_MATERIAL, PRIM_MATERIAL_LIGHT] );
}
else
{
llSetPrimitiveParams( [PRIM_MATERIAL, PRIM_MATERIAL_GLASS] );
}
}
integer IsDay(float fTimeOfDay)
{
integer iDay;
if ( fTimeOfDay > fDayThresh && fTimeOfDay < fNightThresh )
{
iDay = TRUE;
}
else
{
iDay = FALSE;
}
return iDay;
}
default
{
state_entry()
{
init();
if ( IsDay(fTime) )
{
state Day;
}
else
{
state Night;
}
}
}
state Day
{
state_entry()
{
refresh();
set_light( FALSE );
}
timer()
{
refresh();
if ( !IsDay(fTime) )
{
state Night;
}
}
}
state Night
{
state_entry()
{
refresh();
set_light( TRUE );
}
timer()
{
refresh();
if ( IsDay(fTime) )
{
state Day;
}
}
}
// Chromal Brodsky
// v0.0.4 - 2004-03-30
//
// Controls a light based upon the virtual time of day.
//
// v0.0.1 - 0.0.3 - initial revs
// v0.0.4 - uses the new llSetPrimitiveParams() call to disable client light rendering when off!
float fTime = 0;
float fDayThresh = 0.66;
float fNightThresh = 3.46;
integer iTimerSecs = 300;
string sOutPre;
init()
{
sOutPre = llGetScriptName() + ": ";
refresh();
llSetTimerEvent(iTimerSecs);
llWhisper(0, sOutPre + (string)fTime + ": startup..."

llWhisper(0, "Timer interval is: " + (string)iTimerSecs + " seconds."

}
refresh()
{
fTime = llGetTimeOfDay() / 3600.0;
}
set_light(integer iOn)
{
if (iOn == TRUE)
{
llSetPrimitiveParams( [PRIM_MATERIAL, PRIM_MATERIAL_LIGHT] );
}
else
{
llSetPrimitiveParams( [PRIM_MATERIAL, PRIM_MATERIAL_GLASS] );
}
}
integer IsDay(float fTimeOfDay)
{
integer iDay;
if ( fTimeOfDay > fDayThresh && fTimeOfDay < fNightThresh )
{
iDay = TRUE;
}
else
{
iDay = FALSE;
}
return iDay;
}
default
{
state_entry()
{
init();
if ( IsDay(fTime) )
{
state Day;
}
else
{
state Night;
}
}
}
state Day
{
state_entry()
{
refresh();
set_light( FALSE );
}
timer()
{
refresh();
if ( !IsDay(fTime) )
{
state Night;
}
}
}
state Night
{
state_entry()
{
refresh();
set_light( TRUE );
}
timer()
{
refresh();
if ( IsDay(fTime) )
{
state Day;
}
}
}