Difference between revisions of "AREADEF"
MrSugarCube (talk | contribs) (Created page with '__FORCETOC__ Areas in the world, such as dungeons and cities are defined by regions. Accessing regions in scripts can be accomplished using the REGION reference from a [[Characte...') |
(No difference)
|
Revision as of 18:55, 7 June 2009
Areas in the world, such as dungeons and cities are defined by regions. Accessing regions in scripts can be accomplished using the REGION reference from a character, item or map point object, or the AREA.region_id reference from the server object. The following tables detail the various properties of the region object in SphereServer:
Contents
References
References return pointers to other objects (e.g. the CHAR.n reference allows you to access the characters that are attached to the account). 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 | For regions linked to a multi, gets the region that contains the multi region. Only valid for reading values. |
Properties and Functions
Here is a list of all region 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. If an attempt is made to execute (not read) a command that does not exist on the region, then the command will be called on all sectors that touch the region area.
Name | Read/Write | Description |
ALLCLIENTS command | W | Executes command on all clients inside the region boundaries. |
ANNOUNCE | RW | Gets or sets whether or not there will be an announcement when someone enters or exits the region. |
ARENA | RW | Gets or sets whether or not the region is considered to be an arena. |
BUILDABLE | RW | Gets or sets whether or not players can place buildings in the region. |
CLEARTAGS prefix | W | Removes all TAGs from the region that start with the given prefix. |
CLIENTS | R | Gets the total number of clients that are inside the sectors that touch the region. |
DEFNAME | R | Gets the region's defname. |
EVENTS +/-regiontype_defname | RW | Gets a list of attached region events, or adds or removes a region event to or from the region. |
FLAGS | RW | Gets or sets the region's attributes. |
GATE | RW | Gets or sets whether or not casting the gate travel spell is allowed in the region. |
GROUP | RW | Gets or sets a group name for the region. |
GUARDED | Gets or sets whether or not guards can be called within the region. | |
ISEVENT.regiontype_defname | R | Returns 1 if the region has a specified region event attached. |
MAGIC | RW | Gets or sets whether or not there is an anti-magic field in the region. |
MAP | R | Gets the map that the region exists on. |
MARK | RW | Gets or sets whether or not casting the mark spell is allowed in the region. |
NAME | RW | Gets or sets the name of the region. |
NOBUILD | RW | Gets or sets whether or not players can place buildings in the region. |
NODECAY | RW | Gets or sets whether or not items will decay in the region. |
NOPVP | RW | Gets or sets whether or not PvP combat is allowed in the region. |
P | RW | Gets or sets the location of the region (used when using the GO command). |
RECALL | RW | Gets or sets whether or not casting the recall spell is allowed in the region. |
RECALLIN | RW | Gets or sets whether or not it is possible to use the recall spell to enter the region. |
RECALLOUT | RW | Gets or sets whether players can recall out of the region. |
RECT | R | Gets the number of rectangles that this region is made from. |
RECT.n | R | Gets the nth rectangle that this region is made from. |
RESOURCES +/-regiontype_defname | RW | Gets a list of attached region events, or adds or removes a region event to or from the region. |
SAFE | RW | Gets or sets whether or not the region is a safe zone. |
TAG.name | RW | Gets or sets the value of a TAG. |
TAGAT.index | R | Gets a TAG at the given zero-based index. |
TAGAT.index.KEY | R | Gets the name of the TAG at the given zero-based index. |
TAGAT.index.VAL | R | Gets the value of the TAG at the given zero-based index. |
TAGCOUNT | R | Gets the number of TAGs stored on the region. |
TAGLIST | W | Outputs a list of the region's TAGs. |
TYPE | R | If the region is linked to a multi, returns the multi's TYPE property. |
UID | R | Gets the region's unique ID in the world. |
UNDERGROUND | RW | Gets or sets whether or not the region is considered to be underground. |