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=14833)

nyghtGT 10-17-2001 09:27 PM

time script
 
here is a time script I just made. Anyone can use it and for those who dont understand i'll explain to you ... It has seconds, hours, minutes, days, months, and year now:
NPC Code:

// NPC made by Nyght *Asst* (LAT Admin)
if (playerenters) {
timeout=1;
}
if(timeout){
this.time=timevar;
time+=1;
showimg 201,@verdana@Time: #v(hour):#v(minute):#v(time) #s(am/pm),495,70;
changeimgvis 201,4;
changeimgzoom 201,0;
showimg 202,@verdana@Date: #v(month)/#v(day)/#v(year) G.T.,495,85;
changeimgvis 202,4;
changeimgzoom 202,0;
setstring am/pm,A.M.;
timeout=1;
}
if (time=60) {
time=1;
timeout=1;
minute+=1;
}
if (minute=60) {
time=1;
timeout=1;
hour+=1;
}
if (hour=12 && am=1) {
time=1;
timeout=1;
hour=1;
setstring am/pm,P.M.;
}
if (hour=12 && am/pm=P.M.) {
time=1;
timeout=1;
hour=1;
setstring am/pm,A.M.;
day+=1;
}
if (day=31) {
time=1;
timeout=1;
hour=1;
day=1;
setstring am/pm,A.M.;
}
if (month=13) {
time=1;
timeout=1;
hour=1;
day=1;
month=1;
setstring am/pm,A.M.;
year+=1;
}


Also, please tell me if your gonna use this. You have my permission, but just notify me of its use.

Shard_IceFire 10-17-2001 09:52 PM

Is it just me or are there like 5 recent threads titled 'time script' ?

nyghtGT 10-17-2001 09:57 PM

yeah
 
but i started this one ... the other ones are old news ...

joseyisleet 10-18-2001 09:49 PM

Heh, I have on almost exactly like that (got the idea from my push ups NPC). There's one problem with yours though, when you go into a different level, it resets it, then it picks up from where it was when you left the level if you go back (something like that I got confused there).

KJS 10-18-2001 09:58 PM

you could like make the script way shorter if you used timevar

btedji 10-19-2001 03:31 AM

Quote:

Originally posted by KJS
you could like make the script way shorter if you used timevar
and if you used the 24 hour system

KJS 10-19-2001 03:32 AM

Quote:

Originally posted by btedji

and if you used the 24 hour system

what are you talking about... a time script I have made is a 12 hour based time script and it has a am and pm simbol next to it...

and it uses timevar...

btedji 10-19-2001 03:33 AM

Quote:

Originally posted by KJS


what are you talking about... a time script I have made is a 12 hour based time script and it has a am and pm simbol next to it...

and it uses timevar...

im saying the script would be shorter if you used the 24 hour system

Poogle 10-19-2001 03:54 AM

Quote:

Originally posted by Shard_IceFire
Is it just me or are there like 5 recent threads titled 'time script' ?
16+ dude look!

nyghtGT 10-19-2001 06:21 AM

well ...
 
like i said i am still experimenting with this stuff ...

mhermher 10-19-2001 05:14 PM

=(
 
The script didnt work for me... do it only work online?

btedji 10-20-2001 12:39 AM

there should be a tutorial for ap/hp bars and time

Xaviar 10-20-2001 12:48 AM

Quote:

Originally posted by btedji
there should be a tutorial for ap/hp bars and time
Yea, and then get a mod to post it as an announcement ;)


All times are GMT +2. The time now is 12:32 PM.

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