Core.aslx defines various “scope” functions. Each of these will return an object list (possible empty). Scope functions that end “ForRoom” must be given a room as a parameter (other functions will default to the current room).
Exits
- ScopeExits Exits that the player can use from the current location, i.e., all visible exits for this room, whether locked or not.
- ScopeExitsForRoom
- ScopeUnlockedExitsForRoom From Quest 5.7.
- AllExits All exits in the game.
Commands
- ScopeCommands Gets a list of all global commands and all the lists for the current room.
- AllCommands All commands in the game.
Reachable Objects
Quest makes a distinction between objects a player can reach and objects the player can see. Obviously with most objects, the player can do both, but this can be important in some situations.
Objects in a container are considered reachable if the container is open. If an item’s visible attribute is not set (i.e., it is false), or if the room is dark and the object is not a light source, then the object is not reachable.
- ScopeReachableInventory Items carried that are also reachable.
- ScopeReachable All objects in this scope can be interacted with directly by the player, items in the current room or in the inventory that are reachable.
- ScopeReachableForRoom All objects in the room that are reachable by the player. If this is the current room, then it will include items in the inventory that are reachable.
- ScopeReachableNotHeld These objects are in the current room and can be interacted with, but they’re not in the player’s inventory.
- ScopeReachableNotHeldForRoom
Visible Objects
Objects in a container are considered visible if it is either open or transparent (or both). If an item’s visible attribute is not set (i.e., it is false), or if the room is dark and the object is not a light source, then the object is not visible.
- ScopeInventory All the visible objects the player is carrying. Used to populate the “Inventory” list, and the list of objects returned by the “inventory” command.
- ScopeVisible Any carried items and items in the room that are visible.
- ScopeVisibleForRoom All objects in the room that are visible by the player. If this is the current room, then it will include items in the inventory that are visible.
- ScopeVisibleNotHeld This is everything visible in the current room.
- ScopeVisibleNotHeldForRoom
- ScopeVisibleNotHeldNotScenery As
ScopeVisibleNotHeld, but excludes items tagged as scenery. - ScopeVisibleNotHeldNotSceneryForRoom
- ScopeVisibleNotReachable All objects in this scope are visible but not reachable.
- ScopeVisibleNotReachableForRoom
Rooms
As of Quest 5.8, you can get a list of rooms (more specifically, objects with “isroom” set to true).
Others
- AllObjects All the objects (i.e., including rooms) in the game.