Scripts Library

Creating scripts
User avatar
Freda Frostbite
Posts: 689
Joined: Sat Mar 29, 2014 2:10 am
Location: Florida, space coast.
Has thanked: 508 times
Been thanked: 702 times

Re: Scripts Library

Post by Freda Frostbite » Wed Jun 04, 2014 7:21 pm

Darn, it does not seem to work. It does not respond to touching as the script says it will. Any other thoughts?
User avatar
Deuce Halsey
Posts: 322
Joined: Mon Oct 14, 2013 9:30 pm
Has thanked: 391 times
Been thanked: 260 times

Re: Scripts Library

Post by Deuce Halsey » Wed Jun 04, 2014 7:30 pm

That's odd. It worked for me. I'll send you a copy of my working version in game.
These users thanked the author Deuce Halsey for the post:
Freda Frostbite
Deuce Halsey
Just4yucks in Kitely Marketplace
http://www.kitely.com/market?store=2704782
User avatar
Freda Frostbite
Posts: 689
Joined: Sat Mar 29, 2014 2:10 am
Location: Florida, space coast.
Has thanked: 508 times
Been thanked: 702 times

Re: Scripts Library

Post by Freda Frostbite » Wed Jun 04, 2014 7:38 pm

Thanks so much, Deuce! Yours works great! Not at all sure why mine does not.
User avatar
Constance Peregrine
Posts: 2325
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2765 times
Been thanked: 1424 times

Re: Scripts Library

Post by Constance Peregrine » Wed Jun 04, 2014 7:45 pm

hard to say but good Duece helped ya-))
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Constance Peregrine
Posts: 2325
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2765 times
Been thanked: 1424 times

follower

Post by Constance Peregrine » Tue Jun 10, 2014 11:00 am

Found this in another item someplace...tested in kitely and should be fun-))

It did not work for me in the merchants sandbox but did on my own land, which is cool, just noting....use your imagination and make cool followers-))

Code: Select all

//Simple Rotation Follower Script
//If this script is set to run, it will turn to match the orientation of the target selected.
// It will perfer to follow the owner
// but if the owner is not there it will pick someone at random within 50 m
// and follow them.

//Based off of scripts by SL Ope Rand & Christopher Omega

// AXIS_* constants, represent the unit vector 1 unit on the specified axis.
vector AXIS_UP = <0,0,1>;
vector AXIS_LEFT = <0,1,0>;
vector AXIS_FWD = <1,0,0>;
vector offset = < -2,2, -0.45>;  //1 meter behind and 1 meter above owner's center.
vector roffset=<0,0,0>;
float rspeed =0.4; 

integer range=20;
integer nestSize=20;
key lastTargetID;
vector nest;
integer nestDefined = 0;
integer textureChan = 9854;

rotation getRotToPointAxisAt(vector axis, vector target) {
return llGetRot() * llRotBetween(axis * llGetRot(), target - llGetPos());
}

integer legalPos( vector pos)
{
    if ((pos.x>5)&&( pos.x<250)&&(pos.y>5)&&( pos.y<250))
    {
        if (nestDefined==1)
        {
          if( (pos.x>nest.x-nestSize)&&( pos.x<nest.x+nestSize)&&(pos.y>nest.y-nestSize)&&( pos.y<nest.y+nestSize) )
            {
                return 1;
            } 
            else
            {
                return 0; // Not in our nest zone
            }
       }
       else
       {
            // No Nest Zone Defined
                 return 1;
           
       }
    }
    else
    {
        return 0; // They broke our liberal rules so we're SOOO over with them
    }
 
}


// Strength and damping are values used to control 
// how llRotLookAt and llLookAt move, these values are tunable.
float strength = 1.0;
float damping = 0.1250;

default 
    {
        state_entry() {
            
        nestDefined=0;
        lastTargetID = llGetOwner();
        
        //Stops it from tipping over
        llSetStatus(STATUS_ROTATE_X, FALSE);
        llSetStatus(STATUS_ROTATE_Y, TRUE); 
        llSetStatus(STATUS_ROTATE_Z, FALSE);
        llSetStatus(STATUS_PHYSICS, FALSE);
        
        
        //llSensorRepeat(string name, key id, integer type, float range, float arc, float rate)
        //llSensorRepeat("",llGetOwner(),AGENT,60,PI,0.2); //set the last three variables lower/higher to lessen lag
    
        llSensorRepeat("","",AGENT,range,PI,1);
        llListen( 0, "", llGetOwner(), "" );

    }
    
    on_rez(integer start_param) { llResetScript(); }
    
    listen(integer channelIn, string name, key id, string message) 
    {
       if (llSubStringIndex(message,"NEST") >= 0) 
         {
            nest = llGetPos();
            llSay(0,"The range of my Nest is: X( "+ (string)(nest.x-nestSize) + ") to X( "+ (string)(nest.x+nestSize) + 
                       ") and y( "+ (string)(nest.y-nestSize)+ ") to y("+ (string)(nest.y+nestSize) +")");
            nestDefined=1;
         } 
    
          if (llSubStringIndex(message,"DENEST") >= 0) 
         {
             nestDefined=0;
         }
    }
    
    sensor(integer num_detected) 
    {
    
        // Pick someone at random but perfer the owner and last target
         integer target_selected = (integer)llFrand((float)num_detected);
         integer i;
         for(i = 0; i < num_detected; i++)
         {
           if ( (llDetectedKey(i)== lastTargetID) && (legalPos(llDetectedPos(i))==1) )
           {
            target_selected = i; // Go with our existing target if possible
           }
           if ( (llDetectedKey(i)== llGetOwner()) && (legalPos(llDetectedPos(i))==1) )
           {
             target_selected = i;
             lastTargetID=llGetOwner();  // forget about that passing fad
           }
         }
         //llShout(0, "num_detected "+ (string)num_detected + " target_selected "+ (string) target_selected);

        //vector target = llDetectedPos(0);
        vector target = llDetectedPos(target_selected);
        
        // This line points the fwd (X) axis at the target:
        //llRotLookAt(getRotToPointAxisAt(AXIS_FWD, target), strength, damping);
        // llLookAt(llGetOwner(),strength, damping);
        
        // This line points the left (Y) axis at the target:
        // llRotLookAt(getRotToPointAxisAt(AXIS_LEFT, target), strength, damping);
        // This points the up (Z) axis at the target:
        // llRotLookAt(getRotToPointAxisAt(AXIS_UP, target), strength, damping);
        
        // Get position and rotation
        vector pos   = llDetectedPos(target_selected);
        rotation rot = llDetectedRot(target_selected);
        vector mypos = llGetPos();
        
        // Offset back one metre in X and up one metre in Z based on world coordinates.
        // use whatever offset you want.
        vector worldOffset = offset;
        
        // Offset relative to owner needs a quaternion.
        vector avOffset = offset * rot;
        
        pos += avOffset+roffset;       // use the one you want, world or relative to AV.
        
        //llShout(0, "MoveTo "+ (string)pos + " @ "+ (string) rspeed);
        //llMoveToTarget(pos,rspeed); 


        
        if (legalPos(pos) ==1)
        { 
            llSetPos(pos);
            llSetRot(rot);
        }
        else
        {
            lastTargetID = NULL_KEY; // Not in our nest zone
        }


        llResetScript(); 
    
    }

}
These users thanked the author Constance Peregrine for the post:
Chris Namaste
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Constance Peregrine
Posts: 2325
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2765 times
Been thanked: 1424 times

Scrubber

Post by Constance Peregrine » Sat Jul 05, 2014 2:07 pm

Just saw a basic script isn't here, so, here...

Code: Select all

// The Scrubber v1.3 - Jopsy Pendragon, 8/22/2007
// Just drop this script on a prim that's giving you grief.
// It will reset/unset most persistant prim settings that
// can only be set by scripts and then remove itself.
// This script is in the public domain and may be used freely.
// Please leave this comment block intact if you share this script!

default
{
state_entry()
{
llSetSitText( "" );
llSetTouchText( "" );
llParticleSystem( [ ] );
llSetText( "", ZERO_VECTOR, 1.0 );
llTargetOmega( ZERO_VECTOR, 0, 0 );
llSetCameraAtOffset( ZERO_VECTOR );
llSetCameraEyeOffset( ZERO_VECTOR );
llSitTarget( ZERO_VECTOR, ZERO_ROTATION );
llSetTextureAnim( FALSE , ALL_SIDES, 1, 1, 0, 0, 0.0 );
llStopSound();
llOwnerSay("This Prim is Clean... ");
llRemoveInventory( llGetScriptName() ); // vanish without a trace...
}
}
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Carlos Loff
Posts: 270
Joined: Sat Dec 28, 2013 8:58 pm
Location: Between Lisbon - Portugal and London - UK
Has thanked: 260 times
Been thanked: 176 times
Contact:

Re: Scripts Library

Post by Carlos Loff » Sat Jul 05, 2014 2:59 pm

Great post, great helps, great people, ling live Kitely, thanks
These users thanked the author Carlos Loff for the post:
Constance Peregrine
Join Kitely Group ---> Loff Virtual Worlds
Join Me on Facebook ---> https://www.facebook.com/groups/loffvirtualcities/
Join Google+ ---> OpenSim Virtual Worlds ---> https://plus.google.com/u/0/communities ... 2072972054
User avatar
Constance Peregrine
Posts: 2325
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2765 times
Been thanked: 1424 times

Balloon Generator

Post by Constance Peregrine » Sun Nov 02, 2014 4:12 pm

I just left this http://www.giessenict.nl/index.php/nl/o ... -generator at the http://www.kitely.com/virtual-world/Ila ... ts-Sandbox for anyone who wishes to pick up a copy rather than do it yourselves-))

I was just making sure it worked here and just decided to leave it there 'cause it is so pretty and this is http://en.wikipedia.org/wiki/Day_of_the_Dead and you can celebrate the dead [or being dead]!!
These users thanked the author Constance Peregrine for the post:
Roswenthe Blackwell
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Ilan Tochner
Posts: 5043
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 2803 times
Been thanked: 2828 times
Contact:

Re: Scripts Library

Post by Ilan Tochner » Sun Nov 02, 2014 4:53 pm

Hi Constance,

Leaving items in the Kitely Merchants Sandbox is ill advised. They will be auto-returned within 8 hours at the most (they may be returned sooner if the person who placed them there doesn't remain in that sandbox world).
These users thanked the author Ilan Tochner for the post:
Constance Peregrine
User avatar
Roswenthe Blackwell
Posts: 163
Joined: Sat Mar 29, 2014 10:14 pm
Has thanked: 76 times
Been thanked: 156 times

Re: Scripts Library

Post by Roswenthe Blackwell » Sun Nov 02, 2014 6:06 pm

I picked it up and dropped it (inactive) near the land point at Meddlesome so it doesn't get lost. I also put it in my library.
These users thanked the author Roswenthe Blackwell for the post (total 2):
Constance PeregrineRobert Stanley
Post Reply