local function MagicBuff_1222_C(ActName,TagName,play,_id)
for i,k in pairs(MagicBuff_1222_C_t) do
local r=SETBUFF_C(ActName,k,1)
if r==1 then
local ts=""
local npay = function() if TagName:getRace()==66 then return s.obj.getPlayer(TagName:getMasterName()) else return TagName end end
local ppos=s.share.getRandom(0,29)
local p_itema = TagName:getUseItem(ppos)
if p_itema then
ts=ts.."["..p_itema:getName().."]"
TagName:takeOffItem(ppos)
end
if ts~="" then
s.obj.addMapEffectEvent(ActName:getMap(),ActName:getX(),ActName:getY(),0,26,100,0,1)
play:sendCenterMsg(253,0,ActName:getCharName().."的触发诅咒BUFF,将对方"..ts.."打入背包!~",1, 3, 3)
npay():sendCenterMsg(150,220,"注意:您被对方BUFF击中\\"..ts.." 被打入背包!",0, 3, 3)
end
end
end
end
function on_DoSpellSkill(Actor, TagActor, MagicID)
local actorname = Actor:getCharName()
local TagActorName = TagActor:getCharName()
MagicBuff_a(Actor,TagActor,MagicID,1,0) --调用技能BUFF
end
{bf=function(a,b,c,d) if b:getRace()==0 or b:getRace()==66 then MagicBuff_1222_C(a,b,c,d) end end},这里打开就报错
来个LUA 技术解决 有偿
补充内容 (2022-11-17 13:50):
能解决的 留下联系方式 ,谢谢
补充内容 (2022-11-17 17:56):
2022-11-17 17:57:37 {221031} [string "D:\Mirserver1\Mir200\LuaScripts\System\Jl_MagicBuff.lua"]:241: attempt to call a nil value (global 'SETBUFF_C_t')
stack traceback:
[string "D:\Mirserver1\Mir200\LuaScripts\System\Jl_MagicBuff.lua"]:241: in upvalue 'MagicBuff_1222_C'
[string "D:\Mirserver1\Mir200\LuaScripts\System\Jl_MagicBuff.lua"]:474: in field 'bf'
[string "D:\Mirserver1\Mir200\LuaScripts\System\Jl_MagicBuff.lua"]:490: in local 'SET_MGBUFF'
[string "D:\Mirserver1\Mir200\LuaScripts\System\Jl_MagicBuff.lua"]:494: in function 'MagicBuff_a'
[string "D:\Mirserver1\Mir200\LuaScripts\System\BindEvent.lua"]:316: in function 'on_DoSpellSkill' |