Categories:
functions triggers variables
Functions: all  aff  other  char  array  room  obj  quest  int  string  

Room functions:

checkdt
doorflagged
exit
exitaffected
get_char_room_list
get_obj_list_room
get_rand_exit
get_zone_number
get_zone_tier
getpathroom
obj_to_room
objinroom
randroom
roomaffected
roomdesc
roomexists
roomflagged
roomname
roomoutside
roomsector
weather

checkdt
check dt in next room, argument is direction
Syntax:
(char) checkdt(string)

doorflagged
doorflagged(room_vnum, direction, spell_name)
Check if door from given room to given direction has given flag, i.e. "closed",
"locked", "hidden" etc
Return value is 1 if it does, 0 if not. If there is no door then returns 0,
check if exit is there at all with exit(dir) function.
Example: doorflagged(inroom(me), "north", "closed")
Syntax:
(int) doorflagged(int, str, str)

exit
return vnum of room that exit leads to, from another room if specified
Syntax:
(int) exit(string[, room])

exitaffected
exitaffected(room_vnum, direction, spell_name)
Check if exit from given room to given direction is affected by given spell
Return value is duration of the affect, 0 if not found
Example: exitaffected(inroom(me), "north", "firewall")
Syntax:
(int) exitaffected(int, str, str)

get_char_room_list
With single argument it returns array of chars in the given room.
With more arguments it creates array with all chars in given room in a variable
of the name as per the second argument and return their number.
When third parameter is entered, select only player in the same group as given char.
Syntax:
(char|array) get_char_room_list(int[, string[, char]])
Examples:
let num = get_char_room_list(3056, "chars") - return number of chars at high healer and create array "chars" with pointers on them
let arr = get_char_room_list(3056) - return array of all chars at high healer
let num = get_char_room_list(3056, "chard", fighting(me)) - returns only chars in group who fights me

get_obj_list_room
return array of objects in given room, if second parameter is entered, return objects only with given alias
Syntax:
(array) get_obj_list_room(int [, string])
Examples:
let objs = get_obj_list_room(3056) - get all items in room High Sanctuary
let objs = get_obj_list_room(3056, "ring") - get all items with alias ring from room High Sanctuary

get_rand_exit
returns random exit ("north", "south", ...), argument can be combined (separate by space) from: noground, nowater, noair, nodt, noabyss, noswamp, nochall, noclan, noclosedi, nonstandard, stayzone, nomob, nodoorclosed
when no exit exists returns ""
Syntax:
(string) get_rand_exit(string)

get_zone_number
return zone number
Syntax:
(int) get_zone_number(int)
Examples:
let num = get_zone_number(3056) - returns 30

get_zone_tier
return zone tier name
Syntax:
(string) get_zone_tier(int)
Examples:
let tier = get_zone_tier(30) - returns "Normal" -mid tier name

getpathroom
returns first room on the path to target room
Flags can be space-separated list of keywords to override default behavior:
"through_doors" (default to mob's passdoor ability),
"ignore_notrack" (default false)
and "through_secret" (default true). Prefix flag with "no" to reverse,
i.e. "nothrough_secret" to prevent tracking through secret exits.
Syntax:
(string) getpathroom(vnum[, flags])

obj_to_room
put object to room, return null when fail
Syntax:
(int) obj_to_room(obj, vnum)

objinroom
number of objects of specified vnum in same room (just on the ground!), if vnum is 0 it returns count of all objects on the ground
Syntax:
(int) objinroom(vnum)

randroom
return random room, argument can be combined (separate by space) from: noground, nowater, noair, nodt, noabyss, noswamp, nochall, noclan, noclosedi, nonstandard
Syntax:
(int) randroom(string)

roomaffected
Check if room is affected by given spell
Return value is duration of the affect, 0 if not found
Example: roomaffected(inroom(me), spell2int("sun burst"))
Syntax:
(int) roomaffected(int, int)

roomdesc
return or set room description of given room \n is replaced by newline
Syntax:
(string) roomdesc(vnum [, new_desc])
Examples:
roomdesc(inroom(me), "This is first line of new description\nThis is second\n")

roomexists
return true if room of this vnum exists, false if not
Syntax:
(string) roomexists(vnum)

roomflagged
check if room is flagged with given flag
Syntax:
(char) roomflagged(string[, int])

roomname
return or set name of given room
Syntax:
(string) roomname(vnum [, new_name])

roomoutside
returns 0 if inside, 1 if outside
Syntax:
(int) roomoutside(vnum)

roomsector
returns sector type of the given room
Syntax:
(int) roomsector(vnum [, new_sector])

weather
returns weather in target room, returns one of "cloudless", "cloudy", "rainy", "storm", "unknown"
Syntax:
(string) weather(vnum)