Region Info

Written by Kitsune
// The beginnings of a region-info script.
string region;
string sim;
float dilation;
float fps;
float min_dilation;
float min_fps;
 
default
{
    state_entry()
    {
        llSetTimerEvent(0.2);
        min_dilation = 1.0;
        min_fps = 45.0;
    }
 
    touch_start(integer num)
    {
        min_dilation = 1.0;
        min_fps = 45.0;
    }
 
    timer()
    {
        string here = llGetRegionName();
        if(region != here)
        {
            sim = llGetSimulatorHostname();
            region = here;
        }
 
        dilation = llGetRegionTimeDilation();
        fps = llGetRegionFPS();
 
        if (min_dilation > dilation) min_dilation = dilation;
        if (min_fps > fps) min_fps = fps;
 
        llSetText(
                "   REGION NAME : " + region +
              "\n  SIM HOSTNAME : " + sim +
              "\n TIME DILATION : " + (string)dilation +
              "["+(string)min_dilation+"]" +
              "\n    REGION FPS : " + (string)fps +
              "["+(string)min_fps+"]",
            <0,1,0>, 1.0);
    }
}