Parcel Analyzer

Thread Started By ☠ MosDef ☠

4989
3
  • 55 Vote(s) - 2.82 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
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.]";
        }
    }
}
[Image: 8cWHDmW.png]
Reply


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

Thanks,
Ken
Reply


#3
Yeah bro your script got Errors but thanks for trying tho
[Image: t8reyp.png]
Reply


#4
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.]";
        }
    }

Reply




Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...