diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/constants.md | 16 | ||||
-rw-r--r-- | doc/script_commands.txt | 39 |
2 files changed, 49 insertions, 6 deletions
diff --git a/doc/constants.md b/doc/constants.md index 60ba6908d..98c22bb3e 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -358,7 +358,8 @@ - `mf_reset`: 52 - `mf_notomb`: 53 - `mf_nocashshop`: 54 -- `mf_noviewid`: 55 +- `mf_noautoloot`: 55 +- `mf_noviewid`: 56 ### Cell Properties @@ -4004,6 +4005,11 @@ - `DATATYPE_VAR`: 4096 - `DATATYPE_LABEL`: 8192 +### Logmes types + +- `LOGMES_NPC`: 0 +- `LOGMES_ATCOMMAND`: 1 + ### Item Subtypes (Weapon types) - `W_FIST`: 0 @@ -4059,6 +4065,14 @@ - `DRESSROOM_OPEN`: 1 - `DRESSROOM_CLOSE`: 0 +### getmapinfo options + +- `MAPINFO_NAME`: 0 +- `MAPINFO_ID`: 1 +- `MAPINFO_SIZE_X`: 2 +- `MAPINFO_SIZE_Y`: 3 +- `MAPINFO_ZONE`: 4 + ### Renewal - `RENEWAL`: 1 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 43616fddd..b5718a55e 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3306,6 +3306,27 @@ Notice that NPC objects disabled with disablenpc() will still be located. --------------------------------------- +*getmapinfo(<info>{, "<map name>"}) +*getmapinfo(<info>{, <map id>}) + +This command returns various information about a specific map. If the second +argument is omitted, it will try to use the map of the attached NPC, or the +map of the attached player if the NPC can't be found. + +Valid <info> are: + MAPINFO_NAME name of the map + MAPINFO_ID numeric ID of the map + MAPINFO_ZONE name of the zone used by the map + MAPINFO_SIZE_X width of the map (cells on the x axis) + MAPINFO_SIZE_Y height of the map (cells on the y axis) + +Examples: + getmapinfo(MAPINFO_ID, "map name"); // ID from name + getmapinfo(MAPINFO_NAME, 3); // name from ID + getmapinfo(MAPINFO_ZONE); // zone, ie Normal, PvP, Jail, ... + +--------------------------------------- + *getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>}) This function searches a whole map or area for units and adds their GID to @@ -7507,13 +7528,21 @@ window). It will not be displayed anywhere else. debugmes("\033[38D\033[K ==Message== \n"); // enable colour code. --------------------------------------- -*logmes("<message>") +*logmes("<message>"{, <log type>}) + +This command will write the message given to the map server log files, as +specified in 'conf/map/logs.conf'. If SQL logging is enabled, the message will +go to the specified log table. If logs are not enabled, nothing will happen. + +Log types are: -This command will write the message given to the map server NPC log file, -as specified in 'conf/map/logs.conf'. If SQL logging is enabled, the message -will go to the 'npclog' table. +LOGMES_NPC - log to the 'npclog' table (Default) +LOGMES_ATCOMMAND - log to the 'atcommandlog' table + +Example: -If logs are not enabled for NPCs, nothing will happen. + logmes("foobar"); + logmes("foobar", LOGMES_ATCOMMAND); --------------------------------------- |