Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-24-2001, 03:22 AM
WoRlaNN2k WoRlaNN2k is offline
Registered User
Join Date: Oct 2001
Location: Ontario, Canada
Posts: 266
WoRlaNN2k is on a distinguished road
Send a message via ICQ to WoRlaNN2k Send a message via AIM to WoRlaNN2k Send a message via Yahoo to WoRlaNN2k
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 .
Reply With Quote
  #2  
Old 12-24-2001, 04:20 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
the time is already on the server........also with the rent thing...nm ur pretty stupid
Reply With Quote
  #3  
Old 12-24-2001, 04:25 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
geez no one is going to do that much work for you
Reply With Quote
  #4  
Old 12-24-2001, 04:43 AM
WoRlaNN2k WoRlaNN2k is offline
Registered User
Join Date: Oct 2001
Location: Ontario, Canada
Posts: 266
WoRlaNN2k is on a distinguished road
Send a message via ICQ to WoRlaNN2k Send a message via AIM to WoRlaNN2k Send a message via Yahoo to WoRlaNN2k
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.
Reply With Quote
  #5  
Old 12-24-2001, 09:39 AM
WoRlaNN2k WoRlaNN2k is offline
Registered User
Join Date: Oct 2001
Location: Ontario, Canada
Posts: 266
WoRlaNN2k is on a distinguished road
Send a message via ICQ to WoRlaNN2k Send a message via AIM to WoRlaNN2k Send a message via Yahoo to WoRlaNN2k
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?
Reply With Quote
  #6  
Old 12-24-2001, 08:25 PM
WoRlaNN2k WoRlaNN2k is offline
Registered User
Join Date: Oct 2001
Location: Ontario, Canada
Posts: 266
WoRlaNN2k is on a distinguished road
Send a message via ICQ to WoRlaNN2k Send a message via AIM to WoRlaNN2k Send a message via Yahoo to WoRlaNN2k
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)

Last edited by WoRlaNN2k; 12-24-2001 at 08:47 PM..
Reply With Quote
  #7  
Old 12-24-2001, 09:48 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #8  
Old 12-25-2001, 12:39 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #9  
Old 12-31-2001, 11:39 PM
WoRlaNN2k WoRlaNN2k is offline
Registered User
Join Date: Oct 2001
Location: Ontario, Canada
Posts: 266
WoRlaNN2k is on a distinguished road
Send a message via ICQ to WoRlaNN2k Send a message via AIM to WoRlaNN2k Send a message via Yahoo to WoRlaNN2k
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
Reply With Quote
  #10  
Old 01-03-2002, 06:18 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Re: hmm

Quote:
Originally posted by mikepg
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.
well u would have to find the current time divided by 5 .. then that is the timevar value.. and u just add that to the current timevar..
if u wanna do date u have to figure it out based on the date.. it would depend how u do it ...
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:44 PM.


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