User:Daemonika Nightfire/Scripts/Anti Rezz

From Second Life Wiki
< User:Daemonika Nightfire
Revision as of 14:04, 3 January 2020 by Daemonika Nightfire (talk | contribs) (→‎*DS* Anti Rezz)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

*DS* Anti Rezz

KBwarning.png Warning: There are no scripts available in Second Life that can protect objects/mesh against copybots!
  • It is ridiculous to think that this would still work with the control event.
  • Thats just a great tool to annoy your customers. It delete the complete object by rezzing on ground and detach it after 5 minutes from avatar.
/*
    *DS* Anti Rezz
    Dear content creator, this script will not protect your creations against copybots.
    It is a real stupid placebo, because each copybot needs just some seconds for copy all what he can see.
    For that is it not necessary to rez an object/mesh, attachments are not secure too.
    This script will not work in no script parcells, even not when it contain control permission,
    because it can not start at parcells that dont allow scripts.
    
    The only thing what you reach with scripts like this, you will loose customers!
*/

integer Limit = 300;    // 5 minutes
integer count = 0;      // empty counter

default
{
    state_entry()
    {
        //llSay(0, "Hello, Avatar!");
    }
    
    attach(key id) // gets AvatarKey who wear it automatically
    {
        if(id) // check the available key
        {
            llRequestPermissions(id, PERMISSION_ATTACH); // asks for permissions to attach/detach
        }
    }
    
    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_ATTACH) // check the requested permission
        {
            if(count < Limit) // check the counter-limit
            {
                llSetTimerEvent(1); // start the timer
                llSay(0, "This placebo detach your object after 5 minutes.");
            }
            else if(count >= Limit) // check the counter-limit
            {
                llSay(0, "Time's up, this placebo will now always remove the object immediately.");
                llDetachFromAvatar(); // detach the object from avatar when permission is given
            }
        }
    }

    timer()
    {
        if(count == Limit) // check the counter-limit
        {
            llSetTimerEvent(0); // stop the timer
            llDetachFromAvatar(); // detach the object from avatar when permission is given
            return; // leave the event immediately
        }
        count += 1; // counts the seconds
    }
    
    on_rez(integer Dae)
    {
        if(llGetAttached() == 0) // check for rezzing onground
        {
            llSay(0, "This placebo delete your object when you rez it on ground");
            llDie(); // delete the complete object
        }
    }
}