Thread: Time Problem
View Single Post
  #8  
Old 11-05-2006, 02:02 PM
Loakey_P2P Loakey_P2P is offline
SL Oldbie
Loakey_P2P's Avatar
Join Date: Apr 2006
Location: U.S.A
Posts: 137
Loakey_P2P is an unknown quantity at this point
Send a message via AIM to Loakey_P2P Send a message via Yahoo to Loakey_P2P
well i guess no one can tell me why im having problem's getting a database npc to check flag's on another database npc ? ive given the code for the weather npc . if you still need more all i can give is the time npc . which isnt that complicated . it's not very long and not very complicated .

PHP Code:
function onCreated(){
  
setTimer(5);
}
function 
onTimeout(){
  
this.namesday={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};

  
this.sec = (int(timevar 5)) % 60;
  
this.min = (int(timevar 12) + 4) % 60;
  
this.hour = (int(timevar / (12 60)) + 2) % 24;
  
this.days = (int(timevar / (12*60*24)) + 31) % 365;
  
this.years int(timevar / (12 60 24 365)) + 2001;
  
this.season = (int(this.days / (365 4)) - 3) % 4;
  
this.leapyear this.years == int(this.years 4);
  if(
this.season "0"){setstring serverr.season,spring;this.season "spring";}
  if(
this.season "1"){setstring serverr.season,summer;this.season "summer";}
  if(
this.season "2"){setstring serverr.season,fall;this.season "fall";}
  if(
this.season "3"){setstring serverr.season,winter;this.season "winter";}
  
setTimer(5);

any help please ? from anyone . after posting it and looking at it a minute i wonder if i shouldnt case the "if(this.season)" parts ?
__________________
Shaded Legend Playerworld
-Past accounts - LoakeyTheElf - Loakey_P2P
-Past Servers - Rune - Sparitoria - Shaded Legends
-Past Sl Jobs * ET/LAT/NAT/LAT Admin/Developer/Admin/Head Admin/Asst. Manager/Manager
-Current Job - Retired

*Sorry you must have mistaken me for someone that cares .
Reply With Quote