-
Notifications
You must be signed in to change notification settings - Fork 0
Sectors
FORCETOC The world is split into fixed-size sectors (by default, 64x64 tiles). Environmental settings (light, weather, etc) are stored on a per-sector basis. Accessing sectors in scripts can be accomplished using the SECTOR reference from a Characters, Items or Map_Points object. The following table details the various properties of the sector object in SphereServer:
Here is a list of all sector properties and functions. If a function is marked as readable then it can return a value when used as . Click on the name for more detailed information such as usage and examples.
| Name | Read/Write | Description | | - | | ALLCHARS command | R | Executes command on all characters inside the sector. | | - | | ALLCHARSIDLE command | R | Executes command on all disconnected characters inside the sector. | | - | | ALLCLIENTS command | R | Executes command on all clients inside the sector. | | - | | ALLITEMS command | R | Executes command on all items inside the sector. | | - | | CANSLEEP | R | Returns 1 if the sector have all condition to sleep. (X ONLY) | | - | | CLIENTS | R | Gets the number of clients in the sector. | | - | | COLDCHANCE | RW | Gets or sets the chance of snow for the sector. | | - | | COMPLEXITY | R | Gets the number of characters in the sector. | | - | | COMPLEXITY.HIGH | R | Returns 1 if the sector has a high complexity. (less than 5 characters) | | - | | COMPLEXITY.MEDIUM | R | Returns 1 if the sector has a medium complexity. (less than 10 characters) | | - | | COMPLEXITY.LOW | R | Returns 1 if the sector has a low complexity. (10+ characters) | | - | | DRY | W | Sets the weather to dry. | | - | | ISDARK | R | Returns 1 if the light level in the sector is considered to be dark. | | - | | ISNIGHTTIME | R | Returns 1 if the local time of day is between 9pm and 7am. | | - | | ISSLEEPING | R | Returns 1 if the sector is sleeping. (X ONLY) | | - | | ITEMCOUNT | R | Returns the number of items in the sector. | | - | | LIGHT | RW | Gets or sets the light level for the sector. | | - | | LOCALTIME | R | Gets the local time of day, as a descriptive string. | | - | | LOCALTOD | R | Gets the local time of day, in minutes. | | - | | NUMBER | R | Gets the index number of the sector. | | - | | RAIN | W | Sets the weather to raining. | | - | | RAINCHANCE | RW | Gets or sets the chance of rain for the sector. | | - | | RESPAWN ALL | W | Resurrects dead NPC characters (not corpses). If ALL is provided then all sectors will be affected. | | - | | RESTOCK ALL | W | Restocks all NPCs in the sector. If ALL is provided then all sectors will be affected. | | - | | SEASON | RW | Gets or sets the current season in the sector. | | - | | SNOW | W | Sets the weather to snowing. | | - | | WEATHER | RW | Gets or sets the current weather in the sector. |