Difference between revisions of "No Auto-Return"

From Second Life Wiki
Jump to navigation Jump to search
(New page: == What ''is'' No Auto-Return? == Isn't it annoying when you're at a sandbox and you haven't linked a build and you get frustrated because it gets returned and you can't work out where th...)
 
m (→‎Example script: Replaced <source> with <syntaxhighlight>)
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
Isn't it annoying when you're at a sandbox and you haven't linked a build and you get frustrated because it gets returned and you can't work out where that bit goes again? Well, with this script it stops the objects from getting returned!
Isn't it annoying when you're at a sandbox and you haven't linked a build and you get frustrated because it gets returned and you can't work out where that bit goes again? Well, with this script it stops the objects from getting returned!


Note: Only use for long builds that will take a long time; NOTHING ELSE!!!
[[Image:Bella_003.jpg|thumb|My cube has been here for 4 hours!]]
Note 2: Only works in single prims.


== Let's see the script then! ==
Note: Only use for long builds that will take a long time; NOTHING ELSE!


Okay, here we go :D.
{{KBnote|Test this with some unimportant build first. I believe this autoreturn hack was nerfed in the last year. --[[User:ObviousAltIsObvious Resident|ObviousAltIsObvious Resident]] ([[User talk:ObviousAltIsObvious Resident|talk]]) 23:20, 24 January 2015 (PST)}}


<lsl>//Bella all the way! xD
== Example script ==
//
{{LSL Tip|Do take note that this script is meant for single-prim-objects, '''NOT''' linksets!}}
<syntaxhighlight lang="lsl2">
key owner;


default
default
{
{
    on_rez(integer param)
    {
        key ownerRightNow = llGetOwner();
        if (owner == ownerRightNow)
            llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);
        else
            llResetScript();
    }
    changed(integer change)
    {
        if (change & (CHANGED_OWNER | CHANGED_INVENTORY))
            llResetScript();
    }
     state_entry()
     state_entry()
     {
     {
         llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS);
         owner = llGetOwner();
         llListen(10240,"",NULL_KEY,"");
 
        llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);
 
         llListen(10240, "", NULL_KEY, "");
     }
     }
     on_rez(integer param)
 
     listen(integer channel, string name, key id, string message)
     {
     {
         llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS);
         llDie();
     }
     }
     run_time_permissions(integer perm)
     run_time_permissions(integer perm)
     {
     {
         if(perm)
         if(perm & PERMISSION_CHANGE_LINKS)
        {
             llSetTimerEvent(30.0);
             llSetTimerEvent(30);
        }
     }
     }
     timer()
     timer()
     {
     {
         key parent=llGetKey();
         key keyThisPrim = llGetKey();
         llBreakLink(llGetLinkNumber());
         integer link = llGetLinkNumber();
         llSleep(5);
 
         llCreateLink(parent,0);
         llBreakLink(link);
    }
 
    listen(integer channel, string name, key id, string message)
    //  wait a bit to make sure this works
    {
         llSleep(5.0);
        llDie();
 
        llCreateLink(keyThisPrim, FALSE);
     }
     }
}</lsl>
}
</syntaxhighlight>

Latest revision as of 16:43, 3 February 2023

What is No Auto-Return?

Isn't it annoying when you're at a sandbox and you haven't linked a build and you get frustrated because it gets returned and you can't work out where that bit goes again? Well, with this script it stops the objects from getting returned!

My cube has been here for 4 hours!

Note: Only use for long builds that will take a long time; NOTHING ELSE!

KBnote.png Note: Test this with some unimportant build first. I believe this autoreturn hack was nerfed in the last year. --ObviousAltIsObvious Resident (talk) 23:20, 24 January 2015 (PST)

Example script

KBcaution.png Important: Do take note that this script is meant for single-prim-objects, NOT linksets!
key owner;

default
{
    on_rez(integer param)
    {
        key ownerRightNow = llGetOwner();

        if (owner == ownerRightNow)
            llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);
        else
            llResetScript();
    }

    changed(integer change)
    {
        if (change & (CHANGED_OWNER | CHANGED_INVENTORY))
            llResetScript();
    }

    state_entry()
    {
        owner = llGetOwner();

        llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);

        llListen(10240, "", NULL_KEY, "");
    }

    listen(integer channel, string name, key id, string message)
    {
        llDie();
    }

    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_CHANGE_LINKS)
            llSetTimerEvent(30.0);
    }

    timer()
    {
        key keyThisPrim = llGetKey();
        integer link = llGetLinkNumber();

        llBreakLink(link);

    //  wait a bit to make sure this works
        llSleep(5.0);

        llCreateLink(keyThisPrim, FALSE);
    }
}