![]() |
Clock NPC
Hello, I was wondering if anyone here can make me a Clock NPC that will give the exact time. Here is what i want in it:
-I want it say say the day,hours,minutes, seconds,and AM or PM. -I want it in the format day hour:minutes:seconds AM/PM -I want the default time to say Sunday 12:00:00 AM. -I want it so that the owner of a house can say reset clock and it will reset back to the default. -I want the time to still work even tho no one is in that level. -I want it to actually work ^_^. If there is anything out there that is exactly like this, tell me where i can get it. I need this clock so i can put it in the house i want to make, so people that are paying rent will know exacly when i want my rent :). |
the time is already on the server........also with the rent thing...nm ur pretty stupid
|
geez no one is going to do that much work for you
|
im not talking about the crappy clock that follows you on the screen, i want it to display real time. I am not stupid, i just don't know how to make npcs very well. I could do this myself if i knew how to create variables, how to increase them or make them say something else at a certain time, and if i knew how to make an npc say all the variables at once.
|
Ok i managed to script it, sort of. I had to split it into different parts. 1 for day, 1 for hours, 1 for minutes, 1 for AM/PM, and 1 for that flashing : thing. It took long n00b code instead of 1337 short code... does anyone know the code to make it work even tho no one is in that level?
|
fine fine... I kinda did it myself... here it is:
if (created||strequals(#c,reset clock)) { setstring this.day,Sunday; this.hours=12; this.minutes1=0; this.minutes2=0; this.seconds1=0; this.seconds2=0; setstring this.ampm,AM; timeout=0.05; } //The Clock Model if (timeout) { message #s(this.day) #v(this.hours):#v(this.minutes1)#v(this.minutes2): #v(this.seconds1)#v(this.seconds2) #s(this.ampm); sleep 0.5; message #s(this.day) #v(this.hours) #v(this.minutes1)#v(this.minutes2) #v(this.seconds1)#v(this.seconds2) #s(this.ampm); timeout=0.5; } What I need to know now is how do I increase the strings and variables? And how do i set the time to what ever i say (for example: set clock day hours minutes AM/PM, and then i will say set clock Monday 8 23 PM. I want the seconds to start over as well) |
hmm
ive demised a way to keep it real time based on a starting time....but i need to keep that a secret. I put a lot of thought into this one, lol ;)
if i finish the script, ill let you know. |
hmm
ive demised a way to keep it real time based on a starting time....but i need to keep that a secret. I put a lot of thought into this one, lol ;)
if i finish the script, ill let you know. |
okies i have another question... how do i split the text into different parts?
for example: setclock #1 #2:#3#4 #6 #1=days, #2=hours, #3+4=minutes, and #6=AM/PM... So when I say "seclock Sunday 12:00 AM" it will set the clock to Sunday 12:00:00 AM (yes i am aware there is another :00 in there, those are seconds and I want those to reset to 00 each time I change the clock). In the script I have made, these are the different parts: server.wd=Days server.wh=Hours server.wm1=Minutes1 server.wm2=Minutes2 server.ws1=Seconds1 server.ws2=Seconds2 server.wampm=AM/PM Here's the code I've given the clock itself. if (created) { timereverywhere; timeout=0.05; } if (timeout) { message #s(server.wd) #v(server.wh) #v(server.wm1)#v(server.wm2) #v(server.ws1)#v(server.ws2) #s(server.wampm) sleep 0.5; message #s(server.wd) #v(server.wh):#v(server.wm1)#v(server.wm2):#v(serv er.ws1)#v(server.ws2) #s(server.wampm) timeout=0.5; } I hope the information i have given you will help you to help me :) |
Re: hmm
Quote:
if u wanna do date u have to figure it out based on the date.. it would depend how u do it ... |
| All times are GMT +2. The time now is 07:04 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.