Difference between revisions of "NDOIG"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<center><p style="width: 60%">[[NDOIA|A]][[NDOIB|B]][[NDOIC|C]][[NDOID|D]][[NDOIE|E]][[NDOIF|F]][[NDOIG|G]][[NDOIH|H]][[NDOII|I]][[NDOIJ|J]][[NDOIK|K]][[NDOIL|L]][[NDOIM|M]][[NDOIN|N]][[NDOIO|O]][[NDOIP|P]][[NDOIQ|Q]][[NDOIR|R]][[NDOIS|S]][[NDOIT|T]][[NDOIU|U]][[NDOIV|V]][[NDOIW|W]][[NDOIX|X]][[NDOIY|Y]][[NDOIZ|Z]]</p></center>
+
<p style="width:60%;margin: 0 auto">[[NewDawnHome|[Main]]] [[NDServerIndexScriptsMain|[Lua Examples]]]</p>
 +
<center><p style="width: 60%">[[NDOIA|A]] [[NDOIB|B]] [[NDOIC|C]] [[NDOID|D]] [[NDOIE|E]] [[NDOIF|F]] [[NDOIG|G]] [[NDOIH|H]] [[NDOII|I]] [[NDOIJ|J]] [[NDOIK|K]] [[NDOIL|L]] [[NDOIM|M]] [[NDOIN|N]] [[NDOIO|O]] [[NDOIP|P]] [[NDOIQ|Q]] [[NDOIR|R]] [[NDOIS|S]] [[NDOIT|T]] [[NDOIU|U]] [[NDOIV|V]] [[NDOIW|W]] [[NDOIX|X]] [[NDOIY|Y]] [[NDOIZ|Z]]</p></center>
 
<p style="color: #DDDD88;font-size: 22px;width:60%;margin: 0 auto">Object Functions & Examples</p>
 
<p style="color: #DDDD88;font-size: 22px;width:60%;margin: 0 auto">Object Functions & Examples</p>
 
<center>
 
<center>
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllEquippedObjects() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAccessLevel()</p>Returns<br>accesslevel - access level of user || Get the access level of the user attached to this object.
 
|}
 
|}
 
</center>
 
</center>
Line 15: Line 16:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllModules() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllEquippedObjects()</p>Returns<br>table - array of all equipped objects in the gameobject || Get object equipped in the specified slot.
 
|}
 
|}
 
</center>
 
</center>
Line 26: Line 27:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllObjVars() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllModules()</p>table - array of all current lua modles || Gets a list of all the script modules that are currently attached to the given object.
 
|}
 
|}
 
</center>
 
</center>
Line 37: Line 38:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllSharedObjectProperties() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllObjVars()</p>Returns<br>table - a table of object variables on the given object || Returns a (table) of all given object variables for a given object.
 
|}
 
|}
 
</center>
 
</center>
Line 48: Line 49:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetBaseMoveSpeed() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllSharedObjectProperties()</p>Returns<br>table of all shared object properties || Returns all shared object properties for the object.
 
|}
 
|}
 
</center>
 
</center>
Line 59: Line 60:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCharacterName() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAllStats()</p>Returns<br>table - a table of an object's given stat variables || Returns a (table) of all given stat variables for a given object. Table fields are dependent on "Type" key. Type maps to either Regen or Simple.(String). All entries have Value -> (double) Regen types include keys MaxValue -> (double) and RegenRate (double).
 
|}
 
|}
 
</center>
 
</center>
Line 70: Line 71:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetColor() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAssetBundleName()</p>Returns<br>string - asset bundle name || Get the asset bundle name this object is associated with if not the default.
 
|}
 
|}
 
</center>
 
</center>
Line 81: Line 82:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetContainedObjects() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetAttachedUserId()</p>Params<br>userid - userid of attached player || If a player is attached to this object, it will return the unique user id for that player. This is a unique identifier for a player. Can be used to identify a player regardless of character. This works even if the character is offline!
 
|}
 
|}
 
</center>
 
</center>
Line 92: Line 93:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCreationTemplateId() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetBaseMoveSpeed()</p>Returns<br>number - base movement speed || Get the base movement speed of this mobile.
 
|}
 
|}
 
</center>
 
</center>
Line 103: Line 104:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentMoveSpeedModifier () || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCharacterName()</p>Returns<br>string - name of the character || Returns a characters name regardless if they are online on this region or not.
 
|}
 
|}
 
</center>
 
</center>
Line 114: Line 115:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetDest() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetColor()</p>Returns<br>string - New color in format (FFFFFF) ie: Red,Green,Blue in hexidecimal format || Gets the color of this object.
 
|}
 
|}
 
</center>
 
</center>
Line 125: Line 126:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetEquippedObject() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetContainedObjects()</p>Returns<br>table - array of contained objects || Returns table of objects inside this object if it is a container, this is not recursive.
 
|}
 
|}
 
</center>
 
</center>
Line 136: Line 137:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetFacing() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCreationTemplateId()</p>Returns<br>number - The ID of the current template the unit was created with || Get template id this object was created with. Check the templates file for more details.
 
|}
 
|}
 
</center>
 
</center>
Line 147: Line 148:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetHue() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetCurrentMoveSpeedModifier()</p>Returns<br>float - returns 0 or the current move speed modifier || Returns the current movement speed modifier of the mobile.
 
|}
 
|}
 
</center>
 
</center>
Line 158: Line 159:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetItemCount() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetDest()</p>Returns<br>location - Current target destination of the mobile or Loc of zero for no destination set || Returns the mobile's current target destination if any.
 
|}
 
|}
 
</center>
 
</center>
Line 169: Line 170:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetLoc() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetEquippedObject()</p>Params<br>string - the name of the equipment slot<br>Returns<br>gameobject - the object in the equipped slot || Get object equipped in the specified slot.
 
|}
 
|}
 
</center>
 
</center>
Line 180: Line 181:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetMobileType() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetFacing()</p>Returns<br>number - Returns the angle that a given object is facing || Returns current facing angle in degrees. In respect to the world origin.
 
|}
 
|}
 
</center>
 
</center>
Line 191: Line 192:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetName() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetHue()</p>Returns<br>number - hue value from the palette || Gets the hue of this object.
 
|}
 
|}
 
</center>
 
</center>
Line 202: Line 203:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetObjVar() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetIconId()</p>Returns<br>number - the id of the icon for this object || Get the icon id to use in the client user action for this object.
 
|}
 
|}
 
</center>
 
</center>
Line 213: Line 214:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetObjVarType() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetIPAddress()</p>Returns<br>string - ip address of the user if any || Returns the IP address of the user attached to this object if any or .
 
|}
 
|}
 
</center>
 
</center>
Line 224: Line 225:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetObjectTags() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetItemCount()</p>returns<br>number -  Number of items in the container, including count of containers inside containers. 0 for non containers || Get the total item count currently inside a container, recursively.  
 
|}
 
|}
 
</center>
 
</center>
Line 235: Line 236:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetPathTarget() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetLoc()</p>Returns<br>location - current location of this object || .Returns current location
 
|}
 
|}
 
</center>
 
</center>
Line 246: Line 247:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetRotation() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetMobileType()</p>Returns<br>string - Mobile type (Animal,Monster,Friendly,Player) || Get the mobile type of this object.
 
|}
 
|}
 
</center>
 
</center>
Line 257: Line 258:
 
{| class="wikitable" | style="width: 60%"
 
{| class="wikitable" | style="width: 60%"
 
|-
 
|-
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetSharedObjectProperty() || .
+
|style="width: 40%"| <p style="color: #DDDD88;font-size: 18px">GetName()</p>Params<br>string - name of the object || Get the name of this object.
 +
|}
 +
</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">GetObjVar()</p>Params<br>name - name of the give object variable<br>Returns<br>object - the value of the given objects variable || Gets an object variable that exists with the current name. If it doesn't exist, it returns nil.
 +
Notes: This is mainly how you access variables of a given object.
 +
|}
 +
</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">GetObjVarType()</p><br>name - name of the given object variable<br>Returns<br>object - the type of the given object variable || Attempts to return a string indicating the type of a "userdata" obj var.
 +
|}
 +
</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">GetObjectOwner()</p>Returns<br>gameobject - attached object of the user who owns this object || Get the attached user who owns this object.
 +
|}
 +
</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">GetObjectTag()</p>Returns<br>bool - true if has tag ||  Checks if this object has a specific tag based on it's client type.
 +
|}
 +
</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">GetObjectTags()</p>Returns<br>table - an array of tag names ||  Returns a table in the form of an array, of the names of tags set in the ObjectTagDefinitions file.
 +
|}
 +
</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">GetPathTarget()</p>Returns<br>gameobject - the current path target or nil || Returns the current path target of the mobile if any.
 +
|}
 +
</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">GetRestrictedStatUpdateLevel()</p>Params<br>gameobject - the attached object of user<br>Returns<br>string - Visibility this target user has access to ("Private", "Restricted", "Global") || Gets the visibility of stat updates that this user will receive. If it was never set, it defaults to Global.
 +
|}
 +
</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">GetRotation()</p>Returns<br>rotation - the current rotation value of the given object || Gets the current facing angle in degrees. Can not be called on mobile objects!
 +
|}
 +
</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">GetScale()</p>Returns<br>scale - the current scale value of the object || Gets the scale of a mobile object.
 +
|}
 +
</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">GetSharedObjectProperty()</p>Params<br>string - name of the flag to check<br>Returns<br>sharedpropertyvalue - value of specified property || Gets the value for the SharedObjectProperties 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">GetStatMaxValue()</p>Params<br>statname - stats name<br>Returns<br>number - the max value of this stat || Get the max value of a named stat.
 +
|}
 +
</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">GetStatRegenRate()</p>Params<br>statname - stat name<br>Returns<br>number - The regen rate of this stat in units per second (defaults to 0) || Get the regen rate of a named stat.
 +
|}
 +
</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">GetStatValue()</p>Params<br>statname - stat name<br>Returns<br>number - the current value of this stat || Get the current value of a named stat.
 +
|}
 +
</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">GetStatVisibility()</p>Params<br>statname - stat name<br>Returns<br>string - Visibility of this stat ("Private", "Restricted", "Global") || Returns the visibility setting for a given stat.
 +
|}
 +
</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">GetTimerDelay()</p>Params<br>timername - name of timer<br>Returns<br>timespan - time left (nil if no active timer) || Get the amount of time before the specified timer fires.
 +
|}
 +
</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">GetUpdateRange()</p>Returns<br>number - current update range ||  Get the update range (the distance this player can see other objects) for a given user.
 
|}
 
|}
 
</center>
 
</center>

Latest revision as of 07:20, 27 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

Object Functions & Examples

GetAccessLevel()

Returns
accesslevel - access level of user
Get the access level of the user attached to this object.

Example

 CODE EXAMPLE BLOCK

GetAllEquippedObjects()

Returns
table - array of all equipped objects in the gameobject
Get object equipped in the specified slot.

Example

 CODE EXAMPLE BLOCK

GetAllModules()

table - array of all current lua modles
Gets a list of all the script modules that are currently attached to the given object.

Example

 CODE EXAMPLE BLOCK

GetAllObjVars()

Returns
table - a table of object variables on the given object
Returns a (table) of all given object variables for a given object.

Example

 CODE EXAMPLE BLOCK

GetAllSharedObjectProperties()

Returns
table of all shared object properties
Returns all shared object properties for the object.

Example

 CODE EXAMPLE BLOCK

GetAllStats()

Returns
table - a table of an object's given stat variables
Returns a (table) of all given stat variables for a given object. Table fields are dependent on "Type" key. Type maps to either Regen or Simple.(String). All entries have Value -> (double) Regen types include keys MaxValue -> (double) and RegenRate (double).

Example

 CODE EXAMPLE BLOCK

GetAssetBundleName()

Returns
string - asset bundle name
Get the asset bundle name this object is associated with if not the default.

Example

 CODE EXAMPLE BLOCK

GetAttachedUserId()

Params
userid - userid of attached player
If a player is attached to this object, it will return the unique user id for that player. This is a unique identifier for a player. Can be used to identify a player regardless of character. This works even if the character is offline!

Example

 CODE EXAMPLE BLOCK

GetBaseMoveSpeed()

Returns
number - base movement speed
Get the base movement speed of this mobile.

Example

 CODE EXAMPLE BLOCK

GetCharacterName()

Returns
string - name of the character
Returns a characters name regardless if they are online on this region or not.

Example

 CODE EXAMPLE BLOCK

GetColor()

Returns
string - New color in format (FFFFFF) ie: Red,Green,Blue in hexidecimal format
Gets the color of this object.

Example

 CODE EXAMPLE BLOCK

GetContainedObjects()

Returns
table - array of contained objects
Returns table of objects inside this object if it is a container, this is not recursive.

Example

 CODE EXAMPLE BLOCK

GetCreationTemplateId()

Returns
number - The ID of the current template the unit was created with
Get template id this object was created with. Check the templates file for more details.

Example

 CODE EXAMPLE BLOCK

GetCurrentMoveSpeedModifier()

Returns
float - returns 0 or the current move speed modifier
Returns the current movement speed modifier of the mobile.

Example

 CODE EXAMPLE BLOCK

GetDest()

Returns
location - Current target destination of the mobile or Loc of zero for no destination set
Returns the mobile's current target destination if any.

Example

 CODE EXAMPLE BLOCK

GetEquippedObject()

Params
string - the name of the equipment slot
Returns
gameobject - the object in the equipped slot
Get object equipped in the specified slot.

Example

 CODE EXAMPLE BLOCK

GetFacing()

Returns
number - Returns the angle that a given object is facing
Returns current facing angle in degrees. In respect to the world origin.

Example

 CODE EXAMPLE BLOCK

GetHue()

Returns
number - hue value from the palette
Gets the hue of this object.

Example

 CODE EXAMPLE BLOCK

GetIconId()

Returns
number - the id of the icon for this object
Get the icon id to use in the client user action for this object.

Example

 CODE EXAMPLE BLOCK

GetIPAddress()

Returns
string - ip address of the user if any
Returns the IP address of the user attached to this object if any or .

Example

 CODE EXAMPLE BLOCK

GetItemCount()

returns
number - Number of items in the container, including count of containers inside containers. 0 for non containers
Get the total item count currently inside a container, recursively.

Example

 CODE EXAMPLE BLOCK

GetLoc()

Returns
location - current location of this object
.Returns current location

Example

 CODE EXAMPLE BLOCK

GetMobileType()

Returns
string - Mobile type (Animal,Monster,Friendly,Player)
Get the mobile type of this object.

Example

 CODE EXAMPLE BLOCK

GetName()

Params
string - name of the object
Get the name of this object.

Example

 CODE EXAMPLE BLOCK

GetObjVar()

Params
name - name of the give object variable
Returns
object - the value of the given objects variable
Gets an object variable that exists with the current name. If it doesn't exist, it returns nil.

Notes: This is mainly how you access variables of a given object.

Example

 CODE EXAMPLE BLOCK

GetObjVarType()


name - name of the given object variable
Returns
object - the type of the given object variable
Attempts to return a string indicating the type of a "userdata" obj var.

Example

 CODE EXAMPLE BLOCK

GetObjectOwner()

Returns
gameobject - attached object of the user who owns this object
Get the attached user who owns this object.

Example

 CODE EXAMPLE BLOCK

GetObjectTag()

Returns
bool - true if has tag
Checks if this object has a specific tag based on it's client type.

Example

 CODE EXAMPLE BLOCK

GetObjectTags()

Returns
table - an array of tag names
Returns a table in the form of an array, of the names of tags set in the ObjectTagDefinitions file.

Example

 CODE EXAMPLE BLOCK

GetPathTarget()

Returns
gameobject - the current path target or nil
Returns the current path target of the mobile if any.

Example

 CODE EXAMPLE BLOCK

GetRestrictedStatUpdateLevel()

Params
gameobject - the attached object of user
Returns
string - Visibility this target user has access to ("Private", "Restricted", "Global")
Gets the visibility of stat updates that this user will receive. If it was never set, it defaults to Global.

Example

 CODE EXAMPLE BLOCK

GetRotation()

Returns
rotation - the current rotation value of the given object
Gets the current facing angle in degrees. Can not be called on mobile objects!

Example

 CODE EXAMPLE BLOCK

GetScale()

Returns
scale - the current scale value of the object
Gets the scale of a mobile object.

Example

 CODE EXAMPLE BLOCK

GetSharedObjectProperty()

Params
string - name of the flag to check
Returns
sharedpropertyvalue - value of specified property
Gets the value for the SharedObjectProperties specified.

Example

 CODE EXAMPLE BLOCK

GetStatMaxValue()

Params
statname - stats name
Returns
number - the max value of this stat
Get the max value of a named stat.

Example

 CODE EXAMPLE BLOCK

GetStatRegenRate()

Params
statname - stat name
Returns
number - The regen rate of this stat in units per second (defaults to 0)
Get the regen rate of a named stat.

Example

 CODE EXAMPLE BLOCK

GetStatValue()

Params
statname - stat name
Returns
number - the current value of this stat
Get the current value of a named stat.

Example

 CODE EXAMPLE BLOCK

GetStatVisibility()

Params
statname - stat name
Returns
string - Visibility of this stat ("Private", "Restricted", "Global")
Returns the visibility setting for a given stat.

Example

 CODE EXAMPLE BLOCK

GetTimerDelay()

Params
timername - name of timer
Returns
timespan - time left (nil if no active timer)
Get the amount of time before the specified timer fires.

Example

 CODE EXAMPLE BLOCK

GetUpdateRange()

Returns
number - current update range
Get the update range (the distance this player can see other objects) for a given user.

Example

 CODE EXAMPLE BLOCK