[M]r[K]id
19-09-10, 09:31 AM
em viết 1 event nhưng khi chạy game server nó lại báo sai. mí pro sem dùm nha!
function epbanhtt()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Tham Gia Event "Trung thu 2010" ?",
"Su dung trai cay/sdtraicay",
"Ep banh/eftbanhttthuinao",
"Su dung Banh/sdbanhttthuinao",
"Thoat./Exit"});
end;
function sdtraicay()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Su dung loai trai cay nao ?",
"Su dung Mang Cau/sdmangcau",
"Su dung XOai/sdxoai",
"Su dung Dua xiem/sdduaxiem",
"Su dung Sung/sdsung",
"Su dung Du Du/sddudu",
"Thoat./Exit"});
end;
function eftbanhttthuinao()
"Ep Banh Chung Thap Cam/eftbanhso1",
"Ep Banh Tet Nhan Dau/eftbanhso2",
"Ep Banh Chung Cao Cap/eftbanhso3",
"Ep Banh Tet Thap Cam/eftbanhso4",
"Thoat./Exit"});
end;
function sdbanhttthuinao()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Su dung loai banh nao ?",
"Su dung Banh Chung Thap Cam/sdbanhso1",
"Su dung Banh Tet Nhan Dau/sdbanhso2",
"Su Banh Chung Cao Cap/sdbanhso3",
"Su Banh Tet Thap Cam/sdbanhso4",
"Thoat./Exit"});
end;
================================================== ================================================== ==
=================================================d ieu khoan================================
================================================== ================================================== =
function sdmangcau()
if (GetItemCount(168) >= 1) then
DelItem(168)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Mang Cau Ma Muon Doi A` Nhox !")
end
end;
function sdxoai()
if (GetItemCount(169) >= 1) then
DelItem(169)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co XOai Ma Muon Doi A` Nhox !")
end
end;
function sdduaxiem()
if (GetItemCount(170) >= 1) then
DelItem(170)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Dua Xiem Ma Muon Doi A` Nhox !")
end
end;
function sdsung()
if (GetItemCount(171) >= 1) then
DelItem(171)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Sung Ma Muon Doi A` Nhox !")
end
end;
function sddudu()
if (GetItemCount(172) >= 1) then
DelItem(172)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Du Du Ma Muon Doi A` Nhox !")
end
end;
================================================== ================================================== ==
=================================================s dtraicay================================
================================================== ================================================== =
function eftbanhso1()
if (GetItemCount(168) >= 1)
and (GetItemCount(169) >= 1)
and (GetItemCount(170) >= 1)
and (GetItemCount(171) >= 1)
and (GetItemCount(172) >= 1) then
AddEventItem(173)
DelItem(168)
DelItem(169)
DelItem(170)
DelItem(171)
DelItem(172)
Msg2Player("Ban nhan duoc Banh Chung Thap Cam.")
else
Talk(1,"","Nguoi Khong Co Du Nguyen Liu Ma` Cu' Thix On` Ao` A` Nhox !")
end
end;
function eftbanhso2()
if (GetItemCount(173) >= 2) then
AddEventItem(174)
DelItem(173)
DelItem(173)
Msg2Player("Ban nhan duoc Banh Tet Nhan Dau.")
else
Talk(1,"","Nguoi Khong Co 2 cai Banh Chung Thap Cam Ma Muon Ghep A` Nhox !")
end
end;
function eftbanhso3()
if (GetItemCount(174) >= 2) then
AddEventItem(175)
DelItem(174)
DelItem(174)
Msg2Player("Ban nhan duoc Banh Chung Cao Cap.")
else
Talk(1,"","Nguoi Khong Co 2 cai Banh Tet Nhan Dau Ma Muon Ghep A` Nhox !")
end
end;
function eftbanhso4()
if (GetItemCount(173) >= 3)
and (GetItemCount(174) >= 2)
and (GetItemCount(175) >= 1) then
AddEventItem(176)
DelItem(173)
DelItem(173)
DelItem(173)
DelItem(174)
DelItem(174)
DelItem(175)
Msg2Player("Ban nhan duoc Banh Tet Thap Cam.")
else
Talk(1,"","Nguoi Khong Co Du Nguyen Liu Ma` Cu' Thix On` Ao` A` Nhox !")
end
end;
================================================== ================================================== ==
=================================================e p banh================================
================================================== ================================================== =
function sdbanhso1()
if (GetItemCount(173) >= 1) then
DelItem(173)
for i=1,10 do AddOwnExp(200000) end
Msg2Player("Ban nhan duoc 200K EXP")
else
Talk(1,"","Nguoi Khong Co Banh Chung Thap Cam ma` muon su dung A` Nhox !")
end
end;
function sdbanhso2()
if (GetItemCount(174) >= 1) then
DelItem(174)
for i=1,10 do AddOwnExp(2000000) end
Msg2Player("Ban nhan duoc 2tr EXP")
else
Talk(1,"","Nguoi Khong Co Banh Tet Nhan Dau ma` muon su dung A` Nhox !")
end
end;
function sdbanhso3()
if (GetItemCount(175) >= 1) then
DelItem(176)
for i=1,10 do AddOwnExp(20000000) end
Msg2Player("Ban nhan duoc 20tr EXP")
else
Talk(1,"","Nguoi Khong Co Banh Chung Cao Cap ma` muon su dung A` Nhox !")
end
end;
function sdbanhso4()
if (GetItemCount(176) >= 1) then
DelItem(176)
for i=1,10 do AddOwnExp(1000000000) end
Msg2Player("Ban nhan duoc 1 Ty EXP")
else
Talk(1,"","Nguoi Khong Co Banh Tet Thap Cam ma` muon su dung A` Nhox !")
end
end;
function epbanhtt()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Tham Gia Event "Trung thu 2010" ?",
"Su dung trai cay/sdtraicay",
"Ep banh/eftbanhttthuinao",
"Su dung Banh/sdbanhttthuinao",
"Thoat./Exit"});
end;
function sdtraicay()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Su dung loai trai cay nao ?",
"Su dung Mang Cau/sdmangcau",
"Su dung XOai/sdxoai",
"Su dung Dua xiem/sdduaxiem",
"Su dung Sung/sdsung",
"Su dung Du Du/sddudu",
"Thoat./Exit"});
end;
function eftbanhttthuinao()
"Ep Banh Chung Thap Cam/eftbanhso1",
"Ep Banh Tet Nhan Dau/eftbanhso2",
"Ep Banh Chung Cao Cap/eftbanhso3",
"Ep Banh Tet Thap Cam/eftbanhso4",
"Thoat./Exit"});
end;
function sdbanhttthuinao()
SayEx({"<color=cyan>Phan Tang<color>: Nguoi Muon Su dung loai banh nao ?",
"Su dung Banh Chung Thap Cam/sdbanhso1",
"Su dung Banh Tet Nhan Dau/sdbanhso2",
"Su Banh Chung Cao Cap/sdbanhso3",
"Su Banh Tet Thap Cam/sdbanhso4",
"Thoat./Exit"});
end;
================================================== ================================================== ==
=================================================d ieu khoan================================
================================================== ================================================== =
function sdmangcau()
if (GetItemCount(168) >= 1) then
DelItem(168)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Mang Cau Ma Muon Doi A` Nhox !")
end
end;
function sdxoai()
if (GetItemCount(169) >= 1) then
DelItem(169)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co XOai Ma Muon Doi A` Nhox !")
end
end;
function sdduaxiem()
if (GetItemCount(170) >= 1) then
DelItem(170)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Dua Xiem Ma Muon Doi A` Nhox !")
end
end;
function sdsung()
if (GetItemCount(171) >= 1) then
DelItem(171)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Sung Ma Muon Doi A` Nhox !")
end
end;
function sddudu()
if (GetItemCount(172) >= 1) then
DelItem(172)
for i=1,10 do AddOwnExp(20000) end
Msg2Player("Ban nhan duoc 20K EXP")
else
Talk(1,"","Nguoi Khong Co Du Du Ma Muon Doi A` Nhox !")
end
end;
================================================== ================================================== ==
=================================================s dtraicay================================
================================================== ================================================== =
function eftbanhso1()
if (GetItemCount(168) >= 1)
and (GetItemCount(169) >= 1)
and (GetItemCount(170) >= 1)
and (GetItemCount(171) >= 1)
and (GetItemCount(172) >= 1) then
AddEventItem(173)
DelItem(168)
DelItem(169)
DelItem(170)
DelItem(171)
DelItem(172)
Msg2Player("Ban nhan duoc Banh Chung Thap Cam.")
else
Talk(1,"","Nguoi Khong Co Du Nguyen Liu Ma` Cu' Thix On` Ao` A` Nhox !")
end
end;
function eftbanhso2()
if (GetItemCount(173) >= 2) then
AddEventItem(174)
DelItem(173)
DelItem(173)
Msg2Player("Ban nhan duoc Banh Tet Nhan Dau.")
else
Talk(1,"","Nguoi Khong Co 2 cai Banh Chung Thap Cam Ma Muon Ghep A` Nhox !")
end
end;
function eftbanhso3()
if (GetItemCount(174) >= 2) then
AddEventItem(175)
DelItem(174)
DelItem(174)
Msg2Player("Ban nhan duoc Banh Chung Cao Cap.")
else
Talk(1,"","Nguoi Khong Co 2 cai Banh Tet Nhan Dau Ma Muon Ghep A` Nhox !")
end
end;
function eftbanhso4()
if (GetItemCount(173) >= 3)
and (GetItemCount(174) >= 2)
and (GetItemCount(175) >= 1) then
AddEventItem(176)
DelItem(173)
DelItem(173)
DelItem(173)
DelItem(174)
DelItem(174)
DelItem(175)
Msg2Player("Ban nhan duoc Banh Tet Thap Cam.")
else
Talk(1,"","Nguoi Khong Co Du Nguyen Liu Ma` Cu' Thix On` Ao` A` Nhox !")
end
end;
================================================== ================================================== ==
=================================================e p banh================================
================================================== ================================================== =
function sdbanhso1()
if (GetItemCount(173) >= 1) then
DelItem(173)
for i=1,10 do AddOwnExp(200000) end
Msg2Player("Ban nhan duoc 200K EXP")
else
Talk(1,"","Nguoi Khong Co Banh Chung Thap Cam ma` muon su dung A` Nhox !")
end
end;
function sdbanhso2()
if (GetItemCount(174) >= 1) then
DelItem(174)
for i=1,10 do AddOwnExp(2000000) end
Msg2Player("Ban nhan duoc 2tr EXP")
else
Talk(1,"","Nguoi Khong Co Banh Tet Nhan Dau ma` muon su dung A` Nhox !")
end
end;
function sdbanhso3()
if (GetItemCount(175) >= 1) then
DelItem(176)
for i=1,10 do AddOwnExp(20000000) end
Msg2Player("Ban nhan duoc 20tr EXP")
else
Talk(1,"","Nguoi Khong Co Banh Chung Cao Cap ma` muon su dung A` Nhox !")
end
end;
function sdbanhso4()
if (GetItemCount(176) >= 1) then
DelItem(176)
for i=1,10 do AddOwnExp(1000000000) end
Msg2Player("Ban nhan duoc 1 Ty EXP")
else
Talk(1,"","Nguoi Khong Co Banh Tet Thap Cam ma` muon su dung A` Nhox !")
end
end;