| 
 | 
 
--- smy_pfm: yun taiji;wield sword;perform sword.lian;perform sword.sanhuan;perform cuff.an;jiali 1; 
-- npcid: perform target id sanfeng 
-- return: yun taiji;wield sword;perform sword.lian sanfeng;perform sword.sanhuan sanfeng;perform cuff.an sanfeng;jiali 1; 
function insertNPCID(smy_pfm,npcid)   
--print(smy_pfm) 
--print(npcid) 
        local l_smy_pfm = '' 
        local l_smy_pmfs=utils.split(smy_pfm,';') 
        local l_index 
        local l_pfm 
        for _,l_pfm in pairs(l_smy_pmfs) do 
--                        print('l_pfm is :'..l_pfm) 
                        l_index = string.find(l_pfm, "perform")  
                        if l_index~=nil then 
                                l_pfm = l_pfm..' '..npcid 
                        end 
                        l_smy_pfm=l_smy_pfm..l_pfm..';' 
        end 
        l_smy_pfm = string.sub(l_smy_pfm,1,string.len(l_smy_pfm)-1) 
--        print('insertNPCID return is :'..l_smy_pfm) 
        return l_smy_pfm 
end 
 |   
 
 
 
 |