Difference between revisions of "ROOMDEF"
From SphereWiki
MrSugarCube (talk | contribs) |
MrSugarCube (talk | contribs) |
||
| Line 1: | Line 1: | ||
__FORCETOC__ | __FORCETOC__ | ||
| − | Within [[Regions||regions]] you can also define rooms, which are basically 'sub-regions' that exist inside the area which may represent buildings within a town or a boss room within a dungeon. | + | Within [[Regions||regions]] you can also define rooms, which are basically 'sub-regions' that exist inside the area which may represent buildings within a town or a boss room within a dungeon. Rooms are almost identical to regions, except they cannot possess triggers, events or tags. |
| − | ==Properties | + | |
| − | + | The syntax for defining a room is as follows: | |
| + | |||
| + | |||
| + | <tt> | ||
| + | [ROOMDEF ''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== | ||
| + | Within the room 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 room. | | [[ANNOUNCE]] || RW || Gets or sets whether or not there will be an announcement when someone enters or exits the room. | ||
| Line 15: | Line 25: | ||
|- | |- | ||
| [[BUILDABLE]] || RW || Gets or sets whether or not players can place buildings in the room. | | [[BUILDABLE]] || RW || Gets or sets whether or not players can place buildings in the room. | ||
| − | |||
| − | |||
|- | |- | ||
| [[FLAGS]] || RW || Gets or sets the room's attributes. | | [[FLAGS]] || RW || Gets or sets the room's attributes. | ||
| Line 24: | Line 32: | ||
| [[GROUP]] || RW || Gets or sets a group name for the room. | | [[GROUP]] || RW || Gets or sets a group name for the room. | ||
|- | |- | ||
| − | | [[GUARDED]] || RW | Gets or sets whether or not guards can be called within the room. | + | | [[GUARDED]] || RW || Gets or sets whether or not guards can be called within the room. |
|- | |- | ||
| [[MAGIC]] || RW || Gets or sets whether or not there is an anti-magic field in the room. | | [[MAGIC]] || RW || Gets or sets whether or not there is an anti-magic field in the room. | ||
| − | |||
| − | |||
|- | |- | ||
| [[MARK]] || RW || Gets or sets whether or not casting the mark spell is allowed in the room. | | [[MARK]] || RW || Gets or sets whether or not casting the mark spell is allowed in the room. | ||
| Line 47: | Line 53: | ||
|- | |- | ||
| [[RECALLOUT]] || RW || Gets or sets whether players can recall out of the room. | | [[RECALLOUT]] || RW || Gets or sets whether players can recall out of the room. | ||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| [[SAFE]] || RW || Gets or sets whether or not the room is a safe zone. | | [[SAFE]] || RW || Gets or sets whether or not the room is a safe zone. | ||
| − | |||
| − | |||
|- | |- | ||
| [[UNDERGROUND]] || RW || Gets or sets whether or not the room is considered to be underground. | | [[UNDERGROUND]] || RW || Gets or sets whether or not the room is considered to be underground. | ||
|} | |} | ||
| + | |||
| + | |||
| + | ==Examples== | ||
| + | |||
| + | <spherescript> | ||
| + | // | ||
| + | // A House in Minoc, from the default script pack. | ||
| + | // | ||
| + | [ROOMDEF a_house_1] | ||
| + | EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass | ||
| + | NAME=House | ||
| + | GROUP=Minoc | ||
| + | FLAGS=04000 | ||
| + | P=2484,472,0,0 | ||
| + | RECT=2479,463,2489,481,0 | ||
| + | RECT=2489,471,2497,481,0 | ||
| + | </spherescript> | ||
| + | |||
| + | <spherescript> | ||
| + | // | ||
| + | // A Secret Cave, from the default script pack. | ||
| + | // | ||
| + | [ROOMDEF a_secret_cave_1] | ||
| + | EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass | ||
| + | NAME=Secret Cave | ||
| + | GROUP=Hidden Valley | ||
| + | P=1653,2967,0,0 | ||
| + | RECT=1648,2957,1658,2977,0 | ||
| + | </spherescript> | ||
[[Category: Reference Compendium]] | [[Category: Reference Compendium]] | ||
| − | [[Category: | + | [[Category: Definitions]] |
Revision as of 22:12, 10 June 2009
Within |regions you can also define rooms, which are basically 'sub-regions' that exist inside the area which may represent buildings within a town or a boss room within a dungeon. Rooms are almost identical to regions, except they cannot possess triggers, events or tags.
The syntax for defining a room is as follows:
[ROOMDEF defname]
RECT=left, top, right, bottom, map
RECT=left, top, right, bottom, map
RECT=left, top, right, bottom, map
Contents
Properties
Within the room 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 room. |
| ARENA | RW | Gets or sets whether or not the room is considered to be an arena. |
| BUILDABLE | RW | Gets or sets whether or not players can place buildings in the room. |
| FLAGS | RW | Gets or sets the room's attributes. |
| GATE | RW | Gets or sets whether or not casting the gate travel spell is allowed in the room. |
| GROUP | RW | Gets or sets a group name for the room. |
| GUARDED | RW | Gets or sets whether or not guards can be called within the room. |
| MAGIC | RW | Gets or sets whether or not there is an anti-magic field in the room. |
| MARK | RW | Gets or sets whether or not casting the mark spell is allowed in the room. |
| NAME | RW | Gets or sets the name of the room. |
| NOBUILD | RW | Gets or sets whether or not players can place buildings in the room. |
| NODECAY | RW | Gets or sets whether or not items will decay in the room. |
| NOPVP | RW | Gets or sets whether or not PvP combat is allowed in the room. |
| P | RW | Gets or sets the location of the room (used when using the GO command). |
| RECALL | RW | Gets or sets whether or not casting the recall spell is allowed in the room. |
| RECALLIN | RW | Gets or sets whether or not it is possible to use the recall spell to enter the room. |
| RECALLOUT | RW | Gets or sets whether players can recall out of the room. |
| SAFE | RW | Gets or sets whether or not the room is a safe zone. |
| UNDERGROUND | RW | Gets or sets whether or not the room is considered to be underground. |
Examples
// // A House in Minoc, from the default script pack. // [ROOMDEF a_house_1] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=House GROUP=Minoc FLAGS=04000 P=2484,472,0,0 RECT=2479,463,2489,481,0 RECT=2489,471,2497,481,0
// // A Secret Cave, from the default script pack. // [ROOMDEF a_secret_cave_1] EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass NAME=Secret Cave GROUP=Hidden Valley P=1653,2967,0,0 RECT=1648,2957,1658,2977,0