SergOz, FindNextObject уже можно не использовать, UN:U команда была исправлена и дополнена.
Code:
[+] Improved UN:U command. It does not raise error if no more objects are found, but sets x-coordinate to -1 instead. Thus no premature
objects counting is required. A new syntax with 6 parameters was added to allow using arbitrary integer variables instead of v-variables.
!!UN:U(objectType)/(objectSubtype)/(direction like -1/-2 or object index)/(x)/(y)/(z).
Example:
; Let's traverse through all map monsters, doubling their quantity
!#VA(x:y) (y:y) (z:y); define variables to store object coordinates
!!VR(x):S-1; setting x-coordinate to -1 will force to start search from scratch
!!re i; endless loop
!!UN:U(OBJ_MONSTER)/(ANY_OBJ)/-1/(x)/(y)/(z); find next monster, (x) = -1 on failure
!!br&(x)<0:; exit loop if nothing found
!!MO(x)/(y)/(z):Gd*2; double monsters quantity
!!en:;
daemon_n,
Самый оптимизированный вариант по скорости и качеству:
SergOz, если работает без ":", то можно и не ставить.