Env方法扩展GetNpcName本页总览GetNpcName获取NPC名字实例:LuaJson触发器function (runner,env) -- env:GetNpcName(NpcID) return env:GetNpcName(1000)end[ { "id":"测试触发器", "type":"交谈", "condition":"roleBindID==609 && GetNpcName(roleBindID) == \"主角\"", "triggerEvent":"测试1" }]参数参数类型描述选项NpcIDIntegerNPCID必填返回值String返回NPC名字,如果找不到或者输入错都返回空字符串