Difference between revisions of "AREADEF"
From SphereWiki
MrSugarCube (talk | contribs) |
m (Added languagemenue) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|AREADEF}} | ||
+ | |||
__FORCETOC__ | __FORCETOC__ | ||
− | Areas in the world, such as dungeons and cities are defined by regions. | + | Areas in the world, such as dungeons and cities are defined by regions. Regions are constructed from one or more "rectangles" on the map. |
+ | |||
+ | |||
+ | The basic syntax for definining a region is as follows: | ||
− | |||
− | |||
− | + | <tt> | |
− | + | [AREADEF ''defname'']<br /> | |
− | + | RECT=''left, top, right, bottom, map''<br /> | |
− | + | RECT=''left, top, right, bottom, map''<br /> | |
− | + | RECT=''left, top, right, bottom, map''<br /> | |
+ | </tt> | ||
− | ==Properties | + | ==Properties== |
− | + | Within the region definition the following properties are also available to customise the behaviour of the area. | |
{| border="1" cellspacing="4" cellpadding="4" | {| border="1" cellspacing="4" cellpadding="4" | ||
| '''Name''' || '''Read/Write''' || '''Description''' | | '''Name''' || '''Read/Write''' || '''Description''' | ||
− | |||
− | |||
|- | |- | ||
| [[ANNOUNCE]] || RW || Gets or sets whether or not there will be an announcement when someone enters or exits the region. | | [[ANNOUNCE]] || RW || Gets or sets whether or not there will be an announcement when someone enters or exits the region. | ||
Line 24: | Line 26: | ||
| [[ARENA]] || RW || Gets or sets whether or not the region is considered to be an arena. | | [[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. | + | | [[BUILDABLE]] || RW || Gets or sets whether or not players can place buildings and ships in the region. |
|- | |- | ||
− | | [[ | + | | [[EVENTS (Property)|EVENTS]] ''regiontype_defname'' || W || Adds a region event to the region. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| [[FLAGS]] || RW || Gets or sets the region's attributes. | | [[FLAGS]] || RW || Gets or sets the region's attributes. | ||
Line 40: | Line 36: | ||
| [[GROUP]] || RW || Gets or sets a group name for the region. | | [[GROUP]] || RW || Gets or sets a group name for the region. | ||
|- | |- | ||
− | | [[GUARDED]] || RW | Gets or sets whether or not guards can be called within the region | + | | [[GUARDED]] || RW || Gets or sets whether or not guards can be called within the region. |
− | |||
− | |||
|- | |- | ||
| [[MAGIC]] || RW || Gets or sets whether or not there is an anti-magic field in the region. | | [[MAGIC]] || RW || Gets or sets whether or not there is an anti-magic field in the region. | ||
− | |||
− | |||
|- | |- | ||
| [[MARK]] || RW || Gets or sets whether or not casting the mark spell is allowed in the region. | | [[MARK]] || RW || Gets or sets whether or not casting the mark spell is allowed in the region. | ||
Line 66: | Line 58: | ||
| [[RECALLOUT]] || RW || Gets or sets whether players can recall out of the region. | | [[RECALLOUT]] || RW || Gets or sets whether players can recall out of the region. | ||
|- | |- | ||
− | | [[RECT]] || | + | | [[RECT]] ''left, top, right, bottom, map'' || W || Adds a rectangle to the region definition. |
|- | |- | ||
− | + | | [[RESOURCES]] ''regiontype_defname'' || W || Adds a region event to the region. | |
− | |||
− | | [[RESOURCES]] '' | ||
|- | |- | ||
| [[SAFE]] || RW || Gets or sets whether or not the region is a safe zone. | | [[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. | | [[TAG]]''.name'' || RW || Gets or sets the value of a TAG. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| [[UNDERGROUND]] || RW || Gets or sets whether or not the region is considered to be underground. | | [[UNDERGROUND]] || RW || Gets or sets whether or not the region is considered to be underground. | ||
Line 94: | Line 70: | ||
− | == | + | ==Examples== |
− | + | ||
+ | <spherescript> | ||
+ | // | ||
+ | // The world region from the default script pack. | ||
+ | // | ||
+ | [AREADEF a_world] | ||
+ | EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass | ||
+ | NAME=Felucca | ||
+ | GROUP=ALLMAP | ||
+ | P=1323,1624,55,0 | ||
+ | RECT=0,0,7168,4096,0 | ||
+ | </spherescript> | ||
− | + | <spherescript> | |
− | + | // | |
− | + | // Lord British's Castle from the default script pack. | |
− | + | // | |
− | + | [AREADEF a_lord_britishs_castle_1] | |
− | + | EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass | |
− | + | NAME=Lord British's Castle | |
− | + | GROUP=Britain | |
− | + | FLAGS=0648e | |
− | + | P=1392,1625,30,0 | |
− | + | RECT=1294,1679,1411,1697,0 | |
− | + | RECT=1295,1559,1313,1577,0 | |
− | + | RECT=1392,1559,1410,1577,0 | |
+ | RECT=1302,1577,1410,1680,0 | ||
+ | RECT=1313,1563,1392,1577,0 | ||
+ | EVENTS=r_brit_castle | ||
+ | TAG.GUARDOWNER=Lord British's Personal | ||
+ | </spherescript> | ||
[[Category: Reference Compendium]] | [[Category: Reference Compendium]] | ||
− | [[Category: | + | [[Category: Definitions]] |
Latest revision as of 21:35, 26 November 2010
Missing languages
Areas in the world, such as dungeons and cities are defined by regions. Regions are constructed from one or more "rectangles" on the map.
The basic syntax for definining a region is as follows:
[AREADEF defname]
RECT=left, top, right, bottom, map
RECT=left, top, right, bottom, map
RECT=left, top, right, bottom, map
Contents
Properties
Within the region definition the following properties are also available to customise the behaviour of the area.
Name | Read/Write | Description |
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 and ships in the region. |
EVENTS regiontype_defname | W | Adds a region event to 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 | RW | Gets or sets whether or not guards can be called within the region. |
MAGIC | RW | Gets or sets whether or not there is an anti-magic field in the region. |
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 left, top, right, bottom, map | W | Adds a rectangle to the region definition. |
RESOURCES regiontype_defname | W | Adds a region event to 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. |
UNDERGROUND | RW | Gets or sets whether or not the region is considered to be underground. |
Examples
// // The world region from the default script pack. // [AREADEF a_world] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Felucca GROUP=ALLMAP P=1323,1624,55,0 RECT=0,0,7168,4096,0
// // Lord British's Castle from the default script pack. // [AREADEF a_lord_britishs_castle_1] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Lord British's Castle GROUP=Britain FLAGS=0648e P=1392,1625,30,0 RECT=1294,1679,1411,1697,0 RECT=1295,1559,1313,1577,0 RECT=1392,1559,1410,1577,0 RECT=1302,1577,1410,1680,0 RECT=1313,1563,1392,1577,0 EVENTS=r_brit_castle TAG.GUARDOWNER=Lord British's Personal