Invisible Prim Script

Expired

Use this with an

// "Invisible" texture script
// Cross Lament claims no credit for this
// She also refers to herself in the third person

default
{
state_entry()
{
llSetPrimitiveParams( [ PRIM_TEXTURE, ALL_SIDES, "b8d3965a-ad78-bf43-699b-bff8eca6c975", ZERO_VECTOR, <0.4, 0.4, 0 >, 0.0 ] ) ;
}
}

 

alpha texture:

 

Gift Giver

Expired

// Put name of object to be given in the line below 
// and place object in the contents
string object = "Test Object";

default
{
    state_entry()
    {
        llSay(0, "Touch giver ready");
    }

    touch_start(integer total_number)
    {
        key id=llDetectedKey(total_number - 1);
        string name=llKey2Name(id);
        llSay(0, name + ", Please have a notecard" + object);
        llGiveInventory(id, object);
    }
    on_rez(integer start_param)
    {
        llResetScript();
    } 
}

 

Flashing Hover Text

Expired

string HoverText = "** Your Text Here **"; // YOUR TEXT
vector Color = <0,0,0>; //Color 1
vector Color2 = <1 ,1,1>; //Color 2

float Transparancy = 0.75; //  Transparency of the Text 1.0 is Solid.
float Timer = 0.2; // speeeeeeed  
integer Flash = FALSE;


default
{
    state_entry()
    {
            llSetTimerEvent(Timer);
    }
    timer()
    {
        if (Flash == FALSE)
        {
            llSetText(HoverText, Color, Transparancy);
            Flash = TRUE;
        }
        else
        {
            llSetText(HoverText, Color2, Transparancy);
            Flash = FALSE;
        }
    }
    on_rez(integer start_param)
    {
        llResetScript();
    }
}

 

Compass Script

Expired

default
{
state_entry()
{
llSetTimerEvent(0.1); // set a timer event for every tenth of a second
}

timer()
{
string direction; // this is the variable we will set the text with
vector vel = llRot2Fwd(llGetRot());// get the current velocity
integer x = llRound(vel.x); // round the x value of the velocity and assign it to a new variable
integer y = llRound(vel.y); // round the y value of the velocity and assign it to a new variable


//Keep in mind the following when reading the following part of this script: when one travels perfectly east at a speed of 1.0, their velocity is <1 .0,0,0>. Therefore, if they were traveling west,
//it would be <-1.0,0,0>. If they were traveling north, it would be <0.0,1.0,0.0>. If they were traveling south, it would be <0.0,-1.0,0.0>. We dont deal with the Z value of the velocity at all
//because cardinal directions are based on a two-dimensional coordinate plane.
if((llAbs(x) > llAbs(y)) && (x > 0)) // if the absolute value of X is greater than Y, then we are traveling mostly east or west. If X is positive, then we are traveling east.
{
direction="East";
}
else if((llAbs(x) > llAbs(y)) && (x <0)) // if the absolute value of X is greater than Y, then we are traveling mostly east or west. If X is negative, then we are traveling west.
{

direction = "West";
}
else if((llAbs(y) > llAbs(x)) && (y > 0)) // if the absolute value of Y is greater than X, then we are traveling mostly north or south. If Y is positive, then we are traveling north.
{

direction = "North";
}
else if((llAbs(y) > llAbs(x)) && (y <0)) // if the absolute value of Y is greater than X, then we are traveling mostly north or south. If Y is negative, then we are traveling south.
{

direction = "South";
}
else if((llAbs(y) == llAbs(x)) && (x > 0 && y > 0)) // if the absolute value of Y is equal to X, then we are in an intermediate direction. If both X and Y are positive, then we are traveling nort //heast, because EAST is positive on the X axis and north is positive on the Y axis.
{

direction = "Northeast";
}
else if((llAbs(y) == llAbs(x)) && (x <0 && y > 0)) // if the absolute value of Y is equal to X, then we are in an intermediate direction. If X is negative and Y is positive, then we are traveling //northwest
{

direction = "Northwest";
}
else if((llAbs(y) == llAbs(x)) && (x <0 && y < 0)) // if the absolute value of Y is equal to X, then we are in an intermediate direction. If X is negative and Y is negative, then we are traveling //southwest
{

direction = "Southwest";
}
else if((llAbs(y) == llAbs(x)) && (x > 0 && y <0)) // if the absolute value of Y is equal to X, then we are in an intermediate direction. If X is positive and Y is negative, then we are traveling //southeast
{

direction = "Southeast";
}
else // not moving
{
direction = "Stationary";
}
llSetText(direction, <1,1,1>, 1.0); // set text on the object to what direction we are moving in
}
}