Showing posts from 2021

Lighting in the virtual world

 Several months ago I decided to go to a disco and because there were so many people the lag was unbearable. So I kept my graphics to a minimum. When I returned to my virtual home, I forgot to put the graphic configuration as I had previously. I noticed something very strange, it was totally dark but the lights were not on. One of the most basic scripts that can be done is to detect when it is night or day. If it is night, turn on the lights automatically. But my script apparently didn't work, why? To investigate the matter, I built a tool that marked the position of the sun. The script comes below: string GetTimeOfDay ( float dayFraction ) { integer hours = ( integer ) ( dayFraction * 24 ) ; integer minutes = ( integer ) ( dayFraction * 24 * 60 ) % 60 ; integer percent = ( integer ) ( dayFraction * 100 ) ; return ( string ) hours + " : " + llGetSubString ( ( string ) ( 100 + minutes ) , 1 , 2 ) + " ( " + ( string ) pe

About the death and rebirth of my auto greeter

 One of the peculiarities of lsl scripts is that like any other programming language, they evolve over time. Inevitably some very old things can stop working properly. An example is an automated greeter that sends a welcome message to all visitors. Additionally it also maintains a list with the last 100 visitors. Since I built it in 2007 or 2008 I have never sold more than 5 or 6. One of the reasons is that there is one that is free and uses an external LAMP server (Linux + Apache + MySql + PHP) or similar. It is also true that I must have updated it a few times since then. Other scripters even having the competition of the free greeter have considerably improved their scripts by adding other features that the free greeter does not have. I have recently observed that my automated greeter is not working properly when click the option to list the last 100 visitors. It only shows the first 64 in the list, then it stops. At first I did not know how to diagnose what was happening. The scrip