View Single Post
  #11  
Old 11-24-2009, 02:37 PM
Jman9912 Jman9912 is offline
Registered User
Join Date: Jun 2001
Location: North Carolina
Posts: 114
Jman9912 is on a distinguished road
Send a message via AIM to Jman9912
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 [percent60;
  
temp.hours int(timevar 60) [percent24;
  
temp.display =  (temp.hours 10 "0" "") @ temp.hours ":" @ (temp.minutes 10 "0" "") @ temp.minutes;
  
with (findimg(200)) {
    
text "Time: " temp.display;
    
font "Arial";
    
5;
    
screenheight 25;
    
layer 4;
  }
  
if (
temp.hours >&& 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==&& 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);

Reply With Quote