The V2.00 ThereClient introduced a service specifically intended for use by other programs. These programs may be external to the ThereClient, or may execute within the ThereClient environment in the form of a customized replacement Flash movie. The primary difference between the two modes of operation is:
- A Flash movie within the ThereClient does not require activation of the SystemCockpit, but it can only be launched if
- No such name restriction exists for programs running outside of the ThereClient, but the SystemCockpit must be manually enabled in order for them to work, and they will not automatically terminate when the ThereClient terminates.
This service allows you to manipulate a tree of nodes by specifying the node’s path and an operation to perform. Paths are similar to Unix file names in that they have multiple components separated by “/” characters, and the root of the tree is referred to as a path containing a single “/” character.
Each node has three elements:
- A version, containing a number which increments when the value of the node changes or a special flag value to indicate that versioning is not supported on this node. Unfortunately:
- We don’t know what the special flag value is.
- It is a known (and very low priority) bug that some nodes do not support versioning, but nevertheless just have a normal version number such as “1”. If you perform a
Waitoperation on such a node, it will never terminate.
- A type of either
Method. Value nodes and method nodes are the leaves of the tree, while container nodes make up the body of the tree.
- The node’s value. For a container node, this is a list of the possible child nodes, either leaves or nested container nodes. For a method node, the arguments required to invoke the method are described.
The operation used for the service can be one of the following:
Browsecan be used to get an HTML view of the node.
Getprovides an XML view of the node.
Wait(with an additional
&Version=ver parameter) allows you to perform a
Getbut will not return until the version of the node is different from the provided ver parameter.
Invoke(with an additional
&Args=args parameter) allows a method node to be invoked.
Set(with an additional
&Value=v parameter) allows a value node to be set.
If you perform a
Wait operation on a value node, you will see something like this:
<Answer> <Result>1</Result> <Node> <Version>1</Version> <Type>Value</Type> <Value>0</Value> </Node> </Answer>
If you perform a
Wait operation on a container node, you will see something like this:
<Answer> <Result>1</Result> <Node> <Version>4</Version> <Type>Container</Type> <Children> <Child> <Name>edprops</Name> <Type>Container</Type> </Child> <Child> <Name>state</Name> <Type>Value</Type> </Child> <Child> <Name>presence0</Name> <Type>Container</Type> </Child> <Child> <Name>clide</Name> <Type>Value</Type> </Child> </Children> </Node> </Answer>
You can see from this example that the children of a container node may have a mixture of node types.
An attempt to access a non-existent node will result in something like the following:
<Answer> <Result>0</Result> <ErrorCode>4400001</ErrorCode> <ErrorDetails>No node exists at path '/thobs/196772622/edprops/forcefield/valxx'</ErrorDetails> </Answer>
The root of the ScriptHook hierarchy is the path “/”, which is a container node providing the following main branches:
/accallows you to make your avatar speak text, or perform an emote.
/clientgives access to system messages and GUI windows. In addition, you can simulate mouse button clicks and key presses.
/mainMenuprovides access to the main ThereClient menu system. It is only present when the main menu is on the screen, so cannot be used while in ActionMode.
/pilotPobspresents access to different classes of pob owned by the avatar.
/thobscontains a sub-tree for the thob associated with each visible dob.
/acc ScriptHook sub-tree provides access to Avatar Centric Chat through a single method
/acc/addChatText. You can invoke this with additional arguments to have your avatar “speak” the text. This functionality includes the ability to perform emotes. For example, performing a GET on the following URL makes your avatar jump for joy:
Note that the nested “=” character in the
Args argument is encoded as
%3D to prevent that part of the URL being parsed incorrectly. Similarly, if you want to put a space character in the text, you should encode it as either a “+” or a “%20”. You can include a newline character (like hitting the carriage return key) by including one encoded as “%0A”.