David_Linh_97
03-08-16, 05:40 PM
Lỗi:
L·o phu vèn ®· kiÖt søc, ®¹i hiÖp ngµy mai h·y trë l¹i ®i
CODE:
Include("\\script\\global\\recoin_goldenequip.lua")Include("\\script\\global\\equipenchase_help.lua")
Include("\\script\\task\\newtask\\education\\jiaoyutasknpc. lua")
Include("\\script\\task\\newtask\\newtask_head.lua")
Include("\\script\\global\\×ÏÉ«¼°»Æ½ð×°±¸Öý Ôì.lua")
Include("\\script\\global\\shenmi_chapman.lua"); --ÐÞ×°±¸¹¦ÄÜ
Include("\\script\\activitysys\\npcdailog.lua")
Include("\\script\\misc\\eventsys\\type\\npc.lua")
--------¹Ì¶¨¶Ô»° ³ÇÊÐ--------
function tiejiang_city(...)
local nNpcIndex = GetLastDiagNpc();
--local szNpcName = GetNpcName(nNpcIndex);
--if NpcName2Replace then szNpcName = NpcName2Replace(szNpcName) end
local szNpcName = "Thî RÌn"
local tbDailog = DailogClass:new(szNpcName);
G_ACTIVITY:OnMessage("ClickNpc", tbDailog, nNpcIndex);
EventSys:GetType("AddNpcOption"):OnEvent(szNpcName, tbDailog, nNpcIndex)
local aryParam = arg;
if (getn(aryParam) == 0) then
tbDailog.szTitleMsg = TIEJIANG_DIALOG
else
for i = 1, getn(aryParam) do
if (i == 1) then
tbDailog.szTitleMsg = TIEJIANG_DIALOG
else
local _,_, szOpt, szFun = strfind(aryParam[i], "([^/]+)/([^/]+)")
local fn = getglobal(szFun)
if fn then
tbDailog:AddOptEntry(szOpt, fn);
end
end;
end;
end;
tbDailog.szTitleMsg = gsub(tbDailog.szTitleMsg, "<dec>", "")
tbDailog:AddOptEntry("Giao dÞch", yes);
--tbDailog:AddOptEntry("Cöa hµng tinh luyÖn th¹ch", energy_sale);
tbDailog:AddOptEntry("ChÕ t¹o", onFoundry);
tbDailog:AddOptEntry("Kh¶m n¹m", jewel_yes);
tbDailog:AddOptEntry("Söa ®å bÞ háng ", deal_brokenequip);
tbDailog:AddOptEntry("Ta tíi lµm nhiÖm vô t©n thñ ", education_tiejiang);
tbDailog:AddOptEntry("Ta chØ ghÐ xem th«i.", no, {});
tbDailog:Show()
end;
--------¹Ì¶¨¶Ô»° ТÊÖ´å------
function tiejiang_village(...)
local aryParam = arg;
local aryDescribe = {
--szDialog, --Ìú½³µÄ˵»°£¬ÔÚ¸÷³ÇÊÐÌú½³´ ¦
"Giao dÞch/yes",
--Change request 04/06/2011, ®ãng ch? t¹o trang b? b¹ch kim - Modified by DinhHQ - 20110605
--"VËt phÈm ®óc /onFoundry",
"NhiÖm vô t©n thñ /tboss",
"Ta chØ ®i d¹o mét chót /no",
};
if (getn(aryParam) == 0) then
tinsert(aryDescribe, 1, TIEJIANG_DIALOG)
else
for i = 1, getn(aryParam) do
if (i == 1) then
tinsert(aryDescribe, 1, aryParam[i]);
else
tinsert(aryDescribe, 2, aryParam[i]);
end;
end;
end;
CreateTaskSay(aryDescribe);
end;
--------ÏâǶ--------
function jewel_yes()
CreateTaskSay({"<dec><npc>Kh¶m B¶o Ngäc liªn quan ®Õn sù c©n b»ng cña Ngò hµnh, lµ mét cùc phÈm tuyÖt thÕ. Ng¬i muèn x¸c nhËn kh¶m chø ?", "B¾t ®Çu kh¶m/jewel_yes1", "T×m hiÓu thªm/help", "Ta chØ ghÐ xem th«i/no"});
end
function jewel_yes1()
EnchaseItem()
end
-------No--------
function no()
end;
------¾«Á¶Ê¯-------
function energy_sale()
CreateStores();
AddShop2Stores(174, "Tinh luyÖn ", 15, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(179, "Ho¹t ®éng ", 1, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(93, "Phóc duyªn ", 2, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(98, "Tèng kim ", 4, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(146, "Vinh dù ", 11, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(173, "Danh väng ", 13, 100, "fBuyCallBack(%d,%d)");
OpenStores();
end
function fBuyCallBack(nItemIdx, nPrice)
local nCount = 1
local itemgenre, itemdetail, itemParticular = GetItemProp(nItemIdx)
if itemgenre == 6 and itemdetail == 1 and itemParticular == 2317 then
-- ÊÔÁ¶Ìû
AddStatData("jlxiaohao_shiliantiegoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2355 then
-- ÐþÌì½õÄÒ
AddStatData("jlxiaohao_xuantiangoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2369 then
-- ǵ¾ÔÁî
AddStatData("jlxiaohao_qingjulinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2353 then
-- ÔÆ¢¹Áî
AddStatData("jlxiaohao_yunlulinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2352 then
-- ²ÔÀÇÁî
AddStatData("jlsxiaohao_canglanglinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2351 then
-- ÐþÔ³Áî
AddStatData("jlxiaohao_xuanyuanlinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2350 then
-- ×ÏòþÁî
AddStatData("jlxiaohao_zimanglinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2744 then
-- ÈçÒâÔ¿³×
AddStatData("jlxiaohao_ruyiyaoshigoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 1617 then
-- Ñ×µÛÁî
AddStatData("jlxiaohao_yandilinggoumai", nCount)
end
return 1
end
Ai giúp dùm mình fix lỗi nàyđi.... cảm ơn mọi người nhiều
L·o phu vèn ®· kiÖt søc, ®¹i hiÖp ngµy mai h·y trë l¹i ®i
CODE:
Include("\\script\\global\\recoin_goldenequip.lua")Include("\\script\\global\\equipenchase_help.lua")
Include("\\script\\task\\newtask\\education\\jiaoyutasknpc. lua")
Include("\\script\\task\\newtask\\newtask_head.lua")
Include("\\script\\global\\×ÏÉ«¼°»Æ½ð×°±¸Öý Ôì.lua")
Include("\\script\\global\\shenmi_chapman.lua"); --ÐÞ×°±¸¹¦ÄÜ
Include("\\script\\activitysys\\npcdailog.lua")
Include("\\script\\misc\\eventsys\\type\\npc.lua")
--------¹Ì¶¨¶Ô»° ³ÇÊÐ--------
function tiejiang_city(...)
local nNpcIndex = GetLastDiagNpc();
--local szNpcName = GetNpcName(nNpcIndex);
--if NpcName2Replace then szNpcName = NpcName2Replace(szNpcName) end
local szNpcName = "Thî RÌn"
local tbDailog = DailogClass:new(szNpcName);
G_ACTIVITY:OnMessage("ClickNpc", tbDailog, nNpcIndex);
EventSys:GetType("AddNpcOption"):OnEvent(szNpcName, tbDailog, nNpcIndex)
local aryParam = arg;
if (getn(aryParam) == 0) then
tbDailog.szTitleMsg = TIEJIANG_DIALOG
else
for i = 1, getn(aryParam) do
if (i == 1) then
tbDailog.szTitleMsg = TIEJIANG_DIALOG
else
local _,_, szOpt, szFun = strfind(aryParam[i], "([^/]+)/([^/]+)")
local fn = getglobal(szFun)
if fn then
tbDailog:AddOptEntry(szOpt, fn);
end
end;
end;
end;
tbDailog.szTitleMsg = gsub(tbDailog.szTitleMsg, "<dec>", "")
tbDailog:AddOptEntry("Giao dÞch", yes);
--tbDailog:AddOptEntry("Cöa hµng tinh luyÖn th¹ch", energy_sale);
tbDailog:AddOptEntry("ChÕ t¹o", onFoundry);
tbDailog:AddOptEntry("Kh¶m n¹m", jewel_yes);
tbDailog:AddOptEntry("Söa ®å bÞ háng ", deal_brokenequip);
tbDailog:AddOptEntry("Ta tíi lµm nhiÖm vô t©n thñ ", education_tiejiang);
tbDailog:AddOptEntry("Ta chØ ghÐ xem th«i.", no, {});
tbDailog:Show()
end;
--------¹Ì¶¨¶Ô»° ТÊÖ´å------
function tiejiang_village(...)
local aryParam = arg;
local aryDescribe = {
--szDialog, --Ìú½³µÄ˵»°£¬ÔÚ¸÷³ÇÊÐÌú½³´ ¦
"Giao dÞch/yes",
--Change request 04/06/2011, ®ãng ch? t¹o trang b? b¹ch kim - Modified by DinhHQ - 20110605
--"VËt phÈm ®óc /onFoundry",
"NhiÖm vô t©n thñ /tboss",
"Ta chØ ®i d¹o mét chót /no",
};
if (getn(aryParam) == 0) then
tinsert(aryDescribe, 1, TIEJIANG_DIALOG)
else
for i = 1, getn(aryParam) do
if (i == 1) then
tinsert(aryDescribe, 1, aryParam[i]);
else
tinsert(aryDescribe, 2, aryParam[i]);
end;
end;
end;
CreateTaskSay(aryDescribe);
end;
--------ÏâǶ--------
function jewel_yes()
CreateTaskSay({"<dec><npc>Kh¶m B¶o Ngäc liªn quan ®Õn sù c©n b»ng cña Ngò hµnh, lµ mét cùc phÈm tuyÖt thÕ. Ng¬i muèn x¸c nhËn kh¶m chø ?", "B¾t ®Çu kh¶m/jewel_yes1", "T×m hiÓu thªm/help", "Ta chØ ghÐ xem th«i/no"});
end
function jewel_yes1()
EnchaseItem()
end
-------No--------
function no()
end;
------¾«Á¶Ê¯-------
function energy_sale()
CreateStores();
AddShop2Stores(174, "Tinh luyÖn ", 15, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(179, "Ho¹t ®éng ", 1, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(93, "Phóc duyªn ", 2, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(98, "Tèng kim ", 4, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(146, "Vinh dù ", 11, 100, "fBuyCallBack(%d,%d)");
AddShop2Stores(173, "Danh väng ", 13, 100, "fBuyCallBack(%d,%d)");
OpenStores();
end
function fBuyCallBack(nItemIdx, nPrice)
local nCount = 1
local itemgenre, itemdetail, itemParticular = GetItemProp(nItemIdx)
if itemgenre == 6 and itemdetail == 1 and itemParticular == 2317 then
-- ÊÔÁ¶Ìû
AddStatData("jlxiaohao_shiliantiegoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2355 then
-- ÐþÌì½õÄÒ
AddStatData("jlxiaohao_xuantiangoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2369 then
-- ǵ¾ÔÁî
AddStatData("jlxiaohao_qingjulinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2353 then
-- ÔÆ¢¹Áî
AddStatData("jlxiaohao_yunlulinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2352 then
-- ²ÔÀÇÁî
AddStatData("jlsxiaohao_canglanglinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2351 then
-- ÐþÔ³Áî
AddStatData("jlxiaohao_xuanyuanlinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2350 then
-- ×ÏòþÁî
AddStatData("jlxiaohao_zimanglinggoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 2744 then
-- ÈçÒâÔ¿³×
AddStatData("jlxiaohao_ruyiyaoshigoumai", nCount)
elseif itemgenre == 6 and itemdetail == 1 and itemParticular == 1617 then
-- Ñ×µÛÁî
AddStatData("jlxiaohao_yandilinggoumai", nCount)
end
return 1
end
Ai giúp dùm mình fix lỗi nàyđi.... cảm ơn mọi người nhiều