--NPC点击触发
local clickNpcCSD = include("QuestDiary/cfgcsv/cfg_ChuanSongDian.lua")
--NPC点击声音
local cfg_NpcDianJiShengYin = include("QuestDiary/cfgcsv/cfg_NpcDianJiShengYin.lua")
function clicknpc(actor, npcid)
local npcobj = getnpcbyindex(npcid)
GameEvent.push(EventCfg.onClicknpc, actor, npcid, npcobj)
--魔法试炼完成检测
if npcid == 3305 then
local bool1 = getflagstatus(actor, VarCfg["F_神语的试炼_无尽愤怒"])
local bool2 = getflagstatus(actor, VarCfg["F_神语的试炼_血魔护臂MAX"])
if bool1 == 0 or bool2 == 0 then
messagebox(actor, "神语的试炼未完成,无法进入!")
return
end
elseif npcid == 804 then
if not checktitle(actor, "圣人之资") then
messagebox(actor, "你没有获得[圣人之资],无法进入!")
return
end
local mapID = "圣人阁"
FMapMoveEx(actor, mapID, 45, 30, 0)
end
-- Player.sendmsgEx(actor, npcid)
if npcid > 2999 then
local cfg = clickNpcCSD[npcid]
if cfg then
mapmove(actor, cfg.mapid, cfg.x, cfg.y, cfg.range)
end
end
--播放声音
local shengYinCfg = cfg_NpcDianJiShengYin[npcid]
if shengYinCfg then
playsound(actor, shengYinCfg.soundId, 1, 0)
end
end