A
          / \      _             Play Now                         Nemesis on fb
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document Path: /doc/room/set_prop


Name: set_prop - set properties in rooms and other objects

Syntax:
	#include <room2.h>
	set_prop(mixed prop, mixed value)
	set_prop(mixed *props)

Description:
	The set_prop call sets either a single property or a multiple set of
	properties in a room. Each property has a a name and a value. If a
	single property is set (syntax 1), the name and the value is provided,
	if a set of properties is set (syntax 2) and array of even length,
	with the names and values is provided.

	Possible properties and values that can be set (as defined in 
	/include/room_defines.h):

	P_MAP         - The value is a map identifyer with the following
	                format: <map_name>[:<xpos>,<ypos>]. Valid map names
	                are defined in /include/map_defines.h. The xpos and
	                ypos may be ommitted.
	P_NO_FIGHT    - Disables fighting in this room. The value is either 1
	                (default message) or a string containing the message
	                which is displayed when a player tries to start a
	                fight.
	P_NO_MAGIC    - If this is 1 (default message) or a string (message),
	                players can't spell in the room.
	P_UNDER_WATER - This room is under water - no depth! ;-)
	P_AREA        - Defines the general area we are in. The value is a
	                string containing the area. This allows more richness
	                in Nemesis, like a ranger item working only in 
	                forests.
	                Though you may define your own area types, you should
	                prefer one of the standard types if appropriate:
	                "in water"	Swimming or at least wait deep in 
	                                water. Hard to use fire there.
	                "forest"	Wooded area. Lots of nature, but bad 
	                                sight.
	                "city"		City or village, something with houses,
	                		people and roads
	                "plain"		Flat, good sight.
	                "hill"		Hills, mountains and the valleys 
	                		between them.
	                "dungeon"	Artificial underground setting, 
	                		usually with chains, bones etc.
	                "cave"		Natural underground setting
	                "graveyard"	The preferred area for a necromancer.
	                
	                More will probably be defined...

Return value: 1

Examples:
	set_prop(P_MAP, "tharg:10,10");
	set_prop(P_MAP, "tharg");        // without positioning via '@'
	set_prop( ({ P_MAP, "tharg:10,10", P_NO_FIGHT, 1 }) );

See also:


This page was generated in LPC

Imprint / Impressum