Difference between revisions of "NDGIG"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
 
(23 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllRegions() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllRegions()</p>Params<br>prefix - prefix (optional)<br>Returns<br>table - array of each region's name || Returns a list of all region names.
 
|}
 
|}
 
</center>
 
</center>
Line 13: Line 13:
 
   CODE EXAMPLE BLOCK
 
   CODE EXAMPLE BLOCK
 
</div>
 
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllSeedGroups()</p>Params<br>grouptype - All, DefaultOnly, ModOnly<br>bool - should result include groups that are excluded from the initial load<br>Returns<br>table - Array of group names ||  Get the list of all seed object groups.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllTemplateNames()</p>Params<br>filter - filter string by category<br>Returns<br>table - Array of template names || Get a list of template names.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetBans()</p>Params<br>eventid - event identifier for the resulting getbanlist event || Gets a list of all active bans on the server.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCharacterListForUser()</p>Params<br>userid - userid to get the character list for<br>eventid - event identifier for the resulting characterlistrequestresult event<br>Returns<br>table - table of characters names and matching character ids. || .
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 
<center>
 
<center>
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCollisionInfoAtLoc() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetClusterRegions()</p>Returns<br>table - table of regions in the cluster key = region address, value = {WorldName=worldname, SubregionName=subregion} NOTE: Subregion will be nil if no subregion is being used for that region server || Returns a table containing the available regions in the cluster INCLUDING itself.
 
|}
 
|}
 
</center>
 
</center>
Line 27: Line 72:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentModule() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCollisionInfoAtLoc()</p>Params<br>location - location to test<returns>array - array of strings || Returns an array of strings containing information about the objects with collision at the specified location. This is in the form of the type of object Dynamic Object / Permanent Object and the items ID. If there is also a static collision entry present at this location the AARect2D bounds of this static collision entry are returned
 
|}
 
|}
 
</center>
 
</center>
Line 38: Line 83:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentObject() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentModule()</p>Returns<br>string - name of current script || Returns the name of the top-level script/module this function is called in.  
 
|}
 
|}
 
</center>
 
</center>
Line 49: Line 94:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetRegion() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentObject()</p>Returns<br>string - objectreference to the currently executing script || Returns the object reference of the object the current script is executing upon.
 
|}
 
|}
 
</center>
 
</center>
Line 60: Line 105:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetRegionAtLoc() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetInitializerFromTemplate()</p>Params<br>templateid - template id<br>luamod - lua module to extract initializer<br>Returns<br>table - Null of the initialization string that was used || Returns the Initializer that was used for this templete and module.
 
|}
 
|}
 
</center>
 
</center>
Line 71: Line 116:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateObjVar() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetLuaExtensionsEnabled()</p>Returns<br>avgrunframetime - Average running frametime of simulation thread || Returns if it is possible to load lua exceptions .
 
|}
 
|}
 
</center>
 
</center>
Line 82: Line 127:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateObjectProperty() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetModName()</p>Returns<br>string - name of currently running mod || Returns the name of the currently running mod.
 
|}
 
|}
 
</center>
 
</center>
Line 93: Line 138:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetViewObjectCount() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetPrefabExtents()</p>Params<br>prefabname - Prefab Name<br>Returns<br>box - prefab extents || .
 
|}
 
|}
 
</center>
 
</center>
Line 100: Line 145:
 
   CODE EXAMPLE BLOCK
 
   CODE EXAMPLE BLOCK
 
</div>
 
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetLuaProfilingEnabled()</p>Returns<br>bool - is this enabled || Returns lua profiling enabled state.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetRegion()</p>Params<br>regionname - Region Name<br>Returns<br>GameRegion - region object || Returns the game region by name.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetPath()</p>Params<br>pathname - the path name<br>Returns<br>table - path elements || Returns the static world path by name.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetRegionsAtLoc()</p>Params<br>location - location to check<br>prefix - prefix to filter<br>Returns<br>table - Array of region objects || Returns all game regions found at this location.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetSmallestRegionAtLoc()</p>Params<br>location - location to check<br>prefix - prefix to filter<br>Returns<br>table - Array of region objects || Returns the smallest game region found at this location.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetSeedGroupCount()</p>Params<br>seedgroup - Seed group full name<br>Returns<br>table - array of group entries || Get the number of seed objects in a group.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetSeedGroupData()</p>Params<br>seedgroup - Seed group full name<br>Returns<br>table - array of group entries || Get the seed object data for a given seed object groups.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateCategories()</p>Returns<br>table - array of template categories || Get a list of template categories.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateData()</p>Params<br>templateid - Template id<br>Returns<br>table - template data || Get all of the data for a given template id in table form.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateIconId()</p>Params<br>templateid - template id<br>Returns<br>objectid - template object icon id || Get all of the data for a given template id in table form.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateObjVar()</p>Params<br>templateid - template to get the variable from<br>varaiblename - variable name to get<br>Returns<br> the value of the objvar || Get an object variable entry from a specified template.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateObjectBounds()</p>Params<br>templateid - template id<br>Returns<br>table - lua array of object bounds 3d rectangles || Get the object bounds for the client id specified in the template. Not all objects have object bounds specified.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTempmlateObjectName()</p>Params<br>templateid - template id<br>Returns<br>string - template object name || Get the name specified in the template.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateObjectProperty()</p>Params<br>templateid - template id<br>propertyname - object property name<br>Returns<br>string - template object name || Get the default object property specified in the template.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetTemplateRoofBounds()</p>Params<br>templateid - templateid<br>Returns<br>templateid - template id || Get the roof bounds for the client id specified in the template. Not all objects have roof bounds specified.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetUserdataType()</p>Params<br>object - any userdata type object<br>Returns<br>string - type of given object || Attempts to return the C# type of a given userdata value.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetViewObjectCount()</p> || .
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetViewObjects()</p>Params<br>eventid event identifier to look for<br>Returns<br>table - array of objects currently in the view || Get the list of known objects for this subscription/view.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GlobalVarDelete()</p>Params<br>recordname - name of record to delte<br>eventid - event identifier for the globalvarupdateresult message || Requests an asyncronous delete of a global variable.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GlobalVarListRecords()</p>Params<br>recordpath - record path<br>Returns<br>table - table array of matching record names || Returns list of record names matching (starting with) the record path.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GlobalVarRead()</p>Params<br>recordname - record name<br>Returns<br>table - table record for global variable ||  Returns a global record table. These records are accessible to every region in a cluster.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 +
<center>
 +
{| class="wikitable" | style="width: 60%"
 +
|-
 +
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GlobalVarReadKey()</p>Params<br>recordkey - record key<br>objectkey - object key<br>Returns<br>object - table record key value for global variable || Returns a global record table key value. These records are accessible to every region in a cluste.
 +
|}
 +
</center>
 +
<p style="width: 60%;margin: 0 auto">Example</p>
 +
<div style="width:60%;margin: 0 auto">
 +
  CODE EXAMPLE BLOCK
 +
</div>
 +
 
<center>
 
<center>
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetViewObjects() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GlobalVarWrite()</p>Params<br>recordname - name of record to write to<br>eventid - event identifier for the globalvarupdateresult message<br>function -  Callback function to be called when the lock is granted (must accept a table as a parameter and return true to commit the change) || Request a lock on a given global variable so the callback can make changes to the record. The callback function passed must take a table parameter and return true if it wants to commit the change. If it returns false or nil, the write will be cancelled. You can not replace the table that is passed to the callback. You can only edit the entries in the table. For example [[ function(record) record = { NewTable = true } end ]] will not modify the record table at all. Instead, you should do [[ function(record) record.NewTable = true end ]]. NOTE: This is an asynchronous operation. The callback function will not be called until the global var database grants you a lock. Make sure the object is not destroyed while it's waiting for a lock or the callback will never execute.
 
|}
 
|}
 
</center>
 
</center>

Latest revision as of 06:10, 23 November 2019

[Main] [Lua Examples]

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Global Functions & Examples

GetAllRegions()

Params
prefix - prefix (optional)
Returns
table - array of each region's name
Returns a list of all region names.

Example

 CODE EXAMPLE BLOCK

GetAllSeedGroups()

Params
grouptype - All, DefaultOnly, ModOnly
bool - should result include groups that are excluded from the initial load
Returns
table - Array of group names
Get the list of all seed object groups.

Example

 CODE EXAMPLE BLOCK

GetAllTemplateNames()

Params
filter - filter string by category
Returns
table - Array of template names
Get a list of template names.

Example

 CODE EXAMPLE BLOCK

GetBans()

Params
eventid - event identifier for the resulting getbanlist event
Gets a list of all active bans on the server.

Example

 CODE EXAMPLE BLOCK

GetCharacterListForUser()

Params
userid - userid to get the character list for
eventid - event identifier for the resulting characterlistrequestresult event
Returns
table - table of characters names and matching character ids.
.

Example

 CODE EXAMPLE BLOCK

GetClusterRegions()

Returns
table - table of regions in the cluster key = region address, value = {WorldName=worldname, SubregionName=subregion} NOTE: Subregion will be nil if no subregion is being used for that region server
Returns a table containing the available regions in the cluster INCLUDING itself.

Example

 CODE EXAMPLE BLOCK

GetCollisionInfoAtLoc()

Params
location - location to test<returns>array - array of strings
Returns an array of strings containing information about the objects with collision at the specified location. This is in the form of the type of object Dynamic Object / Permanent Object and the items ID. If there is also a static collision entry present at this location the AARect2D bounds of this static collision entry are returned

Example

 CODE EXAMPLE BLOCK

GetCurrentModule()

Returns
string - name of current script
Returns the name of the top-level script/module this function is called in.

Example

 CODE EXAMPLE BLOCK

GetCurrentObject()

Returns
string - objectreference to the currently executing script
Returns the object reference of the object the current script is executing upon.

Example

 CODE EXAMPLE BLOCK

GetInitializerFromTemplate()

Params
templateid - template id
luamod - lua module to extract initializer
Returns
table - Null of the initialization string that was used
Returns the Initializer that was used for this templete and module.

Example

 CODE EXAMPLE BLOCK

GetLuaExtensionsEnabled()

Returns
avgrunframetime - Average running frametime of simulation thread
Returns if it is possible to load lua exceptions .

Example

 CODE EXAMPLE BLOCK

GetModName()

Returns
string - name of currently running mod
Returns the name of the currently running mod.

Example

 CODE EXAMPLE BLOCK

GetPrefabExtents()

Params
prefabname - Prefab Name
Returns
box - prefab extents
.

Example

 CODE EXAMPLE BLOCK

GetLuaProfilingEnabled()

Returns
bool - is this enabled
Returns lua profiling enabled state.

Example

 CODE EXAMPLE BLOCK

GetRegion()

Params
regionname - Region Name
Returns
GameRegion - region object
Returns the game region by name.

Example

 CODE EXAMPLE BLOCK

GetPath()

Params
pathname - the path name
Returns
table - path elements
Returns the static world path by name.

Example

 CODE EXAMPLE BLOCK

GetRegionsAtLoc()

Params
location - location to check
prefix - prefix to filter
Returns
table - Array of region objects
Returns all game regions found at this location.

Example

 CODE EXAMPLE BLOCK

GetSmallestRegionAtLoc()

Params
location - location to check
prefix - prefix to filter
Returns
table - Array of region objects
Returns the smallest game region found at this location.

Example

 CODE EXAMPLE BLOCK

GetSeedGroupCount()

Params
seedgroup - Seed group full name
Returns
table - array of group entries
Get the number of seed objects in a group.

Example

 CODE EXAMPLE BLOCK

GetSeedGroupData()

Params
seedgroup - Seed group full name
Returns
table - array of group entries
Get the seed object data for a given seed object groups.

Example

 CODE EXAMPLE BLOCK

GetTemplateCategories()

Returns
table - array of template categories
Get a list of template categories.

Example

 CODE EXAMPLE BLOCK

GetTemplateData()

Params
templateid - Template id
Returns
table - template data
Get all of the data for a given template id in table form.

Example

 CODE EXAMPLE BLOCK

GetTemplateIconId()

Params
templateid - template id
Returns
objectid - template object icon id
Get all of the data for a given template id in table form.

Example

 CODE EXAMPLE BLOCK

GetTemplateObjVar()

Params
templateid - template to get the variable from
varaiblename - variable name to get
Returns
the value of the objvar
Get an object variable entry from a specified template.

Example

 CODE EXAMPLE BLOCK

GetTemplateObjectBounds()

Params
templateid - template id
Returns
table - lua array of object bounds 3d rectangles
Get the object bounds for the client id specified in the template. Not all objects have object bounds specified.

Example

 CODE EXAMPLE BLOCK

GetTempmlateObjectName()

Params
templateid - template id
Returns
string - template object name
Get the name specified in the template.

Example

 CODE EXAMPLE BLOCK

GetTemplateObjectProperty()

Params
templateid - template id
propertyname - object property name
Returns
string - template object name
Get the default object property specified in the template.

Example

 CODE EXAMPLE BLOCK

GetTemplateRoofBounds()

Params
templateid - templateid
Returns
templateid - template id
Get the roof bounds for the client id specified in the template. Not all objects have roof bounds specified.

Example

 CODE EXAMPLE BLOCK

GetUserdataType()

Params
object - any userdata type object
Returns
string - type of given object
Attempts to return the C# type of a given userdata value.

Example

 CODE EXAMPLE BLOCK

GetViewObjectCount()

.

Example

 CODE EXAMPLE BLOCK

GetViewObjects()

Params
eventid event identifier to look for
Returns
table - array of objects currently in the view
Get the list of known objects for this subscription/view.

Example

 CODE EXAMPLE BLOCK

GlobalVarDelete()

Params
recordname - name of record to delte
eventid - event identifier for the globalvarupdateresult message
Requests an asyncronous delete of a global variable.

Example

 CODE EXAMPLE BLOCK

GlobalVarListRecords()

Params
recordpath - record path
Returns
table - table array of matching record names
Returns list of record names matching (starting with) the record path.

Example

 CODE EXAMPLE BLOCK

GlobalVarRead()

Params
recordname - record name
Returns
table - table record for global variable
Returns a global record table. These records are accessible to every region in a cluster.

Example

 CODE EXAMPLE BLOCK

GlobalVarReadKey()

Params
recordkey - record key
objectkey - object key
Returns
object - table record key value for global variable
Returns a global record table key value. These records are accessible to every region in a cluste.

Example

 CODE EXAMPLE BLOCK

GlobalVarWrite()

Params
recordname - name of record to write to
eventid - event identifier for the globalvarupdateresult message
function - Callback function to be called when the lock is granted (must accept a table as a parameter and return true to commit the change)
Request a lock on a given global variable so the callback can make changes to the record. The callback function passed must take a table parameter and return true if it wants to commit the change. If it returns false or nil, the write will be cancelled. You can not replace the table that is passed to the callback. You can only edit the entries in the table. For example [[ function(record) record = { NewTable = true } end ]] will not modify the record table at all. Instead, you should do function(record) record.NewTable = true end . NOTE: This is an asynchronous operation. The callback function will not be called until the global var database grants you a lock. Make sure the object is not destroyed while it's waiting for a lock or the callback will never execute.

Example

 CODE EXAMPLE BLOCK