-------------------------------------------------------------------右戒指---------------------------------------------------------------------------------
--右戒指--穿戴触发---前
function takeonbefore7(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 takeon7(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
if itemname == "【噬魂】王之孤影" then
local _table = json2tbl(getcustomitemprogressbar(actor, itemobj, 0)) --获取第一条进度条信息
if _table.open == 0 then --判断第一条进度条是否开启
local tbl1 = {
["open"] = 1,
["show"] = 2,
["name"] = "噬魂之力",
["color"] = 253,
["imgcount"] = 1,
["cur"] = 0,
["max"] = 100,
["level"] = 1,
}
local tbl2 = {
["open"] = 1,
["show"] = 2,
["name"] = "噬魂倍攻",
["color"] = 253,
["imgcount"] = 1,
["cur"] = 0,
["max"] = 10,
["level"] = 1,
}
setcustomitemprogressbar(actor, itemobj, 0, tbl2json(tbl1))
setcustomitemprogressbar(actor, itemobj, 1, tbl2json(tbl2))
refreshitem(actor, itemobj)
end
end
if itemname == "终结者" then
addbuff(actor, 31062)
end
end
function takeoff7(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
if itemname == "终结者" then
FkfDelBuff(actor, 31062)
end
end