-->

FoxSan's 3D Tools and LSL Script Repository

Tons of LSL scripts, examples and 3D tools, free for all. There are currently 207 scripts and articles in this database.

Get IM when land is sold

integer ctime = 10;
 
default
{
state_entry()
{
llSay(0, "Online. Will check every "+(string)ctime+" seconds. If land owner is NOT the same as object owner, will message object owner with location and 'your land sold' message, and self delete.");
llSetTimerEvent((float)ctime);
}
 
timer() {
if (llGetLandOwnerAt(llGetPos()) == llGetOwner()) {
// object owner matches land owner
} else {
// object owner does NOT match land owner!
llInstantMessage(llGetOwner(),"Your land at "+(string)llGetRegionName()+":"+(string)llGetPos()+" has been sold. The new buyer may be : "+llKey2Name(llGetLandOwnerAt(llGetPos()))+" (if this fails, a group now has it).");
llDie();
}
 
}
}

llRegionSay

default
{
    state_entry()
    {
        llSetText("llRegionSay()\nTouch to say something region wide",<1,1,1>,1);
    }
 
    touch_start(integer total_number)
    {
        llRegionSay(1,"Overall, the fiber produced by a llama is very soft and is naturally lanolin free.");
    }
}

Sim Information 3

//  Display Sim Statistics
//  Created by Water Rogers for IBM/Opensource
 
//  Purpose
//  --------------------------------------------------------------
//  This script shows you how to use settext() and read some simple
//  sim statistics.
//  
 
//  Requirements
//  --------------------------------------------------------------
//  A single prim is all that is necessary for this example.
 
//  GLOBALS
//  --------------------------------------------------------------
float       g_Timer     = 5.0;          //  Interval to update in seconds
vector      g_TextColor = <1, 1, 1>;    //  The text color (1,1,1 = White)
 
//  FUNCTIONS
//  --------------------------------------------------------------
display()
{
    //  This function shows the SetText().  "\n" is a "NewLine" character
    //  that the compiler notices as an escape sequence.
    string output;
 
    //  Shows how to get the current name of the simulator the script is in
    output = llGetRegionName() + "\n";
 
    //  This function returns the hostname of the server (DNS)
    output += "Hostname: " + llGetSimulatorHostname() + "\n";
 
    //  This will return the current SIM FPS
    output += "FPS: " + (string)llGetRegionFPS() + "\n";
 
    //  This will return the current Sim Time Dilation
    output += "Time Dilation: " + (string)llGetRegionTimeDilation() + "\n";
    llSetText(output, g_TextColor, 1);
}
 
//  EVENTS
//  --------------------------------------------------------------
default
{
    state_entry()
    {
        //  First we clear any text that the object may already have,
        //  then call the display() function and set the event timer.
        llSetText("", g_TextColor, 1);
        display();
        llSetTimerEvent(g_Timer);
    }
 
    timer()
    {
        display();
    }
}

Sim Information 2

//PARCEL_DETAILS_OWNER     2     The parcel owner's key.     (36 Characters)     key
//PARCEL_DETAILS_GROUP     3     The parcel group's key.     (36 Characters)     key
//PARCEL_DETAILS_AREA
 
// Best viewed in Chat History (ctrl-h)
//default
//{
//    collision_start(integer a)//Announce who collided
//    {
//        llSay(0, "llKey2Name: " + llKey2Name(llDetectedKey(0)) +
//               "\nllDetectedName: " + llDetectedName(0));
//    }
//    touch_start(integer a)
//    {
//        llSay(0,"llKey2Name: " + llKey2Name(llDetectedKey(0)) +
//               "\nllDetectedName: " + llDetectedName(0));
//    }
//}
 
list landinforeqd = [PARCEL_DETAILS_NAME, PARCEL_DETAILS_DESC, PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP, PARCEL_DETAILS_AREA];
vector regionbase;
default
{
    state_entry()
    {
        //llResetScript();
        regionbase = llGetPos();  // llGetRegionCorner();
        llSetText("Ready.",<1.0,1.0,1.0>,1.0);
    }
 
    touch_start(integer total_number)
    {
        list details = llGetParcelDetails(regionbase,landinforeqd);
 
        //llSay(0, "Local Parcel Name:" + llList2String(details ,0));
        //llSay(0, "Local Parcel Desc:" + llList2String(details ,1));
        //llSay(0, "Local Parcel Own:" + llList2String(details ,2));
        //        llSay(0, "Local Parcel group:" + llList2String(details ,3));
        //                llSay(0, "Local Parcel area:" + llList2String(details ,4));
 
 llSetText(
"Info: \n Parcel Name: " +llList2String(details ,0)+
"\n Parcel description: " +llList2String(details ,1)+
"\n Parcel Owner Key: " +//llList2String(details ,2)+
"\n Parcel Owner Name: n/a" +
"\n Parcel Group Key: " +//llList2String(details ,3)+
"\n Parcel Group Name: n/a" +
"\n Parcel Size: " +llList2String(details ,4)+ " m²", <1.0, 1.0, 1.0>, 1.0);
    }
}

Sim Information 1

//•      llGetParcelDetails
//•      llGetParcelFlags
//•      llGetParcelMaxPrims
//•      llGetParcelPrimCount 
 
string gSimName;
key gStatusQuery;
string gStatus;
string gRating;
key SimPos;
 
default
{
    state_entry()
    {
        llListen(1, "", "", "");
    } 
 
    listen(integer channel, string name, key id, string mesg)
    {
        gSimName = mesg;
        gStatusQuery = llRequestSimulatorData(gSimName, DATA_SIM_STATUS);
        gRating = llRequestSimulatorData(gSimName, DATA_SIM_RATING);
        SimPos = llRequestSimulatorData(gSimName, DATA_SIM_POS);
    }
 
    dataserver(key queryId, string data)
    {
        if (queryId == gStatusQuery)
        {
            gStatus = data;
        }
        else if (queryId == gRating)
        {
            gRating = data;
        }
        else
        {
            vector SimPos? = (vector) data;
            llSay(0, gSimName + " (" + gRating + ") " + "(" + (string)((integer) SimPos?.x) + ", " + (string)((integer) SimPos?.y) + ") is " + gStatus);
            llSetText("Info: " + gSimName + " (" + gRating + ") " + "(" + (string)((integer) SimPos?.x) + ", " + (string)((integer) SimPos?.y) + ") is " + gStatus + " .", <1.0, 1.0, 1.0>, 1.0); 
 
//llSetText("", <1.0, 1.0, 1.0>, 1.0);
 
        }
    }
}