--------------------------------------------------------------------左戒指---------------------------------------------------------------------------------
--左戒指--穿戴触发---前
function takeonbefore8(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
if itemname == "【噬魂】王之孤影" then
Player.sendmsgEx(actor, "提示#251|:#255|装备|【噬魂】王之孤影#249|,只能穿戴在|右手#249|位置...")
return false
end
if itemname == "★★星魂永燃★★" then
local attr = getbaseinfo(actor, 51, 30)
if attr < 15 then
Player.sendmsgEx(actor, "★★星魂永燃★★#251|:#255|人物体力增加元素|低于15%#249|,穿戴失败...")
return false
end
end
end
--左戒指--穿戴触发---后
function takeon8(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
-- 三魂四魄「元素」 穿戴时随机获得[1%-5%]的体力元素
if itemname == "三魂四魄「元素」" then
local addvar = getnewitemaddvalue(itemobj, 0)
if addvar == 0 then
local num1 = math.random(1, 5)
local num2 = math.random(1, 5)
local num3 = math.random(1, 5)
local num4 = math.random(1, 5)
local num5 = math.random(1, 5)
local num6 = math.random(1, 5)
setnewitemvalue(actor, 8, 0, "+", num1, itemobj)
setnewitemvalue(actor, 8, 1, "+", num2, itemobj)
setnewitemvalue(actor, 8, 2, "+", num3, itemobj)
setnewitemvalue(actor, 8, 3, "+", num4, itemobj)
setnewitemvalue(actor, 8, 7, "+", num5, itemobj)
setnewitemvalue(actor, 8, 8, "+", num6, itemobj)
end
end
if itemname == "终结者" then
addbuff(actor, 31062)
end
end
--左戒指-- 脱装备触发---后
function takeoff8(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
if itemname == "终结者" then
FkfDelBuff(actor, 31062)
end
end