9

Jul

by V

Repost of Bri Hasp’s Sliding Door Script:

//**** Permission is granted to use this script any way you like ****vector dpos;integer doorSte = 0;
default
{
state_entry()
{
llOwnerSay("Sliding door script is active");
}touch_start(integer total_number)
{

if (doorSte == 0)
{

dpos = llGetPos();

dpos = dpos + <2,0,0>; //calculate door position + 2m in X
llSetPos(dpos); //moves the door to new position

doorSte = 1;
}
else
{

dpos = llGetPos();
dpos = dpos - <2,0,0>;//calculate door position - 2m in X
llSetPos(dpos); //moves the door to new position

doorSte = 0;
}
}
}

Source: Sliding Door Script

Source: Art Deco Desk=V= AN 99 sit legs up.bvh

Please see how to import this creation as well as how to use these poses and have a poseball script. For the drawers, use this modified door script:

Right:

// If door is locked, the name of the avatar who locked it.
// If door is not locked, the empty string ("").
string gLockedBy = "";// This number must match the channel number of the lock
// and unlock objects you want to use. If multiple doors
// have the same channel, then a single lock can lock all of
// them at once.
integer gLockChannel = 243;default
{
state_entry()
{
llSay(0, "Door 1.0");
llListen(gLockChannel, "", NULL_KEY, "");
state closed;
}
}state closed
{
listen(integer channel, string name, key id, string message)
{
if (channel == gLockChannel)
{
if (message == "")
{
gLockedBy = "";
//llTriggerSound("door unlock", 10.0);
llSay(0, "unlocked");
}
else
{
gLockedBy = message;
//llTriggerSound("door lock", 10.0);
llSay(0, "locked");
}
}
}

touch_start(integer total_number)
{
string name = llDetectedName(0);
if (name == gLockedBy || gLockedBy == "")
{

rotation rot = llGetRot();
rotation delta = llEuler2Rot(< -PI/16,0,0>);
rot = delta * rot;
llSetRot(rot);
llSleep(0.25);
rot = delta * rot;
llSetRot(rot);
state open;
}
else
{

}
}
}

state open
{
touch_start(integer num)
{

rotation rot = llGetRot();
rotation delta = llEuler2Rot(
);
rot = delta * rot;
llSetRot(rot);

llSleep(0.25);
rot = delta * rot;
llSetRot(rot);

state closed;
}
}

Left:

// If door is locked, the name of the avatar who locked it.
// If door is not locked, the empty string ("").
string gLockedBy = "";// This number must match the channel number of the lock
// and unlock objects you want to use. If multiple doors
// have the same channel, then a single lock can lock all of
// them at once.
integer gLockChannel = 243;default
{
state_entry()
{
llSay(0, "Door 1.0");
llListen(gLockChannel, "", NULL_KEY, "");
state closed;
}
}state closed
{
listen(integer channel, string name, key id, string message)
{
if (channel == gLockChannel)
{
if (message == "")
{
gLockedBy = "";
//llTriggerSound("door unlock", 10.0);
llSay(0, "unlocked");
}
else
{
gLockedBy = message;
//llTriggerSound("door lock", 10.0);
llSay(0, "locked");
}
}
}

touch_start(integer total_number)
{
string name = llDetectedName(0);
if (name == gLockedBy || gLockedBy == "")
{

rotation rot = llGetRot();
rotation delta = llEuler2Rot(< -PI/16,0,0>);
rot = delta * rot;
llSetRot(rot);
llSleep(0.25);
rot = delta * rot;
llSetRot(rot);
state open;
}
else
{

}
}
}

state open
{
touch_start(integer num)
{

rotation rot = llGetRot();
rotation delta = llEuler2Rot(
);
rot = delta * rot;
llSetRot(rot);

llSleep(0.25);
rot = delta * rot;
llSetRot(rot);

state closed;
}
}

[EDIT 11th July 2010: Changed some textures of the chair and fixed a few unlinked prims of the table.]

This is a repost of Adelle Fitzgerald’s CC-by-sa licensed Sync Poseball Script

For the master poseball:

//d'Elle Tech Sync Poseball Script (Main) by Adelle Fitzgerald

//Licenced under Creative Commons Attribution-Share Alike 3.0 Unported - http://creativecommons.org/licenses/by-sa/3.0/

//You are free:

// * to Share — to copy, distribute and transmit the work
// * to Remix — to adapt the work

//Under the following conditions:

// * Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

// * Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

//With the understanding that:

// * Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
// * Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
// * Other Rights — In no way are any of the following rights affected by the license:
// o Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
// o The author's moral rights;
// o Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
// * Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.

//Disclaimer

//The Commons Deed is not a license. It is simply a handy reference for understanding the Legal Code (the full license) — it is a human-readable expression of some of its key terms. Think of it as the user-friendly interface to the Legal Code beneath. This Deed itself has no legal value, and its contents do not appear in the actual license.

//Creative Commons is not a law firm and does not provide legal services. Distributing of, displaying of, or linking to this Commons Deed does not create an attorney-client relationship.

string animation;
string text = "Sit";
vector target = < -0.5,0,-0.4>;
vector rot = &lt;0,-90,180>;
key otherAvie;
integer debug = FALSE;
integer reSyncTimer = 120; //Timer for auto-resync - set to 0 for disabled.

default
{
on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
animation = llGetInventoryName(INVENTORY_ANIMATION, 0);
llListen(1,"","","");
llSetText(text,&lt;1,1,1>,1);
llSetAlpha(1.0,ALL_SIDES);
llSitTarget(target,llEuler2Rot(rot*DEG_TO_RAD));
}

listen(integer channel, string name, key id, string message)
{
if(message == "show")
{
llSetAlpha(1.0,ALL_SIDES);
llSetText(text,&lt;1,1,1>,1);
llMessageLinked(LINK_ALL_OTHERS, 0, "show", "NULL_KEY");
}
if(message == "hide")
{
llSetAlpha(0.0,ALL_SIDES);
llSetText("",&lt;1,1,1>,1);
llMessageLinked(LINK_ALL_OTHERS, 0, "hide", "NULL_KEY");
}
if (id == llAvatarOnSitTarget() || id == otherAvie)
{
if(message == "sync")
{
if (debug) llSay(0,"Re-syncing main");
llMessageLinked(LINK_ALL_OTHERS, 0, "sync", "NULL_KEY");
llStopAnimation(animation);
llStartAnimation(animation);
}
}

}

changed(integer change)
{
if(change & CHANGED_LINK)
{
key avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY)
{
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
}
else
{
if (llGetPermissionsKey() != NULL_KEY)
{
llStopAnimation(animation);
llResetScript();
}
}
}
}

run_time_permissions(integer parm)
{
if(parm == PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llMessageLinked(LINK_ALL_OTHERS, 0, "sync", "NULL_KEY");
llStartAnimation(animation);
llSetAlpha(0.0,ALL_SIDES);
llSetText("",&lt;1,1,1>,1);
llSetTimerEvent(reSyncTimer);
}
}
link_message(integer int,integer num,string str,key id)
{
if(str == "sync")
{
if (debug) llSay(0,"Re-syncing main");
llStopAnimation(animation);
llStartAnimation(animation);
}
else if (str == "otherAvie")
{
if (debug) llSay(0,"Other Avie: " + (string)id);
otherAvie = id;
}
}
timer()
{
if (debug) llSay(0,"Re-syncing main");
llStopAnimation(animation);
llMessageLinked(LINK_ALL_OTHERS, 0, "sync", "NULL_KEY");
llStartAnimation(animation);
}
}

For the slave poseball:

//d'Elle Tech Sync Poseball Script (Slave) by Adelle Fitzgerald

//Licenced under Creative Commons Attribution-Share Alike 3.0 Unported - http://creativecommons.org/licenses/by-sa/3.0/

//You are free:

// * to Share — to copy, distribute and transmit the work
// * to Remix — to adapt the work

//Under the following conditions:

// * Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

// * Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.

//With the understanding that:

// * Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
// * Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
// * Other Rights — In no way are any of the following rights affected by the license:
// o Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
// o The author's moral rights;
// o Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
// * Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.

//Disclaimer

//The Commons Deed is not a license. It is simply a handy reference for understanding the Legal Code (the full license) — it is a human-readable expression of some of its key terms. Think of it as the user-friendly interface to the Legal Code beneath. This Deed itself has no legal value, and its contents do not appear in the actual license.

//Creative Commons is not a law firm and does not provide legal services. Distributing of, displaying of, or linking to this Commons Deed does not create an attorney-client relationship.

string animation;
string text = "Sit";
vector target = < -0.5,0,-0.2>;
vector rot = &lt;0,-90,180>;
integer debug = FALSE;

default
{
on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
animation = llGetInventoryName(INVENTORY_ANIMATION, 0);
llSetText(text,&lt;1,1,1>,1);
llSetAlpha(1.0,ALL_SIDES);
llSitTarget(target,llEuler2Rot(rot*DEG_TO_RAD));
}

link_message(integer int,integer num,string str,key id)
{
if(str == "sync")
{
if (debug) llSay(0,"Re-syncing slave");
llStopAnimation(animation);
llStartAnimation(animation);
}
if(str == "show")
{
llSetAlpha(1.0,ALL_SIDES);
llSetText(text,&lt;1,1,1>,1);
}
if(str == "hide")
{
llSetAlpha(0.0,ALL_SIDES);
llSetText("",&lt;1,1,1>,1);
}
}

changed(integer change)
{
if(change & CHANGED_LINK)
{
key avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY)
{
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
}
else
{
if (llGetPermissionsKey() != NULL_KEY)
{
llStopAnimation(animation);
llResetScript();
}
}
}
}

run_time_permissions(integer parm)
{
if(parm == PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llMessageLinked(LINK_ALL_OTHERS, 0, "otherAvie", llAvatarOnSitTarget());
llMessageLinked(LINK_ALL_OTHERS, 0, "sync", "NULL_KEY");
llStartAnimation(animation);
llSetAlpha(0.0,ALL_SIDES);
llSetText("",&lt;1,1,1>,1);
}
}
}

Please note, that this code, unlike our own creations, is licensed under a different creative commons license.

Source: Sync Poseball Script
Creative Commons License

8

Jun

by V

This is a repost of Jippen Faddoul’s GPL licensed poseball script.

// Jippen Faddoul's Poseball script - Low ram/lag posepall thats just drag-and drop simple
// Copyright (C) 2007 Jippen Faddoul
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 3, as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http: //www.gnu.org/licenses/>

//This text will appear in the floating title above the ball
string TITLE="Sit here";
//You can play with these numbers to adjust how far the person sits from the ball. ( <x ,Y,Z> )
vector offset=&lt;0.0,0.0,0.5>;

///////////////////// LEAVE THIS ALONE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
string ANIMATION;
integer visible = TRUE;
key avatar;

vector COLOR = &lt;1.0,1.0,1.0>;
float ALPHA_ON = 1.0;
float ALPHA_OFF = 0.0;

show(){
visible = TRUE;
llSetText(TITLE, COLOR,ALPHA_ON);
llSetAlpha(ALPHA_ON, ALL_SIDES);
}

hide(){
visible = FALSE;
llSetText("", COLOR,ALPHA_ON);
llSetAlpha(ALPHA_OFF, ALL_SIDES);
}

default{
state_entry() {
llSitTarget(offset,ZERO_ROTATION);
if((ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0)) == ""){
llOwnerSay("Error: No animation");
ANIMATION = "sit";
}
llSetSitText(TITLE);
show();
}

touch_start(integer detected) {
//llOwnerSay("Memory: " + (string)llGetFreeMemory());
if(visible){ hide(); }
else { show(); }
}

changed(integer change) {
if(change & CHANGED_LINK) {
avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY){
//SOMEONE SAT DOWN
hide();
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
return;
}else{
//SOMEONE STOOD UP
if (llGetPermissionsKey() != NULL_KEY){ llStopAnimation(ANIMATION); }
show();
return;
}
}
if(change & CHANGED_INVENTORY) { llResetScript(); }
if(change & CHANGED_OWNER) { llResetScript(); }
}

run_time_permissions(integer perm) {
if(perm & PERMISSION_TRIGGER_ANIMATION) {
llStopAnimation("sit");
llStartAnimation(ANIMATION);
hide();
}
}
}</x>

Source: Zero Lag Poseball Script

21

May

by V

There’s a small pretext here. This device was inspired by the Leonardo Device from the classic PC Game ‘Syndicate’. I just thought it might make for a nice posing stand. To use it, you first need a tube. You can either make your own, or simply import my premade Da Vinci circle with mystical carvings. (Source: Da Vinci.zip. Please see how to import this creation.) Then you need to create the following script and put it into the Machine:

string TITLE="Da Vinci Machine";
vector offset=&lt;0.0,0.0,-0.1>;

string ANIMATION;
integer visible = TRUE;
key avatar;

vector COLOR = &lt;1.0,1.0,1.0>;
float ALPHA_ON = 1.0;
float ALPHA_OFF = 0.0;

show(){
visible = TRUE;
llSetText(TITLE, COLOR,ALPHA_ON);
llSetAlpha(ALPHA_ON, ALL_SIDES);
}

hide(){
visible = FALSE;
llSetText("", COLOR,ALPHA_ON);
llSetAlpha(ALPHA_OFF, ALL_SIDES);
}

default{
state_entry() {
llSitTarget(offset,ZERO_ROTATION);
if((ANIMATION = llGetInventoryName(INVENTORY_ANIMATION,0)) == ""){
llOwnerSay("Error: No animation");
ANIMATION = "sit";
}
llSetSitText("pose");
show();
}

touch_start(integer detected) {
if(visible){ hide(); }
else { show(); }
}

changed(integer change) {
if(change & CHANGED_LINK) {
avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY){
hide();
llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
{
llParticleSystem([ PSYS_PART_MAX_AGE, 1.5,
PSYS_PART_START_COLOR, &lt;0.91941, 0.91941, 0.91941>,
PSYS_PART_END_COLOR, &lt;1.00000, 1.00000, 1.00000>,
PSYS_PART_START_SCALE, &lt;4.0, 4.0, 4.0>,
PSYS_PART_END_SCALE, &lt;4.0, 4.0, 4.0>,
PSYS_SRC_BURST_RATE,1.0,
PSYS_SRC_ACCEL,&lt;0.00000, 0.00000, 0.00000>,
PSYS_SRC_BURST_PART_COUNT,1,
PSYS_SRC_BURST_RADIUS,0.000000,
PSYS_SRC_BURST_SPEED_MIN,0.410000,
PSYS_SRC_BURST_SPEED_MAX,0.010000,
PSYS_SRC_INNERANGLE,0.000000,
PSYS_SRC_OUTERANGLE,0.000000,
PSYS_SRC_OMEGA,&lt;0.00000, 0.0, 0.00000>,
PSYS_SRC_MAX_AGE,0.000000,
PSYS_PART_START_ALPHA,1.000000,
PSYS_PART_END_ALPHA,1.000000,
PSYS_SRC_TEXTURE, "e09da12e-3ac2-d85b-abcc-613f492453a6",
PSYS_SRC_TARGET_KEY,(key)"" ]);
}
return;
}else{
if (llGetPermissionsKey() != NULL_KEY){ llStopAnimation(ANIMATION); }
show();
{
llParticleSystem([]);
}
return;
}
}
if(change & CHANGED_INVENTORY) { llResetScript(); }
if(change & CHANGED_OWNER) { llResetScript(); }
}

run_time_permissions(integer perm) {
if(perm & PERMISSION_TRIGGER_ANIMATION) {
llStopAnimation("sit");
llStartAnimation(ANIMATION);
hide();
}
}
}

And finally, you need to upload the Da Vinci animation and the circle texture that will be displayed by the machine when ‘active’. Put the animation into the contents of the machine, and replace the UUID in the above script (from the line PSYS_SRC_TEXTURE, "e09da12e-3ac2-d85b-abcc-613f492453a6",) with the UUID of the circle texture you uploaded.

14

May

by V

This script needs a 4×4 media texture (a texture with 4 images in 4 rows, equally divided, that will create a ‘scene’ when watched in quick succession). By default (in ‘off’ state) it will play the texture slices, when switched ‘on’, it will stop flickering to serve as land media texture.

integer Switch = FALSE;

default
{
touch_start(integer total_number)
{
if(Switch == FALSE)
{
Switch = TRUE;
llSay(0, "On"); //turn on stuff here
llSetText("Please touch again when the movie is finished. \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ",&lt;1,1,1>,1);
llSetTextureAnim(FALSE | LOOP, 0,4,4,1,16,16);
}
else
{
Switch = FALSE;
llSay(0, "Off"); //turn off stuff here
llSetText("Please touch the screen first to watch the movie correctly. \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ",&lt;1,1,1>,1);
llSetTextureAnim(ANIM_ON | LOOP, 0,4,4,1,16,16);
}
}
}

default {

state_entry() {

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0.0, 0.0, -0.25);

}

}