View Single Post
  #1  
Old 08-29-2002, 03:08 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Timevar: Minutes/Hours/Days/Months/Years

I decided to play w/ timevar yesterday, and it took me a bit to come up with the following, but I find it may be helpful for others if they intend to do some sort of server time system
NPC Code:

if (created || timeout)
{ this.minutes=timevar*5/60;
for (m=0;this.minutes>60;m++)
{ this.minutes=this.minutes-60;}
this.hours=timevar*5/60/60;
for (h=0;this.hours>24;h++)
{ this.hours=this.hours-24;}
showimg 237,@@bc@#v(this.hours):#v(this.minutes),screenwid th/3,screenheight/screenheight+40;
changeimgzoom 237,0.8;
changeimgvis 237,4;
timeout=0.05;
}


it should ALL be clientsided btw, I don't know if timevar works clientside yet because I haven't been home to test anything, I've done this ALL at school today, enjoy, you're welcome BTW.
---Shifter
P.S. If you DO end up using part(s) of my ideas here, please include //Timevar: hours/minutes by Projectshifter ([email protected]) thanks.
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote