megalords
30-11-11, 10:27 PM
Include("\\Script\\global\\serverlib.lua");
gio_event_tet = {8,12,13,17,18,19,20,21,22}
mang_cau = 238
dua_xiem = 239
du_du = 240
xoai = 241
sung = 242
FRUITNAME = {
[238] = "Mang Cau",
[239] = "Dua Xiem",
[240] = "Xoai",
[241] = "Du Du",
[242] = "Sung",
}
function main()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
SubWorld = 1;
if (GetLevel() >= 10) then
if GetMissionV(2) == 0 then
Say("<bclr=blue>Hoat dong event tet chua den thoi gian hoat dong<bclr>",0)
elseif GetMissionV(2) == 1 or GetMissionV(2) == 2 then
if GetLevel() < 10 then
Say("Cap do yeu cau phai la tren <color=Red>cap 10<color> moi co the tham gia hoat dong.",0)
else
Say("<color=yellow>Le Quan<color>: Hoat dong event tet da dien ra!Nguoi co muon tham gia khong?",2,"Ta muon tham gia./ok","De ta suy nghi lai da./out")
end
end
end;
end;
function ok()
for i = 1,getn(gio_event_tet) do
if gio >= gio_event_tet[i] then
hetgioeventtet = (gio_event_tet[i]+1.5)*60*60 - (gio*60*60+phut*60+giay)
break
end
end
SetTimer(hetgioeventtet*18,4)
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon thuc hien viec gi?","Ta muon ghep trai cay./ghep","Doi trai cay lay banh./doi","Ta chi ghe ngang thoi./out"});
end;
function ghep()
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon ghep loai trai cay nao","3 Mang Cau thanh 1 Dua Xiem./ghep1","3 Dua Xiem thanh 1 Du Du./ghep2","3 Du Du thanh 1 Xoai./ghep3","3 Xoai thanh 1 Sung./ghep4","De ta suy nghi./out"});
end;
function ghep1()
if (GetItemCount(238) >= 3) then
ti_le = 70
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Dua Xiem<color>!")
AddEventItem(239)
DelItem(238)
DelItem(238)
DelItem(238)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 ,color=Green>Mang Cau<color>!")
DelItem(238)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Mang Cau<color> ben nguoi khong!")
end
end;
function ghep2()
if (GetItemCount(239) >= 3) then
ti_le = 65
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Du Du<color>!")
AddEventItem(240)
DelItem(239)
DelItem(239)
DelItem(239)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Dua Xiem<color>!")
DelItem(239)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Dua Xiem<color> ben nguoi khong!")
end
end;
function ghep3()
if (GetItemCount(240) >= 3) then
ti_le = 50
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Xoai<color>!")
AddEventItem(241)
DelItem(240)
DelItem(240)
DelItem(240)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Du Du<color>!")
DelItem(240)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Du Du<color> ben nguoi khong!")
end
end;
function ghep4()
if (GetItemCount(241) >= 3) then
ti_le = 30
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Sung<color>!")
AddEventItem(242)
DelItem(241)
DelItem(241)
DelItem(241)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Xoai<color>!")
DelItem(241)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Xoai<color> ben nguoi khong!")
end
end;
function doi()
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon doi loai banh nao nao?","5 Mang Cau./doi1","5 Dua Xiem./doi2","5 Du Du./doi3","5 Xoai./doi4","5 Sung./doi5","Doi lay thuy tinh./doi6","De ta suy nghi lai./out"});
end;
function doi1()
if (GetItemCount(238) >= 3) then
AddOwnExp(50000)
Talk(1,"","Ban nhan duoc 5000 diem kinh nghiem!")
Msg2Player("Nhan duoc 5000 diem kinh nghiem....")
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
end;
end;
function doi2()
if (GetItemCount(239) >= 5) then
AddOwnExp(500000)
Talk(1,"","Ban nhan duoc <color=yellow>500000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 500000 diem kinh nghiem....")
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
end;
end;
function doi3()
if (GetItemCount(240) >= 5) then
AddOwnExp(1000000)
Talk(1,"","Ban nhan duoc <color=yellow>1000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 1000000 diem kinh nghiem....")
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
end;
end;
function doi4()
if (GetItemCount(241) >= 5) then
AddOwnExp(2000000)
Talk(1,"","Ban nhan duoc <color=yellow>2000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 2000000 diem kinh nghiem....")
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
end;
end;
function doi5()
if (GetItemCount(242) >= 5) then
AddOwnExp(5000000)
Talk(1,"","Ban nhan duoc <color=yellow>5000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 5000000 diem kinh nghiem....")
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
end;
end;
function doi6()
if (GetItemCount(67) >= 5) then
if (GetItemCount(68) >= 5) then
if (GetItemCount(69) >= 5) then
if (GetItemCount(70) >= 5) then
i = random(0,2)
if (i == 0) then
Talk(1,"","Ban nhan duoc 1 cai <color=pink>Tu Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Tu Thuy Tinh....")
AddEventItem(42)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
elseif (i == 1) then
Talk(1,"","Ban nhan duoc 1 cai <color=Blue>Lam Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Lam Thuy Tinh....")
AddEventItem(43)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
elseif (i == 2) then
Talk(1,"","Ban nhan duoc 1 cai <color=Green>Luc Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Luc Thuy Tinh....")
AddEventItem(44)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
end
else
Talk(1,"","Nguoi co chac la mang theo du hoa qua ben nguoi khong!")
end
end;
end;
end;
end;
function out()
end;
Cho em hỏi cái scripts này sai chỗ nào ... sao vào có thấy npc đứng đó nhưng nó nói 1 dòng ngắn củn = tiếng miên ~~ ... rồi ko làm dc gì hết ... ai fix giúp em với
Còn nữa ... ai share cho em bộ chuẩn questkey 5 quả với lại 4 cái bánh ép ra đi ... tìm thấy mà sao add tùm lum ko đúng tên .. hoặc đúng tên thì không đúng hình ... fix mún điên lun mà cũng ko dc T_T
Với lại share giúp em bộ qkey event sinhnhat đi ... cái mà đường trứng sữa ..v.v. này nọ đó ... em kiếm bộ này mà ko thấy ~~ ... Cám ơn mấy anh đã giúp đỡ [-O<[-O<[-O<
gio_event_tet = {8,12,13,17,18,19,20,21,22}
mang_cau = 238
dua_xiem = 239
du_du = 240
xoai = 241
sung = 242
FRUITNAME = {
[238] = "Mang Cau",
[239] = "Dua Xiem",
[240] = "Xoai",
[241] = "Du Du",
[242] = "Sung",
}
function main()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
SubWorld = 1;
if (GetLevel() >= 10) then
if GetMissionV(2) == 0 then
Say("<bclr=blue>Hoat dong event tet chua den thoi gian hoat dong<bclr>",0)
elseif GetMissionV(2) == 1 or GetMissionV(2) == 2 then
if GetLevel() < 10 then
Say("Cap do yeu cau phai la tren <color=Red>cap 10<color> moi co the tham gia hoat dong.",0)
else
Say("<color=yellow>Le Quan<color>: Hoat dong event tet da dien ra!Nguoi co muon tham gia khong?",2,"Ta muon tham gia./ok","De ta suy nghi lai da./out")
end
end
end;
end;
function ok()
for i = 1,getn(gio_event_tet) do
if gio >= gio_event_tet[i] then
hetgioeventtet = (gio_event_tet[i]+1.5)*60*60 - (gio*60*60+phut*60+giay)
break
end
end
SetTimer(hetgioeventtet*18,4)
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon thuc hien viec gi?","Ta muon ghep trai cay./ghep","Doi trai cay lay banh./doi","Ta chi ghe ngang thoi./out"});
end;
function ghep()
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon ghep loai trai cay nao","3 Mang Cau thanh 1 Dua Xiem./ghep1","3 Dua Xiem thanh 1 Du Du./ghep2","3 Du Du thanh 1 Xoai./ghep3","3 Xoai thanh 1 Sung./ghep4","De ta suy nghi./out"});
end;
function ghep1()
if (GetItemCount(238) >= 3) then
ti_le = 70
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Dua Xiem<color>!")
AddEventItem(239)
DelItem(238)
DelItem(238)
DelItem(238)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 ,color=Green>Mang Cau<color>!")
DelItem(238)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Mang Cau<color> ben nguoi khong!")
end
end;
function ghep2()
if (GetItemCount(239) >= 3) then
ti_le = 65
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Du Du<color>!")
AddEventItem(240)
DelItem(239)
DelItem(239)
DelItem(239)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Dua Xiem<color>!")
DelItem(239)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Dua Xiem<color> ben nguoi khong!")
end
end;
function ghep3()
if (GetItemCount(240) >= 3) then
ti_le = 50
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Xoai<color>!")
AddEventItem(241)
DelItem(240)
DelItem(240)
DelItem(240)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Du Du<color>!")
DelItem(240)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Du Du<color> ben nguoi khong!")
end
end;
function ghep4()
if (GetItemCount(241) >= 3) then
ti_le = 30
i = random(1,100)
if i < floor(ti_le/100) then
Talk(1,"","<color=yellow>Ghep thanh cong<color>!Ban nhan duoc 1 <color=Green>Sung<color>!")
AddEventItem(242)
DelItem(241)
DelItem(241)
DelItem(241)
elseif i > floor(ti_le/100) then
Talk(1,"","<color=Red>Ghep that bai<color>! Ban bi mat 1 <color=Green>Xoai<color>!")
DelItem(241)
end
else
Talk(1,"","Nguoi co chac la mang theo <color=Green>Xoai<color> ben nguoi khong!")
end
end;
function doi()
SayEx({"<color=yellow>Le Quan<color>:Nguoi muon doi loai banh nao nao?","5 Mang Cau./doi1","5 Dua Xiem./doi2","5 Du Du./doi3","5 Xoai./doi4","5 Sung./doi5","Doi lay thuy tinh./doi6","De ta suy nghi lai./out"});
end;
function doi1()
if (GetItemCount(238) >= 3) then
AddOwnExp(50000)
Talk(1,"","Ban nhan duoc 5000 diem kinh nghiem!")
Msg2Player("Nhan duoc 5000 diem kinh nghiem....")
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
end;
end;
function doi2()
if (GetItemCount(239) >= 5) then
AddOwnExp(500000)
Talk(1,"","Ban nhan duoc <color=yellow>500000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 500000 diem kinh nghiem....")
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
end;
end;
function doi3()
if (GetItemCount(240) >= 5) then
AddOwnExp(1000000)
Talk(1,"","Ban nhan duoc <color=yellow>1000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 1000000 diem kinh nghiem....")
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
end;
end;
function doi4()
if (GetItemCount(241) >= 5) then
AddOwnExp(2000000)
Talk(1,"","Ban nhan duoc <color=yellow>2000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 2000000 diem kinh nghiem....")
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
end;
end;
function doi5()
if (GetItemCount(242) >= 5) then
AddOwnExp(5000000)
Talk(1,"","Ban nhan duoc <color=yellow>5000000<color> diem kinh nghiem!")
Msg2Player("Nhan duoc 5000000 diem kinh nghiem....")
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
end;
end;
function doi6()
if (GetItemCount(67) >= 5) then
if (GetItemCount(68) >= 5) then
if (GetItemCount(69) >= 5) then
if (GetItemCount(70) >= 5) then
i = random(0,2)
if (i == 0) then
Talk(1,"","Ban nhan duoc 1 cai <color=pink>Tu Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Tu Thuy Tinh....")
AddEventItem(42)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
elseif (i == 1) then
Talk(1,"","Ban nhan duoc 1 cai <color=Blue>Lam Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Lam Thuy Tinh....")
AddEventItem(43)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
elseif (i == 2) then
Talk(1,"","Ban nhan duoc 1 cai <color=Green>Luc Thuy Tinh<color>!")
Msg2Player("Nhan duoc 1 Luc Thuy Tinh....")
AddEventItem(44)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(238)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(239)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(240)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(241)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
DelItem(242)
end
else
Talk(1,"","Nguoi co chac la mang theo du hoa qua ben nguoi khong!")
end
end;
end;
end;
end;
function out()
end;
Cho em hỏi cái scripts này sai chỗ nào ... sao vào có thấy npc đứng đó nhưng nó nói 1 dòng ngắn củn = tiếng miên ~~ ... rồi ko làm dc gì hết ... ai fix giúp em với
Còn nữa ... ai share cho em bộ chuẩn questkey 5 quả với lại 4 cái bánh ép ra đi ... tìm thấy mà sao add tùm lum ko đúng tên .. hoặc đúng tên thì không đúng hình ... fix mún điên lun mà cũng ko dc T_T
Với lại share giúp em bộ qkey event sinhnhat đi ... cái mà đường trứng sữa ..v.v. này nọ đó ... em kiếm bộ này mà ko thấy ~~ ... Cám ơn mấy anh đã giúp đỡ [-O<[-O<[-O<