summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index fb4c2530d..4909699c3 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3226,15 +3226,22 @@ let you enter.
---------------------------------------
-*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)
+*getareausers({"<map name>",}{<x1>,<y1>,<x2>,<y2>})
+*getareausers({"<map name>",}{<radius>})
This function will return the count of connected characters which are
-located within the specified area - an x1/y1-x2/y2 square - on the
-specified map.
+located within the specified area. Area can be x1/y1-x2/y2 square,
+or radius from npc position. If map name missing, used attached player map.
This is useful for maps that are split into many buildings, such as all
the "*_in" maps, due to all the shops and houses.
+Examples:
+ // return players in area npc area on current map.
+ .@num = getareausers();
+ // return players in square (1, 1) - (10, 10)
+ .@num = "players: " + getareausers(1, 1, 10, 10);
+
---------------------------------------
*getusersname;