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)

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


All times are GMT +2. The time now is 03:29 PM.

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