PDA

View Full Version : [TLBB] Xin Code NPC Võ Hồn



vhmt1101
30-04-15, 07:59 PM
NPC võ hồn của mình bị lỗi, thao tác bình thường nhưng không ép skill hay nâng skill gì được hết. Có bác nào có lòng hảo tâm cho e xin cái CODE NPC đó.
Em chân thành cám ơn ạ !

Intel
30-04-15, 09:20 PM
NPC võ hồn của mình bị lỗi, thao tác bình thường nhưng không ép skill hay nâng skill gì được hết. Có bác nào có lòng hảo tâm cho e xin cái CODE NPC đó.
Em chân thành cám ơn ạ !



--Vo Hon NPC
--2014
--Translate by Intel

--
x892006_g_ScriptId = 892206


x892006_g_eventList={}

--**********************************
--Translate by Intel
--**********************************
function x892006_UpdateEventList( sceneId, selfId,targetId )
local PlayerName=GetName(sceneId,selfId)
local PlayerSex=GetSex(sceneId,selfId)
if PlayerSex == 0 then
PlayerSex = " #Gcô nß½ng#W "
else
PlayerSex = " #Ythiªu hi®p #W"
end
BeginEvent(sceneId)
AddText(sceneId,"Chào m×ng"..PlayerSex.."đªn v¾i thª gi¾i cüa #GThiên Long Bát Bµ#W phiên bän #HT́nh Trong Giang H°")
AddText(sceneId, " #cFF0000! ! ! ! ! Chú ư! ! ! ! ! #r#G Thao tác trên Vơ H°n trß¾c tiên hăy tháo g̃ hªt bäo thƠch")
for i, eventId in x892006_g_eventList do
CallScriptFunction( eventId, "OnEnumerate",sceneId, selfId, targetId )
end
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n ch÷n c¥m tinh",6,3000)
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n tång c¤p",6,7)
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n kÛ nång h÷c t§p",6,8)
AddNumText(sceneId,x892006_g_ScriptId,"#Y H°n bång châu h₫p thành",6,1000)
AddNumText(sceneId,x892006_g_ScriptId," Gi¾i thi®u vơ h°n thång c¤p",-1,8686)
AddNumText(sceneId,x892006_g_ScriptId," Gi¾i thi®u vơ h°n trƠng thái",-1,8687)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnDefaultEvent( sceneId, selfId,targetId )
x892006_UpdateEventList( sceneId, selfId, targetId )
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnEventRequest( sceneId, selfId, targetId, eventId )
for i, findId in x892006_g_eventList do
if eventId == findId then
CallScriptFunction( eventId, "OnDefaultEvent",sceneId, selfId, targetId )
return
end
end

local NumText = GetNumText();
if NumText == 8687 then --Thuoc Tinh Vo Hon
BeginEvent(sceneId)
AddText(sceneId,"#G Vơ h°n c¤p 3: #r #Y Tång 5000 máu gi¾i hƠn")
AddText(sceneId,"#G Vơ h°n c¤p 4: #r #Y Tång 10000 máu gi¾i hƠn")
AddText(sceneId,"#G Vơ h°n c¤p 5: #r #Y Tång 20000 máu gi¾i hƠn")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 8686 then --Gioi thieu vo hon thang cap
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 1000 then --Hop Thanh Hon Bang Chau
BeginEvent(sceneId)
AddText(sceneId,"CÑ 5 cái #GH°n Bång Châu#W cùng c¤p có th¬ h₫p thành 1 #YH°n Bång Châu #Wc¤p cao h½n")

AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 2]",6,1001)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 3]",6,1002)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 4]",6,1003)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 5]",6,1004)
AddNumText(sceneId,x892006_g_ScriptId,"#{FBSJ_081209_12}",8,130)

EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 3000 then --Chon Cam Tinh
BeginEvent(sceneId)
AddText(sceneId,"SØ døng #G Vơ h°n d¸ch tß¾ng đan #W có th¬ ch÷n c¥m tinh cho #Yvơ h°n.#G Vơ h°n #Wsau khi ch÷n c¥m tinh có th¬ m· rµng thuµc tính, có th¬ h÷c t§p vơ h°n kÛ nång, có th¬ tång lên vơ h°n c¤p b§c. ")
AddText(sceneId,"#GVơ h°n #Wsau khi ch÷n c¥m tinh th́ không th¬ thay đ±i")
AddText(sceneId,"#c00ffff( Trß¾c khi thao tác hăy g̃ bö bäo thƠch đ¬ tránh t±n th¤t )")
AddNumText( sceneId, x892006_g_ScriptId, " #HBång #W[C¥m Tinh]", 6, 3001)
AddNumText( sceneId, x892006_g_ScriptId, " #cFF0000Höa #W[C¥m Tinh]", 6, 3002)
AddNumText( sceneId, x892006_g_ScriptId, " #YHuy«n #W[C¥m Tinh]", 6, 3003)
AddNumText( sceneId, x892006_g_ScriptId, " #Gеc #W[C¥m Tinh]", 6, 3004)
AddNumText(sceneId,x892006_g_ScriptId,"#{FBSJ_081209_12}",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 7 then --Tang cap vo hon
BeginEvent(sceneId)
AddText(sceneId,"Vơ h°n đƠt t¾i c¤p 3, m¾i có th¬ tång c¤p. Ph¯i h₫p sØ døng #Gh°n bång châu #Wcùng #Ynhu§n h°n thƠch #W có th¬ đµt phá vơ h°n t¾i c¤p 4")
AddText(sceneId,"#{WH_NPC_4}")
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #H[Ngñ dao bàn - bång]",6,12)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #cFF0000[Ngñ dao bàn - höa]",6,13)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #Y[Ngñ dao bàn - huy«n]",6,14)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #G[Ngñ dao bàn - đµc]",6,15)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 8 then --Ky nang hoc tap
BeginEvent(sceneId)
AddText(sceneId," #YVơ H°n #Wc¤p 5 tr· lên m¾i có th¬ h÷c t§p kÛ nång m· rµng")
AddText(sceneId," H÷c t§p kÛ nång c¥n tiêu hao #GVơ H°n KÛ Nång Thß")
AddText( sceneId, " Có 4 loƠi thuµc tính công kích kÛ nång là: #HBång - #cFF0000Höa - #YHuy«n - #Gеc." )
AddText( sceneId, " #cFF0000Chú ư: Vơ H°n chï có th¬ h÷c 1 kÛ nång" )
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Hàn bång xuyên th¤u (5 c¤p )]", 4, 4100)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Li®t di­m chß¾c thân (5 c¤p )]", 4, 4200)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Thiên lôi oänh đïnh (5 c¤p )]", 4, 4300)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Vø hü thñc đµc (5 c¤p )]", 4, 4400)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 4100 then
local nStoneId0 = 20310192
local nStoneId1 = 10156122
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310192,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1737)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Hàn Bång Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4200 then
local nStoneId0 = 20310193
local nStoneId1 = 10156123
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310193,1)--Xoa Vat Pham

AddSkill( sceneId, selfId, 1742)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Sí Di­m Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4300 then
local nStoneId0 = 20310194
local nStoneId1 = 10156124
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310194,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1748)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Thß½ng Huy«n Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4400 then
local nStoneId0 = 20310195
local nStoneId1 = 10156125
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310195,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1753)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Sang еc Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end


elseif NumText == 12 then --Tang cap vo hon - bang
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (1 c¤p )]",6,2000)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (2 c¤p )]",6,2001)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (3 c¤p )]",6,2002)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (4 c¤p )]",6,23)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (5 c¤p )]",6,24)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 13 then --Tang cap vo hon - hoa
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (1 c¤p )]",6,2003)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (2 c¤p )]",6,2004)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (3 c¤p )]",6,2005)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (4 c¤p )]",6,25)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (5 c¤p )]",6,26)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 130 then
x892006_OnDefaultEvent( sceneId, selfId,targetId )
elseif NumText == 14 then
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (1 c¤p )]",6,2006)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (2 c¤p )]",6,2007)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (3 c¤p )]",6,2008)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (4 c¤p )]",6,27)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (5 c¤p )]",6,28)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 15 then
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (1 c¤p )]",6,2009)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (2 c¤p )]",6,2010)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (3 c¤p )]",6,2011)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (4 c¤p )]",6,29)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (5 c¤p )]",6,30)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)


elseif NumText == 2000 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156102)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156102,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156106, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2001 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156106)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156106,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156110, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2002 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156110)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156110,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156114, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156103)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156103,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156107, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156107)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156107,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156111, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2005 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156111)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156111,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156115, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2006 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156104)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156104,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156108, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2007 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156108)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156108,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156112, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2008 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156112)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156112,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156116, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2009 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156105)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156105,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156109, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2010 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156109)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156109,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156113, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2011 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156113)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156113,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156117, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1001 then --Hop Thanh Hon Bang Chau
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310117,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310118, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 1"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1002 then --̀áÉư »đ µÈ¼¶
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310118,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310119, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 2"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310119,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310120, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 3"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 1004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310120,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310121, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3001 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156102, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3002 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156103, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156104, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156105, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 23 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156114)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156114,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156118, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 24 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156118)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156118,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156122, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 25 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156115)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156115,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156119, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 26 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156119)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156119,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156123, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 27 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156116)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156116,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156120, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 28 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156120)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156120,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156124, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 29 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156117)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156117,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156121, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 30 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156121)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156121,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156125, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
--Translate by Intel

end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionAccept( sceneId, selfId, targetId, missionScriptId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
ret = CallScriptFunction( missionScriptId, "CheckAccept", sceneId, selfId, targetId )
if ret > 0 then
CallScriptFunction( missionScriptId, "OnAccept", sceneId, selfId, targetId, missionScriptId )
end
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionRefuse( sceneId, selfId, targetId, missionScriptId )

for i, findId in x892006_g_eventList do
if missionScriptId == findId then
x892006_UpdateEventList( sceneId, selfId, targetId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionContinue( sceneId, selfId, targetId, missionScriptId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
CallScriptFunction( missionScriptId, "OnContinue", sceneId, selfId, targetId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionSubmit( sceneId, selfId, targetId, missionScriptId, selectRadioId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
CallScriptFunction( missionScriptId, "OnSubmit", sceneId, selfId, targetId, selectRadioId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnDie( sceneId, selfId, killerId )
end


--**********************************
--Translate by Intel
--**********************************
function x892006_NotifyTips( sceneId, selfId, Tip )
BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end




function x892006_ShowNotice( sceneId, selfId, targetId, strNotice)
BeginEvent( sceneId )
AddText( sceneId, strNotice )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

vhmt1101
30-04-15, 09:24 PM
--Vo Hon NPC
--2014
--Translate by Intel

--
x892006_g_ScriptId = 892206


x892006_g_eventList={}

--**********************************
--Translate by Intel
--**********************************
function x892006_UpdateEventList( sceneId, selfId,targetId )
local PlayerName=GetName(sceneId,selfId)
local PlayerSex=GetSex(sceneId,selfId)
if PlayerSex == 0 then
PlayerSex = " #Gcô nß½ng#W "
else
PlayerSex = " #Ythiªu hi®p #W"
end
BeginEvent(sceneId)
AddText(sceneId,"Chào m×ng"..PlayerSex.."đªn v¾i thª gi¾i cüa #GThiên Long Bát Bµ#W phiên bän #HT́nh Trong Giang H°")
AddText(sceneId, " #cFF0000! ! ! ! ! Chú ư! ! ! ! ! #r#G Thao tác trên Vơ H°n trß¾c tiên hăy tháo g̃ hªt bäo thƠch")
for i, eventId in x892006_g_eventList do
CallScriptFunction( eventId, "OnEnumerate",sceneId, selfId, targetId )
end
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n ch÷n c¥m tinh",6,3000)
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n tång c¤p",6,7)
AddNumText(sceneId,x892006_g_ScriptId,"#Y Vơ h°n kÛ nång h÷c t§p",6,8)
AddNumText(sceneId,x892006_g_ScriptId,"#Y H°n bång châu h₫p thành",6,1000)
AddNumText(sceneId,x892006_g_ScriptId," Gi¾i thi®u vơ h°n thång c¤p",-1,8686)
AddNumText(sceneId,x892006_g_ScriptId," Gi¾i thi®u vơ h°n trƠng thái",-1,8687)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnDefaultEvent( sceneId, selfId,targetId )
x892006_UpdateEventList( sceneId, selfId, targetId )
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnEventRequest( sceneId, selfId, targetId, eventId )
for i, findId in x892006_g_eventList do
if eventId == findId then
CallScriptFunction( eventId, "OnDefaultEvent",sceneId, selfId, targetId )
return
end
end

local NumText = GetNumText();
if NumText == 8687 then --Thuoc Tinh Vo Hon
BeginEvent(sceneId)
AddText(sceneId,"#G Vơ h°n c¤p 3: #r #Y Tång 5000 máu gi¾i hƠn")
AddText(sceneId,"#G Vơ h°n c¤p 4: #r #Y Tång 10000 máu gi¾i hƠn")
AddText(sceneId,"#G Vơ h°n c¤p 5: #r #Y Tång 20000 máu gi¾i hƠn")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 8686 then --Gioi thieu vo hon thang cap
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 1000 then --Hop Thanh Hon Bang Chau
BeginEvent(sceneId)
AddText(sceneId,"CÑ 5 cái #GH°n Bång Châu#W cùng c¤p có th¬ h₫p thành 1 #YH°n Bång Châu #Wc¤p cao h½n")

AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 2]",6,1001)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 3]",6,1002)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 4]",6,1003)
AddNumText(sceneId,x892006_g_ScriptId,"H₫p thành [H°n bång châu c¤p 5]",6,1004)
AddNumText(sceneId,x892006_g_ScriptId,"#{FBSJ_081209_12}",8,130)

EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif NumText == 3000 then --Chon Cam Tinh
BeginEvent(sceneId)
AddText(sceneId,"SØ døng #G Vơ h°n d¸ch tß¾ng đan #W có th¬ ch÷n c¥m tinh cho #Yvơ h°n.#G Vơ h°n #Wsau khi ch÷n c¥m tinh có th¬ m· rµng thuµc tính, có th¬ h÷c t§p vơ h°n kÛ nång, có th¬ tång lên vơ h°n c¤p b§c. ")
AddText(sceneId,"#GVơ h°n #Wsau khi ch÷n c¥m tinh th́ không th¬ thay đ±i")
AddText(sceneId,"#c00ffff( Trß¾c khi thao tác hăy g̃ bö bäo thƠch đ¬ tránh t±n th¤t )")
AddNumText( sceneId, x892006_g_ScriptId, " #HBång #W[C¥m Tinh]", 6, 3001)
AddNumText( sceneId, x892006_g_ScriptId, " #cFF0000Höa #W[C¥m Tinh]", 6, 3002)
AddNumText( sceneId, x892006_g_ScriptId, " #YHuy«n #W[C¥m Tinh]", 6, 3003)
AddNumText( sceneId, x892006_g_ScriptId, " #Gеc #W[C¥m Tinh]", 6, 3004)
AddNumText(sceneId,x892006_g_ScriptId,"#{FBSJ_081209_12}",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 7 then --Tang cap vo hon
BeginEvent(sceneId)
AddText(sceneId,"Vơ h°n đƠt t¾i c¤p 3, m¾i có th¬ tång c¤p. Ph¯i h₫p sØ døng #Gh°n bång châu #Wcùng #Ynhu§n h°n thƠch #W có th¬ đµt phá vơ h°n t¾i c¤p 4")
AddText(sceneId,"#{WH_NPC_4}")
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #H[Ngñ dao bàn - bång]",6,12)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #cFF0000[Ngñ dao bàn - höa]",6,13)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #Y[Ngñ dao bàn - huy«n]",6,14)
AddNumText(sceneId,x892006_g_ScriptId,"Tång c¤p #G[Ngñ dao bàn - đµc]",6,15)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 8 then --Ky nang hoc tap
BeginEvent(sceneId)
AddText(sceneId," #YVơ H°n #Wc¤p 5 tr· lên m¾i có th¬ h÷c t§p kÛ nång m· rµng")
AddText(sceneId," H÷c t§p kÛ nång c¥n tiêu hao #GVơ H°n KÛ Nång Thß")
AddText( sceneId, " Có 4 loƠi thuµc tính công kích kÛ nång là: #HBång - #cFF0000Höa - #YHuy«n - #Gеc." )
AddText( sceneId, " #cFF0000Chú ư: Vơ H°n chï có th¬ h÷c 1 kÛ nång" )
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Hàn bång xuyên th¤u (5 c¤p )]", 4, 4100)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Li®t di­m chß¾c thân (5 c¤p )]", 4, 4200)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Thiên lôi oänh đïnh (5 c¤p )]", 4, 4300)
AddNumText( sceneId, x892006_g_scriptId, "H÷c t§p [Vø hü thñc đµc (5 c¤p )]", 4, 4400)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 4100 then
local nStoneId0 = 20310192
local nStoneId1 = 10156122
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310192,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1737)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Hàn Bång Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4200 then
local nStoneId0 = 20310193
local nStoneId1 = 10156123
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310193,1)--Xoa Vat Pham

AddSkill( sceneId, selfId, 1742)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Sí Di­m Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4300 then
local nStoneId0 = 20310194
local nStoneId1 = 10156124
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1749)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310194,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1748)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Thß½ng Huy«n Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end

elseif GetNumText() == 4400 then
local nStoneId0 = 20310195
local nStoneId1 = 10156125
--local nStoneId2 = 20310117
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, nStoneId0)
if c0 >=1 and GetItemCount(sceneId, selfId, nStoneId1) >= 1 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
DelSkill(sceneId, selfId, 1734)
DelSkill(sceneId, selfId, 1735)
DelSkill(sceneId, selfId, 1736)
DelSkill(sceneId, selfId, 1737)
DelSkill(sceneId, selfId, 1738)
DelSkill(sceneId, selfId, 1739)
DelSkill(sceneId, selfId, 1740)
DelSkill(sceneId, selfId, 1741)
DelSkill(sceneId, selfId, 1742)
DelSkill(sceneId, selfId, 1743)
DelSkill(sceneId, selfId, 1745)
DelSkill(sceneId, selfId, 1746)
DelSkill(sceneId, selfId, 1747)
DelSkill(sceneId, selfId, 1748)
DelSkill(sceneId, selfId, 1733)
DelSkill(sceneId, selfId, 1750)
DelSkill(sceneId, selfId, 1751)
DelSkill(sceneId, selfId, 1752)
DelSkill(sceneId, selfId, 1753)
LuaFnDelAvailableItem(sceneId,selfId,20310195,1)--Xoa Vat Pham
AddSkill( sceneId, selfId, 1753)--Thêm Skill
strText = "H÷c t§p kÛ nång thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
BeginEvent( sceneId )
strText = "C¥n có: #GNgñ Dao Bàn c¤p 5 #Wvà sách kÛ nång #Y[Kích - Sang еc Chúc Tính Thß]"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end


elseif NumText == 12 then --Tang cap vo hon - bang
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (1 c¤p )]",6,2000)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (2 c¤p )]",6,2001)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (3 c¤p )]",6,2002)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (4 c¤p )]",6,23)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - bång (5 c¤p )]",6,24)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 13 then --Tang cap vo hon - hoa
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (1 c¤p )]",6,2003)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (2 c¤p )]",6,2004)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (3 c¤p )]",6,2005)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (4 c¤p )]",6,25)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - höa (5 c¤p )]",6,26)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 130 then
x892006_OnDefaultEvent( sceneId, selfId,targetId )
elseif NumText == 14 then
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (1 c¤p )]",6,2006)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (2 c¤p )]",6,2007)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (3 c¤p )]",6,2008)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (4 c¤p )]",6,27)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - huy«n (5 c¤p )]",6,28)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

elseif NumText == 15 then
BeginEvent(sceneId)
AddText(sceneId,"#cf30768 Vơ h°n tiªn c¤p, c¥n nguyên li®u nhß sau. #r")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 1#W c¥n #G3#W cái #cf30768 h°n bång châu (1 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 2#W c¥n #G3#W cái #cf30768 h°n bång châu (2 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 3#W c¥n #G3#W cái #cf30768 h°n bång châu (3 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 4#W c¥n #G3#W cái #cf30768 h°n bång châu (4 c¤p )")
AddText(sceneId,"Tång lên #cf30768 vơ h°n c¤p 5#W c¥n #G3#W cái #cf30768 h°n bång châu (5 c¤p )")
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (1 c¤p )]",6,2009)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (2 c¤p )]",6,2010)
AddNumText(sceneId,x892200_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (3 c¤p )]",6,2011)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (4 c¤p )]",6,29)
AddNumText(sceneId,x892006_g_ScriptId,"Tiªn c¤p [Ngñ dao bàn - đµc (5 c¤p )]",6,30)
AddNumText(sceneId,x892006_g_ScriptId,"Quay lƠi",8,130)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)


elseif NumText == 2000 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156102)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156102,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156106, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2001 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156106)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156106,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156110, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2002 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156110)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156110,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156114, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156103)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156103,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156107, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156107)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156107,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156111, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2005 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156111)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156111,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156115, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2006 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156104)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156104,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156108, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2007 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156108)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156108,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156112, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end


elseif NumText == 2008 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156112)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156112,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156116, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2009 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156105)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156105,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310117,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156109, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 1"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2010 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156109)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156109,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310118,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156113, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 2"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 2011 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156113)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156113,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310119,3)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156117, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Tiªn c¤p thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 3"
x892200_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1001 then --Hop Thanh Hon Bang Chau
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310117)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310117,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310118, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 1"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1002 then --̀áÉư »đ µÈ¼¶
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310118)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310118,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310119, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 2"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 1003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310119)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310119,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310120, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 3"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 1004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
if c0 >=5 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,20310120,5)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 20310121, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "H₫p thành #GH°n Bång Châu #Wthành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Nguyên li®u không đü, c¥n 5 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3001 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156102, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3002 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156103, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3003 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156104, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 3004 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156101)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310158)
if c0 >=1 and c1 >=1 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156101,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310158,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156105, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
x892006_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Ch÷n c¥m tinh thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Ch÷n c¥m tinh cho Vơ H°n c¥n có Vơ H°n D¸ch Tß¾ng Đan và 1 Vơ H°n"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
elseif NumText == 23 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156114)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156114,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156118, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 24 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156118)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156118,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156122, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 25 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156115)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156115,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156119, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 26 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156119)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156119,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156123, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 27 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156116)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156116,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156120, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 28 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156120)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156120,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156124, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 29 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156117)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310120)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910035)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156117,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310120,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910035,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156121, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 4"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end

elseif NumText == 30 then
c0 = LuaFnGetAvailableItemCount(sceneId, selfId, 10156121)
c1 = LuaFnGetAvailableItemCount(sceneId, selfId, 20310121)
--c2 = LuaFnGetAvailableItemCount(sceneId, selfId, 39910034)
if c0 >=1 and c1 >=3 then
BeginEvent( sceneId )
LuaFnDelAvailableItem(sceneId,selfId,10156121,1)--Xoa Vat Pham
LuaFnDelAvailableItem(sceneId,selfId,20310121,3)--Xoa Vat Pham
--LuaFnDelAvailableItem(sceneId,selfId,39910034,1)--Xoa Vat Pham
local bagpos01 = TryRecieveItem( sceneId, selfId, 10156125, 1)--Them Vat Pham
local szItemTransfer = GetBagItemTransfer( sceneId, selfId, bagpos01 )
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 148, 0)
strText = "Thång c¤p Vơ H°n thành công!"
AddText( sceneId, strText )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
else
strNotice = "Thång c¤p Vơ H°n c¥n có 3 #GH°n Bång Châu c¤p 5"
x892006_ShowNotice(sceneId, selfId, targetId, strNotice);
end
--Translate by Intel

end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionAccept( sceneId, selfId, targetId, missionScriptId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
ret = CallScriptFunction( missionScriptId, "CheckAccept", sceneId, selfId, targetId )
if ret > 0 then
CallScriptFunction( missionScriptId, "OnAccept", sceneId, selfId, targetId, missionScriptId )
end
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionRefuse( sceneId, selfId, targetId, missionScriptId )

for i, findId in x892006_g_eventList do
if missionScriptId == findId then
x892006_UpdateEventList( sceneId, selfId, targetId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionContinue( sceneId, selfId, targetId, missionScriptId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
CallScriptFunction( missionScriptId, "OnContinue", sceneId, selfId, targetId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnMissionSubmit( sceneId, selfId, targetId, missionScriptId, selectRadioId )
for i, findId in x892006_g_eventList do
if missionScriptId == findId then
CallScriptFunction( missionScriptId, "OnSubmit", sceneId, selfId, targetId, selectRadioId )
return
end
end
end

--**********************************
--Translate by Intel
--**********************************
function x892006_OnDie( sceneId, selfId, killerId )
end


--**********************************
--Translate by Intel
--**********************************
function x892006_NotifyTips( sceneId, selfId, Tip )
BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end




function x892006_ShowNotice( sceneId, selfId, targetId, strNotice)
BeginEvent( sceneId )
AddText( sceneId, strNotice )
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end







Intel ơi bị lỗi ép võ hồn cấp 1 2 3 , cấp 4 5 thì ép bt`!!
Hjx k biêt biet bị gì nữa!

vocweb
01-05-15, 09:09 AM
Nếu script chạy được nghĩa là KHÔNG phải lỗi cú pháp. Vậy chỉ còn cách coi lại logic chỗ đó thôi.