<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.djz.one/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.djz.one/feed.php">
        <title>djzone - lsl</title>
        <description>Layne&#039;s Stuffs</description>
        <link>https://www.djz.one/</link>
        <image rdf:resource="https://www.djz.one/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-05-06T14:25:19+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.djz.one/lsl/authz?rev=1705200026&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/can_haz_rez?rev=1705200518&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/color_timer?rev=1730867184&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/config_from_desc?rev=1705633005&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/hud_buttons?rev=1727745918&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/hud_position?rev=1727646638&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/is_sl?rev=1705201564&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/linksetdata?rev=1743302951&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/longtouch?rev=1705114362&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/memory?rev=1743039838&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/miniscripts?rev=1730866620&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/name?rev=1705200727&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/popup_dislog?rev=1705633133&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/read_ini_notecard?rev=1705632589&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/read_notecard?rev=1743302274&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.djz.one/lsl/updatelinksittarget?rev=1705201123&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.djz.one/_media/wiki/dokuwiki.svg">
        <title>djzone</title>
        <link>https://www.djz.one/</link>
        <url>https://www.djz.one/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://www.djz.one/lsl/authz?rev=1705200026&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-14T02:40:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>authz</title>
        <link>https://www.djz.one/lsl/authz?rev=1705200026&amp;do=diff</link>
        <description>LSL: Authorization

List of Users / Same Group


// Allow matching groups
integer ALLOW_GROUP = TRUE;

// A list of avatar keys (UUID) or usernames
list AUTHORIZED_USERS = [
    &quot;6c8ff91f-d74b-4842-b38b-81bb08f6efde&quot;,     // tomjs
    &quot;bobka Resident&quot;,   // fails
    &quot;bobka.Resident&quot;,   // fails
    &quot;ernest.cone&quot;,      // OK (angelus coen)
    &quot;rebozuelo&quot;         // OK
];

// authorized(ID)
// Return TRUE if:
// * owner
// * group matches object group
// * key in AUTHORIZED_USERS
// * name(key) …</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/can_haz_rez?rev=1705200518&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-14T02:48:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>can_haz_rez</title>
        <link>https://www.djz.one/lsl/can_haz_rez?rev=1705200518&amp;do=diff</link>
        <description>LSL: Functions: can_haz_rez()

can_haz_rez()


integer can_haz_rez(vector pos) {
    integer parcel_flags = llGetParcelFlags(pos);
    if (parcel_flags &amp; PARCEL_FLAG_ALLOW_CREATE_OBJECTS) {
        // Rez is allowed for all
        return TRUE;
    }

    list parcel_details = llGetParcelDetails(pos, [PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP]);
    if (llList2Key(parcel_details, 0) == llGetOwner()) {
        // Owner can always rez
        return TRUE;
    }

    // Do we have group rez rights…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/color_timer?rev=1730867184&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-06T04:26:24+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>color_timer</title>
        <link>https://www.djz.one/lsl/color_timer?rev=1730867184&amp;do=diff</link>
        <description>color_timer()


// cycle through a list of colors

integer SPOT_CHANNEL  = 1520;   

// How long to show each color (seconds)
float delay = 3.0;

// Define the color vectors
vector Blue = &lt;0.2, 0.2, 0.4&gt;;      // Blue
vector Cyan = &lt;0.0, 0.314, 0.314&gt;;  // Cyan
vector Green = &lt;0.0, 0.5, 0.0&gt;;     // Green
vector Gold = &lt;0.5, 0.25, 0.0&gt;;     // Gold

// Show the colors in this order
list colors = [Blue, Cyan, Green, Gold];

integer index = 0;

default {
    state_entry() {
        llListen(SPOT_C…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/config_from_desc?rev=1705633005&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-19T02:56:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>config_from_desc</title>
        <link>https://www.djz.one/lsl/config_from_desc?rev=1705633005&amp;do=diff</link>
        <description>LSL: Configure From Description


// config-from-desc - Get configuration from object Description field

// Use channel 66 by default
integer CHANNEL = 66;

// Enable sound by default
integer SOUND = TRUE;

// parse_args() sets global config directly from the contents of the object&#039;s Description field
// Multiple items are separated by a colon (&#039;:&#039;).
// Configs can either be a key=value pair or just a single key word to enable a feature
//
// Set the channel to 99:
//   channel=99
//
// Set the …</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/hud_buttons?rev=1727745918&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-01T01:25:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>hud_buttons</title>
        <link>https://www.djz.one/lsl/hud_buttons?rev=1727745918&amp;do=diff</link>
        <description>HUD Button Handling

Handle button presses on the HUD by detecting the link, face and position, as well as if it was a long-click (&gt; 2 seconds).

Do button handling outside of the state handlers


button(integer link, integer face, vector p, integer long) {
    string name = llGetLinkName(link);
    log(&quot;button() name: &quot; + name + &quot;  face: &quot; + (string)face + &quot;  pos: &quot; + (string)p);

    if (name == &quot;button&quot;) {
        if (face == 4) {
            // handle 5x2 buttons
            integer bx = (in…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/hud_position?rev=1727646638&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-09-29T21:50:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>hud_position</title>
        <link>https://www.djz.one/lsl/hud_position?rev=1727646638&amp;do=diff</link>
        <description>HUD Positioning

HUDs can detect where they are attached and make appropriate adjustments to ensure they are not hidden off the edge of the viewer&#039;s window.

There is a bit of magic involved in setting the actual offsets as it depends on the geometry of all of the links in the HUD but the basics are here.</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/is_sl?rev=1705201564&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-14T03:06:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>is_sl</title>
        <link>https://www.djz.one/lsl/is_sl?rev=1705201564&amp;do=diff</link>
        <description>LSL: is_SL()

Detect SL vs OpenSim

This relies on a bug in SL that does not exist in OpenSim, per WaS bug Splitting Strings to Lists. We can detect SL by looking for this bug in llParseString2List():


// Hack to detect Second Life vs OpenSim
// Relies on a bug in llParseString2List() in SL
// http://grimore.org/fuss/lsl/bugs#splitting_strings_to_lists 
integer is_SL() {
    string sa = &quot;12999&quot;;
//    list OS = [1,2,9,9,9];
    list SL = [1,2,999];
    list la = llParseString2List(sa, [], [&quot;0&quot;,…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/linksetdata?rev=1743302951&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-03-30T02:49:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linksetdata</title>
        <link>https://www.djz.one/lsl/linksetdata?rev=1743302951&amp;do=diff</link>
        <description>LSL:LinksetData

	*  LSL Wiki LinksetData

Dump All Data


dump_ls_data() {
    integer count = llLinksetDataCountKeys();
    list keys = llLinksetDataListKeys(0, -1);
    integer i = 0;
    for (i=0; i&lt;count; ++i) {
        llOwnerSay(&quot;  &quot; + llList2String(keys, i) + &quot;=&quot; + llLinksetDataRead(llList2String(keys, i)));
    }
}</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/longtouch?rev=1705114362&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-13T02:52:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>longtouch</title>
        <link>https://www.djz.one/lsl/longtouch?rev=1705114362&amp;do=diff</link>
        <description>LSL: Long Touch


default {
    touch_start(integer num) {
        warning(&quot;*idle touch_start(&quot;+(string)num+&quot;)&quot;);
        llResetTime();
    }

    touch_end(integer num) {
        warning(&quot;*idle touch_end(&quot;+(string)num+&quot;)&quot;);
        if (llGetTime() &gt; 2.0) {
            // Reposition on long-touch
            debug(&quot;~~~~~~~touch_end()&quot;);
        }
    }
}</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/memory?rev=1743039838&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-03-27T01:43:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>memory</title>
        <link>https://www.djz.one/lsl/memory?rev=1743039838&amp;do=diff</link>
        <description>LSL: Memory Limits

Minimize a scripts memory usage

Every Mono script in Second Life uses 65536 bytes  if it needs it or not, this lets you reduce that amount

Uncomment the llOwnerSay line to see how much memory is being used, then set MEM_LIMIT to just above that.  Some scripts will need additional memory while they run, if you get errors like</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/miniscripts?rev=1730866620&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-06T04:17:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>miniscripts</title>
        <link>https://www.djz.one/lsl/miniscripts?rev=1730866620&amp;do=diff</link>
        <description>Mini-Scripts

Small single-purpose scripts that are insanely handy to have

Set-and-Delete

	*  desc2float
*  name2float
*  set-for-sale

	*  no-prim-all - reset all prim properties
*  simple no- scripts - reset specific prim properties</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/name?rev=1705200727&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-14T02:52:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>name</title>
        <link>https://www.djz.one/lsl/name?rev=1705200727&amp;do=diff</link>
        <description>LSL: Name

Name Lookups

Looking up UUIDs and usernames can be fin, this is a quick example of how to resolve (possible leagacy) login name to the current login name if it has been changed.


string name = &quot;imaaltthree Resident&quot;;
key displayname_query;
key username_query;
key userkey_query;

default {
    state_entry() {
        llOwnerSay(&quot;original name: &quot; + name);
        // Key the user key first, the other lookups need it
        userkey_query = llRequestUserKey(name);
    }

    dataserver(…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/popup_dislog?rev=1705633133&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-19T02:58:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>popup_dislog</title>
        <link>https://www.djz.one/lsl/popup_dislog?rev=1705633133&amp;do=diff</link>
        <description>LSL: Popup Dialog


list POPUP_OPTIONS = [&#039;Debug&#039;, &#039;On&#039;, &#039;Off&#039;];
string POPUP_TEXT = &quot;Pop-up dialog box&quot;;
integer LISTEN_CHANNEL = -1;
float MENU_TIMEOUT = 30.0;
integer listen_handle;

...

    touch_start(integer touchNumber) {
        listen_handle = llListen(LISTEN_CHANNEL, &quot;&quot;, NULL_KEY, &quot;&quot;);
        llDialog(llDetectedKey(0), POPUP_TEXT, POPUP_OPTIONS, LISTEN_CHANNEL);
        llSetTimerEvent(MENU_TIMEOUT);
    }

    listen(integer channel, string name, key id, string message) {
        if…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/read_ini_notecard?rev=1705632589&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-19T02:49:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>read_ini_notecard</title>
        <link>https://www.djz.one/lsl/read_ini_notecard?rev=1705632589&amp;do=diff</link>
        <description>LSL: Read INI Notecard


list group_labels;
list buttons;
list labels;
list button_labels;
list colors;

// Internal vars
string DEFAULT_NOTECARD = &quot;!CONFIG&quot;;
string notecard_name;
key notecard_qid;
integer line;
integer current_group;
string current_section;

integer current_buttons;
string current_label;
string current_button_label;
vector current_color;


// See if the notecard is present in object inventory
integer can_haz_notecard(string name) {
    integer count = llGetInventoryNumber(INVE…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/read_notecard?rev=1743302274&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-03-30T02:37:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>read_notecard</title>
        <link>https://www.djz.one/lsl/read_notecard?rev=1743302274&amp;do=diff</link>
        <description>LSL: Read Notecard


string CONFIG_NOTECARD = &quot;notecard&quot;;
key card_query;
integer line;

state default {
    state_entry() {
        if (llGetInventoryType(CONFIG_NOTECARD) == INVENTORY_NOTECARD) {
            // Read the notecard
            card_query = llGetNotecardLine(CONFIG_NOTECARD, line=0);
        }
    }

    dataserver(key queryid, string data) {
        if (queryid == card_query) {
            if (data != EOF) {
                // Skip comments
                integer ix = llSubStrin…</description>
    </item>
    <item rdf:about="https://www.djz.one/lsl/updatelinksittarget?rev=1705201123&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-14T02:58:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>updatelinksittarget</title>
        <link>https://www.djz.one/lsl/updatelinksittarget?rev=1705201123&amp;do=diff</link>
        <description>LSL: UpdateLinkSitTarget()


// Sets/Updates the sit target moving the avatar on it if necessary.
// Written by Strife Onizuka, size adjustment provided by Talarus Luan
// http://wiki.secondlife.com/wiki/User:Strife_Onizuka/UpdateLinkSitTarget
UpdateLinkSitTarget(integer link, vector pos, rotation rot) {
    //Using this while the object is moving may give unpredictable results.
    llLinkSitTarget(link, pos, rot);
    key user = llAvatarOnLinkSitTarget(link);
    if (user) {
        // If there…</description>
    </item>
</rdf:RDF>
