diff options
author | Haru <haru@dotalux.com> | 2018-05-29 03:53:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-29 03:53:39 +0200 |
commit | fc175850efdb4dd258dd8bbab4b01be8f1c327fa (patch) | |
tree | 7dcdb2107adcc16a1ddd1d9b2b8199d2a10d7106 /doc | |
parent | 6d50cfd839d45cb2c224d180c11a80324dc4a6f2 (diff) | |
parent | 769e1115ae1dbf41ff213e76d4cf28576e9e8129 (diff) | |
download | hercules-fc175850efdb4dd258dd8bbab4b01be8f1c327fa.tar.gz hercules-fc175850efdb4dd258dd8bbab4b01be8f1c327fa.tar.bz2 hercules-fc175850efdb4dd258dd8bbab4b01be8f1c327fa.tar.xz hercules-fc175850efdb4dd258dd8bbab4b01be8f1c327fa.zip |
Merge pull request #1851 from mekolat/getunits2
Allow global unit lookups from scripts
Diffstat (limited to 'doc')
-rw-r--r-- | doc/script_commands.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index aa0fea31c..eb0f2a78a 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3357,12 +3357,13 @@ Examples: --------------------------------------- -*getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>}) +*getunits(<type>, <variable>, <limit>{, "<map>"{, <x1>, <y1>, <x2>, <y2>}}) This function searches a whole map or area for units and adds their GID to the provided <variable> array. It filters units by <type> and stops searching after <limit> units have been found. Set <limit> to false (0) if you wish to -disable the limit altogether. +disable the limit altogether. If <map> is omitted, this command will search +on the whole server (slow). Returns the number of units added to the array. Type is the type of unit to search for: @@ -3381,6 +3382,10 @@ Type is the type of unit to search for: ** Do NOT use UNITTYPE_ constants here, they have different values. +** If battle_config.dynamic_mobs is enabled and no player has entered the map + yet, the mobs will not have spawned in the map yet, so getunits() will be + unable to find them when searching for BL_MOB. + Example: .@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera"); @@ -10007,4 +10012,4 @@ the available flags are: P_AIRSHIP_ITEM_NOT_ENOUGH P_AIRSHIP_ITEM_INVALID ----------------------------------------
\ No newline at end of file +--------------------------------------- |