Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-08-2005, 07:40 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Real-time Graal.

I was thinking that a real-time Graal clock would be useful to, say, script automatic updates/refreshing for assorted things; shops, treasure chests, maybe some events.
Reply With Quote
  #2  
Old 01-08-2005, 08:00 PM
Sildae Sildae is offline
Elven sorceress!
Sildae's Avatar
Join Date: Dec 2001
Location: Lothlòrien
Posts: 159
Sildae is on a distinguished road
Why don't you script it?
__________________
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw
Reply With Quote
  #3  
Old 01-08-2005, 08:09 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by protagonist
I was thinking that a real-time Graal clock would be useful to, say, script automatic updates/refreshing for assorted things; shops, treasure chests, maybe some events.
I agree, but then it would help to have a serveroption that specifies a time offset from GMT to help people prevent confusion.
__________________
Skyld
Reply With Quote
  #4  
Old 01-08-2005, 09:11 PM
oinknessx oinknessx is offline
Banned
oinknessx's Avatar
Join Date: Apr 2004
Location: United States
Posts: 646
oinknessx is on a distinguished road
Send a message via AIM to oinknessx
I think what he was trying to say is that Graal should have it's own set time that is in the program, so if it is night on one playerworld it would also be night on other playerworlds.. And yes, I agree that I think that could be very useful.
Reply With Quote
  #5  
Old 01-08-2005, 09:40 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
why dont you just script it, and have all the participating playerworlds use the same calculations?

you can already display the real life time on your playerworld
__________________

Reply With Quote
  #6  
Old 01-08-2005, 09:52 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Evil_Trunks
why dont you just script it, and have all the participating playerworlds use the same calculations?

you can already display the real life time on your playerworld

Because it would be easier and would not have to be editted by each individual playerworld.
Reply With Quote
  #7  
Old 01-08-2005, 10:22 PM
Sildae Sildae is offline
Elven sorceress!
Sildae's Avatar
Join Date: Dec 2001
Location: Lothlòrien
Posts: 159
Sildae is on a distinguished road
Quote:
Originally Posted by protagonist
Because it would be easier and would not have to be editted by each individual playerworld.
I am sure that if you described what exactly you wanted, it will be easy for some of the forum's scripters to implement it.
__________________
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw
Reply With Quote
  #8  
Old 01-08-2005, 10:53 PM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
PHP Code:
//#CLIENTSIDE
if (created){
  
timeshift strtofloat(#s(serverr.timeshift));
  
gmt 0;
  
timeout 5;
}
if (
timeout){
  
totalmin int(timevar 12) + timeshift gmt 60;
  
setplayerprop #c,Hour: #v(int(totalmin/60)%24):#v(totalmin);
  
timeout 5;

Breifly. That would work to simulate realtime. Basically, timeshift is the amount of minutes you must add to the current timevar to get the right time (find this manually), then you have gmt, whom would change the amount of hours, depending on your time zone. Then you just need to treat it like virtual time.
Reply With Quote
  #9  
Old 01-09-2005, 08:59 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
serverside:

PHP Code:
if (playertouchsme) {
  
this.temp timevar2;
  
this.hours int(this.temp/(60*60))%24;
  
this.mins int((this.temp/60)%60);
  
this.secs int((this.temp)%60);
  
message #v(this.hours)H:#v(this.mins)M:#v(this.secs)S;

that should always give the current GMT time (minutes seems to be inacurate

code stolen from ZeroTrack's post: http://forums.graalonline.com/forums...7&page=2&pp=15

there is already a clock availible, timevar2

edit: it seems to be inaccurate by like a half hour though
Quote:
Originally Posted by Stefan
- the timevar2 variable is improved: it is now displaying the unix time (seconds since 1970/1/1), with nanosecond-precision (the old timevar2 variable was very precise but was reset when the server was restarted)
__________________

Reply With Quote
  #10  
Old 01-09-2005, 09:43 AM
Snakeandy7 Snakeandy7 is offline
"Member ID=2610"
Snakeandy7's Avatar
Join Date: Mar 2003
Posts: 987
Snakeandy7 is on a distinguished road
Era kinda works by the westcost time.
Sgangs open from 2:00pm till 1:00am
Businesses automatically restock every [hidden for Era reasons] :P.
__________________
"Freedom is best I tell thee
of all things to be won
then never live within the bond
of slavery my son".


Reply With Quote
  #11  
Old 01-09-2005, 09:54 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
It's already possible to base things on real time, with timevar/timevar2, as mentioned above.

You could set up a control npc and reset it at a specific time, such as 12:00pm or something, and the script inside the npc could simply save that time variable when it's created...

Though I guess it would be trickier to set it up so that it would correct itself if the npc server crashed and had to be restarted or something.
Reply With Quote
  #12  
Old 01-09-2005, 01:35 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
Only problem with real-time is little timmy always has to play in the dark due to being in a certain timezone
__________________
--Spark911
Reply With Quote
  #13  
Old 01-09-2005, 02:47 PM
Smutastic Smutastic is offline
Not anymore.
Smutastic's Avatar
Join Date: Oct 2004
Location: Germany
Posts: 210
Smutastic is on a distinguished road
Send a message via ICQ to Smutastic Send a message via AIM to Smutastic Send a message via MSN to Smutastic Send a message via Yahoo to Smutastic
Quote:
Originally Posted by Spark910
Only problem with real-time is little timmy always has to play in the dark due to being in a certain timezone
True.
__________________
Gonna need a home
You'd expect the same, now wouldn't you, wouldn't you?

Your journey back to birth, it's haunting you, it's haunting you...
Your departure from the earth, it's haunting you, it's haunting you...
Reply With Quote
  #14  
Old 01-09-2005, 08:54 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Spark910
Only problem with real-time is little timmy always has to play in the dark due to being in a certain timezone


Haha at timmy.
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 02:19 PM.


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