removed useless _ folders

This commit is contained in:
Fred Beckhusen
2015-08-09 16:54:31 -05:00
parent fde850293c
commit 948a44dfba
5204 changed files with 2425579 additions and 0 deletions

3
LandRover/LandRover.sol Normal file
View File

@@ -0,0 +1,3 @@
<Solution name="LandRover">
<Project name="LandRover" path="LandRover\LandRover.prj" active="true"/>
</Solution>

View File

@@ -0,0 +1,125 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:615
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Opensim Vehicle
// :CODE:
// Author: Davy Maltz
// Clean and user-friendly Poseball script.
// Downloaded from : http://www.outworldz.com/cgi/freescripts.plx?ID=1350
// This program is free software; you can redistribute it and/or modify it.
// Additional Licenes may apply that prevent you from selling this code
// and these licenses may require you to publish any changes you make on request.
//
// There are literally thousands of hours of work in these scripts. Please respect
// the creators wishes and Copyright law and follow their license requirements.
//
// License information included herein must be included in any script you give out or use.
// Licenses may also be included in the script or comments by the original author, in which case
// the authors license must be followed, and their licenses override any licenses outlined in this header.
//
// You cannot attach a license to any of these scripts to make any license more or less restrictive.
//
// All scripts by avatar Ferd Frederix, unless stated otherwise in the script, are licensed as Creative Commons By Attribution and Non-Commercial.
// Commercial use is NOT allowed - no resale of my scripts in any form.
// This means you cannot sell my scripts but you can give them away if they are FREE.
// Scripts by Ferd Frederix may be sold when included in a new object that actually uses these scripts. Putting my script in a prim and selling it on marketplace does not constitute a build.
// For any reuse or distribution, you must make clear to others the license terms of my works. This is done by leaving headers intact.
// See http://creativecommons.org/licenses/by-nc/3.0/ for more details and the actual license agreement.
// You must leave any author credits and any headers intact in any script you use or publish.
///////////////////////////////////////////////////////////////////////////////////////////////////
// If you don't like these restrictions and licenses, then don't use these scripts.
//////////////////////// ORIGINAL AUTHORS CODE BEGINS ////////////////////////////////////////////
// The Script
// The Script
//Feel Free To Mod The Following Values. ~Davy
// Rev 2 - fixed the rotations to be expressed in degrees - Ferd Frederix
//Animation Options
string animation_name = "avatar_sit_generic"; //The name of the animation to use (In Object Inv.)
//User/Owner Options
integer owner_only = FALSE; //TRUE or FALSE to only let the owner use the ball.
//Floating Text Options
string floating_text = ""; //What the floating text says in a string.
vector text_colour = <1,1,1>; //The color of the floating text in a vector.
float text_transparency = 1.0; //Transparency of the floating text. 0.0 to 1.0.
//Set Target/Sit Position Options
//vector sit_offset = <0,1.35,-.1>; //The offset from the ball while sitting.
vector sit_offset = <0,0.35,-.1>; //The offset from the ball while sitting.
vector sit_rotation = <90,180,90>; //The avatar rotation while sitting.
rotation rot;
default
{
on_rez(integer start_param)
{
llResetScript();
}
state_entry()
{
rot = llEuler2Rot(sit_rotation * DEG_TO_RAD);
llSitTarget(sit_offset,rot);
llSetText(floating_text,text_colour,text_transparency);
}
changed(integer change)
{
if(change & CHANGED_LINK && llAvatarOnSitTarget() != NULL_KEY)
{
if(owner_only == FALSE)
{
llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
}
else if(owner_only == TRUE && llAvatarOnSitTarget() != llGetOwner())
{
llUnSit(llAvatarOnSitTarget());
llSay(0,"Vehicle Currently Set To Owner Only.");
}
}
if(llAvatarOnSitTarget() == NULL_KEY)
{
llMessageLinked(LINK_ROOT,0,"unsit","");
llResetScript();
}
}
run_time_permissions(integer perm)
{
if(llAvatarOnSitTarget() != NULL_KEY)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
//llStopAnimation("sit");
//llStartAnimation(animation_name);
llMessageLinked(LINK_ROOT,0,"sit",llAvatarOnSitTarget());
}
else if(!perm)
{
llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
}
else
{
//llStopAnimation(animation_name);
llMessageLinked(LINK_ROOT,0,"unsit","");
llResetScript();
}
}
}
}

View File

View File

@@ -0,0 +1,30 @@
<Project name="LandRover" guid="595fc57d-7840-47f6-89fb-93838e767d75">
<Object name="DriverSeat" guid="d1fa9543-64a2-4ab8-a9f1-2400b4cf95e8">
<Script name="driver.lsl" guid="71f0d5d0-78fc-42f0-bb3c-41b29f177c4e">
</Script>
<Animation name="sit" guid="e01859e1-32ec-4759-a3f9-50f6940ef551">
</Animation>
</Object>
<Object name="l door" guid="e54d8eb8-470b-4a66-a355-aecd6e1a3dca">
<Script name="l door.lsl" guid="6332bfa2-f57c-442a-828c-b132c33126b1">
</Script>
</Object>
<Object name="Left door" guid="60c923d5-aec4-42d1-981a-1ff7248467b8">
<Script name="l door.lsl" guid="9598e25a-4b13-4571-bd4e-ed29e773e311">
</Script>
</Object>
<Object name="PassengerSeat" guid="2da56523-77f0-4d98-85d7-0ef81ac10860">
<Script name="passsenger.lsl" guid="1685b095-f9c8-4e21-ac79-22d31205c829">
</Script>
<Animation name="sit" guid="816b6053-5e3b-4f91-bc6d-7049ec0340e4">
</Animation>
</Object>
<Object name="root" guid="542bdc6b-f1f6-409e-a6ac-f630b2d363e0" active="true">
<Script name="vehicle.lsl" guid="5970592d-f7ee-43d4-9b54-4abf96ffefbd">
</Script>
</Object>
<Object name="Wheel.lsl" guid="dc2caef3-7b37-4566-855e-cede8cf4be74">
<Script name="rotate.lsl" guid="d8b43a9b-bf0f-4393-b090-de64bd34a24e">
</Script>
</Object>
</Project>

View File

@@ -0,0 +1,27 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:617
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Opensim Door control
// :CODE:
integer flag = FALSE;
default
{
touch_start(integer n)
{
flag = ~ flag;
if (flag)
llMessageLinked( LINK_ROOT,1,"LO","");
else
llMessageLinked( LINK_ROOT,1,"LC","");
}
}

View File

@@ -0,0 +1,121 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:618
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Opensim Passnger seat
// :CODE:
// Author: Davy Maltz
// Clean and user-friendly Poseball script.
// Downloaded from : http://www.outworldz.com/cgi/freescripts.plx?ID=1350
// This program is free software; you can redistribute it and/or modify it.
// Additional Licenes may apply that prevent you from selling this code
// and these licenses may require you to publish any changes you make on request.
//
// There are literally thousands of hours of work in these scripts. Please respect
// the creators wishes and Copyright law and follow their license requirements.
//
// License information included herein must be included in any script you give out or use.
// Licenses may also be included in the script or comments by the original author, in which case
// the authors license must be followed, and their licenses override any licenses outlined in this header.
//
// You cannot attach a license to any of these scripts to make any license more or less restrictive.
//
// All scripts by avatar Ferd Frederix, unless stated otherwise in the script, are licensed as Creative Commons By Attribution and Non-Commercial.
// Commercial use is NOT allowed - no resale of my scripts in any form.
// This means you cannot sell my scripts but you can give them away if they are FREE.
// Scripts by Ferd Frederix may be sold when included in a new object that actually uses these scripts. Putting my script in a prim and selling it on marketplace does not constitute a build.
// For any reuse or distribution, you must make clear to others the license terms of my works. This is done by leaving headers intact.
// See http://creativecommons.org/licenses/by-nc/3.0/ for more details and the actual license agreement.
// You must leave any author credits and any headers intact in any script you use or publish.
///////////////////////////////////////////////////////////////////////////////////////////////////
// If you don't like these restrictions and licenses, then don't use these scripts.
//////////////////////// ORIGINAL AUTHORS CODE BEGINS ////////////////////////////////////////////
// The Script
// The Script
//Feel Free To Mod The Following Values. ~Davy
// Rev 2 - fixed the rotations to be expressed in degrees - Ferd Frederix
//Animation Options
string animation_name = "avatar_sit_generic"; //The name of the animation to use (In Object Inv.)
//User/Owner Options
integer owner_only = FALSE; //TRUE or FALSE to only let the owner use the ball.
//Floating Text Options
string floating_text = ""; //What the floating text says in a string.
vector text_colour = <1,1,1>; //The color of the floating text in a vector.
float text_transparency = 1.0; //Transparency of the floating text. 0.0 to 1.0.
//Set Target/Sit Position Options
vector sit_offset = <0,0.35,-.1>; //The offset from the ball while sitting.
vector sit_rotation = <90,180,90>; //The avatar rotation while sitting.
rotation rot;
default
{
on_rez(integer start_param)
{
llResetScript();
}
state_entry()
{
rot = llEuler2Rot(sit_rotation * DEG_TO_RAD);
llSitTarget(sit_offset,rot);
llSetText(floating_text,text_colour,text_transparency);
}
changed(integer change)
{
if(change & CHANGED_LINK && llAvatarOnSitTarget() != NULL_KEY)
{
if(owner_only == FALSE)
{
llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
}
else if(owner_only == TRUE && llAvatarOnSitTarget() != llGetOwner())
{
llUnSit(llAvatarOnSitTarget());
llSay(0,"Vehicle Currently Set To Owner Only.");
}
}
if(llAvatarOnSitTarget() == NULL_KEY)
{
llResetScript();
}
}
run_time_permissions(integer perm)
{
if(llAvatarOnSitTarget() != NULL_KEY)
{
if(perm)
{
//llStopAnimation("sit");
//llStartAnimation(animation_name);
llMessageLinked(LINK_ROOT,0,"passenger","");
}
else if(!perm)
{
llRequestPermissions(llAvatarOnSitTarget(),PERMISSION_TRIGGER_ANIMATION);
}
else
{
//llStopAnimation(animation_name);
llResetScript();
}
}
}
}

View File

View File

@@ -0,0 +1,43 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:620
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// opensim wheel script
// :CODE:
default
{
state_entry()
{
llSetPrimitiveParams([PRIM_MATERIAL, PRIM_MATERIAL_GLASS]);
llTargetOmega(<0,0,0>,0.0,1);
}
on_rez(integer p)
{
llResetScript();
}
link_message(integer n, integer channel, string msg, key id)
{
//llOwnerSay(msg);
if (msg == "F")
{
llTargetOmega(<0,1,0>,2.0,1);
}
else if (msg == "R")
{
llTargetOmega(<0,-1,0>,2.0,1);
}
else if (msg == "S")
{
llTargetOmega(<0,0,0>,0.0,1);
}
}
}

View File

@@ -0,0 +1,27 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:616
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Opensim Door script
// :CODE:
integer flag = FALSE;
default
{
touch_start(integer n)
{
flag = ~ flag;
if (flag)
llMessageLinked( LINK_ROOT,1,"LO","");
else
llMessageLinked( LINK_ROOT,1,"LC","");
}
}

View File

@@ -0,0 +1,291 @@
// :CATEGORY:Vehicle
// :NAME:LandRover
// :AUTHOR:Ferd Frederix
// :CREATED:2013-09-06
// :EDITED:2013-09-18 15:38:56
// :ID:459
// :NUM:619
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Opensim vehicle control
// :CODE:
// http://opensimulator.org/wiki/Vehicles
// Very simple vehicle script, mod for OpenSimulator & ODE & VEHICLE code
// By Kitto Flora September 2009
// SOUND
string RUNNING = "run";
string IDLE = "idle";
string START = "start";
// link messages
// S = Stop wheels
// WC wheels centered
// F = Rotate forward
// R = Rotate backwards
// WR = Wheels right
// WL = Wheels left
// LO = Left door open
// LC = Left Door closed
// RO = Right door open
// RC = Right door closed
// RESET = all prims standard, doors clozed
integer Private = 1; // Change to 1 to prevent others riding.
integer tt;
key oldagent;
key agent;
float forward_power = 5; //Power used to go forward (1 to 30)
float reverse_power = -2; //Power ued to go reverse (-1 to -30)
float turning_ratio = 0.5; //How sharply the vehicle turns. Less is more sharply. (.1 to 10)
integer turncount;
string Wheeldir = "WC";
string NewWheeldir = "WC";
string Wheelrot = "S";
string NewWheelrot = "S";
integer scount;
integer Speed;
integer Run;
setVehicle()
{
//car
llSetVehicleType(VEHICLE_TYPE_CAR);
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.2); // was 0.2
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.80);
llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 0.10);
llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.10);
llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1.0);
llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 0.1);
llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 0.1);
llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.1);
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 2.0, 1000.0>);
llSetVehicleVectorParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, <0.1, 0.1, 0.1>);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.50);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 0.50);
}
Init()
{
Sound(0);
llSetStatus(STATUS_PHYSICS, FALSE);
vector here = llGetPos();
vector height = llGetScale();
float h = height.z;
float h1 = llGround(<0,0,0>) + h;
vector rotv = llRot2Euler(llGetRot());
rotation rot = llEuler2Rot(<0,0,rotv.z>);
llSetPos(<here.x, here.y,h1>);
llSetRot(rot);
llSetVehicleType(VEHICLE_TYPE_NONE);
llMessageLinked(LINK_ALL_OTHERS, 0, "S", NULL_KEY); // wheels stop
llMessageLinked(LINK_ALL_OTHERS, 0, "WC", NULL_KEY); // wheels straight
Run = 0;
}
SetMaterial()
{
llSetPrimitiveParams([PRIM_MATERIAL, PRIM_MATERIAL_GLASS]);
}
Sound(integer n)
{
integer oldn;
if(n != oldn)
{
oldn = n;
//llOwnerSay("Sound:" + (string) n);
if(n == 3)
{
llPlaySound(START,1);
}
else if(n == 2)
{
llLoopSound(RUNNING,1);
}
else if(n == 1)
{
llLoopSound(IDLE,1);
}
else
{
llStopSound();
}
}
}
default
{
state_entry()
{
Init();
llStopSound();
}
on_rez(integer rn){
llResetScript();
}
link_message(integer n, integer channel, string msg, key id)
{
// llOwnerSay(msg);
if (msg == "sit")
{
agent = id;
setVehicle();
SetMaterial();
llSleep(.4);
llSetStatus(STATUS_PHYSICS, TRUE);
llSleep(.1);
Run = 1;
//Sensor is to make a crude Timer as TimerEvent fails on vehicles
llSensor("Non-Entity",NULL_KEY,PASSIVE,1.0, PI_BY_TWO);
llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS);
Sound(3); // start
llSleep(2);
Sound(1); // idle
}
else if (msg == "unsit")
{
Init();
llSleep(.4);
llReleaseControls();
llMessageLinked(LINK_ALL_OTHERS, 0, "S", NULL_KEY);
Run = 0;
llStopSound();
}
}
touch_start(integer tn){
}
run_time_permissions(integer perm)
{
if (perm)
{
llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_DOWN | CONTROL_UP | CONTROL_RIGHT |
CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE);
}
}
control(key id, integer level, integer edge)
{
integer reverse=1;
vector angular_motor;
//get current speed
vector vel = llGetVel();
float speed = llVecMag(vel);
//car controls
if(level & CONTROL_FWD)
{
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 2.0, 1000.0>);
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <forward_power,0,0>);
reverse=1;
NewWheelrot = "F";
Speed = 20;
}
if(level & CONTROL_BACK)
{
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 2.0, 1000.0>);
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <reverse_power,0,0>);
reverse = -1;
NewWheelrot = "R";
Speed = 10;
}
if(level & (CONTROL_RIGHT|CONTROL_ROT_RIGHT))
{
angular_motor.z -= speed / turning_ratio * reverse;
NewWheeldir = "WR";
turncount = 10;
}
if(level & (CONTROL_LEFT|CONTROL_ROT_LEFT))
{
angular_motor.z += speed / turning_ratio * reverse;
NewWheeldir = "WL";
turncount = 10;
}
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);
if(turncount > 0)
{
turncount--;
}
if(turncount == 1)
{
NewWheeldir = "WC";
}
if(Wheeldir != NewWheeldir){
Wheeldir = NewWheeldir;
llMessageLinked(LINK_ALL_OTHERS, 0, Wheeldir, NULL_KEY);
}
if(Wheelrot != NewWheelrot){
Wheelrot = NewWheelrot;
llMessageLinked(LINK_ALL_OTHERS, 0, Wheelrot, NULL_KEY);
}
} //end control
//Sensor is to make a crude Timer as TimerEvent fails on vehicles
no_sensor()
{
if(scount < 1000)
{
scount++;
}
else
{
scount = 0;
// This happens about once per second
if(Speed > 0) Speed--;
if(Speed > 2) Sound(2);
if(Speed == 1) {
llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <1.0, 2.0, 1000.0>);
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0,0,0>);
llMessageLinked(LINK_ALL_OTHERS, 0, "S", NULL_KEY);
Sound(1);
Wheelrot = "S";
}
}
if(Run == 1)
llSensor("Non-Entity",NULL_KEY,PASSIVE,1.0, PI_BY_TWO);
}
} //end default