These forums are CLOSED. Please visit the new forums HERE
Get day of the week ill give you 2000 L |
|
RacerX Gullwing
Magic Rabbit
![]() Join date: 18 Jun 2004
Posts: 371
|
11-29-2005 01:24
Ok 2000 lindens for a script that sets a prim to a different color every day of the week changing at midnight would be good. like blue monday green tuesday yellow wednesday orange thursday red friday purple saturday white sunday that sounds good thats a whole script with a default not just a function I have to figure out how to use.
|
Jokey Domela
Registered User
Join date: 27 Jul 2005
Posts: 83
|
11-29-2005 04:19
Since I just recently published this: /15/a2/72795/1.html, I'll add in the code to do color changing when I get home this evening if noone ese has created it for you.
|
RacerX Gullwing
Magic Rabbit
![]() Join date: 18 Jun 2004
Posts: 371
|
11-29-2005 04:54
hm well its Tuesday today and this thing says its friday but your close Ill have a look if i can get it to say the right day I can set the colors up myself you'll get the cash as long as tommorow it says wednesday
|
Hawk Mendicant
www.hawkuk.com
Join date: 6 Jun 2005
Posts: 30
|
11-29-2005 06:34
I believe Jokey's script is hardcoded to his birthday 15-Sep-06 which is a Friday. You'll probably need to add an llGetDate for it to work with the current day. You'll also need code to get it to refresh after midnight.
Alternatively, if it just needs to cycle colours on a 24 hour basis it doesnt really need to know what day of the week it is. This should do it, although if you need it to refresh at midnight you'll have to start the script running at midnight ![]() CODE
|
Strife Onizuka
Moonchild
![]() Join date: 3 Mar 2004
Posts: 5,887
|
11-29-2005 07:17
CODE
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
RacerX Gullwing
Magic Rabbit
![]() Join date: 18 Jun 2004
Posts: 371
|
11-29-2005 19:00
well I paid the strife and hawk cause they were both good plans jokey's plan needed to much work.
|
RacerX Gullwing
Magic Rabbit
![]() Join date: 18 Jun 2004
Posts: 371
|
11-30-2005 07:28
Well I thought Strife had the better code so I set all the clocks up with that midnight went by and there still the same color. I'm sure it's a typo or something simple but I'm switching over to the one I understand. But the way it was written it would start the day changing color exactly 24 hours from when I dropped it in the clock. Since this clock is now in 9 different sims and a lot of them far from hubs, I'd be reallly busy at midnight so I've added a thing I think that will work. The first day it'll check every 55 seconds to see if its less than 60 seconds past midnight if it is it will trigger a switch that will then set the timer to 24 hours till the next color change. and then never bother to see if its within 60 seconds of midnight again wonder what sim crashes will do to this code. probably set it back to wednesdays color argh. Strife check your code it's still the best I think.
CODE // replace with vectors for other colours if needed. |
Patch Lamington
Blumfield SLuburban
Join date: 2 Nov 2005
Posts: 188
|
Im not worthy
11-30-2005 07:34
Nice return statement Strife!
Poor Jokey... you was robbed. Problem with Hawk's script is that as it isnt date dependent, then the colour cycle wont correct after a sim crash... (while I was editing this RacerX posted a second version and noticed this too!). patch |
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
|
11-30-2005 07:55
How long did you give for Strife's to change color after midnight? Looks like the way the script is setup, it could wait til 12:10 at the latest to change color
[edit] Just noticed that it says that in the comments of strife's script, so you already knew that *lol* so..n/m |
Strife Onizuka
Moonchild
![]() Join date: 3 Mar 2004
Posts: 5,887
|
11-30-2005 20:32
^^' i sort of screwed up. it changed on UTC midnight not PST. Here it is on PST, and it handles daylight savings time.
If you want it to change sooner then 10min then just change the timer in the state entry. CODE
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey |
RacerX Gullwing
Magic Rabbit
![]() Join date: 18 Jun 2004
Posts: 371
|
11-30-2005 22:04
ok thought it was something like that
|