Pose Stand With A Nice Hello from You

Thread Started By YoungMoney

2969
0
  • 65 Vote(s) - 3.02 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
PHP Code:
//Pose Stand With A Nice Hello from You
//Second Life Linden Scripting Language Library (http://wiki.secondlife.com/wiki/Category:LSL_Library)
//Minor Addition by Chimera Firecaster (http://chimerafire.wordpress.com/) - 05/11/2010

//Use:
//  1. Rez an cylinder and create a posing stand from it.
//  2. Give the cylinder a name.  For example, if you have a store named Main Street
//     Clothing, you would name it Main Street Clothing Posing Stand.  If you are
//     making this for a friend, then use your name:  Mary Lamb Posing Stand.  The
//     name of the posing stand will appear before the greeting message.
//  3. Place this script into the "Contents" of the Object
//  4. To edit the script, double-click on its name in "Contents'
//  5. Look for "REPLACE YOUR MESSAGE..." below and replace
//     the text with your own message.
//  6. On the script editing dialog you will see "Mono"
//     Make sure it is checked. Then click on Save.

//Note: this is a FREE script.  It is given generously to the Second Life
//   community without the expectation of anything in return. It may be
//   distributed, but please do not charge for it.  That's bad form.  Besides
//   dishonoring the kindness of others will most certainly bring you bad karma.
//-----Do Not Remove Above Header

key mkLoungingAgentKey NULL_KEY;
integer miPermissionsAcquired FALSE;

 default
 {
 
state_entry()
 {
 
//overriden sit target
 //lower them a bit
 
vector vLoungeTarget = <0.000.001.00>;

 
rotation rX;
 
rotation rY;
 
rotation rZ;
 
rotation r;

 
//build rotations
 //Note: this is broken out like this to simplify the
 //        process of finding the correct sit angle.  I
 //        use the following form until I have the rotation
 //        that I want perfect, and then I simply
 //        hardcode the perfected quaterion and remove   
 //        this mess.
 //
 
rX llAxisAngle2Rot( <1,0,0>, DEG_TO_RAD);         //cartwheel
 
rY llAxisAngle2Rot( <0,1,0>, DEG_TO_RAD);       //sumersault
 
rZ llAxisAngle2Rot( <0,0,1>, DEG_TO_RAD);       //turn in place

 //combine rotations
 
rX rY rZ;

 
//override 'sit' on pie menu
 
llSetSitText"Stand" );

 
//override default sit target and rotation on prim
 
llSitTargetvLoungeTarget);
 }

 
changed(integer change)
 {
 if (
change CHANGED_LINK)
 {
 
key agent llAvatarOnSitTarget();
 if ( 
mkLoungingAgentKey == NULL_KEY && agent != NULL_KEY )
 {

 
//changed user
 //cache new user key and request their permissions
 
mkLoungingAgentKey agent;
 
llRequestPermissions(mkLoungingAgentKey,PERMISSION_TRIGGER_ANIMATION);
 }
 else if ( 
mkLoungingAgentKey != NULL_KEY && agent == NULL_KEY)
 {

 
//user is getting up
 
if ( miPermissionsAcquired )
 {

 
//restore anims
 
llStopAnimation("turn_180");

 }

 
//reset the script to release permissions
 
llResetScript();
 }
 }        
 }

 
run_time_permissions(integer parm)
 {
 if(
parm == PERMISSION_TRIGGER_ANIMATION)
 {
 
//REPLACE YOUR MESSAGE IN THE AREAS BETWEEN QUOTES " xxxxx "  " xxxxx "
 //Watch carefully that you only replace the text between quotes
 
llInstantMessage(mkLoungingAgentKey,"Hello " llKey2Name(mkLoungingAgentKey) + ".  Thanks for using our posing stand and have a wonderful day");

 
//set permission flag
 
miPermissionsAcquired TRUE;

 
//cancel the sit anim
 
llStopAnimation("sit");

 
llStartAnimation("turn_180");
 }
 }    

Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  MLP - MULTI-LOVE-POSE V1.2 zion 20 19,374 02-03-2019, 07:53 AM
Last Post: seferiadam
  Pose Ball System THEREALAMMER 0 922 12-09-2018, 01:35 AM
Last Post: THEREALAMMER

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...