if key == 78 then
BeginEvent( sceneId )
AddText( sceneId, " 使用紫金石、紫金砂可以对7-9星装备进行重铸,请将装备放在背包第一个格子里面!#r#G点击立即重铸,不会二次确认是否替换属性哦,慎重点击重铸!#r[武器、重楼等固定资质装备不支持]#r[不仅要鉴定装备还要鉴定资质哦,不要忘记。]" )
AddNumText( sceneId, x001069_g_ScriptId, "#G立即重铸[谨慎]", 7, 79)
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end
if key == 79 then
local EquipPoint = LuaFnGetBagEquipType( sceneId, selfId, 0 )
if EquipPoint == 0 or EquipPoint == 18 or EquipPoint == 9 or EquipPoint == 21 or EquipPoint == 10 or EquipPoint == 17 then--#H无法对武器进行扩展属性重铸。
x001069_NotifyTip(sceneId,selfId,"#{ZBCZ_140618_18}") --#H无法对武器、龙纹、武魂、暗器、令牌、侠印进行扩展属性重铸。
return
end
local nQual = LuaFnGetItemQual(sceneId,selfId,0)
local nEquipLevel = GetBagItemLevel(sceneId,selfId,0)
if nQual < 7 or nEquipLevel < 80 then
x001069_NotifyTip(sceneId,selfId,"#{ZBCZ_140618_19}") --#H仅可对装备等级达到80级,且装备星级为7星到9星的手工装备进行扩展属性重铸。
return
end
local ret_judge = LuaFnIsJudgeApt( sceneId, selfId, 0 )
if ret_judge ~= 1 then
x001069_NotifyTip(sceneId,selfId,"#H该装备尚未鉴定,请[鉴定装备]并[鉴定资质]后再来进行扩展属性重铸。")
return
end
local index = 1
if nQual == 7 then
index = 1
elseif nQual >= 8 then
index = 2
end
local needItem = 0
local nRet = 0
if index == 1 then
--获取拥有的数量
needItem = LuaFnMtl_GetCostNum(sceneId,selfId,38000953,38000954,38000955)
if needItem < 1 then
x001069_NotifyTip(sceneId,selfId,format("#H缺少道具#{ITEM_%d}或者背包中的#{ITEM_%d}已加锁!",38000953,38000953))
return
end
nRet = LuaFnMtl_CostMaterial(sceneId,selfId,1,38000953,38000954,38000955)
--扣除失败给提示
if nRet ~= 1 then
BeginEvent( sceneId )
AddText( sceneId, format("#H缺少道具#{ITEM_%d}或者背包中的#{ITEM_%d}已加锁!",38000953,38000953) ) --材料不足,需要20个寒冰星屑才能兑换。
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
return
end
end
if index == 2 then
--获取拥有的数量
needItem = LuaFnMtl_GetCostNum(sceneId,selfId,38000956,38000957,38000958)
if needItem < 1 then
x001069_NotifyTip(sceneId,selfId,format("#H缺少道具#{ITEM_%d}或者背包中的#{ITEM_%d}已加锁!",38000956,38000956))
return
end
nRet = LuaFnMtl_CostMaterial(sceneId,selfId,1,38000956,38000957,38000958)
--扣除失败给提示
if nRet ~= 1 then
BeginEvent( sceneId )
AddText( sceneId, format("#H缺少道具#{ITEM_%d}或者背包中的#{ITEM_%d}已加锁!",38000953,38000953) ) --材料不足,需要20个寒冰星屑才能兑换。
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
return
end
end
if index ~= 1 and index ~= 2 then
x001069_NotifyTip(sceneId,selfId,"重洗功能正在维护,请联系雪舞。ERROECODE:"..index)
return
end
LuaFnRewashEquipAttr(sceneId,selfId,0)
x001069_NotifyTip( sceneId, selfId, "重铸属性成功" )
end