Project started by Lynn Kukulcan for making lockmeister compliant items easily.
The scripts are in coloured syntax and notecards in simple monospace text
Lockmeister Chain Script
string NotecardData;
key NotecardDataID;
integer NotecardLineBeingRead = -1;
integer NotecardLineTotal = -1;
list Settings;
DataServer ( key QueryID, string Data )
{
if ( QueryID == NotecardDataID )
{
// Just get the number of lines in the notecard being read.
//
if ( NotecardLineTotal == -1 )
{
NotecardLineTotal = ( integer ) Data;
}
// This is the first data read from the notecard. Clear the NotecardData Variable by Overwriting it with New
// Data.
//
else if ( NotecardLineBeingRead == 0 )
{
NotecardData = Data;
}
// Additional data from the notecard. Append it to the NotecardData Variable instead of Overwriting it.
//
else if ( NotecardLineBeingRead > 0 )
{
NotecardData = NotecardData + "<|>" + Data;
}
// Increment Line Counter.
//
NotecardLineBeingRead = NotecardLineBeingRead + 1;
// If we have not read the last line, then get the next line of data from the notecard.
//
if ( NotecardLineBeingRead < NotecardLineTotal )
{
NotecardDataID = llGetNotecardLine ( llGetScriptName ( ) + " - Data", NotecardLineBeingRead );
}
// We've read all the data from the notecard.
//
else if ( NotecardLineBeingRead == NotecardLineTotal )
{
// Parse to the Settins List.
//
Settings = llParseString2List ( NotecardData, [ "<|>" ], [ ] );
// Say we're done!
//
llSay (0, llGetScriptName ( ) + " Initialized." );
}
}
}
Initialize ( )
{
// Say we're starting to Initialize this script. In this case, we're loading a menu.
//
llSay ( 0, llGetScriptName ( ) + " Initializing ... " );
// Initiate the data server event by asking for the number of lines in the notecard associated with this script.
//
NotecardDataID = llGetNumberOfNotecardLines ( llGetScriptName ( ) + " - Data" );
}
LinkMessage ( integer LinkNumber, integer LinkChannel, string LinkData, key LinkUUID )
{
// Parse incoming Linked Data.
//
list DataList = llParseString2List ( LinkData, [ ":" ], [ ] );
// Lockmeister Reply.
//
if ( LinkChannel == -8888 )
{
// This refers our part.
//
if ( llList2String ( DataList, 0 ) == llList2String ( Settings, 1 ) + " ok" )
{
llParticleSystem
(
[
PSYS_SRC_TARGET_KEY, ( key ) llList2String ( DataList, 1 ),
PSYS_PART_START_SCALE, < .125, .125, .000 >,
PSYS_PART_START_COLOR, < 1.0, 0.0, 0.0 >,
PSYS_PART_FLAGS,
PSYS_PART_TARGET_POS_MASK | PSYS_PART_EMISSIVE_MASK
]
);
}
}
// This is a Sit On Me Message.
//
else if ( llList2String ( DataList, 0 ) == "Sit On Me!" )
{
// Someone else is talking to us.
//
if ( llList2String ( DataList, 1 ) == llList2String ( Settings, 0 ) )
{
// Avatar Disounted Other Object!
//
if ( llList2String ( DataList, 2 ) == "00000000-0000-0000-0000-000000000000" )
{
llParticleSystem ( [ ] );
}
}
}
}
default
{
dataserver ( key QueryID, string Data )
{
DataServer ( QueryID, Data );
}
link_message ( integer LinkNumber, integer LinkChannel, string LinkData, key LinkUUID )
{
LinkMessage ( LinkNumber, LinkChannel, LinkData, LinkUUID );
}
state_entry()
{
Initialize ( );
}
}
Lockmeister Chain Script - Data
VQMUSB Bound<|>lcuff
Specifies which Object in the Link Set we're listening to.
Specifies the Lockmeister Attachment Point we're looking for.
Lockmeister Ping
string NotecardData;
key NotecardDataID;
integer NotecardLineBeingRead = -1;
integer NotecardLineTotal = -1;
list Settings;
string AvatarKey;
DataServer ( key QueryID, string Data )
{
if ( QueryID == NotecardDataID )
{
// Just get the number of lines in the notecard being read.
//
if ( NotecardLineTotal == -1 )
{
NotecardLineTotal = ( integer ) Data;
}
// This is the first data read from the notecard. Clear the NotecardData Variable by Overwriting it with New
// Data.
//
else if ( NotecardLineBeingRead == 0 )
{
NotecardData = Data;
}
// Additional data from the notecard. Append it to the NotecardData Variable instead of Overwriting it.
//
else if ( NotecardLineBeingRead > 0 )
{
NotecardData = NotecardData + "<|>" + Data;
}
// Increment Line Counter.
//
NotecardLineBeingRead = NotecardLineBeingRead + 1;
// If we have not read the last line, then get the next line of data from the notecard.
//
if ( NotecardLineBeingRead < NotecardLineTotal )
{
NotecardDataID = llGetNotecardLine ( llGetScriptName ( ) + " - Data", NotecardLineBeingRead );
}
// We've read all the data from the notecard.
//
else if ( NotecardLineBeingRead == NotecardLineTotal )
{
// Parse to the Settins List.
//
Settings = llParseString2List ( NotecardData, [ "<|>" ], [ ] );
// Say we're done!
//
llSay (0, llGetScriptName ( ) + " Initialized." );
}
}
}
Initialize ( )
{
// Say we're starting to Initialize this script. In this case, we're loading a menu.
//
llSay ( 0, llGetScriptName ( ) + " Initializing ... " );
// Setup our Listener.
//
llListen ( -8888, "", NULL_KEY, "" );
// Initiate the data server event by asking for the number of lines in the notecard associated with this script.
//
NotecardDataID = llGetNumberOfNotecardLines ( llGetScriptName ( ) + " - Data" );
}
LinkMessage ( integer LinkNumber, integer LinkChannel, string LinkData, key LinkUUID )
{
// Parse incoming Linked Data.
//
list DataList = llParseString2List ( LinkData, [ ":" ], [ ] );
integer Counter = 0;
// This is a Sit On Me Message.
//
if ( llList2String ( DataList, 0 ) == "Sit On Me!" )
{
// We're talking to ourselves.
//
if ( llList2String ( DataList, 1 ) == llGetObjectName ( ) )
{
// Avatar Upon Us!
//
if ( llList2String ( DataList, 2 ) == "00000000-0000-0000-0000-000000000000" )
{
AvatarKey = llList2String ( DataList, 2 );
}
else
{
// Store the Avatar Key for the Incoming Messages.
//
AvatarKey = llList2String ( DataList, 2 );
// Go through the Settings List.
//
while ( Counter < llGetListLength ( Settings ) )
{
// Call out all the Lockmeister Parts specified in the Settings Notecard.
//
llSay ( -8888, AvatarKey + llList2String ( Settings, Counter ) );
// Increment Count.
//
Counter = Counter + 1;
}
}
}
}
}
Listen ( integer Channel, string SpeakerName, key SpeakerUUID, string SpeakerMessage )
{
// This is referring to our avatar.
//
if ( llGetSubString ( SpeakerMessage, 0, 35 ) == AvatarKey )
{
llMessageLinked
(
-1, -8888, llGetSubString ( SpeakerMessage, 36, llStringLength ( SpeakerMessage ) - 1 ) + ":" +
( string ) SpeakerUUID, NULL_KEY
);
}
}
default
{
dataserver ( key QueryID, string Data )
{
DataServer ( QueryID, Data );
}
link_message ( integer LinkNumber, integer LinkChannel, string LinkData, key LinkUUID )
{
LinkMessage ( LinkNumber, LinkChannel, LinkData, LinkUUID );
}
listen ( integer Channel, string SpeakerName, key SpeakerUUID, string Message )
{
Listen ( Channel, SpeakerName, SpeakerUUID, Message );
}
state_entry()
{
Initialize ( );
}
}
Lockmeister Ping - Data
lcuff
rcurr
llcuff
lrcuff
Sit On Me!
string NotecardData;
key NotecardDataID;
integer NotecardLineBeingRead = -1;
integer NotecardLineTotal = -1;
list Settings;
string AvatarKey;
Changed ( integer Change )
{
// Link Change.
//
if (Change & CHANGED_LINK)
{
// Be sure this is truly our Change.
//
if ( ( string ) llAvatarOnSitTarget ( ) != AvatarKey )
{
// Delay Link Message by Time Specified.
//
llSleep ( ( float ) llList2String ( Settings, 0 ) );
// Get Avatar Key.
//
AvatarKey = ( string ) llAvatarOnSitTarget ( );
// Transmit this to everyone else.
//
llMessageLinked ( -1, 0, "Sit On Me!:" + llGetObjectName ( ) + ":" + AvatarKey, NULL_KEY );
}
}
}
DataServer ( key QueryID, string Data )
{
if ( QueryID == NotecardDataID )
{
// Just get the number of lines in the notecard being read.
//
if ( NotecardLineTotal == -1 )
{
NotecardLineTotal = ( integer ) Data;
}
// This is the first data read from the notecard. Clear the NotecardData Variable by Overwriting it with New
// Data.
//
else if ( NotecardLineBeingRead == 0 )
{
NotecardData = Data;
}
// Additional data from the notecard. Append it to the NotecardData Variable instead of Overwriting it.
//
else if ( NotecardLineBeingRead > 0 )
{
NotecardData = NotecardData + "<|>" + Data;
}
// Increment Line Counter.
//
NotecardLineBeingRead = NotecardLineBeingRead + 1;
// If we have not read the last line, then get the next line of data from the notecard.
//
if ( NotecardLineBeingRead < NotecardLineTotal )
{
NotecardDataID = llGetNotecardLine ( llGetScriptName ( ) + " - Data", NotecardLineBeingRead );
}
// We've read all the data from the notecard.
//
else if ( NotecardLineBeingRead == NotecardLineTotal )
{
// Parse to the Settins List.
//
Settings = llParseString2List ( NotecardData, [ "<|>" ], [ ] );
// Say we're done!
//
llSay (0, llGetScriptName ( ) + " Initialized." );
}
}
}
Initialize ( )
{
// Say we're starting to Initialize this script. In this case, we're loading a menu.
//
llSay ( 0, llGetScriptName ( ) + " Initializing ... " );
// Initiate the data server event by asking for the number of lines in the notecard associated with this script.
//
NotecardDataID = llGetNumberOfNotecardLines ( llGetScriptName ( ) + " - Data" );
// needed for llAvatarOnSitTarget to work
//
llSitTarget ( < 0, 0, 0.1 >, ZERO_ROTATION );
}
default
{
changed(integer Change)
{
Changed ( Change );
}
dataserver ( key QueryID, string Data )
{
DataServer ( QueryID, Data );
}
state_entry ( )
{
Initialize ( );
}
}
Sit On Me! - Data
0.75
Delay before sending Link Messages.