Nice. Here is what i'm working with so far. It's got a few errors that i'm working on atm. I'm currently tweaking trying to fix the problems. Too much nyquil in my system atm lol. Damn flu....
PHP Code:
//#CLIENTSIDE
function onCreated() {
onTimeout();
}
function onTimeout() {
temp.minutes = timevar [percent] 60;
temp.hours = int(timevar / 60) [percent] 24;
temp.display = (temp.hours < 10 ? "0" : "") @ temp.hours @ ":" @ (temp.minutes < 10 ? "0" : "") @ temp.minutes;
with (findimg(200)) {
text = "Time: " @ temp.display;
font = "Arial";
x = 5;
y = screenheight - 25;
layer = 4;
}
if (temp.hours >5 && temp.hours <= 20) {
this.sunrise=0;
seteffect(0,0,0,0);
echo("5");
}
if (temp.hours >22) {
echo("2");
seteffect(0,0,0,0);
this.sunset=0;
}
if (temp.hours==5 && temp.sunrise ==0) {
temp.sunrise=1;
echo(temp.sunrise);
Sunrise();
}
if (temp.hours==21 && this.sunet==0) {
temp.sunset=1;
Sunset();
}
if (temp.hours < 4) {
seteffect(0,0,0,.5);
echo("3");
}
setTimer(5);
}
function onPlayerChats() {
player.chat.tokenize;
if (params[0]=="sunrise") {
Sunrise();
}
if (params[0]=="sunset") {
Sunset();
}
}
function Sunrise() {
seteffect(0,0,0,0.4);
sleep(2);
seteffect(0,0,0,0.3);
sleep(2);
seteffect(0,0,0,0.2);
sleep(2);
seteffect(0,0,0,0.1);
sleep(2);
seteffect(0,0,0,0);
}
function Sunset() {
seteffect(0,0,0,0.1);
sleep(2);
seteffect(0,0,0,0.2);
sleep(2);
seteffect(0,0,0,0.3);
sleep(2);
seteffect(0,0,0,0.4);
sleep(2);
seteffect(0,0,0,.5);
}