362 "// Filename: teleport_destinations.config",
364 "// Date: " + llGetDate() +
" UTC",
365 "// Author: River Drifter ( river-drifter@aussiebroadband.com.au )",
366 "// Email: river-drifter@aussiebroadband.com.au",
367 "// Licence: Creative Commons Attribution Share Alike 4.0 International or better",
369 "// This destination file is created specifically for this teleporter in the region where",
370 "// it was located. If the teleporter is moved to another region, it must be reset to",
371 "// generate a new version of this file.",
373 "// *NOTE*: This file is periodically recreated by the Teleporter Heartbeat script.",
374 "// All entries place here manually will be lost when the file is recreated. If you",
375 "// wish do testing with manual entries, disable the heartbeat script for the duration.",
376 "//=========================================================="
389 string failure_message;
391 list status = llParseString2List(FailureMessage, [
":"], [
"\n"]);
392 string failure_type = llList2String(status, 0);
395 if (failure_type ==
"BANNED")
397 failure_message =
"Teleporters owned by user " + llList2String(status, 1) +
" are not permitted to";
398 failure_message +=
" add teleporters to the database, update teleporter information or update teleporter destinations.";
402 else if (failure_type ==
"UPDATE")
404 failure_message =
"The updating of the Teleporter's information in the database has unexpectedly failure with the error message: ";
405 failure_message += llList2String(status, 1);
409 else if (failure_type ==
"INSERT")
411 failure_message =
"The insertion of a new teleporter's information into the database has failed unexpectedly with the error message: ";
412 failure_message += llList2String(status, 1);
416 else if (failure_type ==
"NAME_MATCH")
418 failure_message =
"Unable to insert the new teleporter's information into the database because the Teleporter's Name is already in use ";
419 failure_message +=
"by another teleporter located at " + llList2String(status, 1);
423 else if (failure_type ==
"EXTRACT")
425 failure_message =
"The extraction of the list of teleporter destinations has failed unexpectedly with the error message: ";
426 failure_message += llList2String(status, 1);
430 else if (failure_type ==
"INVADER")
432 failure_message =
"Teleports from home world '" + llList2String(status, 1) +
"' are not permitted to ";
433 failure_message +=
" add teleporters to the database, update teleporter information or update teleporter destinations.";
437 failure_message +=
"\n If you wish to report this as an error please send this message to River Drifter with details of what happened and when.\n";
438 llSay(0, failure_message);
486 list versions = llParseString2List(VersionString, [
"."], []);
487 version = (integer)llList2String(versions,2) + ((integer)llList2String(versions,1) * 100) + ((integer)llList2String(versions,0) * 10000);
502 integer location_buffer = 0;
508 list type_component = llParseString2List(ValueString, [
","], []);
509 integer list_size = llGetListLength(type_component);
513 for (; index < list_size; ++index)
515 string location_type = llStringTrim(llList2String(type_component, index), STRING_TRIM);
523 LocationInfo |= location_buffer;
539 list components = llParseString2List(Line, [
"|"], []);
541 string name = components[0];
542 vector init_pos = (vector)components[1];
543 rotation initial_rot = (rotation)components[2];
544 vector offset_info = (vector)components[3];
545 string location_group = components[4];
546 integer address_type = (integer)components[5];
548 if (address_type == 2)
550 region = components[6];
551 world = components[7];
553 else if (address_type == 1)
555 region = components[6];
558 else if (address_type == 0)
565 llSay(DEBUG_CHANNEL,
"Format Error");
571 float offset_distance = (float)offset_info.x;
572 float look_angle = (float)offset_info.y;
573 integer location_information = (integer)offset_info.z;
577 landing = init_pos + llRot2Fwd(initial_rot) * -offset_distance;
579 vector temp = llRot2Euler(initial_rot * llAxisAngle2Rot(<0,0,1>, look_angle));
580 look_at = <llCos(temp.z), llSin(temp.z), 0.0>;
584 output_line = name +
"|" + world +
"|" + region +
"|";
585 output_line += (string)landing +
'|' + (
string)look_at +
'|';
586 output_line += (string)location_information +
'|';
587 output_line += location_group +
"\n";
606 integer count = llGetInventoryNumber(INVENTORY_NOTECARD);
608 for (; index < count; ++index)
641 integer teleport_list_started = FALSE;
643 key teleporter_key = llGetKey();
644 list details = llGetObjectDetails(teleporter_key, [OBJECT_POS, OBJECT_ROT, OBJECT_OWNER, OBJECT_GROUP]);
648 +
"&key=" + teleporter_key
649 +
"&position=" + osReplaceString(llList2String(details, 0),
" ",
"", -1, 0)
650 +
"&rotation=" + osReplaceString(llList2String(details, 1),
" ",
"", -1, 0)
651 +
"&owner=" + llList2String(details, 2)
652 +
"&group=" + llList2String(details, 3)
654 +
"®ion=" + llGetRegionName()
660 heartbeat_key = llHTTPRequest(heartbeat_message, [HTTP_BODY_MAXLENGTH,16384], [
""]);
664 llSay(DEBUG_CHANNEL,
"Either the location_name or database_interface are undefined! Teleporter " +
location_name +
" has been disabled");
665 llSetScriptState(llGetScriptName(), FALSE);
690 list config_data = llParseString2List(config, [
"\n"], []);
694 integer list_length = llGetListLength(config_data);
695 for (; index < list_length; ++index)
698 string trimmed_line = llStringTrim(llList2String(config_data, index), STRING_TRIM);
704 list key_value = llParseString2List(trimmed_line, [
"="], []);
707 string key_object = llToUpper(llStringTrim(llList2String(key_value, 0), STRING_TRIM));
710 string value_object = llStringTrim(llList2String(key_value, 1), STRING_TRIM);
754 http_response(key RequestId, integer Status, list Metadata,
string Body)
764 llSay(DEBUG_CHANNEL,
"Heartbeat Request Failed with error " + (
string)Status);
769 list input_list = llParseString2List(Body, [
"\n"], []);
773 integer input_list_started = FALSE;
774 integer list_count = llGetListLength(input_list);
780 line = llList2String(input_list, index);
783 if (line ==
"EXTRACT_LIST=START") input_list_started = TRUE;
786 else if (line ==
"EXTRACT_LIST=END")
789 input_list_started = FALSE;
793 else if (input_list_started == TRUE)
802 list status_list = llParseString2List(line, [
"="], []);
803 string key_string = llList2String(status_list, 0);
804 string value_string = llList2String(status_list, 1);
806 else if (key_string ==
"ACCESS_PIN") llSetRemoteScriptAccessPin((integer)value_string);
811 while ( ++index < list_count);
integer REGION_FLAG
Number value of REgion Location flag.
integer REMOTE_UPDATE_FLAG
integer COMMENT_PREAMBLE_LENGTH
THe number of characters in the comment preamble.
string CONFIG_DESTINATIONS_NAME
The automatically generated list of teleporter destinations.
string location_name
The display name of the current location.
string CONFIG_NOTECARD_NAME
The name of the notecard containing the Teleport's Configuration.
string LOCATION_NAME
THe Key Value for defining hte name of the location in the Config notecard.
integer ANONYMOUS_FLAG
This flag designates the teleporter as anonymous.
float TIMER_OFF
Settings a Zero Time will turn off the Timer.
integer METAVERSE_FLAG
Number value of Metaverse Location flag.
string location_region
Region holding the Teleporter.
integer EXTENDED_LOCAL_FLAG
Flag for Extended Local teleports.
string VERSION_STRING
The Current version of the software.
integer WORLD_FLAG
Number value of World Location flag.
string COMMENT_PREAMBLE
Preamble for a comment line in the configuration file.
string location_world
The Teleporter Location's World.
string database_interface
The HTTP address for invoking the php script to do the scanning & deleting.
string DATABASE_INTERFACE
The Identifier for the Database Interface URL.
string WORLD_LOCATION
The Configuration File Identifier for the World Location.
string REMOTE_UPDATE
Flag to Enable Auto Updating.
float DEFAULT_LOCATION_OFFSET
The default offset from the landing teleport position when using a display panel;.
list destination_data
A list of the Teleport Destinations from the COnfiguration File.
float front_offset_angle
The LookAt angle after teleportation.
integer rdSetLocationType(string ValueString, integer LocationInfo)
Set the teleporter Location Type.
list teleport_list
The list of Teleport Destinations.
float landing_offset
The distance offset between the landing and the Teleporter.
string LOCALITY_GROUP
Configuration File Identifier for the Regional Location.
float MINIMUM_OFFSET
Minimum allowable offset.
string LANDING_OFFSET
The Configuration File Identifier for the Landing Offset Distance.
rdProcessFailureMessage(string FailureMessage)
Convert error messages into something that is more readable.
float MAXIMUM_OFFSET
Maximum allowable offset.
string EXTENDED_LOCAL
The Extended Local indentifier.
list destination_preamble
float heartbeat_period
Interval in seconds between Heartbeat messages.
rdSaveNewTeleportNotecard(list teleport_list)
Save the Teleportation Destinations into a Notecard.
string REGION_LOCATION
The Configuration File Identifier for the Regional Location.
integer rdSetExtendedLocal(string ValueObject, integer InfoInteger)
Set of Reset the Extended Local Telportation Flag.
string GROUP_LOCATION
The Configuration File Identifier for all Goup Locations.
key heartbeat_key
The Heatbeat HTTP Requrest Key.
string HEARTBEAT_PERIOD
The Configuration File Identifier for the Heartbeat Period.
string LOCATION_TYPE
The Configuration File Identifier for the Location Type.
float MINIMUM_HEARTBEAT_INTERVAL
integer rdSetAnonType(string ValueObject, integer InfoInteger)
Set of Reset the Anonymous Flag.
string FRONT_OFFSET_ANGLE
The Configuration File Identifier for the Look At Angle.
string METAVERSE_LOCATION
The Configuration File Identifier for the Metaverse Location.
string rdAdjustPosition(string Line)
integer GROUP_FLAG
Numeric identifier of a Group Location.
integer LOCATION_MASK
A mask to remove locaiton information.
integer version_number
Version number as integer.
integer rdSetRemoteUpdate(string ValueObject, integer InfoInteger)
string ANONYMOUS_UNIT
The configuration Identifier for Anonymous Operation.
integer rdGetVersionNumber(string VersionString)
Convert Version String into an Integer.
integer location_info
Information on the Teleporter Location.
float MINIMUM_HEARTBEAT_PERIOD
The fastest allowable heartbeat.