Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Real-time Graal. (https://forums.graalonline.com/forums/showthread.php?t=56942)

protagonist 01-08-2005 07:40 PM

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.

Sildae 01-08-2005 08:00 PM

Why don't you script it?

Skyld 01-08-2005 08:09 PM

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.

oinknessx 01-08-2005 09:11 PM

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. :frown:

Evil_Trunks 01-08-2005 09:40 PM

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

protagonist 01-08-2005 09:52 PM

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.

Sildae 01-08-2005 10:22 PM

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.

Velox Cruentus 01-08-2005 10:53 PM

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.

Evil_Trunks 01-09-2005 08:59 AM

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)


Snakeandy7 01-09-2005 09:43 AM

Era kinda works by the westcost time.
Sgangs open from 2:00pm till 1:00am
Businesses automatically restock every [hidden for Era reasons] :P.

konidias 01-09-2005 09:54 AM

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.

Spark910 01-09-2005 01:35 PM

Only problem with real-time is little timmy always has to play in the dark due to being in a certain timezone :(

Smutastic 01-09-2005 02:47 PM

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. :frown:

protagonist 01-09-2005 08:54 PM

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. ^^


All times are GMT +2. The time now is 04:48 AM.

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