Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Time Script (https://forums.graalonline.com/forums/showthread.php?t=10720)

Neoreno 08-29-2001 07:01 PM

Time Script
 
I need to Know the Time Script like off Graal2001?:grrr:

Enigma_GP6 09-03-2001 11:08 AM

Search Me.....(Pulls out pockets and out falls out hundreds of ahand written post-it notes) Uh-oh. GTG!!!!!!! *-_-ZIP!!!!!!

-Rebel95

fuzie 09-03-2001 02:58 PM

yea is it possible to be put on a non-p2p server?

wetferret1 09-30-2001 09:38 AM

What is a time script I can use for my server?
DONT WORRY!
I am doing a graal class at my school.
And we are all going to make a server.

Shard_IceFire 09-30-2001 10:26 AM

Quote:

What is a time script I can use for my server?
DONT WORRY!
I am doing a graal class at my school.
And we are all going to make a server.
Damn what school do you go to? Cause I wanna go there!

Poogle 09-30-2001 10:30 AM

Quote:

Originally posted by Kaimetsu
NPC Code:
this.time=timevar;



I believe it's allowed on non-P2P.

How do yeh use it?!

G_yoshi 09-30-2001 10:35 AM

Quote:

Originally posted by Kaimetsu
NPC Code:
this.time=timevar;



I believe it's allowed on non-P2P.

As I recall, timevar is an NPC server variable. But Stefan has now added it to offline mode. I imagine if free worlds use it, its only clientside, since timevar is really a variable used to syncronize stuff.

Poogle 09-30-2001 11:03 AM

Quote:

Originally posted by G_yoshi


As I recall, timevar is an NPC server variable. But Stefan has now added it to offline mode. I imagine if free worlds use it, its only clientside, since timevar is really a variable used to syncronize stuff.

X Has one

wetferret1 09-30-2001 11:17 AM

Soo..
Back to my post!
I really need to know so I can get an "A"
My teacher is an ass that knows nothing..ARG!!
ANd I am just a "T.A." (Teachers Asst.)

G_yoshi 09-30-2001 12:44 PM

Quote:

Originally posted by Poogle
X Has one
X had a Clock before timevar was available offline. It obivously uses a timeout loop or something similar to count of the time.

G_yoshi 09-30-2001 12:50 PM

Quote:

Originally posted by wetferret1
Soo..
Back to my post!
I really need to know so I can get an "A"
My teacher is an ass that knows nothing..ARG!!
ANd I am just a "T.A." (Teachers Asst.)

I don't know how Stefan set up timevar to work offline, but my only guess is that it is clientside. But you can go onto Graal2001 or any other server w/NPC Server and timevar to get your offline timevar increased by a lot :D

I could post the daynight(features my Seasons) npc here, but I won't ;)

but, for the most part, just use 'mytime=timevar' that will create an automatic time counter. All you have to do is create the graphical part that interprets it ;)

wetferret1 09-30-2001 12:55 PM

Could you explain that to me in a EASYIER way?

Bhala 09-30-2001 08:17 PM

PHP Code:

if(created){
timeout=5;
}
if(!
server.time){
setstring server.time,0;
}
if(
timeout){
server.time++;
timeout=5;


when placed in a level with players it will act just like timevar but with out a player it will do jack....

KJS 09-30-2001 10:12 PM

ok to get this out of your worries...

free servers, offline mode, and p2p servers can all use timevar...

timevar goes up 1 every 5 seconds

and it is not clientside really... like I mean it gets data from the server when it gets your account and stuff...

I knows it not clientside because I have 2 computers and I looked at the time on both of them to see if it was one time

G_yoshi 09-30-2001 11:02 PM

Quote:

Originally posted by KJS
ok to get this out of your worries...

free servers, offline mode, and p2p servers can all use timevar...

timevar goes up 1 every 5 seconds

and it is not clientside really... like I mean it gets data from the server when it gets your account and stuff...

I knows it not clientside because I have 2 computers and I looked at the time on both of them to see if it was one time

This is true. However, the offline timevar only counts up when you are playing offline mode. If you go online to, say, Graal2001, the timevar for offline mode is automatically set to Graal2001's timevar count.

joseyisleet 09-30-2001 11:40 PM

hmm.
 
I was 'fooling' around earlier and figured this out.
// NPC made by Josey Hunt
if(playerenters&&!hasweapon(Time)){toweapons time;
timeout=1;}
if (!server.time){
setstring server.time,0;}
if (timeout){
showimg 1,@Tahoma@Bold@#v(server.time),100,100;changeimgvi s 1,4;timeout=.5;
server.time++;
timeout=1;}

The time changes every 1 second, alls you had to do is change the placing of the image and a few modifications.
I'm to tired right now to do it for you 'peoples' or I would.


Oh yea, watch jeepers creepers. It kicks ass! =)

Warcaptain 10-01-2001 12:43 AM

erm..

to answer alot of those questions.

timevar isnt a npc-server only, as enigma graal uses timevar for their time system

enigma graal has a time system excactly like g2k1's, except it uses the showimg letters not state.png.

just convert timevar, and then do something like if(hour==1){
seteffect blahblahblahblah;}

SSj_Link 10-01-2001 01:59 AM

Quote:

Originally posted by Warcaptain
erm..

to answer alot of those questions.

timevar isnt a npc-server only, as enigma graal uses timevar for their time system

enigma graal has a time system excactly like g2k1's, except it uses the showimg letters not state.png.

just convert timevar, and then do something like if(hour==1){
seteffect blahblahblahblah;}

'

Thats a funny command somehow x.X;;
-freak-

everandom 10-01-2001 11:39 AM

in non P2P with no NPC server you can't do the time thingy really, as the time won't be going when no one logs on to keep the NPC working, while in NPC server it keeps working while there are no players on it (BTW, there's always one player log on... Teh NPCeh Server)

everandom 10-01-2001 08:22 PM

Quote:

Originally posted by Kaimetsu


We've already established that timevar works without an NPC Server.

so you say it could keep going even when no player logs on???
or there's another built in var???

I'm confused
I'm a Newbie Scripter
:confused:

SagaTCN 10-01-2001 11:04 PM

I understand timevar perfectly


I had no idea we were allowed to use it on free servers though.



it counts up 1 every 5 seconds from the point the playerworld went online.

and it's the same for everyone.


And it doesn't matter if there are players in it or not. it will still count up.



All you have to do is make an NPC to interpret timevar into the time. that's it.

SagaTCN 10-02-2001 02:33 AM

Quote:

Originally posted by SagaTCN

it counts up 1 every 5 seconds from the point the playerworld went online.

So, when Playerworld A is first opened the timevar variable is equal to 0? Hmm..interesting. -Yin

btedji 10-02-2001 03:05 AM

if you want to turn timevar into a time on a non-p2p here is a start, this will give you hours but you'll have to figure our everything else like minutes and seconds:

NPC Code:

this.hours=int(((timevar/60)/60)-(int(((((timevar/60)/60)/24)*24))))


everandom 10-02-2001 01:22 PM

Quote:

Originally posted by SagaTCN
I understand timevar perfectly


I had no idea we were allowed to use it on free servers though.



it counts up 1 every 5 seconds from the point the playerworld went online.

and it's the same for everyone.


And it doesn't matter if there are players in it or not. it will still count up.



All you have to do is make an NPC to interpret timevar into the time. that's it.

kewlies that means thats just like how long the server has been online thats kewl that makes the time script easier :)
(no need to make the timer)

wetferret1 10-02-2001 02:20 PM

What do those 3 things repersent in the time thing?

nyghtGT 10-02-2001 04:35 PM

Re: Time Script
 
Quote:

Originally posted by Neoreno
I need to Know the Time Script like off Graal2001?:grrr:
something with strtofloat and a lot of variables ....
:D :D :D :D :D

btedji 10-02-2001 07:18 PM

Re: Re: Time Script
 
Quote:

Originally posted by nyghtGT

something with strtofloat and a lot of variables ....
:D :D :D :D :D

look at my last post in this thread

dragoonvenganc 10-02-2001 09:12 PM

What school would have a graal class... Where.. Please i do not belive you

btedji 10-03-2001 12:54 AM

Quote:

Originally posted by dragoonvenganc
What school would have a graal class... Where.. Please i do not belive you
?????????

Warcaptain 10-03-2001 01:33 AM

Quote:

Originally posted by SagaTCN

All you have to do is make an NPC to interpret timevar into the time. that's it.

I know that..

-_-

thats what i was saying, ive already converted it.

-_-

it works on free servers, and p2p servers.

the way i have it is the EXACT same as G2K1

Falcor 10-03-2001 02:04 AM

You can make Server.vars and server arrays. Its been done befor.

Its just not as concrete as server flags/strings

nyghtGT 10-03-2001 02:35 AM

Re: Re: Re: Time Script
 
Quote:

Originally posted by btedji


look at my last post in this thread

i know i was just giving more effect to how much of that stuff it would use thats all ...:D


All times are GMT +2. The time now is 08:00 AM.

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