PDA

View Full Version : [TLBB] Giúp npc này với



dangvietanh
03-01-15, 10:13 PM
code :

--NPC TongHop
--ID: 854923
--Script: NPC TongHop
--**************************
x854923_g_ScriptId = 854923
--**************************
function x854923_OnDefaultEvent(sceneId,selfId,targetId)
local nam = LuaFnGetName(sceneId,selfId)

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Chao Mung "..nam.." Den Voi TLBB")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Tri Lieu",1,20000)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Chuyen Sinh",1,20001)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Xem So Lan Chuyen Sinh",1,20003)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Nhan Danh Hieu",1,20004)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Doi Sang Post",1,20012)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--**********************************
--Ki琺 tra t鷌
--**********************************
function x854923_OnConditionCheck( sceneId, selfId )
local FreeSpace = LuaFnGetPropertyBagSpace( sceneId, selfId )

if( FreeSpace < 1 ) then
local strNotice = "T鷌 餰o thi猽 kh鬾g gian!"
x854923_ShowNotice( sceneId, selfId, strNotice)
return 0
end

end
--**************************
function x854923_OnEventRequest(sceneId,selfId,targetId,eve ntId)
local key = GetNumText()
--************************************--
if key == 20000 then
BeginEvent(SceneId)
CallScriptFunction(000064,"Restore_hpmp",sceneId,selfId,targetId)
RestoreStrikePoint(sceneId,selfId)
EndEvent(SceneId)
BeginEvent(SceneId)
AddText(sceneId,"Tri Lieu Thanh Cong")
EndEvent(SceneId)

end
if key == 20001 then

BeginEvent(sceneId)
AddText(sceneId,"#b#YSau Khi Chuyen Sinh Level Xuong 40")
AddText(sceneId,"#b#YBan Co Dong Y Khong")
AddNumText(sceneId,x900087_g_ScriptId,"#b#YToi Dong Y",2,20002)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--*****************--
if key == 20002 then

if GetLevel(sceneId,selfId) < 130 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YLevel Cua Ban Chua Dat Den 130 Hay Tu Luyen Them")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif num > 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Da Vuot Qua 200 Lan ")
AddText(sceneId,"#b#YBan Khong The Chuyen Sinh Duoc Nua ")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
SetLevel(sceneId,selfId,40)
num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
SetMissionData(sceneId,selfId,MD_ZHUANSHENG,num+1)
BeginEvent(sceneId)
AddText(sceneId,"#b#YChuc Mung Ban Da Tu Luyen Thanh Cong ")
AddText(sceneId,"#b#YSo Lan Tu Luyen Cua Ban Hien Tai La "..(num+1).."")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20003 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Hien Tai Cua Ban La "..num.."")
AddText(sceneId,"#b#YBan Con "..(200-num).." Lan Chuyen Sinh Nua")
AddText(sceneId,"#b#Y #4 Hay Co Gang Len Nhe #4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
if key == 20004 then
BeginEvent(sceneId)
AddText(sceneId,"#Y Nhan Danh Hieu Theo So Lan Chhuyen Sinh")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_1",5,20005)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_2",5,20006)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_3",5,20007)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_4",5,20008)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00099 Supper_Saiyan_5",5,20009)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00000 Dragon Ball Vip",5,20010)
AddNumText(sceneId,x854923_g_ScriptId,"#b#G Lan Chuyen Sinh Nhan Danh Hieu",11,20011)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

if key == 20005 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Chua Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_1 Can Chuyen Sinh 1 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_1")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20006 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_2 Can Chuyen Sinh 10 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_2")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_2")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20007 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 20 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_3 Can Chuyen Sinh 20 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_3")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_3")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20008 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 50 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_4 Can Chuyen Sinh 50 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_4")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20009 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 100 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec Supper_Saiyan_5 Can Chuyen Sinh 100 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00099Supper_Saiyan_5")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec Supper_Saiyan_5")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20010 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec00000 Dragon Ball Vip Can Chuyen Sinh 200 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00000Dragon Ball Vip")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec00000 Dragon Ball Vip")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20011 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Supper_saiyan_1 Can 1 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_2 Can 10 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_3 Can 30 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_4 Can 50 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00099 Supper_saiyan_5 Can 100 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00000 Dragon Ball Vip Can 200 Lan Chuyen Sinh")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20012 then
BeginEvent(sceneId)
AddText(sceneId,"Ban Muon Nhan Loai Post Nao Sau Day ")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 5000 Post",1,20013)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 10000 Post",1,20014)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 20000 Post",1,20015)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00000 50000 Post",1,20016)
AddNumText(sceneId,x854923_g_ScriptId,"#G Post Can Bao Nhieu Nguyen Lieu",11,20017)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20013 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,1)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 5000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 5000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20014 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 2 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,2)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 10000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 10000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20015 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 4 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,4)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 20000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 20000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20016 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,10)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 50000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 50000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20017 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y 5000 Post Can 1 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 10000 Post Can 2 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 20000 Post Can 4 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 50000 Post Can 10 Lien Nien Huu Du")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

function x854923_NotifyFailTips( sceneId, selfId, Tip )

BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )

end





Bác Nào Xem Giúp Em Sai Ở Đâu Được Hum ??? Em Ấn Vào NPC Nó Không Hiên Lên J Cả =((

dangvietanh
04-01-15, 01:58 PM
code :

--NPC TongHop
--ID: 854923
--Script: NPC TongHop
--**************************
x854923_g_ScriptId = 854923
--**************************
function x854923_OnDefaultEvent(sceneId,selfId,targetId)
local nam = LuaFnGetName(sceneId,selfId)

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Chao Mung "..nam.." Den Voi TLBB")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Tri Lieu",1,20000)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Chuyen Sinh",1,20001)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Xem So Lan Chuyen Sinh",1,20003)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Nhan Danh Hieu",1,20004)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Doi Sang Post",1,20012)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--**********************************
--Ki琺 tra t鷌
--**********************************
function x854923_OnConditionCheck( sceneId, selfId )
local FreeSpace = LuaFnGetPropertyBagSpace( sceneId, selfId )

if( FreeSpace < 1 ) then
local strNotice = "T鷌 餰o thi猽 kh鬾g gian!"
x854923_ShowNotice( sceneId, selfId, strNotice)
return 0
end

end
--**************************
function x854923_OnEventRequest(sceneId,selfId,targetId,eve ntId)
local key = GetNumText()
--************************************--
if key == 20000 then
BeginEvent(SceneId)
CallScriptFunction(000064,"Restore_hpmp",sceneId,selfId,targetId)
RestoreStrikePoint(sceneId,selfId)
EndEvent(SceneId)
BeginEvent(SceneId)
AddText(sceneId,"Tri Lieu Thanh Cong")
EndEvent(SceneId)

end
if key == 20001 then

BeginEvent(sceneId)
AddText(sceneId,"#b#YSau Khi Chuyen Sinh Level Xuong 40")
AddText(sceneId,"#b#YBan Co Dong Y Khong")
AddNumText(sceneId,x900087_g_ScriptId,"#b#YToi Dong Y",2,20002)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--*****************--
if key == 20002 then

if GetLevel(sceneId,selfId) < 130 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YLevel Cua Ban Chua Dat Den 130 Hay Tu Luyen Them")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif num > 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Da Vuot Qua 200 Lan ")
AddText(sceneId,"#b#YBan Khong The Chuyen Sinh Duoc Nua ")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
SetLevel(sceneId,selfId,40)
num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
SetMissionData(sceneId,selfId,MD_ZHUANSHENG,num+1)
BeginEvent(sceneId)
AddText(sceneId,"#b#YChuc Mung Ban Da Tu Luyen Thanh Cong ")
AddText(sceneId,"#b#YSo Lan Tu Luyen Cua Ban Hien Tai La "..(num+1).."")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20003 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Hien Tai Cua Ban La "..num.."")
AddText(sceneId,"#b#YBan Con "..(200-num).." Lan Chuyen Sinh Nua")
AddText(sceneId,"#b#Y #4 Hay Co Gang Len Nhe #4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
if key == 20004 then
BeginEvent(sceneId)
AddText(sceneId,"#Y Nhan Danh Hieu Theo So Lan Chhuyen Sinh")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_1",5,20005)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_2",5,20006)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_3",5,20007)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y Supper_Saiyan_4",5,20008)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00099 Supper_Saiyan_5",5,20009)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00000 Dragon Ball Vip",5,20010)
AddNumText(sceneId,x854923_g_ScriptId,"#b#G Lan Chuyen Sinh Nhan Danh Hieu",11,20011)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

if key == 20005 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Chua Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_1 Can Chuyen Sinh 1 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_1")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20006 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_2 Can Chuyen Sinh 10 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_2")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_2")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20007 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 20 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_3 Can Chuyen Sinh 20 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_3")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_3")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20008 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 50 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_4 Can Chuyen Sinh 50 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_Saiyan_4")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20009 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 100 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec Supper_Saiyan_5 Can Chuyen Sinh 100 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00099Supper_Saiyan_5")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec Supper_Saiyan_5")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20010 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec00000 Dragon Ball Vip Can Chuyen Sinh 200 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00000Dragon Ball Vip")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec00000 Dragon Ball Vip")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20011 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Supper_saiyan_1 Can 1 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_2 Can 10 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_3 Can 30 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_4 Can 50 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00099 Supper_saiyan_5 Can 100 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00000 Dragon Ball Vip Can 200 Lan Chuyen Sinh")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20012 then
BeginEvent(sceneId)
AddText(sceneId,"Ban Muon Nhan Loai Post Nao Sau Day ")
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 5000 Post",1,20013)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 10000 Post",1,20014)
AddNumText(sceneId,x854923_g_ScriptId,"#b#Y 20000 Post",1,20015)
AddNumText(sceneId,x854923_g_ScriptId,"#b#ec00000 50000 Post",1,20016)
AddNumText(sceneId,x854923_g_ScriptId,"#G Post Can Bao Nhieu Nguyen Lieu",11,20017)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20013 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,1)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 5000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 5000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20014 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 2 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,2)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 10000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 10000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20015 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 4 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,4)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 20000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 20000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20016 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,10)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 50000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 50000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20017 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y 5000 Post Can 1 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 10000 Post Can 2 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 20000 Post Can 4 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 50000 Post Can 10 Lien Nien Huu Du")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

function x854923_NotifyFailTips( sceneId, selfId, Tip )

BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )

end





Bác Nào Xem Giúp Em Sai Ở Đâu Được Hum ??? Em Ấn Vào NPC Nó Không Hiên Lên J Cả =(( Sao Không Có ai giúp Vậy 8-x8-x8-x

songtu
04-01-15, 04:18 PM
script này bạn đi copy ở đâu về vậy ?? hay là đã có ai đó add sẵn tong sever rồi!!
lỗi tùm lum!!
ví dụ như "event Id" ...bla.bla.. thiếu "end" các kiểu!! :D
xem trong thư mục Log ở sever xem nó báo lỗi gì ?? ko có thì tạo thư mục ý ra, rồi vào xem! xem cụ thể trong file errorlua.txt gì đó..
cách thứ 2 set acc thành GM (trong GMlist.txt)rồi dùng lệnh !!loadlua = ID_script, rồi chạy xem ở sever nó báo sao?
rồi theo đó mà sửa!!
nếu mà làm đúng hết rồi!! thid xem lại trong script.dat của cả client và sever xem đã khai báo chưa ?!!?

songtu
04-01-15, 04:28 PM
code này ko biết chuẩn chưa!! chạy thử coi!!


--NPC TongHop
--ID: 808008
--Script: NPC TongHop
--**************************
x808008_g_ScriptId = 808008
--**************************
function x808008_OnDefaultEvent(sceneId,selfId,targetId)
local nam = LuaFnGetName(sceneId,selfId)

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Chao Mung "..nam.." Den Voi TLBB")
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Tri Lieu",1,20000)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Chuyen Sinh",1,20001)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Xem So Lan Chuyen Sinh",1,20003)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Nhan Danh Hieu",1,20004)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Doi Sang Post",1,20012)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--**********************************
--Ki? tra t?
--**********************************
function x808008_OnConditionCheck( sceneId, selfId )
local FreeSpace = LuaFnGetPropertyBagSpace( sceneId, selfId )

if( FreeSpace < 1 ) then
local strNotice = "T? ?o thi? kh?g gian!"
x808008_ShowNotice( sceneId, selfId, strNotice)
return 0
end

end
--**************************
function x808008_OnEventRequest(sceneId,selfId,targetId,eve ntId)
local key = GetNumText()
--************************************--
if key == 20000 then
BeginEvent(SceneId)
CallScriptFunction(000064,"Restore_hpmp",sceneId,selfId,targetId)
RestoreStrikePoint(sceneId,selfId)
EndEvent(SceneId)
BeginEvent(SceneId)
AddText(sceneId,"Tri Lieu Thanh Cong")
EndEvent(SceneId)

end
if key == 20001 then

BeginEvent(sceneId)
AddText(sceneId,"#b#YSau Khi Chuyen Sinh Level Xuong 40")
AddText(sceneId,"#b#YBan Co Dong Y Khong")
AddNumText(sceneId,x900087_g_ScriptId,"#b#YToi Dong Y",2,20002)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
--*****************--
if key == 20002 then

if GetLevel(sceneId,selfId) < 130 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YLevel Cua Ban Chua Dat Den 130 Hay Tu Luyen Them")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif num > 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Da Vuot Qua 200 Lan ")
AddText(sceneId,"#b#YBan Khong The Chuyen Sinh Duoc Nua ")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
SetLevel(sceneId,selfId,40)
num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
SetMissionData(sceneId,selfId,MD_ZHUANSHENG,num+1)
BeginEvent(sceneId)
AddText(sceneId,"#b#YChuc Mung Ban Da Tu Luyen Thanh Cong ")
AddText(sceneId,"#b#YSo Lan Tu Luyen Cua Ban Hien Tai La "..(num+1).."")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20003 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Hien Tai Cua Ban La "..num.."")
AddText(sceneId,"#b#YBan Con "..(200-num).." Lan Chuyen Sinh Nua")
AddText(sceneId,"#b#Y #4 Hay Co Gang Len Nhe #4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)

end
if key == 20004 then
BeginEvent(sceneId)
AddText(sceneId,"#Y Nhan Danh Hieu Theo So Lan Chhuyen Sinh")
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Supper_Saiyan_1",5,20005)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Supper_Saiyan_2",5,20006)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Supper_Saiyan_3",5,20007)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y Supper_Saiyan_4",5,20008)
AddNumText(sceneId,x808008_g_ScriptId,"#b#ec00099 Supper_Saiyan_5",5,20009)
AddNumText(sceneId,x808008_g_ScriptId,"#b#ec00000 Dragon Ball Vip",5,20010)
AddNumText(sceneId,x808008_g_ScriptId,"#b#G Lan Chuyen Sinh Nhan Danh Hieu",11,20011)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

if key == 20005 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#YSo Lan Chuyen Sinh Cua Ban Chua Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_1 Can Chuyen Sinh 1 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_S aiyan_1")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end

if key == 20006 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_2 Can Chuyen Sinh 10 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_S aiyan_2")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_2")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20007 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 20 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_3 Can Chuyen Sinh 20 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_S aiyan_3")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_3")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20008 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 50 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#Y Supper_Saiyan_4 Can Chuyen Sinh 50 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#YSupper_S aiyan_4")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#Y Supper_Saiyan_4")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20009 then

num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 100 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec Supper_Saiyan_5 Can Chuyen Sinh 100 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00099Su pper_Saiyan_5")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec Supper_Saiyan_5")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20010 then

SetMissionData(sceneId,selfId,MD_ZHUANSHENG,200)
num = GetMissionData(sceneId,selfId,MD_ZHUANSHENG)
if num < 200 then
BeginEvent(sceneId)
AddText(sceneId,"#b#Y So Lan Chuyen Sinh Cua Ban Khong Du")
AddText(sceneId,"#b#Y Muon Nhan Danh Hieu #b#ec00000 Dragon Ball Vip Can Chuyen Sinh 200 Lan")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnAwardSpouseTitle(sceneId,selfId,"#b#ec00000Dr agon Ball Vip")
DispatchAllTitle(sceneId,selfId)
BeginEvent(sceneId)
AddText(sceneId,"Chuc Mung Ban Nhan Thanh Cong Danh Hieu #b#ec00000 Dragon Ball Vip")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20011 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y Supper_saiyan_1 Can 1 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_2 Can 10 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_3 Can 30 Lan Chuyen Sinh")
AddText(sceneId,"#b#Y Supper_saiyan_4 Can 50 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00099 Supper_saiyan_5 Can 100 Lan Chuyen Sinh")
AddText(sceneId,"#b#ec00000 Dragon Ball Vip Can 200 Lan Chuyen Sinh")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20012 then
BeginEvent(sceneId)
AddText(sceneId,"Ban Muon Nhan Loai Post Nao Sau Day ")
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y 5000 Post",1,20013)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y 10000 Post",1,20014)
AddNumText(sceneId,x808008_g_ScriptId,"#b#Y 20000 Post",1,20015)
AddNumText(sceneId,x808008_g_ScriptId,"#b#ec00000 50000 Post",1,20016)
AddNumText(sceneId,x808008_g_ScriptId,"#G Post Can Bao Nhieu Nguyen Lieu",11,20017)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
if key == 20013 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 1 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,1)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 5000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 5000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20014 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 2 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,2)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 10000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 10000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20015 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 4 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,4)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 20000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 20000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20016 then
if LuaFnGetAvailableItemCount(sceneId, selfId, 30509092) < 10 then
BeginEvent(sceneId)
AddText(sceneId,"#b#G #213 Dinh Lua Dao A #213 ")
AddText(sceneId,"#b#Y #24 Tren Nguoi Cac ha Khong Du Nguyen Lieu #24")
AddText(sceneId,"#b#W #1 Hay Doc Huong Dan O Ben Duoi #1")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
LuaFnDelAvailableItem(sceneId,selfId,30509092,10)
local RemainPoint = GetPlayerRemainPoints(sceneId, selfId)
RemainPoint = RemainPoint + 50000
SetPlayerRemainPoints(sceneId, selfId, RemainPoint)
BeginEvent(sceneId)
AddText(sceneId,"#b#ec00000 Chuc Mung Ban Doi 50000 Post Thanh Cong")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end

end
if key == 20017 then

BeginEvent(sceneId)
AddText(sceneId,"#b#Y 5000 Post Can 1 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 10000 Post Can 2 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 20000 Post Can 4 Lien Nien Huu Du")
AddText(sceneId,"#b#Y 50000 Post Can 10 Lien Nien Huu Du")
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
end
function x808008_NotifyFailTips( sceneId, selfId, Tip )
BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end