Difference between revisions of "Map Points"

From SphereWiki
Jump to: navigation, search
m
Line 11: Line 11:
 
| [[REGION]] || R || Gets the [[Regions|region]] that contains the map point.
 
| [[REGION]] || R || Gets the [[Regions|region]] that contains the map point.
 
|-
 
|-
| [[ROOM]] || R || Gets the [[Regions|room]] that contains the map point.
+
| [[ROOM]] || R || Gets the [[Rooms|room]] that contains the map point.
 
|-
 
|-
 
| [[SECTOR]] || R || Gets the [[Sectors|sector]] that contains the map point.
 
| [[SECTOR]] || R || Gets the [[Sectors|sector]] that contains the map point.

Revision as of 19:56, 7 June 2009

A map point is a specific location on a world map, defined by X, Y, Z and M coordinates. Map point references, such as P from the character/item object and MAP(x,y,map) from the server object can be used to access additional information about a map point such as what static items exist at the location. The following tables detail the various properties of map points in SphereServer:


References

References return pointers to other objects (e.g. the REGION reference allows you to access the region that contains the map point). These can either be accessed by using <REFNAME> to return the UID (1 for object types that don't have UIDs) of the object or 0 if it doesn't exist, or by using <REFNAME.KEY> where KEY is a valid property/function/reference for the REFNAME object. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
REGION R Gets the region that contains the map point.
ROOM R Gets the room that contains the map point.
SECTOR R Gets the sector that contains the map point.


Properties and Functions

Here is a list of all map point properties and functions. If a function is marked as readable then it can return a value when used as <KEY>. Click on the name for more detailed information such as usage and examples.

Name Read/Write Description
ISNEARTYPE type, distance, check_multis R Returns 1 if an item exists within distance tiles of the location whose TYPE matches a specified type.
M
MAP
R Gets the location's map number.
STATICS R Gets the number of static items at the location.
STATICS.n.ID R Gets the ID of the nth item at the location. (zero-based)
STATICS.n.COLOR R Gets the hue of the nth item at the location. (zero-based)
STATICS.n.Z R Gets the Z level of the nth item at the location. (zero-based)
STATICS.n.KEY R Gets the KEY property from the ITEMDEF of the nth item at the location. (zero-based)
TERRAIN R Gets the terrain's ID at the location.
TYPE R Gets the terrain's TYPE at the location.
X R Gets the X coordinate of the location.
Y R Gets the Y coordinate of the location.
Z R Gets the Z coordinate of the location.