quyentran
01-09-14, 05:54 PM
đâu bạn gửi mình server ý đi :v
--Hµp Quà Hiên Viên
--Script m· quà
--Code by Sói Kool
x900501_g_scriptId = 900501
x900501_g_HopQua = 30008155
x900501_g_HienVienMinh = 10557063
x900501_g_HienVienTien = 10557065
x900501_g_HienVienChan = 10557055
x900501_g_HienVienNhat = 10557058
x900501_g_HienVienPhong = 10557059
x900501_g_HienVienNguyet = 10557056
x900501_g_HienVienTram = 10557062
x900501_g_HienVienThien = 10557060
x900501_g_HienVienViet = 10557061
x900501_g_HienVienTn = 10557057
x900501_g_HienVienLe = 10557051
x900501_g_HienVienLan = 10557052
x900501_g_HienVienPhach = 10557054
x900501_g_HienVienDiet = 10557053
x900501_g_HienVienTuyet = 10557064
x900501_g_MG = 30008145
x900501_g_TD = 30008152
x900501_g_VD = 30008151
x900501_g_NM = 30008146
x900501_g_TT = 30008153
x900501_g_TS = 30008154
x900501_g_TL = 30008148
x900501_g_DL = 30008149
x900501_g_MD = 30008147
x900501_g_CB = 30008150
--**********************************
--M· bäo sß½ng--
--**********************************
function x900501_OnDefaultEvent(sceneId,selfId,BagPos)
--Ki¬m tra ô ðÕo cø
local FreeSpace = LuaFnGetPropertyBagSpace( sceneId, selfId )
if( FreeSpace < 1 ) then
x900501_NotifyFailTips(sceneId,selfId,"Hãy s¡p xªp lÕi 1 ô tr¯ng trong ô ÐÕo Cø.")
return 0
end
--Xóa ðÕo cø
LuaFnDelAvailableItem(sceneId,selfId,x900501_g_Hop Qua,1)
--Random v§t ph¦m
local nRet = random(25)
if nRet<=1 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienMinh,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Minh." )
elseif nRet<=2 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienTien,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Tin." )
elseif nRet<=3 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienChan,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Ch¤n." )
elseif nRet<=4 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienNhat,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Nh§t." )
elseif nRet<=5 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienPhong,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Phong." )
elseif nRet<=6 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienNguyet,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Nguy®t." )
elseif nRet<=7 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienTram,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Träm." )
elseif nRet<=8 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienThien,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Thiên." )
elseif nRet<=9 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienViet,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Vi®t." )
elseif nRet<=10 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienTn,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Tiªn." )
elseif nRet<=11 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienLe,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - L®." )
elseif nRet<=12 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienLan,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Lân." )
elseif nRet<=13 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienPhach,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Phách." )
elseif nRet<=14 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienDiet,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Di®t." )
elseif nRet<=15 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_HienVienTuyet,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái Hiên Viên - Tuy®t." )
elseif nRet<=16 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_MG,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Minh Giáo." )
elseif nRet<=17 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_MD,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Mµ Dung." )
elseif nRet<=18 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_TL,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Thiªu Lâm." )
elseif nRet<=19 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_DL,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Thiên Long." )
elseif nRet<=20 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_CB,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Cái Bang." )
elseif nRet<=21 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_VD,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Võ Ðang." )
elseif nRet<=22 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_TD,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Tiêu Dao." )
elseif nRet<=23 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_TT,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Tinh Túc." )
elseif nRet<=24 then
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_TS,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Thiên S½n." )
else
BeginAddItem(sceneId)
AddItem( sceneId,x900501_g_NM,1)
EndAddItem(sceneId,selfId)
AddItemListToHuman(sceneId,selfId)
x900501_NotifyFailTips( sceneId, selfId,"Nh§n ðßþc 1 cái аng Hành L®nh - Nga My." )
end
local nam = GetName(sceneId,selfId)
BroadMsgByChatPipe(sceneId, selfId,""..nam.."#R ðã m· #GHµp Quà Hiên Viên#R, nh§n ðßþc nhi«u ph¥n thß·ng quý giá. Chúc m×ng!",4)
end
--**********************************
--Ghi tên Tip--
--**********************************
function x900501_NotifyFailTips( sceneId, selfId, Tip )
BeginEvent( sceneId )
AddText( sceneId, Tip )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.