Second Life Copybot
Parcel Analyzer - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Business Scripts (https://secondlifecopybot.com/forum-44.html)
+----- Thread: Parcel Analyzer (/thread-903.html)



Parcel Analyzer - ☠ MosDef ☠ - 02-20-2013

Code:
/*
Bornslippy Ruby presents...
Parcel Analyzer
Tags: avatar, effects, ground, group, math, owner, parcel, primitive, region, text, time, timer, world, featured, tools
Description:
License:

http://secondlife.coolminds.org
*/

vector Color = <0, .5, 0>;
  float UpdateInterval = 60.0;
integer UTCOffset = 1;
   list Days   = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"];
   list Months = ["January", "Febrary", "March", "April", "May", "June", "July", "Agoust", "September", "October", "November", "December"];

string Parcel;

integer llAirPressure()
{
    vector Position = llGetPos();
    float Base_Reading = llLog10(5- (((Position.z - llWater(ZERO_VECTOR)) + 10.0)/15500));
    float KiloPascal = (101.32500 + Base_Reading);
    return (integer)KiloPascal;
}

string GetDay(integer offset)
{
    return llList2String(Days, ((((llGetUnixTime()/3600) + offset)/24)%7));
}

string GetMonth(integer month)
{
    return llList2String( ( [""] + Months ), month );
}

Refresh()
{
    if ( Parcel == "" )
    {        
        list flags = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME,PARCEL_DETAILS_DESC,PARCEL_DETAILS_OWNER,PARCEL_DETAILS_GROUP,PARCEL_DETAILS_AREA]);
    
        Parcel = "[Parcel: " + llList2String( flags, 0 ) + "]\n";
        
        if ( llList2String( flags, 1 ) != "" )
            Parcel += "[Description: " + llList2String( flags, 1 ) + "]\n";
            
        if ( llKey2Name( llList2Key( flags, 2 ) ) != "" )
            Parcel += "[Owner: " + llKey2Name( llList2Key( flags, 2 ) ) + "]\n";
            
        if ( llKey2Name( (key)llList2String( flags, 3 ) ) != "" )
            Parcel += "[Group: " + llKey2Name( (key)llList2String( flags, 3 ) ) + "]\n";
            
        Parcel += "[Size: " + llList2String( flags, 4 ) + " sqm.]";
    }
    
    list timestamp = llParseString2List(llGetTimestamp(),["T",":",":","."],[]);
    list date = llParseString2List(
            llList2String(timestamp, 0),
            ["-"],
            []);

    vector pos = llGetPos();        
    vector windVector = llWind(pos);
    float wind;
    if ( windVector.x > windVector.y ) wind = windVector.x;
    else wind = windVector.y;

    string sign;
    if ( UTCOffset > 0 ) sign = "+";
    else sign = "-";
    
    string text = (string)(llList2Integer(timestamp,1) + UTCOffset) + ":" + llList2String(timestamp,2 ) + " UTC"+sign+(string)UTCOffset+"\n" +
                GetDay(1) + " " + llList2String(date, 2) + " " + GetMonth((integer)llList2String(date, 1)) + " " + llList2String(date, 0) + "\n" +
                "[Parcel Informations]\n"+Parcel+"\n[Pressure: " + (string)llAirPressure() + " KiloPascal]" + "[Altitude: " + (string)((integer)pos.z) + " Meters][Wind: " + (string) wind +"]\n" +
                "[Sun: n/a]\n";

    llSetText(text, Color, 1);
}

default
{
    state_entry()
    {
        llSetTimerEvent( UpdateInterval );
    }
    
    timer()
    {
        Refresh();
    }
    
    changed( integer _c )
    {
        if ( _c & CHANGED_REGION )
        {
            list flags = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME,PARCEL_DETAILS_DESC,PARCEL_DETAILS_OWNER,PARCEL_DETAILS_GROUP,PARCEL_DETAILS_AREA]);
        
            Parcel = "[Parcel: " + llList2String( flags, 0 ) + "]\n";
            
            if ( llList2String( flags, 1 ) != "" )
                Parcel += "[Description: " + llList2String( flags, 1 ) + "]\n";
                
            if ( llKey2Name( llList2Key( flags, 2 ) ) != "" )
                Parcel += "[Owner: " + llKey2Name( llList2Key( flags, 2 ) ) + "]\n";
                
            if ( llKey2Name( (key)llList2String( flags, 3 ) ) != "" )
                Parcel += "[Group: " + llKey2Name( (key)llList2String( flags, 3 ) ) + "]\n";
                
            Parcel += "[Size: " + llList2String( flags, 4 ) + " sqm.]";
        }
    }
}



RE: Parcel Analyzer - Ken2011 - 03-02-2013

Hello, could you re-post it ? It has some errors in the code.

Thanks,
Ken


RE: Parcel Analyzer - DarkVirus33 - 08-03-2014

Yeah bro your script got Errors but thanks for trying tho


RE: Parcel Analyzer - Bonfire - 10-09-2014

Try this one same script:)

PHP Code:
/*
Bornslippy Ruby presents...
Parcel Analyzer
Tags: avatar, effects, ground, group, math, owner, parcel, primitive, region, text, time, timer, world, featured, tools
Description:
License:

http://secondlife.coolminds.org
*/

vector Color = <0.50>;
  
float UpdateInterval 60.0;
integer UTCOffset 1;
   list 
Days   = ["Thursday""Friday""Saturday""Sunday""Monday""Tuesday""Wednesday"];
   list 
Months = ["January""Febrary""March""April""May""June""July""Agoust""September""October""November""December"];

string Parcel;

integer llAirPressure()
{
    
vector Position llGetPos();
    
float Base_Reading llLog10(5- (((Position.llWater(ZERO_VECTOR)) + 10.0)/15500));
    
float KiloPascal = (101.32500 Base_Reading);
    return (integer)
KiloPascal;
}

string GetDay(integer offset)
{
    return 
llList2String(Days, ((((llGetUnixTime()/3600) + offset)/24)%7));
}

string GetMonth(integer month)
{
    return 
llList2String( ( [""] + Months ), month );
}

Refresh()
{
    if ( 
Parcel == "" )
    {        
        list 
flags llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME,PARCEL_DETAILS_DESC,PARCEL_DETAILS_OWNERPARCEL_DETAILS_GROUP,PARCEL_DETAILS_AREA]);
    
        
Parcel "[Parcel: " llList2Stringflags) + "]\n";
        
        if ( 
llList2Stringflags) != "" )
            
Parcel += "[Description: " llList2Stringflags) + "]\n";
            
        if ( 
llKey2NamellList2Keyflags) ) != "" )
            
Parcel += "[Owner: " llKey2NamellList2Keyflags) ) + "]\n";
            
        if ( 
llKey2Name( (key)llList2Stringflags) ) != "" )
            
Parcel += "[Group: " llKey2Name( (key)llList2Stringflags) ) + "]\n";
            
        
Parcel += "[Size: " llList2Stringflags) + " sqm.]";
    }
    
    list 
timestamp llParseString2List(llGetTimestamp(),["T",":",":","."],[]);
    list 
date llParseString2List(
            
llList2String(timestamp0),
            [
"-"],
            []);

    
vector pos llGetPos();        
    
vector windVector llWind(pos);
    
float wind;
    if ( 
windVector.windVector.wind windVector.x;
    else 
wind windVector.y;

    
string sign;
    if ( 
UTCOffset sign "+";
    else 
sign "-";
    
    
string text = (string)(llList2Integer(timestamp,1) + UTCOffset) + ":" llList2String(timestamp,) + " UTC"+sign+(string)UTCOffset+"\n" +
                
GetDay(1) + " " llList2String(date2) + " " GetMonth((integer)llList2String(date1)) + " " llList2String(date0) + "\n" +
                
"[Parcel Informations]\n"+Parcel+"\n[Pressure: " + (string)llAirPressure() + " KiloPascal]" "[Altitude: " + (string)((integer)pos.z) + " Meters][Wind: " + (string) wind +"]\n" +
                
"[Sun: n/a]\n";

    
llSetText(textColor1);
}

default
{
    
state_entry()
    {
        
llSetTimerEventUpdateInterval );
    }
    
    
timer()
    {
        
Refresh();
    }
    
    
changedinteger _c )
    {
        if ( 
_c CHANGED_REGION )
        {
            list 
flags llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME,PARCEL_DETAILS_DESC,PARCEL_DETAILS_OWNER,PARCEL_DETAILS_GROUP,PARCEL_DETAILS_AREA]);
        
            
Parcel "[Parcel: " llList2Stringflags) + "]\n";
            
            if ( 
llList2Stringflags) != "" )
                
Parcel += "[Description: " llList2Stringflags) + "]\n";
                
            if ( 
llKey2NamellList2Keyflags) ) != "" )
                
Parcel += "[Owner: " llKey2NamellList2Keyflags) ) + "]\n";
                
            if ( 
llKey2Name( (key)llList2Stringflags) ) != "" )
                
Parcel += "[Group: " llKey2Name( (key)llList2Stringflags) ) + "]\n";
                
            
Parcel += "[Size: " llList2Stringflags) + " sqm.]";
        }
    }