--时装头盔穿戴触发---后
function takeon26(actor, itemobj)
local itemname = getconst(actor, "<$SRIGHTHAND>")
if not itemname then return end
if itemname == "古核武·变异基因体" then
local usenum = getitemaddvalue(actor, itemobj, 2, 19, nil) --获取信息
if usenum == 0 then --已经使用但是未消失的装备
local color = { 254, 242, 249, 116, 251 }
local number = { "①", "②", "③", "④", "⑤" }
local attnum = math.random(1, 5)
changeitemname(actor, 26, "古核武·变异基因体[变异" .. number[attnum] .. "]") --修改装备显示名字
changeitemnamecolor(actor, itemobj, color[attnum]) --修改装备名字颜色
setitemaddvalue(actor, itemobj, 2, 19, attnum) --设置装备标记次数13(死亡等于=10时 装备消失)
elseif usenum == 1 then --攻击增加10%上限
addbuff(actor, 30096)
elseif usenum == 2 then --全技能冷却CD-2秒
setskilldeccd(actor, "烈火剑法", "-", 2)
setskilldeccd(actor, "开天斩", "-", 2)
setskilldeccd(actor, "逐日剑法", "-", 2)
elseif usenum == 3 then --人物体型增大增加10%体力
addbuff(actor, 30097)
end
end
if itemname == "苦修者的秘籍" then
local usenum = getitemaddvalue(actor, itemobj, 2, 19, nil) --获取信息
if usenum <= 10 and usenum ~= 0 then --已经使用但是未消失的装备
return
elseif usenum == 0 then --第一次穿戴
changeitemname(actor, 26, "苦修者的秘籍[可使用:3次]") --修改装备显示名字
changeitemnamecolor(actor, itemobj, 70) --修改装备名字颜色
setitemaddvalue(actor, itemobj, 2, 19, 13) --设置装备标记次数13(死亡等于=10时 装备消失)
end
if Player.Checkskill(actor, "魔法盾") then
local magiclvevl = getskillinfo(actor, 31, 1)
setskillinfo(actor, 31, 1, magiclvevl + 1)
end
end
if itemname == "暗黑之神宝藏" then
local bool = Player.progressbarEX(actor, itemobj, 0, "open", "查询")
if not bool then
local tbl = {
["open"] = 1, --/0-关闭,1-打开
["show"] = 2, --//0-不显示数值,1-百分比,2-数字
["name"] = "暗黑之魂:", --//进度条文本
["color"] = 250, --//进度条颜色,0~255
["imgcount"] = 1, --//图片张数,填1即可
["cur"] = 0, --//当前值
["max"] = 666, --//最大值
["level"] = 0, --//级别(0~65535)
}
setcustomitemprogressbar(actor, itemobj, 0, tbl2json(tbl))
refreshitem(actor, itemobj)
end
end
end
--时装头盔穿戴触发---后
function takeoff26(actor, itemobj)
local itemname = getiteminfo(actor, itemobj, 7)
if not itemname then return end
if itemname == "古核武·变异基因体" then
local usenum = getitemaddvalue(actor, itemobj, 2, 19, nil) --获取信息
if usenum == 1 then --攻击增加10%上限
FkfDelBuff(actor, 30096)
elseif usenum == 2 then --全技能冷却CD-2秒
setskilldeccd(actor, "烈火剑法", "+", 2)
setskilldeccd(actor, "开天斩", "+", 2)
setskilldeccd(actor, "逐日剑法", "+", 2)
elseif usenum == 3 then --人物体型增大增加10%体力
FkfDelBuff(actor, 30097)
end
end
end