Ranking
Originally Posted by Shocktrooper View Post
oh yeah thanks, now it appears in the bottom left, took a bit time finding it though

Maybe if it could be bigger and the numbers where Bold it would look better
Last edited by KillTheCook; Dec 11, 2011 at 11:49 AM.
(\(\(\ My work /)/)/)
/)
_('ω'(Q) Have a Banana
The options on Toribash fonts are very limited but lucky for you I got a little bored and wrote a clock script.

Looks like this:


You can choose:
- 12h or 24 hour display
- show/hide seconds
- autostart on/off
- color
- size
- position

type /clock help ingame to see how.

It saves the settings.

For 3.91 and upwards
Attached Files
clock.lua (9.5 KB, 30 views)
Last edited by psycore; Dec 13, 2011 at 04:40 PM.
Signature temporarily out of order.
I seriously love this clock thing

Only problem is that i dont know how to change the color. It doesnt really give instructions on how to do so. I typed in /clock help and it showed the stuff, and copied the color thing, but it didn't work. maybe give some clarification on how to do so?
RIP [duck] Aug 28 2011 - April 20 2020
Some things seem not to be working also you should show us how the
clock settings.txt works upload an example
(\(\(\ My work /)/)/)
/)
_('ω'(Q) Have a Banana
all works right for me.

script generates settings.txt after first start.

for instructions just type "/clock help"

----------

psycore, your "unable to read 'clock settings.txt'" confuses ppl ;)
Last edited by Nirs; Dec 13, 2011 at 02:09 PM.
Sorry for the confusion. I forgot to mention it will work only with 3.91 and upwards :/ This is not because I'm lazy but because it's not possible.

At first the settings:
/clock format 12 (sets display to 12h mode)
/clock format 24 (sets display to 24h mode)
/clock show seconds (shows seconds; you can leave the 'seconds' away, so /clock show will work as well)
/clock hide seconds (hides seconds; you can leave the 'seconds' away)
/clock size <number> (sets size; default is 10. ex: /clock size 20)
/clock autostart 0 (don't load on startup)
/clock autostart 1 (load on startup)
/clock color <red> <blue> <green> <alpha> (sets the color. alpha means transparency. ex: /clock color 0 1 0 1 will set it to green. /clock color 0.5 0.5 0.5 0.5 will set it to an semitransparent grey)
/clock reset (sets size to 10, color to red, sets 24h mode, position to lower right corner)
Use drag&drop to position the clock
Now to the errors:
If it says it's unable to read from or write to either profile.tbs or clock settings.txt that means, well, it's unable to read from or write to them. This can have many reasons:

The file doesn't exist.
Usually Lua creates files which don't exist.
If /toribash/profile.tbs or /toribash/data/script/clock settings.txt don't exist try creating them. Just open a simple editor and save empty files.
Watch the file type.

File names with spaces are not supported.
As far as I know Windows, Linux and MacOS do support file names with spaces.
But if you want to make sure that it will work, open clock.lua with any text editor and replace every "clock settings.txt" by "clock_settings.txt" (or what ever you like).
(There should be a function to do that. Usually ctrl+f or ctrl+h. May be different)
Then rename "clock settings.txt" to whatever you changed it to. Everything without the quotes of course.

Toribash isn't allowed to read of write files.
The simplest solution is to run Toribash as administrator.
But that's not very secure (although I don't think that TB spreads viruses).
On windows it probably works like this (if you have admin privileges; the translations are guesses):

show image



That's actually it. You don't need to modify the text files.
Last edited by psycore; Dec 13, 2011 at 04:41 PM.
Signature temporarily out of order.
The original colors of red, blue, green, and alpha wont work, but the number texts for setting the colors do work.

Im trying to set it to alpha and it wont work. any support into this?
RIP [duck] Aug 28 2011 - April 20 2020
I'm not sure if I understand you correctly. Are you typing /clock color alpha or something like that? Because that's not how it works. You have to put a number between 0 and 1 for each of red, blue, green and alpha. This is called "(additive) RGB color model". Works like this. The higher the number, the more of the color you get. Examples:
/clock color 1 0 0 1 - red
/clock color 0 1 0 1 - green
/clock color 0 0 1 1 - blue
/clock color 1 1 0 1 - yellow (red+green makes yellow in the RGB model)
/clock color 0 1 1 1 - cyan (blue+green)
/clock color 1 0 1 1 - pink (red+blue)
/clock color 0 0 0 1 - black (nothing)
/clock color 1 1 1 1 - white (red+blue+green)
/clock color 0 0.5 0.5 1 - dark cyan (dark green+dark blue)

same goes for alpha. The higher alpha, the more opaque.
Signature temporarily out of order.