取NPC数量

页面ID: 683

‘ 【取NPC数量】 只能取动态的NPC。也就是用脚本2007创建的NPC。需要用户对象。
‘ ——————-如: sys_getNpcNum name=哈哈
‘ —————————————参数1:条件表达式。
‘ ——————————返回值:始终成功。
‘ ——————————如果执行成功,可读取 %iter_var_str9 = NPC数量。

条件表达式支持如下,可以多个条件组合用空格隔开。opt符号仅支持=符号。 如:name=哈哈 type=2
name(NPC名字)、
type(NPC类型)、
id(NPCID)、
mapid(地图ID)、
posx(坐标x)、
posy(坐标Y)、
findname(在NPC名字中寻找findname指定的字符,如果存在表示条件成立)、
ownerid(NPC所有者ID)

示例

id id_next id_nextfail type data param
100000100 100000101 0 2003 0 sys_getNpcNum mapid=1000
100000101 0 0 126 0 %iter_var_str9