From 7580593b6c5d8bcb63befb0027609255ab255ef6 Mon Sep 17 00:00:00 2001 From: gumi Date: Wed, 29 Mar 2017 14:52:49 -0400 Subject: add getunits() buildin --- doc/script_commands.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 581ec182c..e209b0e56 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3229,6 +3229,40 @@ Notice that NPC objects disabled with disablenpc() will still be located. --------------------------------------- +*getunits(, , , ""{, , , , }) + +This function searches a whole map or area for units and adds their GID to +the provided array. It filters units by and stops searching +after units have been found. Set to false (0) if you wish to +disable the limit altogether. + +Type is the type of unit to search for: + + BL_PC - Character object + BL_MOB - Monster object + BL_PET - Pet object + BL_HOM - Homunculus object + BL_MER - Mercenary object + BL_IEM - Item object (item drops) + BL_SKILL - Skill object (skill fx & sfx) + BL_NPC - NPC object + BL_CHAT - Chat object + BL_ELEM - Elemental object + BL_CHAR - Shorthand for (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM) + BL_ALL - Any kind of object + +** Do NOT use UNITTYPE_ constants here, they have different values. + +Example: + + .@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera"); + +The above example would search the map "prontera" for all PC and NPC units and +add them to the .@units array, while setting .@count to the amount of units +added to the array (useful in for() loops). + +--------------------------------------- + *getgmlevel() This function will return the (GM) level of player group the account to -- cgit v1.2.3-60-g2f50