Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 08-29-2002, 04:27 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
...

0.0
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #3  
Old 08-29-2002, 04:35 AM
voicedcow6666 voicedcow6666 is offline
Registered User
Join Date: May 2002
Location: Texas
Posts: 182
voicedcow6666 is on a distinguished road
I just tested that offline......it was all screwed up, the time that is, PLUS it was LAGGY as hell....it's pretty bad when a script is THAT laggy OFFLINE
Reply With Quote
  #4  
Old 08-29-2002, 05:42 AM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
i tried that too

Since someone brought up timevar,
here is what I did with it.

reply what you will about it.

one thing i ask is that
if you have a gripe or complaint then
you MUST also post a suggested fix,
even if its in plain english or algorithm-ish.
Attached Files
File Type: nw clock.nw (12.6 KB, 167 views)
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #5  
Old 08-29-2002, 05:52 AM
Legondary_MyTH Legondary_MyTH is offline
Registered User
Join Date: May 2002
Location: Levelville
Posts: 420
Legondary_MyTH is on a distinguished road
whoa

cool and i think prozac is in the running for best sig award =D
__________________
ArchMage Amedeus Valoryn of Zormite
Manager of Anarchy
Past Jobs:
Levels Admin on Renegade
LAT on Doomsday,Babylon,G3K
Developer on Faheria,Babylon
GP on Sanstrata,G3K
Reply With Quote
  #6  
Old 08-29-2002, 05:57 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
prozac, look into string arrays, instead of having to set a string for each month, do
setstring this.months,January,February,March,April,May,June, July,August,September,October,November,December;
and use a var to get the month
#I(this.months,0) = January
Reply With Quote
  #7  
Old 08-29-2002, 08:01 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
LOL, I did say however I didn't test the script. I didn't quite realize it couldn't process math quite like that =P I altered it a bit using w/ Commands, and it takes FOREVER to just CHUNK down the hours x.X So it sux0rz, he he.
---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
  #8  
Old 08-29-2002, 12:36 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by Python523
prozac, look into string arrays, instead of having to set a string for each month, do
setstring this.months,January,February,March,April,May,June, July,August,September,October,November,December;
and use a var to get the month
#I(this.months,0) = January
yes thats how i have it set up on enigma... :cough:
Reply With Quote
Reply


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:16 PM.


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