Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.