Kết quả 1 đến 7 của 7
Chủ đề: Lỗi Script khắc điêu văn
-
13-03-17, 02:40 PM #1
- Ngày tham gia
- Jul 2015
- Đang ở
- In the Hell
- Bài viết
- 183
- Thanks
- 55
- Thanked 21 Times in 20 Posts
Lỗi Script khắc điêu văn
Mình có cái script điêu văn của server 12 phái , nhưng sao mình lại khắc điêu văn vào không được , nó lại báo lỗi , bác nào xem giúp mình code script và sửa như thế nào help mình với , mình bị mù code .
PHP Code:--洛阳NPC
--燕青
--普通
--脚本号
x892107_g_ScriptId = 892107
x892107_g_equititemid = {}
x892107_g_JSnum = {2,9,50,87,165,284,811,2088,3570}
x892107_g_SkCyMfXyList = {10157033,10157034,10157035,10157036,10156126,10156127,10156128,10156129,10155002,10155003,10155007,10558949,10155008,10415055,10415056,10413102,10413104,10420088,10420089,10423024,10423025,10423026,10422016}
x892107_g_baibw = {8,16}
x892107_g_itempoint = {}
x892107_g_IsDiaowenPic = {30120001,30120002,30120003,30120004,30120005,30120006,30120007,30120008,30120009,30120010,30120011,30120012,30120013,30120014,30120015,30120016,30120017,30120018,30120019,30120020,30120021,30120022,30120023,30120024,30120025,30120026,30120027,30120028,30120029,30120030,30120031,30120032,30120033,30120034,30120035,30120036,30120037,30120038,30120039,30120040,30120041,30120042,30120043,30120044,30120045,30120046,30120047,30120048,30120049,30120050,30120051,30120052,30120053}
x892107_g_itempoint[0] = {7}
x892107_g_itempoint[1] = {6,11,12,13}
x892107_g_itempoint[2] = {4}
x892107_g_itempoint[3] = {5}
x892107_g_itempoint[4] = {0}
x892107_g_itempoint[5] = {0}
x892107_g_itempoint[6] = {0}
x892107_g_itempoint[7] = {0}
x892107_g_itempoint[8] = {0}
x892107_g_itempoint[9] = {0}
x892107_g_itempoint[10] = {0}
x892107_g_itempoint[11] = {0}
x892107_g_itempoint[12] = {1}
x892107_g_itempoint[13] = {1}
x892107_g_itempoint[14] = {1}
x892107_g_itempoint[15] = {1}
x892107_g_itempoint[16] = {1}
x892107_g_itempoint[17] = {2}
x892107_g_itempoint[18] = {2}
x892107_g_itempoint[19] = {3}
x892107_g_itempoint[20] = {3}
x892107_g_itempoint[21] = {14}
x892107_g_itempoint[22] = {14}
x892107_g_itempoint[23] = {14}
x892107_g_itempoint[24] = {14}
x892107_g_itempoint[25] = {15}
x892107_g_itempoint[26] = {15}
x892107_g_itempoint[27] = {17}
x892107_g_itempoint[28] = {10}
x892107_g_itempoint[29] = {18}
x892107_g_itempoint[30] = {10}
x892107_g_itempoint[31] = {10}
x892107_g_itempoint[32] = {10}
x892107_g_itempoint[33] = {10}
x892107_g_itempoint[34] = {18}
x892107_g_itempoint[35] = {18}
x892107_g_itempoint[36] = {18}
x892107_g_itempoint[37] = {18}
x892107_g_itempoint[38] = {7}
x892107_g_itempoint[39] = {7}
x892107_g_itempoint[40] = {7}
x892107_g_itempoint[41] = {7}
x892107_g_itempoint[42] = {7}
x892107_g_itempoint[43] = {7}
x892107_g_itempoint[44] = {7}
x892107_g_itempoint[45] = {9}
x892107_g_itempoint[46] = {7}
x892107_g_equititemid[0]={4,5,6,7,8,9,10,11}
x892107_g_equititemid[1]={12,13,14,15,16}
x892107_g_equititemid[2]={17,18}
x892107_g_equititemid[3]={19,20}
x892107_g_equititemid[4]={2}
x892107_g_equititemid[5]={3}
x892107_g_equititemid[6]={1}
x892107_g_equititemid[7]={38,39,40,41,42,43,44,0,46}
x892107_g_equititemid[9]={45}
x892107_g_equititemid[10]={28,30,31,32,33}
x892107_g_equititemid[11]={1}
x892107_g_equititemid[12]={1}
x892107_g_equititemid[13]={1}
x892107_g_equititemid[14]={21,22,23,24}
x892107_g_equititemid[15]={25,26}
x892107_g_equititemid[17]={27}
x892107_g_equititemid[18]={29,34,35,36,37}
x892107_g_ChaiChuitem = {}
x892107_g_ChaiChuitem[0]={30110004,30110005,30110006,30110007,30110008,30110009,30110010,30110011}
x892107_g_ChaiChuitem[1]={30110012,30110013,30110014,30110015,30110016}
x892107_g_ChaiChuitem[2]={30110017,30110018}
x892107_g_ChaiChuitem[3]={30110019,30110020}
x892107_g_ChaiChuitem[4]={30110002}
x892107_g_ChaiChuitem[5]={30110003}
x892107_g_ChaiChuitem[6]={30110001}
x892107_g_ChaiChuitem[7]={30110038,30110039,30110040,30110041,30110042,30110043,30110044,30110045,30110451,30110461,30110471,30110481}
x892107_g_ChaiChuitem[9]={30110491,30110501,30110511,30110521}
x892107_g_ChaiChuitem[10]={30110028,30110030,30110031,30110032,30110033}
x892107_g_ChaiChuitem[11]={30110001}
x892107_g_ChaiChuitem[12]={30110001}
x892107_g_ChaiChuitem[13]={30110001}
x892107_g_ChaiChuitem[14]={30110021,30110022,30110023,30110024}
x892107_g_ChaiChuitem[15]={30110025,30110026}
x892107_g_ChaiChuitem[17]={30110027}
x892107_g_ChaiChuitem[18]={30110029,30110034,30110035,30110036,30110037}
x892107_g_ChaiChuStr = {}
x892107_g_ChaiChuStr[0]={"冰攻","火攻","玄攻","毒攻","减冰抗","减火抗","减玄抗","减毒抗"}
x892107_g_ChaiChuStr[1]={"身法","冰抗","火抗","玄抗","毒抗"}
x892107_g_ChaiChuStr[2]={"体力","身法"}
x892107_g_ChaiChuStr[3]={"体力","身法"}
x892107_g_ChaiChuStr[4]={"体力"}
x892107_g_ChaiChuStr[5]={"体力"}
x892107_g_ChaiChuStr[6]={"身法"}
x892107_g_ChaiChuStr[7]={"冰攻","火攻","玄攻","毒攻","减冰抗","减火抗","减玄抗","减毒抗","忘无","冥想","御劲","暴怒"}
x892107_g_ChaiChuStr[9]={"减冰抗","减火抗","减玄抗","减毒抗"}
x892107_g_ChaiChuStr[10]={"体力","冰抗","火抗","玄抗","毒抗"}
x892107_g_ChaiChuStr[11]={"身法"}
x892107_g_ChaiChuStr[12]={"身法"}
x892107_g_ChaiChuStr[13]={"身法"}
x892107_g_ChaiChuStr[14]={"冰攻","火攻","玄攻","毒攻"}
x892107_g_ChaiChuStr[15]={"体力","身法"}
x892107_g_ChaiChuStr[17]={"体力"}
x892107_g_ChaiChuStr[18]={"体力","冰抗","火抗","玄抗","毒抗"}
x892107_g_Diaowen = {30110001,30110002,30110003,30110004,30110005,30110006,30110007,30110008,30110009,30110010,30110011,30110012,30110013,30110014,30110015,30110016,30110017,30110018,30110019,30110020,30110021,30110022,30110023,30110024,30110025,30110026,30110027,30110028,30110029,30110030,30110031,30110032,30110033,30110034,30110035,30110036,30110037,30110038,30110039,30110040,30110041,30110042,30110043,30110044,30110045,30110451,30110461,30110471,30110481,30110491,30110501,30110511,30110521}
x892107_g_attr1 = {"体力雕纹","身法雕纹","冰攻雕纹","火攻雕纹","玄攻雕纹","毒攻雕纹","减冰抗雕纹","减火抗雕纹","减玄抗雕纹","减毒抗雕纹","冰抗雕纹","火抗雕纹","玄抗雕纹","毒抗雕纹","忘无雕纹","冥想雕纹","御劲雕纹","暴怒雕纹"}
function x892107_DoDiaowenChaoChu( sceneId, selfId,EquinPos,ComItmPos)
local ret = LuaFnIsItemAvailable( sceneId, selfId, ComItmPos )
if ret ~= 1 then
BeginEvent(sceneId)
AddText(sceneId,"溶金粉不可用");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 2000000 then
x892107_NotifyFailBox( sceneId, selfId, "#G金钱不足!" )
return
end
if LuaFnGetPropertyBagSpace(sceneId, selfId) < 1 then
x892107_NotifyFailBox( sceneId, selfId, "物品栏要1个空格,请确认" )
return
end
local EquinIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, EquinPos )
local EquipPoint = GetItemEquipPoint(EquinIndex )
if EquipPoint < 0 then
return
end
if EquipPoint == 17 then
x892107_DoDiaowenChaoChuchangji( sceneId, selfId,EquinPos,ComItmPos)
return
end
local isdiaowennot,diaowen,level,str3,str4 = x892107_GetIsDiaoWenNotAndLevel( sceneId, selfId,EquinPos)
if isdiaowennot == 0 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除")
return
end
if tonumber(diaowen) <= 0 or tonumber(diaowen) > 18 or tonumber(level) < 0 or tonumber(level) > 9 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除")
return
end
local EquipPoint = GetItemEquipPoint(EquinIndex )
local DWIDLevel = tonumber(level)+1
local DWtabey = tonumber(diaowen)
if LuaFnGetAvailableItemCount(sceneId, selfId, 30503150) < DWIDLevel then
x892107_ShowNotice( sceneId, selfId, "[溶金粉]数量不足"..DWIDLevel.."个,无法进行摘除" )
return
end
if x892107_g_ChaiChuStr[EquipPoint] == nil then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
if x892107_g_attr1[DWtabey] == nil then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
local i = 1
local beginitem = 0
while x892107_g_ChaiChuStr[EquipPoint][i] ~= nil do
if x892107_g_attr1[DWtabey] == x892107_g_ChaiChuStr[EquipPoint][i].."雕纹" then
beginitem = i
break
end
i = i + 1
end
if beginitem == 0 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
local reply = LuaFnCostMoneyWithPriority( sceneId, selfId, 2000000 );
if reply == -1 then
x892107_ShowNotice( sceneId, selfId, "金钱不足" )
return
end
local rongjinfen = LuaFnDelAvailableItem(sceneId,selfId,30503150,DWIDLevel)
if rongjinfen ~= 1 then
x892107_ShowNotice( sceneId, selfId, "扣除[溶金粉]失败" )
return
end
x892107_ShowNotice( sceneId, selfId, "雕纹摘除成功" )
local itemidconm = x892107_g_ChaiChuitem[EquipPoint][beginitem]+((DWIDLevel-1)*45)
if (EquipPoint == 9) or (EquipPoint == 7 and beginitem >= 9) then
itemidconm = x892107_g_ChaiChuitem[EquipPoint][beginitem] + DWIDLevel-1
end
local allstrl = ""
if str3 ~= nil then
allstrl = str3..allstrl
end
if str4 ~= nil then
allstrl = allstrl..str4
end
LuaFnSetMyFistItems(sceneId, selfId, EquinPos, allstrl)
local xdpgh = TryRecieveItem( sceneId, selfId,itemidconm , 1 );
if xdpgh ~= -1 then
LuaFnItemBind( sceneId, selfId, xdpgh )
end
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
end
function x892107_DoDiaowenHecheng( sceneId, selfId,Pos)
local ret = LuaFnIsItemAvailable( sceneId, selfId, Pos )
if ret ~= 1 then
BeginEvent(sceneId)
AddText(sceneId,"放入的雕纹图样不可用");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, Pos )
local IsTuYang = 0
for i = 1,getn(x892107_g_IsDiaowenPic) do
if x892107_g_IsDiaowenPic[i] == itemIndex and IsTuYang == 0 then
IsTuYang = i
end
end
if IsTuYang == 0 then
x892107_ShowNotice( sceneId, selfId, "#{ZBDW_091105_2}")
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20310169) < 20 then
x892107_ShowNotice( sceneId, selfId, "您的[丹青]不足20个,或已经被加锁,请确认" )
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20502009) < 20 then
x892107_ShowNotice( sceneId, selfId, "您的[黄纸]不足20张,或已经被加锁,请确认" )
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 50000 then
x892107_NotifyFailBox( sceneId, selfId, "#G金钱不足!" )
return
end
local reply = LuaFnCostMoneyWithPriority( sceneId, selfId, 50000 );
if reply == -1 then
x892107_NotifyFailBox( sceneId, selfId, "金钱不足" )
return
end
local delitem0 = LuaFnDelAvailableItem(sceneId,selfId,20310169,20)
local delitem1 = LuaFnDelAvailableItem(sceneId,selfId,20502009,20)
local delitem2 = LuaFnEraseItem( sceneId, selfId, Pos )
if delitem0 < 0 or delitem1 < 0 or delitem2 < 0 then
x892107_ShowNotice( sceneId, selfId, "扣除材料失败" )
return
end
TryRecieveItem( sceneId, selfId, x892107_g_Diaowen[IsTuYang], 1 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
x892107_ShowNotice( sceneId, selfId, "恭喜您合成了一张[#{_ITEM"..x892107_g_Diaowen[IsTuYang].."}]" )
end
function x892107_DoDiaowenAction( sceneId, selfId,Type,g_uiEquipPos,GTItemPos,MItemPos)
if Type == nil then
return
end
if Type ~= 1 and Type ~= 3 and Type~= 4 and Type~= 5 and Type~= 6 then
return
end
if Type == 6 then
if g_uiEquipPos == nil then
return
end
if g_uiEquipPos < 0 then
return
end
--CallScriptFunction( OnDef, "OnDefaul", sceneId, selfId, g_uiEquipPos)
return
end
if (Type == 1 ) and (g_uiEquipPos == nil or GTItemPos == nil or MItemPos == nil) then
return
end
if (Type == 4 or Type == 5 ) and (g_uiEquipPos == nil) then
return
end
if (Type == 3) and (g_uiEquipPos == nil or GTItemPos == nil ) then
return
end
if (g_uiEquipPos < 0 or g_uiEquipPos > 29) and (GTItemPos < 0 or GTItemPos > 29) and (MItemPos < 0 or MItemPos > 29) then
return
end
if Type== 3 then
x892107_DoDiaowenChaoChu( sceneId, selfId,g_uiEquipPos,GTItemPos)
return
end
if Type== 4 then
x892107_DoDiaowenHecheng( sceneId, selfId,g_uiEquipPos)
return
end
if Type== 5 then
x892107_Hecheng( sceneId, selfId,g_uiEquipPos)
return
end
local ret = LuaFnIsItemAvailable( sceneId, selfId, g_uiEquipPos )
local ret1 = LuaFnIsItemAvailable( sceneId, selfId, GTItemPos )
local ret2 = LuaFnIsItemAvailable( sceneId, selfId, MItemPos )
if ret ~= 1 then
BeginEvent(sceneId)
AddText(sceneId,"放入的装备不可用");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
if ret1 ~= 1 or ret2 ~= 1 then
x892107_ShowNotice( sceneId, selfId, "请检查材料是否已经加了锁或不可用")
return
end
--检测物品是否加锁
if LuaFnLockCheck( sceneId, selfId, g_uiEquipPos, 0 ) < 0 then
BeginEvent(sceneId)
AddText(sceneId,"此装备已经被加了锁");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, g_uiEquipPos )
local GTitemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, GTItemPos )
local MitemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, MItemPos )
local EquipPoint = GetItemEquipPoint(itemIndex )
local equip_level = GetBagItemLevel( sceneId, selfId, g_uiEquipPos )
if EquipPoint < 0 then
return
end
if EquipPoint == 17 then
x892107_DoDiaowenActionchangji( sceneId, selfId,Type,g_uiEquipPos,GTItemPos,MItemPos)
return
end
local Enter = 1
for i = 1,getn(x892107_g_baibw) do
if EquipPoint == x892107_g_baibw[i] and Enter == 1 then
Enter = 0
break
end
end
if Enter == 0 then
x892107_ShowNotice( sceneId, selfId, "此类装备暂不开放雕纹")
return
end
if GTitemIndex ~= 30503149 then
x892107_ShowNotice( sceneId, selfId, "请放入[雕纹蚀刻溶剂]")
return
end
local diaowennotlevel,str1,str2,str3,str4 = x892107_GetIsDiaoWenNotAndLevel( sceneId, selfId,g_uiEquipPos)
if diaowennotlevel == 1 then
x892107_ShowNotice( sceneId, selfId, "此装备已经雕纹蚀刻过,请不要重复 雕纹蚀刻")
return
end
if (EquipPoint == 8 ) or (EquipPoint == 16) then
x892107_ShowNotice( sceneId, selfId, "此类装备暂不支持雕纹")
return
end
local lejingstring = ""
if EquipPoint == 0 then
lejingstring = "武器: 4种属性攻击、4种减抗中的任意一种"
elseif EquipPoint == 1 then
lejingstring = "帽子: 身法、4种抗性雕纹中的任意一种"
elseif EquipPoint == 2 then
lejingstring = "衣服: 体力、身法雕纹中的任意一种"
elseif EquipPoint == 3 then
lejingstring = "手套: 体力、身法雕纹的任意一种"
elseif EquipPoint == 4 then
lejingstring = "鞋子体力雕纹"
elseif EquipPoint == 5 then
lejingstring = "腰带体力雕纹"
elseif EquipPoint == 6 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 7 then
lejingstring = "项链: 4种属性攻击、4种减抗、忘无、冥想、御劲、暴怒雕纹的任意一种"
elseif EquipPoint == 9 then
lejingstring = "豪侠印: 4种减抗的任意一种"
elseif EquipPoint == 10 then
lejingstring = "武魂: 体力雕纹、4种抗性的任意一种"
elseif EquipPoint == 11 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 12 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 13 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 14 then
lejingstring = "护腕: 4种属性攻击雕纹的任意一种"
elseif EquipPoint == 15 then
lejingstring = "护肩: 体力、身法雕纹的任意一种"
elseif EquipPoint == 17 then
lejingstring = "暗器体力雕纹"
elseif EquipPoint == 18 then
lejingstring = "龙纹: 体力雕纹、4种抗性的任意一种"
end
if MitemIndex < 30110001 or MitemIndex > 30110530 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local Mecomitemtabel = mod((MitemIndex - 30110000),45)
if MitemIndex >= 30110451 and MitemIndex <= 30110490 then
Mecomitemtabel = 46
end
if MitemIndex >= 30110491 and MitemIndex <= 30110530 then
Mecomitemtabel = 45
end
if x892107_g_itempoint[Mecomitemtabel] == nil then
return
end
local metresiddw = 0
if getn( x892107_g_itempoint[Mecomitemtabel]) > 1 then
for i = 1,getn( x892107_g_itempoint[Mecomitemtabel]) do
if x892107_g_itempoint[Mecomitemtabel][i] ~= nil then
if x892107_g_itempoint[Mecomitemtabel][i] == EquipPoint and metresiddw == 0 then
metresiddw = 1
break
end
end
end
else
if x892107_g_itempoint[Mecomitemtabel][1] ~= nil then
if x892107_g_itempoint[Mecomitemtabel][1] == EquipPoint then
metresiddw = 1
end
end
end
if metresiddw == 0 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
if x892107_g_equititemid[EquipPoint] == nil then
return
end
local DWTableidkey = 0
if getn( x892107_g_equititemid[EquipPoint]) > 1 then
for i = 1,getn( x892107_g_equititemid[EquipPoint]) do
if x892107_g_equititemid[EquipPoint][i] == Mecomitemtabel and DWTableidkey == 0 then
DWTableidkey = i
break
end
end
else
if x892107_g_equititemid[EquipPoint][1] == Mecomitemtabel and DWTableidkey == 0 then
DWTableidkey = 1
end
end
if DWTableidkey == 0 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local juanding = LuaFnIsJudgeApt( sceneId, selfId, g_uiEquipPos )
if juanding == 2 then
BeginEvent(sceneId)
AddText(sceneId,"该装备还没有鉴定,所以不能进行雕纹蚀刻");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 50000 then
x892107_NotifyFailBox( sceneId, selfId, "#G金钱不足!" )
return
end
local itemnamestr = GetItemName(sceneId,MitemIndex)
local xpos,zpos,levle,misstapey = nil,nil,0,-1
for i = 1,getn(x892107_g_attr1) do
xpos,zpos,levle = strfind(itemnamestr,x892107_g_attr1[i].."(%d+)")
if xpos ~= nil and zpos ~= nil and levle ~= nil then
misstapey = i
levle = tonumber(levle)-1
break
end
end
if misstapey == 0 or levle == -1 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local allstrl = misstapey.. levle
if allstrl == "" then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local strlong = strlen(allstrl)
if strlong == 2 then
allstrl = "0"..allstrl
end
allstrl = "&"..allstrl
--ret, arg0 = CallScriptFunction( OnDef, "On" , sceneId, selfId,g_uiEquipPos,DWTableidkey,getn(x892107_g_equititemid[EquipPoint]),DWLevelidkey )
--if itemIndex >= 10156126 and itemIndex <= 10156129 then
--nitemidsed = itemIndex - 10156125
--if nitemidsed == 4 then
--nitemidsed = 0
--end
-- CallScriptFunction( OnDef, "OnDe", sceneId, selfId,g_uiEquipPos,nitemidsed,EquipPoint )
-- end
-- if itemIndex >= 10157033 and itemIndex <= 10157036 then
-- nitemidsed1 = itemIndex - 10157032
--if nitemidsed1 == 4 then
-- nitemidsed1 = 0
--end
-- CallScriptFunction( OnDef, "OnDe", sceneId, selfId,g_uiEquipPos,nitemidsed1,EquipPoint )
-- end
if str3 ~= nil then
allstrl = str3..allstrl
end
if str4 ~= nil then
allstrl = allstrl..str4
end
LuaFnSetMyFistItems(sceneId, selfId, g_uiEquipPos, allstrl)
strItemInfo1 = GetBagItemTransfer( sceneId, selfId, MItemPos )
x892107_BanDing( sceneId, selfId,GTItemPos,g_uiEquipPos)
x892107_BanDing( sceneId, selfId,MItemPos,g_uiEquipPos)
LuaFnEraseItem( sceneId, selfId, GTItemPos )
LuaFnEraseItem( sceneId, selfId, MItemPos )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
LuaFnCostMoneyWithPriority( sceneId, selfId, 50000 );
--strItemInfo = GetBagItemTransfer( sceneId, selfId, g_uiEquipPos )
--equititem = LuaFnGetItemTableIndexByIndex( sceneId, selfId, g_uiEquipPos )
--x892107_ShowRandomSystemNotice( sceneId, selfId, strItemInfo,equititem,strItemInfo1 )
text="#G恭喜你,雕纹蚀刻成功!"
BeginEvent(sceneId)
AddText(sceneId,text)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
function x892107_NotifyFailBox( sceneId, selfId, msg )
BeginEvent(sceneId)
AddText(sceneId,msg)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId, -1)
end
function x892107_ShowNotice( sceneId, selfId, strNotice)
BeginEvent(sceneId)
AddText(sceneId,strNotice)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
function x892107_ShowRandomSystemNotice( sceneId, selfId, dwsre,itemid,meret )
local PlayerName = GetName(sceneId,selfId)
local str = format( "#{_INFOUSR%s}#H经过一番努力,成功的将#{_INFOMSG%s2}#H蚀刻上了#{_INFOMSG%s1}", PlayerName, dwsre,meret )
BroadMsgByChatPipe( sceneId, selfId, str, 4 )
end
function x892107_WuhunMagicUp( sceneId, selfId, table, itemPos,num)
if table == nil or itemPos == nil or num == nil then
return
end
if table ~= 2 then
return
end
local ret = LuaFnIsItemAvailable( sceneId, selfId, itemPos )
if ret ~= 1 then
x892107_ShowNotice( sceneId, selfId, "放入的装备不可用")
return
end
local itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, itemPos )
local EquipPoint = GetItemEquipPoint(itemIndex )
if EquipPoint < 0 then
return
end
if EquipPoint == 17 then
x892107_WuhunMagicUpchangji( sceneId, selfId, table, itemPos,num)
return
end
local IsNoDWEquit,diaowen,level,startstr,endstr = x892107_GetIsDiaoWenNotAndLevel( sceneId, selfId,itemPos)
if IsNoDWEquit == 0 then
x892107_ShowNotice( sceneId, selfId, "请先进行雕纹蚀刻,才能进行雕纹强化")
return
end
local DWEquitLevel = tonumber(level)+1
if DWEquitLevel == 0 or tonumber(diaowen) == 0 or tonumber(diaowen) > 18 then
x892107_ShowNotice( sceneId, selfId, "请先进行雕纹蚀刻,才能进行雕纹强化")
return
end
if DWEquitLevel >= 10 then
x892107_ShowNotice( sceneId, selfId, "您的装备雕纹强化已经达到最高级,不能再进行雕纹强化")
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20310166) < num then
x892107_ShowNotice( sceneId, selfId, "#W请检查您包裹是否有#Y足够的金蚕丝#W,要对应物品放在包裹内才可以雕纹强化哦!!" )
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20310166) < x892107_g_JSnum[DWEquitLevel] then
x892107_ShowNotice( sceneId, selfId, "#W请检查您包裹是否有#Y足够的金蚕丝#W,要对应物品放在包裹内才可以可以雕纹强化哦!!" )
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 10000 then
x892107_NotifyFailBox( sceneId, selfId, "#G金钱不足!" )
return
end
local allstrl = "&"..diaowen.. DWEquitLevel
if allstrl == nil then
allstrl = ""
end
if startstr ~= "" then
allstrl = startstr..allstrl
end
if endstr ~= "" then
allstrl = allstrl..endstr
end
LuaFnSetMyFistItems(sceneId, selfId, itemPos, allstrl)
LuaFnCostMoneyWithPriority( sceneId, selfId, 10000 );
LuaFnDelAvailableItem(sceneId,selfId,20310166,x892107_g_JSnum[DWEquitLevel])
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
--strItemInfo = GetBagItemTransfer( sceneId, selfId, itemPos )
--itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, itemPos )
--x892107_ShowSystemNotice( sceneId, selfId, strItemInfo,itemIndex,diaowen,DWEquitLevel+1 )
text="#G恭喜你,雕纹强化成功!"
BeginEvent(sceneId)
AddText(sceneId,text)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
function x892107_ShowSystemNotice( sceneId, selfId, strItemInfo,itemid,kyid1,kyid2 )
local PlayerName = GetName(sceneId,selfId)
local DiaoWen1 = x892107_g_attr1[tonumber(kyid1)]
local str = format( "#{_INFOUSR%s}#H在#G洛阳(318,315)#R张降龙#H处成功的将蚀刻在#{_INFOMSG%s1}#H上的#G[%s]#H提升到了#G%s#H级", PlayerName, strItemInfo,DiaoWen1,kyid2 )
BroadMsgByChatPipe( sceneId, selfId, str, 4 )
end
function x892107_GetIsDiaoWenNotAndLevel( sceneId, selfId,pos)
local _,skilstring = LuaFnGetItemCreator(sceneId, selfId, pos)
local posx,posz,startstr,tapey,level,endstr = nil,nil,nil,nil,nil,nil
if skilstring ~= nil then
posx,posz,startstr,tapey,level,endstr = strfind(skilstring,"(.*)&(%d%d)(%d)(.*)")
end
local isfinddiaowen = 0
if posx ~= nil and posz ~= nil then
isfinddiaowen = 1
else
if skilstring ~= nil then
startstr = skilstring
endstr = ""
end
end
return isfinddiaowen,tapey,level,startstr,endstr
end
function x892107_Hecheng( sceneId, selfId,itemPos)
local needBind = 0
if LuaFnGetItemBindStatus( sceneId, selfId, itemPos ) == 1 then
needBind = 1
end
if needBind == 1 then
LuaFnItemBind( sceneId, selfId, itemPos )
end
end
function x892107_BanDing( sceneId, selfId,itemPos,equititempos)
local needBind = 0
if LuaFnGetItemBindStatus( sceneId, selfId, itemPos ) == 1 then
needBind = 1
end
if needBind == 1 then
LuaFnItemBind( sceneId, selfId, equititempos )
end
end
---------------------------------------------------------------------------
function x892107_DoDiaowenChaoChuchangji( sceneId, selfId,EquinPos,ComItmPos)
local ret = LuaFnIsItemAvailable( sceneId, selfId, ComItmPos )
if ret ~= 1 then
BeginEvent(sceneId)
AddText(sceneId,"溶金粉不可用");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf <2000000 then
x892107_NotifyFailBox( sceneId, selfId, "#G金钱不足!" )
return
end
if LuaFnGetPropertyBagSpace(sceneId, selfId) < 1 then
x892107_NotifyFailBox( sceneId, selfId, "物品栏要1个空格,请确认" )
return
end
local EquinIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, EquinPos )
local EquinIndex1 = LuaFnGetItemTableIndexByIndex( sceneId, selfId, EquinPos )
if EquinIndex < 10125104 or EquinIndex > 10140829 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除")
return
end
local DWID,Wens = x892107_GetDWID(EquinIndex)
local DWIDLevel = x892107_GetDWlevel( sceneId, selfId, EquinIndex)
local EquipPoint = GetItemEquipPoint(EquinIndex )
if DWID == 0 or DWIDLevel == 0 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 30503150) < DWIDLevel then
x892107_ShowNotice( sceneId, selfId, "[溶金粉]数量不足"..DWIDLevel.."个,无法进行摘除" )
return
end
if x892107_g_ChaiChuStr[EquipPoint] == nil then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
local i = 1
local beginitem = 0
while x892107_g_ChaiChuStr[EquipPoint][i] ~= nil do
if Wens == x892107_g_ChaiChuStr[EquipPoint][i] then
beginitem = i
break
end
i = i + 1
end
if beginitem == 0 then
x892107_ShowNotice( sceneId, selfId, "此装备上没有雕纹,无法进行摘除" )
return
end
local ukmfkxynum = (getn(x892107_g_ChaiChuStr[EquipPoint])-beginitem)*10 + 1 + 10 - DWIDLevel
local retnum = 0
while (EquinIndex >= 10125104 and EquinIndex <= 10140829) and (retnum < getn(x892107_g_ChaiChuStr[EquipPoint])*10 ) do
ret, arg0 = CallScriptFunction( OnDef, "O" , sceneId, selfId,EquinPos)
if ret == 0 then
EquinIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, EquinPos )
end
if EquinIndex < 10125104 or EquinIndex > 10140829 then
retnum = getn(x892107_g_ChaiChuStr[EquipPoint])*10
end
retnum = retnum + 1
end
local reply = LuaFnCostMoneyWithPriority( sceneId, selfId, 2000000 );
if reply == -1 then
x892107_ShowNotice( sceneId, selfId, "金钱不足" )
return
end
if EquinIndex < 10125104 or EquinIndex > 10140829 then
local delrongjinfen = LuaFnDelAvailableItem(sceneId,selfId,30503150,DWIDLevel)
if delrongjinfen ~= 1 then
x892107_ShowNotice( sceneId, selfId, "扣除[溶金粉]失败" )
return
end
x892107_ShowNotice( sceneId, selfId, "雕纹摘除成功" )
local xdpgh = TryRecieveItem( sceneId, selfId, x892107_g_ChaiChuitem[EquipPoint][beginitem]+((DWIDLevel-1)*45), 1 );
if xdpgh ~= -1 then
LuaFnItemBind( sceneId, selfId, xdpgh )
end
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
else
while EquinIndex1 ~= EquinIndex do
ret, arg0 = CallScriptFunction( OnDef, "O" , sceneId, selfId,EquinPos)
if ret ~= 0 then
break
end
EquinIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, EquinPos )
end
x892107_ShowNotice( sceneId, selfId, "雕纹摘除失败" )
end
end
function x892107_DoDiaowenActionchangji( sceneId, selfId,Type,g_uiEquipPos,GTItemPos,MItemPos)
local ret = LuaFnIsItemAvailable( sceneId, selfId, g_uiEquipPos )
local ret1 = LuaFnIsItemAvailable( sceneId, selfId, GTItemPos )
local ret2 = LuaFnIsItemAvailable( sceneId, selfId, MItemPos )
if ret ~= 1 then
BeginEvent(sceneId)
AddText(sceneId,"放入的装备不可用");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
if ret1 ~= 1 or ret2 ~= 1 then
x892107_ShowNotice( sceneId, selfId, "请检查材料是否已经加了锁或不可用")
return
end
--检测物品是否加锁
if LuaFnLockCheck( sceneId, selfId, g_uiEquipPos, 0 ) < 0 then
BeginEvent(sceneId)
AddText(sceneId,"此装备已经被加了锁");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, g_uiEquipPos )
local GTitemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, GTItemPos )
local MitemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, MItemPos )
local EquipPoint = GetItemEquipPoint(itemIndex )
local equip_level = GetBagItemLevel( sceneId, selfId, g_uiEquipPos )
if EquipPoint < 0 then
return
end
local Enter = 1
for i = 1,getn(x892107_g_baibw) do
if EquipPoint == x892107_g_baibw[i] and Enter == 1 then
Enter = 0
end
end
if Enter == 0 then
x892107_ShowNotice( sceneId, selfId, "此类装备暂不开放雕纹")
return
end
if GTitemIndex ~= 30503149 then
x892107_ShowNotice( sceneId, selfId, "请放入[雕纹蚀刻溶剂]")
return
end
if itemIndex >= 10125104 and itemIndex <= 10140829 then
x892107_ShowNotice( sceneId, selfId, "此装备已经雕纹蚀刻过,请不要重复 雕纹蚀刻")
return
end
if (itemIndex >=10210001 and itemIndex <= 10223036) and (equip_level <= 90 or equip_level >=100) then
x892107_ShowNotice( sceneId, selfId, "手工类装备要90-100级之间才能雕纹")
return
end
if equip_level < 50 then
BeginEvent(sceneId)
AddText(sceneId,"50级以下的装备,不能进行雕纹强化");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
if (itemIndex < 10210001 or itemIndex > 10223036 or itemIndex == 10558949 ) and (EquipPoint ~= 0) then
local Skcymfxy = 1
local EndMfXy = getn(x892107_g_SkCyMfXyList)
local i = 1
while x892107_g_SkCyMfXyList[i] ~= itemIndex do
if i > EndMfXy then
break
end
i = i + 1
end
if i > EndMfXy then
x892107_ShowNotice( sceneId, selfId, "此装备暂不支持雕纹,支持雕纹的装备有;11大门派的9星4代神器,90+手工装备,9星龙纹,8星武魂,50级以上暗器,重楼装备")
return
end
end
if EquipPoint == 0 then
if itemIndex < 10558916 or itemIndex > 10558948 then
x892107_ShowNotice( sceneId, selfId, "只有9星的四代神器才能雕纹")
return
end
end
if (EquipPoint >= 8 and EquipPoint <= 9) or (EquipPoint == 16) then
x892107_ShowNotice( sceneId, selfId, "此类装备暂不支持雕纹")
return
end
local lejingstring = ""
if EquipPoint == 0 then
lejingstring = "武器: 4种属性攻击、4种减抗中的任意一种"
elseif EquipPoint == 1 then
lejingstring = "帽子: 身法、4种抗性雕纹中的任意一种"
elseif EquipPoint == 2 then
lejingstring = "衣服: 体力、身法雕纹中的任意一种"
elseif EquipPoint == 3 then
lejingstring = "手套: 体力、身法雕纹的任意一种"
elseif EquipPoint == 4 then
lejingstring = "鞋子体力雕纹"
elseif EquipPoint == 5 then
lejingstring = "腰带体力雕纹"
elseif EquipPoint == 6 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 7 then
lejingstring = "项链: 4种属性攻击、4种减抗的任意一种"
elseif EquipPoint == 10 then
lejingstring = "武魂: 体力雕纹、4种抗性的任意一种"
elseif EquipPoint == 11 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 12 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 13 then
lejingstring = "饰品身法雕纹"
elseif EquipPoint == 14 then
lejingstring = "护腕: 4种属性攻击雕纹的任意一种"
elseif EquipPoint == 15 then
lejingstring = "护肩: 体力、身法雕纹的任意一种"
elseif EquipPoint == 17 then
lejingstring = "暗器体力雕纹"
elseif EquipPoint == 18 then
lejingstring = "龙纹: 体力雕纹、4种抗性的任意一种"
end
if MitemIndex < 30110001 or MitemIndex > 30110450 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local Mecomitemtabel = mod((MitemIndex - 30110000),45)
if x892107_g_itempoint[Mecomitemtabel] == nil then
return
end
local metresiddw = 0
if getn( x892107_g_itempoint[Mecomitemtabel]) > 1 then
for i = 1,getn( x892107_g_itempoint[Mecomitemtabel]) do
if x892107_g_itempoint[Mecomitemtabel][i] ~= nil then
if x892107_g_itempoint[Mecomitemtabel][i] == EquipPoint and metresiddw == 0 then
metresiddw = 1
end
end
end
else
if x892107_g_itempoint[Mecomitemtabel][1] ~= nil then
if x892107_g_itempoint[Mecomitemtabel][1] == EquipPoint then
metresiddw = 1
end
end
end
if metresiddw == 0 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
if x892107_g_equititemid[EquipPoint] == nil then
return
end
local DWTableidkey = 0
if getn( x892107_g_equititemid[EquipPoint]) > 1 then
for i = 1,getn( x892107_g_equititemid[EquipPoint]) do
if x892107_g_equititemid[EquipPoint][i] == Mecomitemtabel and DWTableidkey == 0 then
DWTableidkey = i
end
end
else
if x892107_g_equititemid[EquipPoint][1] == Mecomitemtabel and DWTableidkey == 0 then
DWTableidkey = 1
end
end
if DWTableidkey == 0 then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
end
local DWLevelidkey = floor((MitemIndex - 30109956)/45)
local juanding = LuaFnIsJudgeApt( sceneId, selfId, g_uiEquipPos )
if juanding == 2 then
BeginEvent(sceneId)
AddText(sceneId,"该装备还没有鉴定,所以不能进行雕纹蚀刻");
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 50000 then
x892107_NotifyFailBox( sceneId, selfId, "金钱不足!" )
return
end
ret, arg0 = CallScriptFunction( OnDef, "On" , sceneId, selfId,g_uiEquipPos,DWTableidkey,getn(x892107_g_equititemid[EquipPoint]),DWLevelidkey )
if itemIndex >= 10156126 and itemIndex <= 10156129 then
nitemidsed = itemIndex - 10156125
if nitemidsed == 4 then
nitemidsed = 0
end
CallScriptFunction( OnDef, "OnDe", sceneId, selfId,g_uiEquipPos,nitemidsed,EquipPoint )
end
if itemIndex >= 10157033 and itemIndex <= 10157036 then
nitemidsed1 = itemIndex - 10157032
if nitemidsed1 == 4 then
nitemidsed1 = 0
end
CallScriptFunction( OnDef, "OnDe", sceneId, selfId,g_uiEquipPos,nitemidsed1,EquipPoint )
end
if ret == 0 then
strItemInfo1 = GetBagItemTransfer( sceneId, selfId, MItemPos )
LuaFnEraseItem( sceneId, selfId, GTItemPos )
LuaFnEraseItem( sceneId, selfId, MItemPos )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
LuaFnCostMoneyWithPriority( sceneId, selfId, 50000 );
--strItemInfo = GetBagItemTransfer( sceneId, selfId, g_uiEquipPos )
--equititem = LuaFnGetItemTableIndexByIndex( sceneId, selfId, g_uiEquipPos )
--x892107_ShowRandomSystemNoticechangji( sceneId, selfId, strItemInfo,equititem,strItemInfo1 )
text="#G恭喜你,雕纹蚀刻成功!"
end
if ret >= -7 and ret <= -1 then
text="未知错误。"
end
if ret == -8 then
text="该装备无法进行雕纹蚀刻"
end
BeginEvent(sceneId)
AddText(sceneId,text)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
function x892107_ShowRandomSystemNoticechangji( sceneId, selfId, dwsre,itemid,meret )
local PlayerName = GetName(sceneId,selfId)
local str = format( "#{_INFOUSR%s}#H经过一番努力,成功的将#{_INFOMSG%s2}#H蚀刻上了#{_INFOMSG%s1}", PlayerName, dwsre,meret )
BroadMsgByChatPipe( sceneId, selfId, str, 4 )
end
function x892107_WuhunMagicUpchangji( sceneId, selfId, table, itemPos,num)
if table == nil or itemPos == nil or num == nil then
return
end
if table ~= 2 then
return
end
local ret = LuaFnIsItemAvailable( sceneId, selfId, itemPos )
if ret ~= 1 then
x892107_ShowNotice( sceneId, selfId, "放入的装备不可用")
return
end
local itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, itemPos )
local IsNoDWEquit = x892107_IsDWEquit( sceneId, selfId, itemIndex)
if IsNoDWEquit == 0 then
x892107_ShowNotice( sceneId, selfId, "请先进行雕纹蚀刻,才能进行雕纹强化")
return
end
local DWEquitLevel = x892107_GetDWlevel( sceneId, selfId, itemIndex)
if DWEquitLevel == 0 then
x892107_ShowNotice( sceneId, selfId, "请先进行雕纹蚀刻,才能进行雕纹强化")
return
end
if DWEquitLevel == 10 then
x892107_ShowNotice( sceneId, selfId, "您的装备雕纹强化已经达到最高级,不能再进行雕纹强化")
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20310166) < num then
x892107_ShowNotice( sceneId, selfId, "#W请检查您包裹是否有#Y足够的金蚕丝#W,要对应物品放在包裹内才可以雕纹强化哦!!" )
return
end
if LuaFnGetAvailableItemCount(sceneId, selfId, 20310166) < x892107_g_JSnum[DWEquitLevel] then
x892107_ShowNotice( sceneId, selfId, "#W请检查您包裹是否有#Y足够的金蚕丝#W,要对应物品放在包裹内才可以可以雕纹强化哦!!" )
return
end
local nMoneyJZ = GetMoneyJZ(sceneId,selfId)
local nMoneyJB = GetMoney(sceneId,selfId)
local nMoneySelf = nMoneyJZ + nMoneyJB
if nMoneySelf < 10000 then
x892107_NotifyFailBox( sceneId, selfId, "金钱不足!" )
return
end
ret, arg0 = CallScriptFunction( OnDef, "O" , sceneId, selfId,itemPos)
if ret == 0 then
LuaFnCostMoneyWithPriority( sceneId, selfId, 10000 );
LuaFnDelAvailableItem(sceneId,selfId,20310166,x892107_g_JSnum[DWEquitLevel])
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 49, 0);
--strItemInfo = GetBagItemTransfer( sceneId, selfId, itemPos )
--itemIndex = LuaFnGetItemTableIndexByIndex( sceneId, selfId, itemPos )
--x892107_ShowSystemNoticechangji( sceneId, selfId, strItemInfo,itemIndex )
text="#G恭喜你,雕纹强化成功!"
end
if ret >= -7 and ret <= -1 then
text="未知错误。"
end
if ret == -8 then
text="该装备无法进行雕纹强化"
end
BeginEvent(sceneId)
AddText(sceneId,text)
EndEvent(sceneId)
DispatchMissionTips(sceneId,selfId)
end
function x892107_ShowSystemNoticechangji( sceneId, selfId, strItemInfo,itemid )
local PlayerName = GetName(sceneId,selfId)
local DWlevel = x892107_GetDWlevel( sceneId, selfId, itemid)
local DiaoWen0,DiaoWen1 = x892107_GetDWID(itemid)
local str = format( "#{_INFOUSR%s}#H在#G洛阳(318,315)#R张降龙#H处成功的将蚀刻在#{_INFOMSG%s1}#H上的#G[%s雕纹]#H提升到了#G%s#H级", PlayerName, strItemInfo,DiaoWen1,DWlevel )
BroadMsgByChatPipe( sceneId, selfId, str, 4 )
end
function x892107_IsDWEquit( sceneId, selfId, Itemid)
if Itemid >= 10125104 and Itemid <= 10140829 then
return 1
end
return 0
end
function x892107_GetDWlevel( sceneId, selfId, Itemid)
local dwlevel = 0
local StarItem = {10125104,10126286,10127468,10128650,10129832,10131014,10132196,10133378,10134560,10135742,10136924,10138106,10139288,10140470}
local Sxing = x892107_GetMODID(Itemid)
if Sxing > 0 then
dwlevel=floor((Itemid-StarItem[x892107_GetDWID(Itemid)])/Sxing)+1;
end
return dwlevel
end
function x892107_GetMODID(itemID11)
local Modid=0
if itemID11>=10125104 and itemID11<=10125473 then
Modid=37
elseif itemID11>=10126286 and itemID11<=10126645 then
Modid=36
elseif itemID11>=10127468 and itemID11<=10131393 then
Modid=38
elseif itemID11>=10132196 and itemID11<=10135881 then
Modid=14
elseif itemID11>=10136924 and itemID11<=10140829 then
Modid=36
end
return Modid
end
function x892107_GetDWID(itemID11)
local dwid=0
local str = ""
if itemID11>=10125104 and itemID11<=10125473 then
dwid=1
str = "体力"
elseif itemID11>=10126286 and itemID11<=10126645 then
dwid=2
str = "身法"
elseif itemID11>=10127468 and itemID11<=10127847 then
dwid=3
str = "冰攻"
elseif itemID11>=10128650 and itemID11<=10129029 then
dwid=4
str = "火攻"
elseif itemID11>=10129832 and itemID11<=10130211 then
dwid=5
str = "玄攻"
elseif itemID11>=10131014 and itemID11<=10131393 then
dwid=6
str = "毒攻"
elseif itemID11>=10132196 and itemID11<=10132335 then
dwid=7
str = "冰抗"
elseif itemID11>=10133378 and itemID11<=10133517 then
dwid=8
str = "火抗"
elseif itemID11>=10134560 and itemID11<=10134699 then
dwid=9
str = "玄抗"
elseif itemID11>=10135742 and itemID11<=10135881 then
dwid=10
str = "毒抗"
elseif itemID11>=10136924 and itemID11<=10137283 then
dwid=11
str = "减冰抗"
elseif itemID11>=10138106 and itemID11<=10138465 then
dwid=12
str = "减火抗"
elseif itemID11>=10139288 and itemID11<=10139647 then
dwid=13
str = "减玄抗"
elseif itemID11>=10140470 and itemID11<=10140829 then
dwid=14
str = "减毒抗"
end
return dwid,str
end
CGExecuteScriptHandler: GUID=3C336082 ScriptID=892107 FunName=DoDiaowenAction (4:1,5,3,6,0,0) (-2004964496)(T0=2017-3-13_7:35:55 T1=4416.6920)
error: attempt to concat local `levle' (a nil value)
stack traceback:
1: function `x892107_DoDiaowenAction' at line 496 [string "?"]
stack pop error in fn : /MyNew/oluoyang_diaowen.lua x892107_DoDiaowenAction 0 15004 1 5 3 6 (-2004964496)(T0=2017-3-13_7:35:56 T1=4417.9680)
local allstrl = misstapey.. levle
if allstrl == "" then
x892107_ShowNotice( sceneId, selfId, "请放入"..lejingstring)
return
endLần sửa cuối bởi thienphuc86, ngày 13-03-17 lúc 02:52 PM.
Khách viếng thăm hãy cùng thienphuc86 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
13-03-17, 09:18 PM #2
- Ngày tham gia
- Apr 2011
- Đang ở
- 地獄
- Bài viết
- 3,991
- Thanks
- 369
- Thanked 4,069 Times in 1,403 Posts
Ðề: Lỗi Script khắc điêu văn
xpos,zpos,levle = strfind(itemnamestr,x892107_g_attr1[i].."(%d+)")
if xpos ~= nil and zpos ~= nil and levle ~= nil then
misstapey = i
levle = tonumber(levle)-1
Đoạn này nó sinh ra ngoại lệ. Debug thử xem giá trị chuỗi kia là gìKhách viếng thăm hãy cùng Sói Đẹp Trai xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến Sói Đẹp Trai vì bài viết này !
thienphuc86 (13-03-17)
-
14-03-17, 12:11 AM #3
- Ngày tham gia
- Jul 2015
- Đang ở
- In the Hell
- Bài viết
- 183
- Thanks
- 55
- Thanked 21 Times in 20 Posts
Ðề: Lỗi Script khắc điêu văn
mình debug ngay dòng local allstrl = misstapey..levle , nó lại báo sang dòng này local strlong = strlen(allstrl) String "?" , mình commands nó lại , rồi khắc điêu văn thì nó báo là thành công nhưng không có điêu văn trên trang bị , và lấy trang bị có sẳn điêu văn thì không thể cường hóa cấp điêu văn , bác chỉ mình sửa với.Khách viếng thăm hãy cùng thienphuc86 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
15-03-17, 03:22 AM #4
- Ngày tham gia
- Jul 2015
- Đang ở
- In the Hell
- Bài viết
- 183
- Thanks
- 55
- Thanked 21 Times in 20 Posts
Ðề: Lỗi Script khắc điêu văn
Cac bác help mình cái script điêu văn này với , mình phải sửa sao để biến đó không nil...
Khách viếng thăm hãy cùng thienphuc86 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
15-03-17, 09:01 PM #5
- Ngày tham gia
- Apr 2011
- Đang ở
- 地獄
- Bài viết
- 3,991
- Thanks
- 369
- Thanked 4,069 Times in 1,403 Posts
Ðề: Lỗi Script khắc điêu văn
Vậy thì cái chuỗi bên trong lệnh strlen nó đã bị nil rồi đó. B kiểm tra bên trên nữa xem
Khách viếng thăm hãy cùng Sói Đẹp Trai xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến Sói Đẹp Trai vì bài viết này !
thienphuc86 (15-03-17)
-
17-03-17, 01:22 PM #6
- Ngày tham gia
- Jul 2015
- Đang ở
- In the Hell
- Bài viết
- 183
- Thanks
- 55
- Thanked 21 Times in 20 Posts
Ðề: Lỗi Script khắc điêu văn
mình đã sửa được rồi cám ơn bác nhiều , nhưng các bác cho mình hỏi tại sao mình việt hóa có nhiều lua bị lỗi quá , chưa việt hóa thì chạy bình thường sau khi việt hóa đưa vào server chạy thì bị lỗi đầy ra luôn , có script nó không hiều luôn vậy là sao vậy các bác , mình bị sai thao tác gì khi việt hóa à.
Khách viếng thăm hãy cùng thienphuc86 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
22-03-17, 03:27 AM #7
- Ngày tham gia
- Jul 2015
- Đang ở
- In the Hell
- Bài viết
- 183
- Thanks
- 55
- Thanked 21 Times in 20 Posts
Ðề: Lỗi Script khắc điêu văn
Sao mình chạy một thời gian sao nó lại bị lỗi y như vậy nữa bác ơi , mình không biết sửa sao ,các bác có cách nào gợi ý mình với,hay mình có thể thay script điêu văn khác không các bác.
Khách viếng thăm hãy cùng thienphuc86 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
Các Chủ đề tương tự
-
[JX] Share Script sắp xếp hạng cá nhân, xử lý file văn bản thuần!
Bởi bil4i3n trong diễn đàn ScriptsTrả lời: 2Bài viết cuối: 23-02-16, 04:43 PM -
[TLBB] Xin đc chỉ giáo về Điêu Văn
Bởi mylove8 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 15Bài viết cuối: 19-08-15, 08:07 PM -
[TLBB] Vấn Đề Điêu Văn Ai Giúp Em Với
Bởi nhoxshan2000 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 5Bài viết cuối: 16-08-14, 11:28 PM -
[TLBB] Vấn đề về điêu văn.
Bởi vinateam trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 5Bài viết cuối: 29-03-14, 06:34 PM -
Mod, Văn Bờm, hoặc ai biết ai có cho tớ nhờ tí...
Bởi bembem90 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 11Bài viết cuối: 24-08-10, 10:00 PM