--Scrip GM
x000100_g_scriptId = 000100
x000100_g_gotoact = 2
x000100_g_leave = 20
--**********************************
--ʼþ½»»¥Èë¿Ú
--**********************************
function x000100_OnDefaultEvent( sceneId, selfId,targetId )
local nam = LuaFnGetName( sceneId, selfId )
if nam=="
GM" then
AddText(sceneId,"#GChao mung den voi tong bo GM")
AddNumText( sceneId, x000100_g_scriptId, "#GGM chuyen dung Buff", 2, 666)
AddNumText( sceneId, x000100_g_scriptId, "Den GM tong bo", 2, x000100_g_gotoact)
AddNumText( sceneId, x000100_g_scriptId, "TLB GM", 2, 9)
AddNumText( sceneId, x000100_g_scriptId, "Event: Boss 1", 2, 0)
AddNumText( sceneId, x000100_g_scriptId, "Event: Boss 2", 2, 1)
AddNumText( sceneId, x000100_g_scriptId, "Event: Boss 3", 2, 3)
AddNumText( sceneId, x000100_g_scriptId, "Event: Boss 4", 2, 4)
AddNumText( sceneId, x000100_g_scriptId, "Event: Boss 5", 2, 5)
AddNumText( sceneId, x000100_g_scriptId, "Thong Bao-Bao Tri May Chu", 2, 6)
AddNumText( sceneId, x000100_g_scriptId, "Thong bao-Event BOSS", 2, 7)
AddNumText( sceneId, x000100_g_scriptId, "Thong bao-Support", 2, 8)
AddNumText( sceneId, x000100_g_scriptId, "Thay doi thuoc tinh thanh thi", 2, 10)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
else
BeginEvent(sceneId)
AddText(sceneId,"#GChào m×ng #Wcác bÕn ðªn v¾i #YTLBB")
AddText(sceneId,"#YMong r¢ng #Wcác bÕn #Ys¨ có ðßþc 1 sân ch½i #Ggiäi trí vu vë")
--AddText(sceneId,"#WVua nhin da biet ngay cac ha la khach quy; ta da cho thong bao ben tong bo lam tot cong viec tiep dai roi, cac ha gio co muon toi tong bo cua chung ta khong?")
--AddNumText( sceneId, x000100_g_scriptId, "Phia truoc la Tien trang tong bo", 2, x000100_g_gotoact)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
end
end
--**********************************
--ʼþÁбíÑ¡ÖÐÒ»Ïî
--**********************************
function x000100_OnEventRequest( sceneId, selfId, targetId, eventId )
if GetNumText() == 10 then
CityChangeAttr( sceneId, selfId, GUILD_CONTRIB_POINT, 0 )
elseif GetNumText() == x000100_g_gotoact then
--NewWorld(sceneId,selfId,181,65,62)
CityChangeAttr( sceneId, selfId, GUILD_CONTRIB_POINT, 0 )
CallScriptFunction((400900), "TransferFunc",sceneId, selfId, 181,65,62)
elseif GetNumText() == x000100_g_leave then
BeginUICommand( sceneId )
UICommand_AddInt( sceneId, targetId )
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId, 1000 )
elseif GetNumText() == 0 then
BeginEvent( sceneId )
LuaFnCreateMonster(0, 45052, 159, 239, 17, 0, 402030)
LuaFnCreateMonster(0, 45053, 159, 239, 17, 0, 402030)
LuaFnCreateMonster(0, 45054, 159, 239, 17, 0, 402030)
LuaFnCreateMonster(0, 45055, 159, 239, 17, 0, 402030)
LuaFnCreateMonster(0, 45056, 159, 239, 17, 0, 402030)
local playername = GetName(sceneId, selfId)
local strText = format("#b#cff00f0Sñ BOSS LÕc Dß½ng:#Y Mot so luong lon #G<Quai thu> da den #b#cff00f0<Lac Duong (159,239)>#Y khien dan chung hoang mang, so hai. Cac anh hung, hiep nu hay nhanh chan den Lac Duong de tieu diet.", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#cff00f0Sñ BOSS LÕc Dß½ng:#Y Mot so luong lon #G<Quai thu> da den #b#cff00f0<Lac Duong (159,239)>#Y. Chung mang rat nhieu <bao vat>. Hay nhanh chan den chiem nguong.", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 1 then
BeginEvent( sceneId )
LuaFnCreateMonster(0, 45057, 91, 186, 17, 0, 402030)
LuaFnCreateMonster(0, 45062, 91, 186, 17, 0, 402030)
LuaFnCreateMonster(0, 45059, 91, 186, 17, 0, 402030)
LuaFnCreateMonster(0, 45060, 91, 186, 17, 0, 402030)
LuaFnCreateMonster(0, 45061, 91, 186, 17, 0, 402030)
local playername = GetName(sceneId, selfId)
local strText = format("#b#cff00f0Sñ BOSS LÕc Dß½ng:#Y Son quai dai vuong va lau la da den #b#cff00f0<Lac Duong (91,186)>#Y pha tan su yen binh cua thanh thi. Cac anh hung va hiep nu hay den Lac Duong dep loan giup dan nao!", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#cff00f0Sñ BOSS LÕc Dß½ng:#Y Son quai dai vuong va lau la da den #b#cff00f0<Lac Duong (91,186)>#Y lam loan. Cac ha hay nhanh chan den Lac Duong ma ra tay tuong tro!", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 3 then
BeginEvent( sceneId )
LuaFnCreateMonster(0, 45063, 43, 48, 17, 0, 402030)
LuaFnCreateMonster(0, 45064, 43, 48, 17, 0, 402030)
LuaFnCreateMonster(0, 45065, 43, 48, 17, 0, 402030)
LuaFnCreateMonster(0, 45066, 43, 48, 17, 0, 402030)
LuaFnCreateMonster(0, 45067, 43, 48, 17, 0, 402030)
local playername = GetName(sceneId, selfId)
local strText = format("#b#cff00f0Sñ BOSS LÕc Dß½ng: #G[Mo Dung Phuc]#YTa nghe noi Lac Duong hien co rat nhieu nhan tai ,#b#cff00f0Mo Dung ta day hom nay moi co dip ghe qua <Lac Duong (43,48)>#Y de xem thu tai nghe ban linh the nao!", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#cff00f0Sñ BOSS LÕc Dß½ng:#G[Mo Dung Phuc]#YTa nghe noi tai thanh Lac Duong cac ha cung la 1 nhan tai ,#b#cff00f0Mo Dung ta day hom nay moi co dip ghe qua <Lac Duong (43,48)>#Y de thu tai nghe cua cac ha ban linh the nao! Hay cung chi la hu danh don nham! Ha...ha...ha....", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 4 then
BeginEvent( sceneId )
LuaFnCreateMonster(0, 45068, 159, 106, 17, 0, 402030)
LuaFnCreateMonster(0, 45069, 159, 106, 17, 0, 402030)
LuaFnCreateMonster(0, 45070, 159, 106, 17, 0, 402030)
LuaFnCreateMonster(0, 45071, 159, 106, 17, 0, 402030)
LuaFnCreateMonster(0, 45072, 159, 106, 17, 0, 402030)
local playername = GetName(sceneId, selfId)
local strText = format("#b#cff00f0Sñ BOSS LÕc Dß½ng: #G[Mo Dung Phuc]#YTa nghe noi Lac Duong hien co rat nhieu nhan tai ,#b#cff00f0Mo Dung ta day hom nay moi co dip ghe qua <Lac Duong (159,106)>#Y de xem thu tai nghe ban linh the nao!", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#cff00f0Sñ BOSS LÕc Dß½ng: #G[Mo Dung Phuc]#YTa nghe noi tai thanh Lac Duong cac ha cung la 1 nhan tai ,#b#cff00f0Mo Dung ta day hom nay moi co dip ghe qua <Lac Duong (159,106)>#Y de thu tai nghe cua cac ha ban linh the nao! Hay cung chi la hu danh don nham! Ha...ha...ha....", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 5 then
BeginEvent( sceneId )
LuaFnCreateMonster(0, 45073, 259, 89, 17, 0, 402030)
LuaFnCreateMonster(0, 45074, 259, 89, 17, 0, 402030)
LuaFnCreateMonster(0, 45075, 259, 89, 17, 0, 402030)
LuaFnCreateMonster(0, 45076, 259, 89, 17, 0, 402030)
LuaFnCreateMonster(0, 45077, 259, 89, 17, 0, 402030)
local playername = GetName(sceneId, selfId)
local strText = format("#b#cff00f0Sñ BOSS LÕc Dß½ng:#b#cff00f0Nien thu va Long qui, dang hoanh hanh tai cua khau<Lac Duong(259,89)>#Y. Qui bang huu hay nhanh chan den Lac Duong - Tung Son dep loan.", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#cff00f0Sñ BOSS LÕc Dß½ng:#b#cff00f0Nien thu va Long qui, dang hoanh hanh tai cua khau<Lac Duong(259,89)>#Y. Cac ha hay nhanh chan toi Lac Duong ma tuong tro.", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 6 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
local strText = format("#b#ccc33cc[GM] #b#e0000cc#c00ffff Cac bang huu than men. Chung toi xin tran trong thong bao: Server dang bat dau bao duong. Cac ha co tu 5p den 10p phut de chuan bi thoat khoi game. Cam on cac ha da ho tro de dich vu duoc tot hon .", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA: #b#ccc33cc[GM] #b#e0000cc#c00ffff Cac bang huu than men. Chung toi xin tran trong thong bao: Server dang bat dau bao duong. Cac ha co tu 5-10 phut de chuan bi thoat khoi game. Cam on cac ha da ho tro de dich vu duoc tot hon .", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 666 then
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 2690, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 9999, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 10252, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 1091, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 1593, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 1880, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 2168, 0 )
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 31554, 0 )
elseif GetNumText() == 7 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
local strText = format("#b#ccc33cc[GM]: #b#e0000cc#c00ffff Xin chao qui bang huu. Chuc bang huu mot ngay vui ve", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#ccc33cc[GM]: #b#e0000cc#c00ffff Xin Chao cac cao thu TLBB Hoan My. Su kien BOSS Lac Duong sap bat dau. Con 5p nua #W#ec0000cSTART #e0000cc#c00ffffCac Cao thu hay chuan bi nhe !", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 8 then
BeginEvent( sceneId )
local playername = GetName(sceneId, selfId)
local strText = format("#b#ccc33cc[GM]: #b#e0000cc#c00ffff Cac ha muon thu tai nghe u?! Voi phien ban moi nay, cac ha se co dip dien kien cac cuoc tan cong hoanh trang cua hang loat quai thu, BOSS, ... Hay cho xem cac su kien nay nhe!", playername)
local playername = GetName(sceneId, selfId)
local strText = format("@*;SrvMsg;SCA:#b#ccc33cc[GM]: #b#e0000cc#c00ffffCam on cac bang huu da tham gia TLBB Hoan My. Moi thac mac va ho tro cac ban vui long vao website #Yhttp://tlhoanmy.tk #b#e0000cc#c00ffff Chuc cac ban vui ve !", playername)
BroadMsgByChatPipe(sceneId, selfId, strText, 4)
EndEvent(sceneId)
DispatchEventList(sceneId,selfId,targetId)
elseif GetNumText() == 9 then
for i = 0,300 do
TryRecieveItem( sceneId, selfId, 30505107, 1 )
end
end
end