 |
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Sat May 17, 2003 9:27 pm
Scrtipt help - Status window |
Hi, ok here is what I like, I saw this guy having it and would like to have a similar to it. its on the status window that is shown the following:
Uptime:
(counting up) (this should be Day-hr-min-sec)
Sunrise:
(Counting down) day-min-sev
and if you look, you see he got speciall colors. I can't manage to get that dark kinda yellow and things.
All answeres would be appriciated.
and.! Is there a color scheme? for example I can type #CW lightgreen, but I cant type %ansi(lightgreen)
and in the status window I couldn't have "#CW"...huh I hope somone will understand. =)
One last thingy...
I aslo wanna have a button that is kinda "colored"...
I gota var @bank with a certain amount
the limit is 50k gp.
Now is there anyway to make it for instans if I got 10k it will be colored 1/5 of the button? Anyone understands my bad english? heh
//
Corleidum. |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat May 17, 2003 11:48 pm |
You might do better to ask the "Westar" or "Ash" directly.
I don't see anything special about the colors, they appear to be yellow and bright green. Keep in mind that the colors on a screenshot may not be an exact match of the colors on the original screen.
The status window should be fairly easy, PROVIDED you have a source for the information. It's probably easier to do in the Settings Editor than from the command line.
#STW { %ansi(yellow)Uptime: %cr %ansi(high,green)%eval( %ctime/(24 * 3600))d %eval( (%ctime/3600)24)h %eval( (%ctime/60)60)m %eval( %ctime60)s}
Untested. Ignore "syntax errors" caused by use of . I don't think the status window will update on system variables, so you'll probably need to use something other than %ctime.
For the button, use type gauge. Make the Value @bank, and the Gauge Max 50000. Select the colors of your choice (don't use black).
LightBulb
Advanced Member |
|
|
|
 |
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Sun May 18, 2003 9:27 am |
quote:
You might do better to ask the "Westar" or "Ash" directly.
I don't see anything special about the colors, they appear to be yellow and bright green. Keep in mind that the colors on a screenshot may not be an exact match of the colors on the original screen.
The status window should be fairly easy, PROVIDED you have a source for the information. It's probably easier to do in the Settings Editor than from the command line.
#STW { %ansi(yellow)Uptime: %cr %ansi(high,green)%eval( %ctime/(24 * 3600))d %eval( (%ctime/3600)24)h %eval( (%ctime/60)60)m %eval( %ctime60)s}
Untested. Ignore "syntax errors" caused by use of . I don't think the status window will update on system variables, so you'll probably need to use something other than %ctime.
For the button, use type gauge. Make the Value @bank, and the Gauge Max 50000. Select the colors of your choice (don't use black).
LightBulb
Advanced Member
Well thats what I did.. I asked him...
he did not want to share the information with me... =(.
Ok, it's working. But what about counting down to something?
And.. I can't change the time for the uptime? Cause when I set it it went to 0 0 0 0...Is there a way to change it so I can for ex type "uptime day hour min sec" so it will be set?
P. AC. |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 18, 2003 5:00 pm |
Please don't quote my entire reply IMMEDIATELY AFTER the reply itself. All that does is make the page longer. Also, please don't go back and EDIT your previous posts after they've already been replied to. In particular, don't remove information that's referred to in the reply (the webpage you originally referenced).
%ctime is a SYSTEM variable. That means its controlled by the SYSTEM and can't be changed by you. If that's not the time you want you'll need to use something else.
You might try something like this:
Script to track game time
Kjata has another good clock script in a recent post (Making a Clock). Use the Active Topics link to find it. Many more can probably be found with the Search link using keywords such as "clock" or "timer".
Counting up is done by ADDING to a variable. Counting down is done by SUBTRACTING (or adding negative numbers).
LightBulb
Advanced Member |
|
|
|
 |
Corleidum Novice
Joined: 30 Apr 2003 Posts: 43 Location: Sweden
|
Posted: Sun May 18, 2003 7:25 pm |
OK, I remade the scrip Kjata made on "make a clock"
#ALARM {*2} {#ADD se 1;#IF (@se >= 60) {#ADD mi 1;#VAR se 0};#IF (@mi >= 60) {#ADD hou 1;#VAR mi 0};#IF (@hou >= 24) {#ADD day 1;#VAR hou 0}}
#STW {Mud Uptime: @day"d" @hou"h" @mi"m" @se"s"}
#ALIAS setuptime {#VAR day %1 #VAR hou %2;#VAR mi %3;#VAR secs 0}
thats how I made it. Now I got two questions.
1: The seconds are ticking to slow.
every 2 real life seconds it tics 1...
2: I am not good at all at coding.
what does the '#alarm (*2)' <- stand for?
/
P. AC |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 18, 2003 10:45 pm |
*2 stands for "every 2 seconds". This is probably fast enough for most uses, you'll just need to #ADD se 2 instead of 1.
By the way, your #ALARM uses @se but your #ALIAS sets @secs. You'd probably be better off with long, easily understood, variable names than with short, easily typed, variable names since zMUD will be doing most of the typing.
That is: @day @hour @minute @second
instead of: @day @hou @mi @se
LightBulb
Advanced Member |
|
|
|
 |
|
|
|