[S]ocola[S]an
06-11-10, 09:14 PM
Coder : - Kinkina2009
Vì CLbgamesvn cần copy đoạn gỳ đó vào host mà achơi máy net bị CMS chặn nên ko vào được Forum nên mình share dùm anh ấy ^^
Copy vào server để đâu tùy ý ko quan tâm ^^
Phần 1 : Dã Tẩu Kiểu Mới
datau.lua
Include("\\script\\Global\\sourcejx49.lua")
Include("\\script\\Global\\da_tau\\listmangdatau.lua")
TASKNHANNHIEMVU = 250 --/XAC DINH NHAN NHIEM VU HAY CHUA
TASKMISSION = 249 --/XAC DINH NHIEM VU 1 2 3 4 5 .... N
TASKSOQUAI = 248 --/SO QUAI VAT DANH DUOC
TASKHOANTHANH = 247 --/SO LAN HOAN THANH NHIEM VU
TASKHUYBO = 246 --/SO CO HOI HUY BO NHIEM VU
TASKCHECKPOINT = 245
SONHAXATAC = 244
PHUCDUYENDAI = 5
PHUCDUYENTRUNG = 4
PHUCDUYENTIEU = 3
IDTINHHONG = 11
IDTUTHUYTINH = 9
IDLUCTHUYTINH = 10
IDLAMTHUYTINH = 8
function main()
if GetTask(TASKNHANNHIEMVU) == 0 then
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
Talk(1,"gomission","<color=fire>Da Tau<color>: Hien Tai Vi Dai Hiep Chua Nhan Nhiem Vu")
else
SayEx({"<color=fire>Da Tau<color>: Thong Tin cua "..GetName()..":\nSo Lan Hoan Thanh: "..GetTask(TASKHOANTHANH).."\nCo Hoi Huy Bo: "..GetTask(TASKHUYBO).."",
"Hoan Thanh Nhiem Vu./finish",
"Huy Bo Nhiem Vu./close",
"Thoat./no"})
end
end;
function no()
end;
----------------------======================================Huy Bo============================
function close()
if GetTask(TASKHUYBO) >= 1 then
SayEx({"<color=fire>Da Tau:<color>: Hien tai Dai Hiep dang co "..GetTask(TASKHUYBO).." co hoi huy bo\nNeu huy thi se bi tru di 1 <color=red>Co Hoi Huy Bo<color>\nBan co chac khong?",
"Dung Co Hoi Huy Bo Nhiem Vu./closefinish",
"Quay Tro Lai Trang Truoc./main",
"Thoat./no"})
else
SayEx({"<color=fire>Da Tau:<color>: Hien tai Dai Hiep dang co "..GetTask(TASKHUYBO).." co hoi huy bo\nNeu huy thi se mat het <color=red>Tich Luy <color>\nBan co chac khong?",
"Ta Dong Y Huy Tat Ca./closeforever",
"Quay Tro Lai Trang Truoc./main",
"Thoat./no"})
end
end;
function closefinish()
SetTask(TASKHUYBO,GetTask(TASKHUYBO) - 1)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SayEx({"<color=fire>Da Tau <color>: Dai Hiep da <color=red>Huy Bo Nhiem Vu Thanh Cong<color> co the tiep tuc lam lai",
"Ket Thuc Doi Ngoai./no"})
end
function closeforever()
SetTask(TASKHUYBO,0)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKHOANTHANH,0)
SayEx({"<color=fire>Da Tau <color>: Dai Hiep da <color=red>Huy Bo Nhiem Vu Thanh Cong<color> co the tiep tuc lam lai",
"Ket Thuc Doi Ngoai./no"})
end
--================================================== ================================================== ============================
--===============================================NHA N NHIEM VU NE ================================================== ==
function gomission()
SayEx({"<color=fire>Da Tau:<color>: Day la Nhiem Vu thu "..GetTask(TASKHOANTHANH).." cua nguoi co muon lam tiep khong",
"Ta Muon Nhan Nhiem Vu Da Tau./go",
"Ket Thuc Doi Ngoai./no"})
end
function go()
level = GetLevel()
a = random(1,6)
SetTask(TASKNHANNHIEMVU,1)
if a == 1 then
k = random(1,7)
if k == 1 then
SetTask(TASKMISSION,1)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=yellow>Phuc Duyen Dai<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 2 then
SetTask(TASKMISSION,2)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=blue>Phuc Duyen Trung<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 3 then
SetTask(TASKMISSION,3)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=red>Phuc Duyen Tieu<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 4 then
SetTask(TASKMISSION,4)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=cycan>Tinh Hong Bao Thach<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 5 then
SetTask(TASKMISSION,5)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=pink>Tu Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 6 then
SetTask(TASKMISSION,6)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=green>Luc Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 7 then
SetTask(TASKMISSION,7)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=blue>Lam Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
end
end
if a == 2 then
lv = GetLevel()
h = random(1,3)
if h == 1 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
end
end
SetTask(TASKMISSION,8)
SayEx({"<color=fire>Da Tau<color>: Hay den <color=pink>"..maps.."<color> thu thap cho ta <color=fire>15 cuon <color=yellow>Dia Do Chi",
"Ket Thuc Doi Ngoai./no"})
elseif h == 2 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
end
end
SetTask(TASKMISSION,9)
SayEx({"<color=fire>Da Tau <color>: Hay den <color=pink>"..maps.."<color> thu thap cho ta <color=fire>3<color> quyen <color=yellow>Mat Chi",
"Ket Thuc Doi Ngoai./no"})
elseif h == 3 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
quai = NhiemVu[i][2]
end
end
SetTask(TASKMISSION,10)
SayEx({"<color=fire>Da Tau <color>: Hay den <color=pink>"..maps.."<color> tieu diet <color=pink>"..quai.."<color> Thu Linh",
"Ket Thuc Doi Ngoai./no"})
end
end
if a == 3 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pk = Point[i][1]
end
end
SetTask(TASKMISSION,11)
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..pk.."<color> diem PK\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 4 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
dv = Point[i][2]
end
end
SetTask(TASKMISSION,12)
SetTask(TASKCHECKPOINT,GetRepute())
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..dv.."<color> diem Danh Vong\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 5 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pd = Point[i][3]
end
end
SetTask(TASKMISSION,13)
SetTask(TASKCHECKPOINT,GetTask(TaskPhucDuyen))
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..pd.."<color> diem Phuc Duyen\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 6 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
tk = Point[i][4]
end
end
SetTask(TASKMISSION,14)
SetTask(TASKCHECKPOINT,GetTask(TaskTongKim))
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..tk.."<color> diem Tong Kim\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
end
--================================================== =====Hoan Thanh Su Mang ================================================== =
function finish()
if GetTask(TASKMISSION) == 1 then
if GetItemCount(PHUCDUYENDAI) >= 1 then
DelItem(PHUCDUYENDAI)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=yellow> Phuc Duyen Dai<color>")
end
elseif GetTask(TASKMISSION) == 2 then
if GetItemCount(PHUCDUYENTRUNG) >= 1 then
DelItem(PHUCDUYENTRUNG)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Phuc Duyen Trung<color>")
end
elseif GetTask(TASKMISSION) == 3 then
if GetItemCount(PHUCDUYENTIEU) >= 1 then
DelItem(PHUCDUYENTIEU)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Phuc Duyen Tieu<color>")
end
elseif GetTask(TASKMISSION) == 4 then
if GetItemCount(IDTINHHONG) >= 1 then
DelItem(IDTINHHONG)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Tinh Hong Bao Thach<color>")
end
elseif GetTask(TASKMISSION) == 5 then
if GetItemCount(IDTUTHUYTINH) >= 1 then
DelItem(IDTUTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=pink>Tu Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 6 then
if GetItemCount(IDLUCTHUYTINH) >= 1 then
DelItem(IDLUCTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=green>Luc Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 7 then
if GetItemCount(IDLAMTHUYTINH) >= 1 then
DelItem(IDLAMTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue>Lam Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 8 then
if GetTask(TASKSOQUAI) >= 15 then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi . So Dia Do Chi Cua Ban La "..GetTask(TASKSOQUAI).." Khong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 9 then
if GetTask(TASKSOQUAI) >= 3 then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi . So Mat Chi Cua Ban La "..GetTask(TASKSOQUAI).." Khong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 10 then
lv = GetLevel()
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
SoQuai = NhiemVu[i][2]
end
end
if GetTask(TASKSOQUAI) >= SoQuai then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: So quai : <color=fire>"..GetTask(TASKSOQUAI).."/"..SoQuai.."<color=fire>\nKhong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 11 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pk = Point[i][1]
end
end
if GetPK() >= pk then
SetPK(0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Diem PK hien tai la "..GetPK().."/"..pk.." khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 12 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
dv = Point[i][2]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + dv
pointnow = GetRepute()
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Danh Vong khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 13 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pd = Point[i][3]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + pd
pointnow = GetTask(TaskPhucDuyen)
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Phuc Duyen khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 14 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
tk = Point[i][4]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + tk
pointnow = GetTask(TaskTongKim)
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Tong Kim khong the hoan thanh")
end
else
Msg2Player("Bug Da Tau. Moi Mission deu bi xoa")
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKNHANNHIEMVU,0)
end
end;
--================================================== =PHAN THUONG============================================ ==========
function CheckMission()
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKHOANTHANH,GetTask(TASKHOANTHANH)+1)
SayEx({"<color=fire>Da Tau<color>: Ban da hoan thanh Da Tau\nSo Lan Hoan Thanh : "..GetTask(TASKHOANTHANH).."\nCo Hoi Huy Bo: "..GetTask(TASKHUYBO).."",
"Nhan Phan Thuong ./phanthuong",
"Ket Thuc./no"})
end;
function phanthuong()
x = random(1,6)
if x == 1 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
elseif x == 2 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Co Hoi Huy Bo/mattich",
"Thuy Tinh/thuytinh"})
elseif x == 3 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiez",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
elseif x == 4 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Tinh Hong Bao Thach/tinhhong",
"Tang 1 lan Tich Luy./tichluy"})
elseif x == 5 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Co Hoi Huy Bo/cohoi",
"Ngan Luong/nganluong",
"Thuy Tinh./thuytinh"})
elseif x == 6 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
end
end;
function kinhnghiemmin()
exp = random(500000,10000000)
AddOwnExp(exp)
Msg2Player("Ban nhan duoc "..exp.." diem Kinh Nghiem")
end;
function mattich()
k = random(86,113)
AddEventItem(k)
Msg2Player("Ban nhan duoc 1 cuon Bi Kiep mon phai")
end;
function thuytinh()
s = random(1,3)
if s == 1 then
AddEventItem(IDLAMTHUYTINH)
Msg2Player("Ban nhan duoc 1 Lam Thuy Tinh")
elseif s == 2 then
AddEventItem(IDLUCTHUYTINH)
Msg2Player("Ban nhan duoc 1 Luc Thuy Tinh")
elseif s == 3 then
AddEventItem(IDTUTHUYTINH)
Msg2Player("Ban nhan duoc 1 Lam Thuy Tinh")
end
end
function kinhnghiemz()
exp = random(1000000,30000000)
AddOwnExp(exp)
Msg2Player("Ban nhan duoc "..exp.." diem Kinh Nghiem")
end
function nganluong()
tien = random(200000,450000)
Earn(tien)
Msg2Player("Ban nhan duoc "..tien.." van luong")
end
function tinhhong()
AddEventItem(IDTINHHONG)
Msg2Player("Ban nhan duoc 1 vien Tinh Hong Bao THach")
end
function tichluy()
SetTask(TASKHOANTHANH,GetTask(TASKHOANTHANH)+1)
Msg2Player("Ban nhan duoc 1 Tich Luy da tau")
end
function cohoi()
SetTask(TASKHUYBO,GetTask(TASKHUYBO)+1)
Msg2Player("Ban nhan duoc 1 Co Hoi Huy Bo Nhiem Vu")
end
listmangdatau.lua
-- //
--Script Da Tau theo kieu moi // //
--=====================================//
--Ten Map,sO qUAI KILL,lv thap nhat nhan nv,lv cao nhat nhan nv
NhiemVu = {
{"Hoa Son",100,1,10}, -- 1x
{"Tuyet Dinh Hoa Son",100,11,20}, --2x
{"Tan Lang",100,21,30}, --3x
{"Kiem Cac Tay Bac",100,31,40}, --4x
{"Dao Hoa Nguyen",100,41,50}, --5x
{"Dai Tu Dong",100,51,60}, --6x
{"Lam Du Quan",100,61,70}, --7x
{"Chan Nui Truong Bach",100,71,80}, --8x
{"Truong Bach Son Nam",250,81,100}, --10x
{"Truong Bach Son Bac",250,101,120}, --12x
{"Sa Mac Dia Bieu",250,121,130}, --13x
{"Mac Cao Quat",250,131,150}, --15x
{"Tay Son Dao",250,151,200} --17x
}
-- PK , Danh Vong, Phuc Duyen , Tich Luy Tong Kim , Level Thap Nhat Nhan NV , Level Cao Nhat ...
Point = {
{1,20,50,0,1,10}, -- 1x
{2,30,50,0,11,20}, --2x
{3,40,50,0,21,30}, --3x
{4,50,50,0,31,40}, --4x
{5,50,50,0,41,50}, --5x
{6,60,60,0,51,60}, --6x
{7,70,70,0,61,70}, --7x
{8,80,80,0,71,80}, --8x
{9,100,150,5000,81,100}, --10x
{10,200,200,10000,101,120}, --12x
{10,200,200,15000,121,130}, --13x
{10,200,200,20000,131,150}, --15x
{10,250,250,30000,151,200} --17x
}
MapMission = {
{"Hoa Son",2}, -- 1x
{"Tuyet Dinh Hoa Son",212}, --2x
{"Tan Lang",7}, --3x
{"Kiem Cac Tay Bac",9}, --4x
{"Dao Hoa Nguyen",55}, --5x
{"Dai Tu Dong",72}, --6x
{"Lam Du Quan",1}, --7x
{"Chan Nui Truong Bach",4}, --8x
{"Truong Bach Son Nam",13}, --10x
{"Truong Bach Son Bac",14}, --12x
{"Sa Mac Dia Bieu",5}, --13x
{"Mac Cao Quat",3}, --15x
{"Tay Son Dao",15} --17x
}
npcdie.lua
--Author : KingMax
--SCript datau theo Phien Ban moi
Include("\\script\\Global\\da_tau\\datau_.lua")
Include("\\script\\Global\\da_tau\\listmangdatau.lua")
function CheckDaTau()
lv = GetLevel()
W,X,Y = GetWorldPos()
if GetTask(TASKMISSION) == 8 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
if W == MapMission[i][2] then
z = random(1,40)
maps = NhiemVu[i][1]
if z == 7 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Dia Do Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
elseif z == 12 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Dia Do Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon "..maps.." Dia Do Chi! Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
end
end
end
end
elseif GetTask(TASKMISSION) == 9 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
if W == MapMission[i][2] then
z = random(1,100)
maps = NhiemVu[i][1]
if z == 7 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》. Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
elseif z == 12 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》. Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
end
end
end
end
elseif GetTask(TASKMISSION) == 10 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
quai = NhiemVu[i][2]
if W == MapMission[i][2] then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban tieu diet 1 ten Thu Linh. So Quai : "..GetTask(TASKSOQUAI).."/"..quai.." ten")
end
end
end
else
z = random(1,200)
if z == 56 then
SetTask(SONHAXATAC,GetTask(SONHAXATAC) + 1)
Msg2Player("Ban nhan duoc 1 tam【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
elseif z == 50 then
SetTask(SONHAXATAC,GetTask(SONHAXATAC) + 1)
Msg2Player("Ban nhan duoc 1 tam 【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
SetTask(SONHAXATAC,GetTask(SONHAXATAC)+1)
Msg2Player("Ban nhan duoc 1 tam 【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
end
end
end
Một Điều Nữa
Work Tốt Nhất Trên Tình Huynh Đệ Server
Vì CLbgamesvn cần copy đoạn gỳ đó vào host mà achơi máy net bị CMS chặn nên ko vào được Forum nên mình share dùm anh ấy ^^
Copy vào server để đâu tùy ý ko quan tâm ^^
Phần 1 : Dã Tẩu Kiểu Mới
datau.lua
Include("\\script\\Global\\sourcejx49.lua")
Include("\\script\\Global\\da_tau\\listmangdatau.lua")
TASKNHANNHIEMVU = 250 --/XAC DINH NHAN NHIEM VU HAY CHUA
TASKMISSION = 249 --/XAC DINH NHIEM VU 1 2 3 4 5 .... N
TASKSOQUAI = 248 --/SO QUAI VAT DANH DUOC
TASKHOANTHANH = 247 --/SO LAN HOAN THANH NHIEM VU
TASKHUYBO = 246 --/SO CO HOI HUY BO NHIEM VU
TASKCHECKPOINT = 245
SONHAXATAC = 244
PHUCDUYENDAI = 5
PHUCDUYENTRUNG = 4
PHUCDUYENTIEU = 3
IDTINHHONG = 11
IDTUTHUYTINH = 9
IDLUCTHUYTINH = 10
IDLAMTHUYTINH = 8
function main()
if GetTask(TASKNHANNHIEMVU) == 0 then
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
Talk(1,"gomission","<color=fire>Da Tau<color>: Hien Tai Vi Dai Hiep Chua Nhan Nhiem Vu")
else
SayEx({"<color=fire>Da Tau<color>: Thong Tin cua "..GetName()..":\nSo Lan Hoan Thanh: "..GetTask(TASKHOANTHANH).."\nCo Hoi Huy Bo: "..GetTask(TASKHUYBO).."",
"Hoan Thanh Nhiem Vu./finish",
"Huy Bo Nhiem Vu./close",
"Thoat./no"})
end
end;
function no()
end;
----------------------======================================Huy Bo============================
function close()
if GetTask(TASKHUYBO) >= 1 then
SayEx({"<color=fire>Da Tau:<color>: Hien tai Dai Hiep dang co "..GetTask(TASKHUYBO).." co hoi huy bo\nNeu huy thi se bi tru di 1 <color=red>Co Hoi Huy Bo<color>\nBan co chac khong?",
"Dung Co Hoi Huy Bo Nhiem Vu./closefinish",
"Quay Tro Lai Trang Truoc./main",
"Thoat./no"})
else
SayEx({"<color=fire>Da Tau:<color>: Hien tai Dai Hiep dang co "..GetTask(TASKHUYBO).." co hoi huy bo\nNeu huy thi se mat het <color=red>Tich Luy <color>\nBan co chac khong?",
"Ta Dong Y Huy Tat Ca./closeforever",
"Quay Tro Lai Trang Truoc./main",
"Thoat./no"})
end
end;
function closefinish()
SetTask(TASKHUYBO,GetTask(TASKHUYBO) - 1)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SayEx({"<color=fire>Da Tau <color>: Dai Hiep da <color=red>Huy Bo Nhiem Vu Thanh Cong<color> co the tiep tuc lam lai",
"Ket Thuc Doi Ngoai./no"})
end
function closeforever()
SetTask(TASKHUYBO,0)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKHOANTHANH,0)
SayEx({"<color=fire>Da Tau <color>: Dai Hiep da <color=red>Huy Bo Nhiem Vu Thanh Cong<color> co the tiep tuc lam lai",
"Ket Thuc Doi Ngoai./no"})
end
--================================================== ================================================== ============================
--===============================================NHA N NHIEM VU NE ================================================== ==
function gomission()
SayEx({"<color=fire>Da Tau:<color>: Day la Nhiem Vu thu "..GetTask(TASKHOANTHANH).." cua nguoi co muon lam tiep khong",
"Ta Muon Nhan Nhiem Vu Da Tau./go",
"Ket Thuc Doi Ngoai./no"})
end
function go()
level = GetLevel()
a = random(1,6)
SetTask(TASKNHANNHIEMVU,1)
if a == 1 then
k = random(1,7)
if k == 1 then
SetTask(TASKMISSION,1)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=yellow>Phuc Duyen Dai<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 2 then
SetTask(TASKMISSION,2)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=blue>Phuc Duyen Trung<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 3 then
SetTask(TASKMISSION,3)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 Binh <color=red>Phuc Duyen Tieu<color> de Boi Duong Sinh Luc",
"Ket Thuc Doi Ngoai./no"})
elseif k == 4 then
SetTask(TASKMISSION,4)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=cycan>Tinh Hong Bao Thach<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 5 then
SetTask(TASKMISSION,5)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=pink>Tu Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 6 then
SetTask(TASKMISSION,6)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=green>Luc Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
elseif k == 7 then
SetTask(TASKMISSION,7)
SayEx({"<color=fire>Da Tau<color>: Hay Mang Den Cho Ta 1 vien <color=blue>Lam Thuy Tinh<color> de luyen cong",
"Ket Thuc Doi Ngoai./no"})
end
end
if a == 2 then
lv = GetLevel()
h = random(1,3)
if h == 1 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
end
end
SetTask(TASKMISSION,8)
SayEx({"<color=fire>Da Tau<color>: Hay den <color=pink>"..maps.."<color> thu thap cho ta <color=fire>15 cuon <color=yellow>Dia Do Chi",
"Ket Thuc Doi Ngoai./no"})
elseif h == 2 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
end
end
SetTask(TASKMISSION,9)
SayEx({"<color=fire>Da Tau <color>: Hay den <color=pink>"..maps.."<color> thu thap cho ta <color=fire>3<color> quyen <color=yellow>Mat Chi",
"Ket Thuc Doi Ngoai./no"})
elseif h == 3 then
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
maps = NhiemVu[i][1]
quai = NhiemVu[i][2]
end
end
SetTask(TASKMISSION,10)
SayEx({"<color=fire>Da Tau <color>: Hay den <color=pink>"..maps.."<color> tieu diet <color=pink>"..quai.."<color> Thu Linh",
"Ket Thuc Doi Ngoai./no"})
end
end
if a == 3 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pk = Point[i][1]
end
end
SetTask(TASKMISSION,11)
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..pk.."<color> diem PK\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 4 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
dv = Point[i][2]
end
end
SetTask(TASKMISSION,12)
SetTask(TASKCHECKPOINT,GetRepute())
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..dv.."<color> diem Danh Vong\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 5 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pd = Point[i][3]
end
end
SetTask(TASKMISSION,13)
SetTask(TASKCHECKPOINT,GetTask(TaskPhucDuyen))
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..pd.."<color> diem Phuc Duyen\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
if a == 6 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
tk = Point[i][4]
end
end
SetTask(TASKMISSION,14)
SetTask(TASKCHECKPOINT,GetTask(TaskTongKim))
SayEx({"<color=fire>Da Tau<color>: Hay di nang cap cho ta <color=fire>"..tk.."<color> diem Tong Kim\nRoi ve day gap ta",
"Ket Thuc Doi Ngoai./no"})
end
end
--================================================== =====Hoan Thanh Su Mang ================================================== =
function finish()
if GetTask(TASKMISSION) == 1 then
if GetItemCount(PHUCDUYENDAI) >= 1 then
DelItem(PHUCDUYENDAI)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=yellow> Phuc Duyen Dai<color>")
end
elseif GetTask(TASKMISSION) == 2 then
if GetItemCount(PHUCDUYENTRUNG) >= 1 then
DelItem(PHUCDUYENTRUNG)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Phuc Duyen Trung<color>")
end
elseif GetTask(TASKMISSION) == 3 then
if GetItemCount(PHUCDUYENTIEU) >= 1 then
DelItem(PHUCDUYENTIEU)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Phuc Duyen Tieu<color>")
end
elseif GetTask(TASKMISSION) == 4 then
if GetItemCount(IDTINHHONG) >= 1 then
DelItem(IDTINHHONG)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue> Tinh Hong Bao Thach<color>")
end
elseif GetTask(TASKMISSION) == 5 then
if GetItemCount(IDTUTHUYTINH) >= 1 then
DelItem(IDTUTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=pink>Tu Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 6 then
if GetItemCount(IDLUCTHUYTINH) >= 1 then
DelItem(IDLUCTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=green>Luc Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 7 then
if GetItemCount(IDLAMTHUYTINH) >= 1 then
DelItem(IDLAMTHUYTINH)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi , Trong Nguoi cua Dai Hiep khong co 1 <color=blue>Lam Thuy Tinh<color>")
end
elseif GetTask(TASKMISSION) == 8 then
if GetTask(TASKSOQUAI) >= 15 then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi . So Dia Do Chi Cua Ban La "..GetTask(TASKSOQUAI).." Khong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 9 then
if GetTask(TASKSOQUAI) >= 3 then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Xin Loi . So Mat Chi Cua Ban La "..GetTask(TASKSOQUAI).." Khong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 10 then
lv = GetLevel()
for i=1,getn(NhiemVu) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
SoQuai = NhiemVu[i][2]
end
end
if GetTask(TASKSOQUAI) >= SoQuai then
SetTask(TASKSOQUAI,0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: So quai : <color=fire>"..GetTask(TASKSOQUAI).."/"..SoQuai.."<color=fire>\nKhong The Hoan Thanh Nhiem Vu")
end
elseif GetTask(TASKMISSION) == 11 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pk = Point[i][1]
end
end
if GetPK() >= pk then
SetPK(0)
CheckMission()
else
Talk(1,"no","<color=fire>Da Tau<color>: Diem PK hien tai la "..GetPK().."/"..pk.." khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 12 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
dv = Point[i][2]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + dv
pointnow = GetRepute()
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Danh Vong khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 13 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
pd = Point[i][3]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + pd
pointnow = GetTask(TaskPhucDuyen)
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Phuc Duyen khong the hoan thanh")
end
elseif GetTask(TASKMISSION) == 14 then
lv = GetLevel()
for i=1,getn(Point) do
if lv >= Point[i][5] and lv <= Point[i][6] then
tk = Point[i][4]
end
end
pointdau = GetTask(TASKCHECKPOINT)
pointcan = pointdau + tk
pointnow = GetTask(TaskTongKim)
pointnang = pointnow - pointdau
if pointnow >= pointcan then
CheckMission()
SetTask(TASKCHECKPOINT,0)
else
Talk(1,"no","<color=fire>Da Tau<color>: Ban da nang <color=fire>"..pointnang.."<color> Tong Kim khong the hoan thanh")
end
else
Msg2Player("Bug Da Tau. Moi Mission deu bi xoa")
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKNHANNHIEMVU,0)
end
end;
--================================================== =PHAN THUONG============================================ ==========
function CheckMission()
SetTask(TASKMISSION,0)
SetTask(TASKSOQUAI,0)
SetTask(TASKNHANNHIEMVU,0)
SetTask(TASKHOANTHANH,GetTask(TASKHOANTHANH)+1)
SayEx({"<color=fire>Da Tau<color>: Ban da hoan thanh Da Tau\nSo Lan Hoan Thanh : "..GetTask(TASKHOANTHANH).."\nCo Hoi Huy Bo: "..GetTask(TASKHUYBO).."",
"Nhan Phan Thuong ./phanthuong",
"Ket Thuc./no"})
end;
function phanthuong()
x = random(1,6)
if x == 1 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
elseif x == 2 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Co Hoi Huy Bo/mattich",
"Thuy Tinh/thuytinh"})
elseif x == 3 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiez",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
elseif x == 4 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Tinh Hong Bao Thach/tinhhong",
"Tang 1 lan Tich Luy./tichluy"})
elseif x == 5 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Co Hoi Huy Bo/cohoi",
"Ngan Luong/nganluong",
"Thuy Tinh./thuytinh"})
elseif x == 6 then
SayEx({"<color=fire>Da Tau<color>: Nguoi da hoan thanh nhiem vu Da Tau\nCo muon nhan chut Phan Thuong Khong",
"Kinh Nghiem./kinhnghiemmin",
"Mat Tich Vo Cong/mattich",
"Thuy Tinh./thuytinh"})
end
end;
function kinhnghiemmin()
exp = random(500000,10000000)
AddOwnExp(exp)
Msg2Player("Ban nhan duoc "..exp.." diem Kinh Nghiem")
end;
function mattich()
k = random(86,113)
AddEventItem(k)
Msg2Player("Ban nhan duoc 1 cuon Bi Kiep mon phai")
end;
function thuytinh()
s = random(1,3)
if s == 1 then
AddEventItem(IDLAMTHUYTINH)
Msg2Player("Ban nhan duoc 1 Lam Thuy Tinh")
elseif s == 2 then
AddEventItem(IDLUCTHUYTINH)
Msg2Player("Ban nhan duoc 1 Luc Thuy Tinh")
elseif s == 3 then
AddEventItem(IDTUTHUYTINH)
Msg2Player("Ban nhan duoc 1 Lam Thuy Tinh")
end
end
function kinhnghiemz()
exp = random(1000000,30000000)
AddOwnExp(exp)
Msg2Player("Ban nhan duoc "..exp.." diem Kinh Nghiem")
end
function nganluong()
tien = random(200000,450000)
Earn(tien)
Msg2Player("Ban nhan duoc "..tien.." van luong")
end
function tinhhong()
AddEventItem(IDTINHHONG)
Msg2Player("Ban nhan duoc 1 vien Tinh Hong Bao THach")
end
function tichluy()
SetTask(TASKHOANTHANH,GetTask(TASKHOANTHANH)+1)
Msg2Player("Ban nhan duoc 1 Tich Luy da tau")
end
function cohoi()
SetTask(TASKHUYBO,GetTask(TASKHUYBO)+1)
Msg2Player("Ban nhan duoc 1 Co Hoi Huy Bo Nhiem Vu")
end
listmangdatau.lua
-- //
--Script Da Tau theo kieu moi // //
--=====================================//
--Ten Map,sO qUAI KILL,lv thap nhat nhan nv,lv cao nhat nhan nv
NhiemVu = {
{"Hoa Son",100,1,10}, -- 1x
{"Tuyet Dinh Hoa Son",100,11,20}, --2x
{"Tan Lang",100,21,30}, --3x
{"Kiem Cac Tay Bac",100,31,40}, --4x
{"Dao Hoa Nguyen",100,41,50}, --5x
{"Dai Tu Dong",100,51,60}, --6x
{"Lam Du Quan",100,61,70}, --7x
{"Chan Nui Truong Bach",100,71,80}, --8x
{"Truong Bach Son Nam",250,81,100}, --10x
{"Truong Bach Son Bac",250,101,120}, --12x
{"Sa Mac Dia Bieu",250,121,130}, --13x
{"Mac Cao Quat",250,131,150}, --15x
{"Tay Son Dao",250,151,200} --17x
}
-- PK , Danh Vong, Phuc Duyen , Tich Luy Tong Kim , Level Thap Nhat Nhan NV , Level Cao Nhat ...
Point = {
{1,20,50,0,1,10}, -- 1x
{2,30,50,0,11,20}, --2x
{3,40,50,0,21,30}, --3x
{4,50,50,0,31,40}, --4x
{5,50,50,0,41,50}, --5x
{6,60,60,0,51,60}, --6x
{7,70,70,0,61,70}, --7x
{8,80,80,0,71,80}, --8x
{9,100,150,5000,81,100}, --10x
{10,200,200,10000,101,120}, --12x
{10,200,200,15000,121,130}, --13x
{10,200,200,20000,131,150}, --15x
{10,250,250,30000,151,200} --17x
}
MapMission = {
{"Hoa Son",2}, -- 1x
{"Tuyet Dinh Hoa Son",212}, --2x
{"Tan Lang",7}, --3x
{"Kiem Cac Tay Bac",9}, --4x
{"Dao Hoa Nguyen",55}, --5x
{"Dai Tu Dong",72}, --6x
{"Lam Du Quan",1}, --7x
{"Chan Nui Truong Bach",4}, --8x
{"Truong Bach Son Nam",13}, --10x
{"Truong Bach Son Bac",14}, --12x
{"Sa Mac Dia Bieu",5}, --13x
{"Mac Cao Quat",3}, --15x
{"Tay Son Dao",15} --17x
}
npcdie.lua
--Author : KingMax
--SCript datau theo Phien Ban moi
Include("\\script\\Global\\da_tau\\datau_.lua")
Include("\\script\\Global\\da_tau\\listmangdatau.lua")
function CheckDaTau()
lv = GetLevel()
W,X,Y = GetWorldPos()
if GetTask(TASKMISSION) == 8 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
if W == MapMission[i][2] then
z = random(1,40)
maps = NhiemVu[i][1]
if z == 7 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Dia Do Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
elseif z == 12 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Dia Do Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon "..maps.." Dia Do Chi! Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
end
end
end
end
elseif GetTask(TASKMISSION) == 9 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
if W == MapMission[i][2] then
z = random(1,100)
maps = NhiemVu[i][1]
if z == 7 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》. Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
elseif z == 12 then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》.Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban nhan duoc 1 cuon 【"..maps.."】《Mat Chi》. Hien tai ban co "..GetTask(TASKSOQUAI).." cuon")
end
end
end
end
elseif GetTask(TASKMISSION) == 10 then
for i=1,getn(MapMission) do
if lv >= NhiemVu[i][3] and lv <= NhiemVu[i][4] then
quai = NhiemVu[i][2]
if W == MapMission[i][2] then
SetTask(TASKSOQUAI,GetTask(TASKSOQUAI)+1)
Msg2Player("Ban tieu diet 1 ten Thu Linh. So Quai : "..GetTask(TASKSOQUAI).."/"..quai.." ten")
end
end
end
else
z = random(1,200)
if z == 56 then
SetTask(SONHAXATAC,GetTask(SONHAXATAC) + 1)
Msg2Player("Ban nhan duoc 1 tam【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
elseif z == 50 then
SetTask(SONHAXATAC,GetTask(SONHAXATAC) + 1)
Msg2Player("Ban nhan duoc 1 tam 【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
SetTask(SONHAXATAC,GetTask(SONHAXATAC)+1)
Msg2Player("Ban nhan duoc 1 tam 【Son Ha Xa Tac】. Hien tai ban dang co "..GetTask(SONHAXATAC).." tam")
end
end
end
Một Điều Nữa
Work Tốt Nhất Trên Tình Huynh Đệ Server