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

View File

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

View File

@@ -0,0 +1,10 @@
<Project name="Hypergates" guid="aa69f39d-4f8f-4a06-b326-e7f0d8fcd771">
<Object name="Object" guid="d4677966-2d42-47b3-af94-7d5b9280dbe7" active="true">
<Script name="HG Script.lsl" guid="e1255449-838f-4dee-92a9-6f0257df930f">
</Script>
<Script name="Script Updater.lsl" guid="7e41710c-a218-4112-8f0e-a961f9727c8b">
</Script>
<Script name="Script. Udater Server.lsl" guid="0c83afc0-1834-4a30-a5c4-ee0a64b9737d">
</Script>
</Object>
</Project>

View File

@@ -0,0 +1,295 @@
// :CATEGORY:Hypergate
// :NAME:Hypergates
// :AUTHOR:Maria Korolov
// :KEYWORDS:
// :CREATED:2015-01-15 20:52:03
// :EDITED:2015-01-15
// :ID:1065
// :NUM:1708
// :REV:1
// :WORLD:OpenSim
// :DESCRIPTION:
Hypergate script for Opensim// :REVISION: 4
// :LICENSE: CC-0
// Maria Korolov's Hypergate script
integer Rev = 4;
key StatusQuery;
integer FontSize;
string SimName;
string SimAddress;
vector LandingPoint = <128.0, 128.0, 22.0>;
vector LookAt = <1.0,1.0,1.0>;
list LastFewAgents;
string FunctionName = "osTeleportAgent";
string FunctionPermitted = "No";
integer checked = 0;
SpecialEffect()
{
llPlaySound("d7a9a565-a013-2a69-797d-5332baa1a947", 1); // change this to match your sim sound
llParticleSystem([
PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
PSYS_SRC_MAX_AGE, 0.5,
PSYS_PART_MAX_AGE, 1.0,
PSYS_SRC_BURST_RATE, 0.01,
PSYS_SRC_BURST_PART_COUNT, 50,
PSYS_SRC_BURST_RADIUS, 0.3,
PSYS_SRC_BURST_SPEED_MIN, 0.2,
PSYS_SRC_BURST_SPEED_MAX, 3.0,
PSYS_SRC_ACCEL, <0.0,0.0,0.0>,
PSYS_PART_START_COLOR, <1, 1, 1>,
PSYS_PART_START_ALPHA, 0.5,
PSYS_PART_END_ALPHA, 0.0,
PSYS_PART_START_SCALE, <0.3,0.3,0>,
PSYS_PART_END_SCALE, <0.5,0.5,0>,
PSYS_PART_FLAGS
, 0
| PSYS_PART_EMISSIVE_MASK
| PSYS_PART_INTERP_SCALE_MASK
]);
}
LoadDestination ()
{
list Description = llParseString2List(llGetObjectDesc(), [", "],[","]);
SimName = llList2String(Description,0);
FontSize = (integer) (llStringLength(SimName)*(-2.25)+60.5);
SimAddress = llList2String(Description,1);
StatusQuery = llRequestSimulatorData(SimAddress, DATA_SIM_STATUS);
string CommandList = "";
CommandList = osMovePen( CommandList, 5, 55 );
CommandList += "FontSize "+ (string) FontSize+";";
CommandList = osDrawText( CommandList, SimName );
osSetDynamicTextureDataBlendFace( "", "vector", CommandList, "width:256,height:256", FALSE, 2, 0, 255, 3 );
}
PerformTeleport( key WhomToTeleport )
{
integer CurrentTime = llGetUnixTime();
integer AgentIndex = llListFindList( LastFewAgents, [ WhomToTeleport ] );
if (AgentIndex != -1)
{
integer PreviousTime = llList2Integer( LastFewAgents, AgentIndex+1 );
if (PreviousTime >= (CurrentTime - 30)) return;
LastFewAgents = llDeleteSubList( LastFewAgents, AgentIndex, AgentIndex+1);
}
LastFewAgents += [ WhomToTeleport, CurrentTime ];
if (FunctionPermitted == "Yes")
osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt );
else
llMapDestination(SimAddress, LandingPoint, LookAt);
}
default
{
state_entry()
{
LoadDestination();
llVolumeDetect(FALSE); // toggle bug fix in Opensim
llVolumeDetect(TRUE);
FunctionPermitted = "Yes";
}
changed(integer what)
{
if (what & CHANGED_REGION_START)
{
llResetScript();
}
}
on_rez(integer start_param)
{
LoadDestination();
FunctionPermitted = "Yes";
}
}
state Running
{
state_entry()
{
llOwnerSay( "Results: "+ FunctionPermitted);
LoadDestination();
llSetTextureAnim(ANIM_ON | LOOP, 1, 4, 4, 0.0, 16, 5);
llSetText("", ZERO_VECTOR, 0);
}
dataserver(key queryId, string data) //turn gate black if destination is down
{
if (data=="up") llSetColor(<1.000, 1.000, 1.000>,1);
else llSetColor(<0.067, 0.067, 0.067>,1);
}
touch_start(integer number)
{
LoadDestination();
}
collision(integer number)
{
SpecialEffect();
PerformTeleport( llDetectedKey( 0 ));
}
changed(integer what)
{
if (what & CHANGED_REGION_START)
{
llResetScript();
}
}
}
// :CODE:
// :AUTHOR:Maria Korolov
// :DESCRIPTION: Hypergate script for Opensim
// :REVISION: 4
// :LICENSE: CC-0
// Maria Korolov's Hypergate script
integer Rev = 4;
key StatusQuery;
integer FontSize;
string SimName;
string SimAddress;
vector LandingPoint = <128.0, 128.0, 22.0>;
vector LookAt = <1.0,1.0,1.0>;
list LastFewAgents;
string FunctionName = "osTeleportAgent";
string FunctionPermitted = "No";
integer checked = 0;
SpecialEffect()
{
llPlaySound("d7a9a565-a013-2a69-797d-5332baa1a947", 1); // change this to match your sim sound
llParticleSystem([
PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
PSYS_SRC_MAX_AGE, 0.5,
PSYS_PART_MAX_AGE, 1.0,
PSYS_SRC_BURST_RATE, 0.01,
PSYS_SRC_BURST_PART_COUNT, 50,
PSYS_SRC_BURST_RADIUS, 0.3,
PSYS_SRC_BURST_SPEED_MIN, 0.2,
PSYS_SRC_BURST_SPEED_MAX, 3.0,
PSYS_SRC_ACCEL, <0.0,0.0,0.0>,
PSYS_PART_START_COLOR, <1, 1, 1>,
PSYS_PART_START_ALPHA, 0.5,
PSYS_PART_END_ALPHA, 0.0,
PSYS_PART_START_SCALE, <0.3,0.3,0>,
PSYS_PART_END_SCALE, <0.5,0.5,0>,
PSYS_PART_FLAGS
, 0
| PSYS_PART_EMISSIVE_MASK
| PSYS_PART_INTERP_SCALE_MASK
]);
}
LoadDestination ()
{
list Description = llParseString2List(llGetObjectDesc(), [", "],[","]);
SimName = llList2String(Description,0);
FontSize = (integer) (llStringLength(SimName)*(-2.25)+60.5);
SimAddress = llList2String(Description,1);
StatusQuery = llRequestSimulatorData(SimAddress, DATA_SIM_STATUS);
string CommandList = "";
CommandList = osMovePen( CommandList, 5, 55 );
CommandList += "FontSize "+ (string) FontSize+";";
CommandList = osDrawText( CommandList, SimName );
osSetDynamicTextureDataBlendFace( "", "vector", CommandList, "width:256,height:256", FALSE, 2, 0, 255, 3 );
}
PerformTeleport( key WhomToTeleport )
{
integer CurrentTime = llGetUnixTime();
integer AgentIndex = llListFindList( LastFewAgents, [ WhomToTeleport ] );
if (AgentIndex != -1)
{
integer PreviousTime = llList2Integer( LastFewAgents, AgentIndex+1 );
if (PreviousTime >= (CurrentTime - 30)) return;
LastFewAgents = llDeleteSubList( LastFewAgents, AgentIndex, AgentIndex+1);
}
LastFewAgents += [ WhomToTeleport, CurrentTime ];
if (FunctionPermitted == "Yes")
osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt );
else
llMapDestination(SimAddress, LandingPoint, LookAt);
}
default
{
state_entry()
{
LoadDestination();
llVolumeDetect(FALSE); // toggle bug fix in Opensim
llVolumeDetect(TRUE);
FunctionPermitted = "Yes";
}
changed(integer what)
{
if (what & CHANGED_REGION_START)
{
llResetScript();
}
}
on_rez(integer start_param)
{
LoadDestination();
FunctionPermitted = "Yes";
}
}
state Running
{
state_entry()
{
llOwnerSay( "Results: "+ FunctionPermitted);
LoadDestination();
llSetTextureAnim(ANIM_ON | LOOP, 1, 4, 4, 0.0, 16, 5);
llSetText("", ZERO_VECTOR, 0);
}
dataserver(key queryId, string data) //turn gate black if destination is down
{
if (data=="up") llSetColor(<1.000, 1.000, 1.000>,1);
else llSetColor(<0.067, 0.067, 0.067>,1);
}
touch_start(integer number)
{
LoadDestination();
}
collision(integer number)
{
SpecialEffect();
PerformTeleport( llDetectedKey( 0 ));
}
changed(integer what)
{
if (what & CHANGED_REGION_START)
{
llResetScript();
}
}
}

View File

@@ -0,0 +1,74 @@
// :CATEGORY:Updater
// :NAME:Hypergates
// :AUTHOR:Ferd Frederix
// :KEYWORDS:Update, updater
// :CREATED:2014-01-30 12:16:43
// :EDITED:2015-01-21
// :ID:1065
// :NUM:1709
// :REV:1.0
// :WORLD:Second Life, OpenSim
// :DESCRIPTION:
// Remote prim updater for scripts. This registers the prim to accept scripts from a server in the same region.
// :CODE:
// when anything changes in the prims inventory, this sends the name and UUID to a central server.
// It enabled remote script loading from that central prim, estate-wide
// As a result, if you add any new scripts, they auto-get inserted into the database
// tunable
integer debug = FALSE; // chat a message
integer UNIQ = 1246; // the private channel unique to the owner of this prim
// Not tuneable
integer CHECKIN = 86400; // 86400 seconds = 1 day
integer comChannel ; // placeholder for llRegionSay
DEBUG (string msg) { if (debug) llOwnerSay(llGetScriptName() + ":" + msg);}
integer pin; // a random pin for security
update() {
integer j = llGetInventoryNumber(INVENTORY_SCRIPT);
integer i;
for (i = 0; i < j; i++)
{
string name = llGetInventoryName(INVENTORY_SCRIPT,i);
DEBUG("Sending " + name);
llRegionSay(comChannel,name + "^" + (string) pin);
}
llOwnerSay("Script Updater ready");
llSetTimerEvent(CHECKIN); // Hourly check ins
}
default
{
state_entry()
{
pin = llCeil(llFrand(123456) + 654321);
comChannel = (((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF ) + UNIQ; // 1234 is the private channel for this owner
llSetRemoteScriptAccessPin(pin);
update();
}
// in case we rez, our UUID changed, so we check in
on_rez(integer p) {
llResetScript(); }
// a new script may have been added
changed ( integer what)
{
if (what & CHANGED_INVENTORY ) {
update();
}
if (what & CHANGED_REGION_START ) {
llResetScript();
}
}
timer()
{
update();
}
}

View File

@@ -0,0 +1,173 @@
// :CATEGORY:Updater
// :NAME:Hypergates
// :AUTHOR:Ferd Frederix
// :KEYWORDS:Update, updater
// :CREATED:2014-01-30 12:17:30
// :EDITED:2015-01-21
// :ID:1065
// :NUM:1710
// :REV:1.1
// :WORLD:Second Life, OpenSim
// :DESCRIPTION:
// Central prim updater for scripts. Just drop a (non running) script in here and click the prim. Scripts are sent to the registered clients
// :CODE:
// Rev 1.1 on 2-13-2014 fixes timeout bugs, adds
//
integer debug = TRUE; // chat a message
// tunables
integer TITLE = TRUE; // show how many scripts can be updated in hover text
integer UNIQ = 1246; // the private channel unique to the owner of this prim - MUST MATCH in client and server
integer CHECKIN = 172860; // 86400 seconds = 1 day X 2 + 60. This is twice the client setting plus one minute to allow for a dropped packet and slop in LSLEditor
// globals
integer comChannel ; // we listen on this channel. It is unioque to this owner and a subchannel
integer MINUTE = 60; // seconds in a minute, seems inefficient, but debug is a lot faster this way!
DEBUG (string msg) { if (debug) llSay(0,llGetScriptName() + ":" + msg);}
// The list is a PIN to update, a timestamp, thre name of the script, the UUID of the prim it was found in
// This is a small searchable database whose primary key (uniq) is name + UUID
integer STRIDE = 4; // size of this list:
list lScripts; // +0 (integer) PIN - remote prims random PIN
// +1 (integer) time stamp last heard from
// +2 (string) name of script
// +3 (key) UUID
update()
{
integer toDo = llGetInventoryNumber(INVENTORY_SCRIPT); // how many scripts checked in?
integer PrimToDo = llGetListLength(lScripts);
llOwnerSay((string) (toDo -1) + " scripts in inventory to send");
// DEBUG(llDumpList2String(lScripts,","));
integer index;
// scan all scripts in our inventory, could be more than one needs updating.
for (index = 0; index < toDo; index++)
{
string name = llGetInventoryName(INVENTORY_SCRIPT,index);
// check to see if the name of the script we just found in our inventory matches ourself. if so, skip it
if (name != llGetScriptName()) {
DEBUG( "Processing script " + name);
integer countAllScripts = llGetListLength(lScripts);
integer indexer;
integer counter;
// Scan over all scripts
for (indexer = 0; indexer < countAllScripts; indexer += STRIDE)
{
// check to see if the name of the script we just found in our inventory matches any item in the list
if (llList2String(lScripts,indexer + 2) == name) {
key targetUUID = llList2Key(lScripts,indexer + 3); // yup, the name matches, lets fetch the UUID
integer pin = llList2Integer(lScripts,indexer ); // get the pin
DEBUG("Sending " + name + " PIN:" + (string) pin + " UUID:" + (string) targetUUID);
llRemoteLoadScriptPin(targetUUID,name,pin, TRUE,0); // and send it set to run
counter++;
}
}
DEBUG("Updated " + (string) counter + " scripts named " + name);
}
}
llOwnerSay("Done!");
}
default
{
state_entry()
{
if (! TITLE) {
llSetText("",<1,1,1>,1.0);
}
// make a private chat channel
comChannel = (((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF ) + UNIQ; // UNIQ is the private channel for this owner
llListen(comChannel,"","","");
llOwnerSay("Put non-running scripts into inventory and touch this to send them to remote prims.");
llSetTimerEvent(CHECKIN);
}
listen(integer channel, string name, key id, string msg)
{
list params = llParseString2List(msg,["^"],[]);
string message = llList2String(params,0);
integer pin = (integer) llList2String(params,1);
integer index;
integer len = llGetListLength(lScripts);
integer found = FALSE;
// CRU of CRUD process
// try to find a script in that prim previously recorded. If found update
for ( index = 0; index < len; index += STRIDE) {
// primary key is composite of UUID of prim and script name
if (llList2String(lScripts,index+2) == message && llList2Key(lScripts,index+3) == id) {
// found a prim and script that has already checked in.
DEBUG("Located script " + llList2String(lScripts,index+2));
lScripts = llListReplaceList([pin,llGetUnixTime(),message,pin],lScripts,index,index+3);
found = TRUE;
index = len; // skip to end
}
}
if (!found) {
DEBUG("Adding script " + message);
lScripts += pin; // the remote prim pin
lScripts += llGetUnixTime(); // time stamp it
lScripts += message; // remote prim name
lScripts += id; // remote prim UUID
}
}
touch_start( integer what)
{
if (llDetectedKey(0) == llGetOwner()) {
update();
}
}
// D of CRUD process
// scan for missing checked-in prims and clean up the list
timer()
{
integer len = llGetListLength(lScripts);
while (len > 0)
{
// look for late checkins, which means a script was stopped or a prim removed.
// Every day or two plus a minute for message delays is good to prevent RAM from filling up,
/// and still allows allows one missed message
integer timeago = llGetUnixTime() - llList2Integer(lScripts,len-STRIDE);
DEBUG("Timeago " + (string) timeago);
if ( timeago > (CHECKIN*2 + MINUTE))
{
DEBUG("Have not heard from script named " + llList2String(lScripts,len-2) + ": Script named " + llKey2Name(llList2Key(lScripts,len-1)) );
lScripts = llDeleteSubList(lScripts,len-STRIDE,len);
len = llGetListLength(lScripts);
} else
len -= 3;
}
len = llGetListLength(lScripts);
if (TITLE) {
llSetText((string) (len/3) + " scripts",<1,1,1>,1.0);
}
}
}