em đang chơi server PV 2.0 nhưng chuyển sinh được 10 lần là hết rồi pro nào sửa dùm em cs vô hạn dùm em với
code chuyển sinh của server em nè:
Code:
dsdh={}
Include("\\Script\\thuvien\\hamcosodulieu.lua")
Include("\\script\\dulieu\\danhsachdanhhieu.lua")
dscdlcs = {
{1,{150,0,500,400},{10,50,"Sieu Pham Hy Ky",20}},
{2,{155,1,1300,600},{11,55,"Xuat Tran Kinh Hong",23}},
{3,{160,2,2100,800},{12,60,"Lang Tuyet Vu Anh",26}},
{4,{165,3,3000,1000},{13,65,"Kinh The Doc Vu",29}},
{5,{170,4,4000,1200},{14,70,"Ngu Khong Phung Hu",32}},
{6,{175,5,5200,1500},{15,75,"Hon Thien Tran Nguyen",35}},
{7,{180,6,6500,2000},{16,80,"So Phuong Linh Vu",38}},
{8,{185,7,8000,2800},{17,85,"Tiem Long Ngam Uyen",41}},
{9,{190,8,10000,4000},{18,90,"Truyen Thuyet Chi Ton",45}},
{10,{200,9,13000,6000},{20,100,"Vo Song Vuong Gia",50}},
}

skills={
{"Thieu Lam",{"Vo Tuong Tam",353},{"Dat Ma Do Giang",350},{"Hoanh Tao Thien Quan",351}},
{"Thien Vuong",{"Pha Thien Tram",342},{"Truy Tinh Truc Nguyet",347},{"Truy Phong Quyet",345}},
{"Duong Mon",{"Bao Vu Le Hoa",302},{"Nhiep Hon Nguyet Anh",355},{"Cuu Cung Phi Tinh",358},{"Loan Hoan Kich",399}},
{"Ngu Doc",{"Am Phong Thuc Cot",359},{"Huyen Am Tram",361}},
{"Nga My",{"Tam Nga Te Tuyet",374},{"Phong Suong Toai Anh",370}},
{"Thuy Yen",{"Bang Tung Vo Anh",377},{"Bang Tam Thien Tu",378}},
{"Cai Bang",{"Phi Long Tai Thien",362},{"Thien Ha Vo Cau",389}},
{"Thien Nhan",{"Thien Ngoai Lieu Tinh",367},{"Van Long Kich",365}},
{"Vo Dang",{"Thien Dia Vo Cuc",382},{"Nhan Kiem Hop Nhat",380}},
{"Con Lon",{"Ngao Tuyet Khieu Phong",385},{"Loi Dong Cuu Thien",384}}
}

sucmanh = {35,20,25,30,20}			
thanphap = {25,35,25,20,15}
sinhkhi = {25,20,25,30,25}
noiluc = {15,25,25,20,40}



function main()
if (GetTask(11) == 0) then
if (GetLevel() == 1) and (GetTask(197) == 0) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu gap ta co truyen gi chang ?",5,"Nhan ho tro tan thu/nhttt","Nhan ho tro cua nhan vat Iteam/nhtcnviteam","Lien quan den trung sinh/lqdtsnv","Lien quan den danh hieu/lqdvddh","Thoat/no")
else
if (GetTask(23) == 0) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu gap ta co truyen gi chang ?",5,"Nhan danh hieu Nhan Sy Giang Ho (Cap 99)/hdnsgh","Nhan ho tro cua nhan vat Iteam/nhtcnviteam","Lien quan den trung sinh/lqdtsnv","Lien quan den danh hieu/lqdvddh","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu gap ta co truyen gi chang ?",4,"Nhan ho tro cua nhan vat Iteam/nhtcnviteam","Lien quan den trung sinh/lqdtsnv","Lien quan den danh hieu/lqdvddh","Thoat/no")
end
end
else
if (GetTask(23) == 0) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu gap ta co truyen gi chang ?",5,"Nhan danh hieu Nhan Sy Giang Ho (Cap 99)/hdnsgh","Nhan ho tro cua nhan vat Iteam/nhtcnviteam","Lien quan den trung sinh/lqdtsnv","Lien quan den danh hieu/lqdvddh","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu gap ta co truyen gi chang ?",4,"Nhan ho tro cua nhan vat Iteam/nhtcnviteam","Lien quan den trung sinh/lqdtsnv","Lien quan den danh hieu/lqdvddh","Thoat/no")
end
end
end;

function nhtcnviteam()
end;

function hdnsgh()
if (GetLevel() >= 99) or (GetTask(197) ~= 0) then
Talk(1,"nhandhnsgh","Day la <color=fire> danh hieu Nhan Sy Giang Ho<color> thi chu hay nhan lay !")
else
Talk(1,"no","Thi chu chua du <color=red>cap 99<color>, khong the nhan")
end
end;
function nhttt()
Talk(1,"nhtttn","Day la <color=fire> 2 van luong, dang cap 70, 1 bo trang bi<color> thi chu hay nhan lay !")
end;
function nhandhnsgh()
taodanhhieu(11)
SetTask(23,1)
KickOutSelf()
end;
function nhtttn()

SetTask(11,1)
Earn(20000)
AddMagic(471)
for i=1,69 do
AddOwnExp(100000000)
end

nh1 = random(0,4)
nh2 = random(0,4)
nh3 = random(0,4)
nh4 = random(0,4)
nh5 = random(0,4)
nh6 = random(0,4)
nh7 = random(0,4)
nh8 = random(0,4)
nh9 = random(0,4)

AddItem(0,2,15,1,nh1,10,6)	
AddItem(0,6,2,1,nh2,10,6)    	
AddItem(0,5,4,1,nh3,10,6)
AddItem(0,7,14,1,nh4,10,6)
AddItem(0,8,2,1,nh5,10,6)
AddItem(0,9,2,1,nh6,10,6)
AddItem(0,3,1,1,nh7,10,6)
AddItem(0,3,1,1,nh8,10,6)
AddItem(0,4,2,1,nh9,10,6)

AddItem(0,0,0,60+1,nh1,10,6)
AddItem(0,0,1,60+1,nh2,10,6)
AddItem(0,0,2,60+1,nh3,10,6)
AddItem(0,0,3,60+1,nh4,10,6)
AddItem(0,0,4,60+1,nh5,10,6)
AddItem(0,0,5,60+1,nh6,10,6)
AddItem(0,1,0,30+1,nh7,10,6)
AddItem(0,1,1,30+1,nh8,10,6)
AddItem(0,1,2,30+1,nh9,10,6)











KickOutSelf()


end;

function gtvvddh()
Say("<color=blue>Vo Danh Tang:<color> Danh hieu co tu <color=fire>Trung Sinh, Su Kien<color> khi su dung se nhan duoc nhung ho tro tuong ung",1,"Thoat/no")
end;

function lqdvddh()
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon",3,"Gioi thieu ve danh hieu/gtvvddh","Su dung danh hieu/luachondanhhieu","Thoat/no")
end;

function lqdtsnv()
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon hinh thuc <color=fire>Trung Sinh<color> nhan vat",3,"Van de chuyen sinh nhan vat/lqcssc","Van de cai lao hoan dong/gtvclhd","Thoat/no")
end;

function clhdbnd()

Talk(1,"no","Chuc nang nay se cap nhap khi sever co gamer dat chuyen sinh toi da <color=red>10 lan<color>")

end;

function gtvclhd()

Say("<color=blue>Vo Danh Tang:<color> Khi cai lao hoan dong thi chu se bat dau lai tu dau voi phan thuong la ki nang, gia tang tiem nang goc, kha nang tu luyen ki nang, danh hieu bac 2 tuong ung",2,"Cai Lao Hoan Dong/clhdbdn","Thoat/no")

end;


function clhdbdn()
if (GetTask(230) < 10) then
ttcl = GetTask(230) + 1
Say("<color=blue>Vo Danh Tang:<color> De cai lao hoan dong lan thu "..ttcl.." thi chu can co dang cap "..dscdlcl[ttcl][2][1]..", chuyen sinh "..dscdlcl[ttcl][2][2].." lan",2,"Ta muon cai lao hoan dong/clhdtct","Thoat/no")
elseif (GetTask(230) == 10) then

Talk(1,"no","Thi chu da <color=red>cai lao hoan dong toi da 10 lan,<color> khong the cai lao hoan dong tiep")

end
end;

function clhdtct()
ttcl = GetTask(230) + 1
if (GetLevel() >= dscdlcl[ttcl][2][1]) then
if (GetTask(197) >= dscdlcl[ttcl][2][2]) then

Talk(2,"clhdtc","Thi chu <color=blue>Cai lao hoan dong lan thu "..dscdlcl[ttcl][1].."<color> thanh cong","<color=blue>Nhan duoc phan thuong:<color> "..dscdlcl[ttcl][3][1].." ki nang, gia tang tiem nang goc "..dscdlcl[ttcl][3][2]..", ki nang that truyen +1, sieu cap +1, danh hieu bac 2 "..dscdlcl[ttcl][3][3])

else
Talk(1,"no","Thi chu khong du <color=red>"..dscdlcl[ttcl][2][2].." lan chuyen sinh,<color> khong the cai lao hoan dong")
end
else
Talk(1,"no","Thi chu khong du dang cap <color=red>"..dscdlcl[ttcl][2][1]..",<color> khong the cai lao hoan dong")
end
end;


function clhdtc()



end;







function lqcssc()
if (GetTask(197) == 0) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hien gio dang chua chuyen sinh",3,"Gioi thieu ve chuyen sinh/gtvcssc","Chuyen sinh nhan vat/nvcssc","Thoat/no")
elseif (GetTask(197) < 10) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hien gio dang chuyen sinh <color=fire>"..GetTask(197).." lan<color>",3,"Gioi thieu ve chuyen sinh/gtvcssc","Chuyen sinh nhan vat/nvcssc","Thoat/no")
else
Talk(1,"no","Thi chu da <color=red>chuyen sinh toi da 10 lan,<color> khong the chuyen sinh tiep")
end
end;

function gtvcssc()
Say("<color=blue>Vo Danh Tang:<color> Khi <color=fire>Chuyen Sinh <color>thi chu se ve dang cap 1, va se nhan duoc phan thuong la tiem nang, ki nang, tiem nang goc, kha nang tu luyen ki nang cao cap, danh hieu tuong ung",1,"Thoat/no")
end;


function nvcssc()
if (GetTask(197) < 10) then
tt = GetTask(197) + 1
Say("<color=blue>Vo Danh Tang:<color> De chuyen sinh <color=fire>lan "..tt.." <color> thi chu can co dang cap "..dscdlcs[tt][2][1]..", "..dscdlcs[tt][2][3].." danh vong, "..dscdlcs[tt][2][4].." phuc duyen",2,"Ta muon chuyen sinh/tmcsktgc","Thoat/no")
elseif (GetTask(197) == 10) then

Talk(1,"no","Thi chu da chuyen sinh toi da <color=red>10 lan,<color> khong the chuyen sinh tiep")

end
end;



function tmcsktgc()

tt = GetTask(197) + 1


if (GetLevel() >= dscdlcs[tt][2][1]) then

if (GetRepute() >= dscdlcs[tt][2][3]) then

if (GetTask(162) >= dscdlcs[tt][2][4]) then

Talk(2,"csscnbg","Thi chu da chuyen sinh <color=fire>lan "..dscdlcs[tt][1].."<color> thanh cong","<color=fire>Nhan duoc phan thuong:<color> "..dscdlcs[tt][3][1].." ki nang, "..dscdlcs[tt][3][2].." tiem nang, "..dscdlcs[tt][3][4].." tiem nang goc, ki nang cao cap muc tu luyen +1 cap, danh hieu "..dscdlcs[tt][3][3])

else
Talk(1,"no","Thi chu khong du <color=red>"..dscdlcs[tt][2][4].." phuc duyen,<color> khong the chuyen sinh")
end

else
Talk(1,"no","Thi chu khong du <color=red>"..dscdlcs[tt][2][3].." danh vong,<color> khong the chuyen sinh")
end



else
Talk(1,"no","Thi chu khong du <color=red>Dang cap "..dscdlcs[tt][2][1]..",<color> khong the chuyen sinh")
end



end;




function csscnbg()
tngctcs = 0
kncs = 0
tncs = 0
tt = GetTask(197) + 1
SetTask(162,GetTask(162)-dscdlcs[tt][2][4])
for i=1,tt do
kncs = kncs + dscdlcs[i][3][1]
tncs = tncs + dscdlcs[i][3][2]
tngctcs = tngctcs + dscdlcs[i][3][4]
end
  p = GetRestSP()              
RollbackSkill()		
vlmt = GetTask(80)
AddMagicPoint(vlmt-p+kncs)	
UpdateSkill()


vt = ktmp()
if (vt ~= -1) then
sl = getn(skills[vt])
if (sl == 3) then

if (HaveMagic(skills[vt][2][2]) ~= -1) then
AddMagic(skills[vt][2][2],GetTask(31))
end
if (HaveMagic(skills[vt][3][2]) ~= -1) then
AddMagic(skills[vt][3][2],GetTask(32))
end

elseif (sl == 4) then
if (HaveMagic(skills[vt][2][2]) ~= -1) then
AddMagic(skills[vt][2][2],GetTask(31))
end
if (HaveMagic(skills[vt][3][2]) ~= -1) then
AddMagic(skills[vt][3][2],GetTask(32))
end
if (HaveMagic(skills[vt][4][2]) ~= -1) then
AddMagic(skills[vt][4][2],GetTask(33))
end
elseif (sl == 5) then

if (HaveMagic(skills[vt][2][2]) ~= -1) then
AddMagic(skills[vt][2][2],GetTask(31))
end
if (HaveMagic(skills[vt][3][2]) ~= -1) then
AddMagic(skills[vt][3][2],GetTask(32))
end
if (HaveMagic(skills[vt][4][2]) ~= -1) then
AddMagic(skills[vt][4][2],GetTask(33))
end
if (HaveMagic(skills[vt][5][2]) ~= -1) then
AddMagic(skills[vt][5][2],GetTask(34))
end
end
end



	a = GetRestAP()                      	
thutu = GetSeries() + 1;
ResetBaseAttrib(0,sucmanh[thutu]+tngctcs);
ResetBaseAttrib(1,thanphap[thutu]+tngctcs);
ResetBaseAttrib(2,sinhkhi[thutu]+tngctcs);
ResetBaseAttrib(3,noiluc[thutu]+tngctcs);
	AddProp(-a)

ttk = GetTask(79) * 5
AddProp(ttk+tncs)
SetLevel(1)
SetTask(197,dscdlcs[tt][1])
taodanhhieu(dscdlcs[tt][1])
AddGlobalNews("Nguoi choi "..GetName().." da chuyen sinh lan "..dscdlcs[tt][1].." thanh cong")
KickOutSelf()
end;




function ktmp()
player_Faction = GetFaction()
if (player_Faction == "翠烟门") then 
mp = 6
elseif (player_Faction == "五毒教") then
mp = 4
elseif (player_Faction == "天王帮") then
mp = 2
elseif (player_Faction == "少林派") then
mp = 1
elseif (player_Faction == "武当派") then
mp = 9
elseif (player_Faction == "天忍教") then
mp = 8
elseif (player_Faction == "唐门") then
mp = 3
elseif (player_Faction == "昆仑派") then
mp = 10
elseif (player_Faction == "峨嵋派") then
mp = 5
elseif (player_Faction == "丐帮") then
mp = 7
else
mp = -1
end
return mp
end;



function taodanhhieucl(mscl)

vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

if (mscl == 1) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Vong Nga"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 303
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 1
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +5%, noi luc toi da +5%, khang tat ca goi han +1%, khang tat ca +1%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 2) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Ngung Than"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 304
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 2
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +10%, noi luc toi da +10%, khang tat ca goi han +2%, khang tat ca +2%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 3) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Ngoc Dong"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 391
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 3
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +15%, noi luc toi da +15%, khang tat ca goi han +3%, khang tat ca +3%, phan don sat thuong 5%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 4) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Chu Thien"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 392
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 4
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +20%, noi luc toi da +20%, khang tat ca goi han +4%, khang tat ca +4%, phan don sat thuong 6%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 5) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Duong Quang"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 393
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 5
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +25%, noi luc toi da +25%, khang tat ca goi han +5%, khang tat ca +5%, phan don sat thuong 7%, phan don sat thuong 5 diem"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 6) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Ngu Long"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 394
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 6
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +30%, noi luc toi da +30%, khang tat ca goi han +6%, khang tat ca +6%, phan don sat thuong 8%, phan don sat thuong 10 diem"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 7) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Nhat Nguyet"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 395
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 7
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +35%, noi luc toi da +35%, khang tat ca goi han +7%, khang tat ca +7%, phan don sat thuong 9%, phan don sat thuong 20 diem"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 8) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Ngoc Nhi"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 396
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 8
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +40%, noi luc toi da +40%, khang tat ca goi han +8%, khang tat ca +8%, phan don sat thuong 10%, phan don sat thuong 30 diem"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 9) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Ngu Khi"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 397
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 9
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +45%, noi luc toi da +45%, khang tat ca goi han +9%, khang tat ca +9%, phan don sat thuong 12%, phan don sat thuong 40 diem, noi luc ho than +15%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (mscl == 10) then

dsdh[vtdh][6][getn(dsdh[vtdh][6])+1] = "Tam Hoa"
dsdh[vtdh][7][getn(dsdh[vtdh][7])+1] = 398
dsdh[vtdh][8][getn(dsdh[vtdh][8])+1] = 10
dsdh[vtdh][9][getn(dsdh[vtdh][9])+1] = "Sinh luc toi da +50%, noi luc toi da +50%, khang tat ca goi han +10%, khang tat ca +10%, phan don sat thuong 15%, phan don sat thuong 50 diem, noi luc ho than +30%"
dsdh[vtdh][2] = {}
dsdh[vtdh][3] = {}
dsdh[vtdh][4] = {}
dsdh[vtdh][5] = {}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))





end


end;

















function taodanhhieu(ms)

vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
if (vtdh == 0) then
if (ms == 1) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Sieu Pham Hy Ky"},{470},{1},{"Sinh luc +100 diem, noi luc +100 diem, khang +1%, khang toi da +1%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 2) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Xuat Tran Kinh Hong"},{457},{2},{"Sinh luc +200 diem, noi luc +200 diem, khang +2%, khang toi da +2%, chi mang +5%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 3) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Lang Tuyet Vu Anh"},{458},{3},{"Sinh luc +300 diem, noi luc +300 diem, khang +3%, khang toi da +3%, chi mang +10%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 4) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Kinh The Doc Vu"},{459},{4},{"Sinh luc +400 diem, noi luc +400 diem, khang +4%, khang toi da +4%, chi mang +10%, di chuyen +10%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 5) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Ngu Khong Phung Hu"},{460},{5},{"Sinh luc +500 diem, noi luc +500 diem, khang +5%, khang toi da +5%, chi mang +10%, di chuyen +20%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 6) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Hon Thien Tran Nguyen"},{461},{6},{"Sinh luc +600 diem, noi luc +600 diem, khang +6%, khang toi da +6%, chi mang +10%, di chuyen +20%, xuat chieu +10%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 7) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"So Phuong Linh Vu"},{462},{7},{"Sinh luc +700 diem, noi luc +700 diem, khang +7%, khang toi da +7%, chi mang +10%, di chuyen +20%, xuat chieu +20%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 8) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Tiem Long Ngam Uyen"},{463},{8},{"Sinh luc +800 diem, noi luc +800 diem, khang +8%, khang toi da +8%, chi mang +10%, di chuyen +20%, xuat chieu +20%, hieu ung -10%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 9) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Truyen Thuyet Chi Ton"},{464},{9},{"Sinh luc +900 diem, noi luc +900 diem, khang +9%, khang toi da +9%, chi mang +15%, di chuyen +30%, xuat chieu +20%, hieu ung -20%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 10) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Vo Song Vuong Gia"},{465},{10},{"Sinh luc +1000 diem, noi luc +1000 diem, khang +10%, khang toi da +10%, chi mang +15%, di chuyen +30%, xuat chieu +30%, hieu ung -30%"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 11) then
dsdh[getn(dsdh)+1] = {GetUUID(),{"Nhan Sy Giang Ho"},{303},{11},{"Phuc hoi sinh luc moi nua giay 5 diem, phuc hoi noi luc moi nua giay 5 diem"},{},{},{},{}}
SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))


end
else
if (ms == 1) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Sieu Pham Hy Ky"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 470
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 1
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +100 diem, noi luc +100 diem, khang +2%, khang toi da +1%"


SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 2) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Xuat Tran Kinh Hong"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 457
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 2
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +200 diem, noi luc +200 diem, khang +4%, khang toi da +2%, chi mang +5%"


SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 3) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Lang Tuyet Vu Anh"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 458
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 3
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +300 diem, noi luc +300 diem, khang +6%, khang toi da +3%, chi mang +10%"


SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 4) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Kinh The Doc Vu"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 459
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 4
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +400 diem, noi luc +400 diem, khang +8%, khang toi da +4%, chi mang +10%, di chuyen +10%"


SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 5) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Ngu Khong Phung Hu"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 460
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 5
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +500 diem, noi luc +500 diem, khang +10%, khang toi da +5%, chi mang +10%, di chuyen +20%"


SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 6) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Hon Thien Tran Nguyen"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 461
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 6
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +600 diem, noi luc +600 diem, khang +12%, khang toi da +6%, chi mang +10%, di chuyen +20%, xuat chieu +10%"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 7) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "So Phuong Linh Vu"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 462
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 7
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +700 diem, noi luc +700 diem, khang +14%, khang toi da +7%, chi mang +10%, di chuyen +20%, xuat chieu +20%"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 8) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Tiem Long Ngam Uyen"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 463
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 8
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +800 diem, noi luc +800 diem, khang +16%, khang toi da +8%, chi mang +10%, di chuyen +20%, xuat chieu +20%, hieu ung -10%"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 9) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Truyen Thuyet Chi Ton"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 464
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 9
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +900 diem, noi luc +900 diem, khang +18%, khang toi da +9%, chi mang +15%, di chuyen +30%, xuat chieu +20%, hieu ung -20%"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 10) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Vo Song Vuong Gia"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 465
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 10
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Sinh luc +1000 diem, noi luc +1000 diem, khang +20%, khang toi da +10%, chi mang +15%, di chuyen +30%, xuat chieu +30%, hieu ung -30%"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))

elseif (ms == 11) then

dsdh[vtdh][2][getn(dsdh[vtdh][2])+1] = "Nhan Sy Giang Ho"
dsdh[vtdh][3][getn(dsdh[vtdh][3])+1] = 303
dsdh[vtdh][4][getn(dsdh[vtdh][4])+1] = 11
dsdh[vtdh][5][getn(dsdh[vtdh][5])+1] = "Phuc hoi sinh luc moi nua giay 5 diem, phuc hoi noi luc moi nua giay 5 diem"

SaveData("script/dulieu/danhsachdanhhieu.lua",TaoBang(dsdh,"dsdh",""))





end
end

end;







function luachondanhhieu()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

if (vtdh == 0) then
Talk(1,"no","Thi chu chua co <color=red>Danh hieu<color>, khong the su dung")
else
if (getn(dsdh[vtdh][2]) == 0) then
Talk(1,"no","Thi chu chua co <color=red>Danh hieu<color>, khong the su dung")
else
hrlcdh1()
end
end
end;



function hrlcdh1()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][2])
if (sldh == 1) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",3,"1."..dsdh[vtdh][2][1].."/dhvt1","Tro lai/main","Thoat/no")
elseif (sldh == 2) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",4,"1."..dsdh[vtdh][2][1].."/dhvt1","2."..dsdh[vtdh][2][2].."/dhvt2","Tro lai/main","Thoat/no")
elseif (sldh == 3) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",5,"1."..dsdh[vtdh][2][1].."/dhvt1","2."..dsdh[vtdh][2][2].."/dhvt2","3."..dsdh[vtdh][2][3].."/dhvt3","Tro lai/main","Thoat/no")
elseif (sldh == 4) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",6,"1."..dsdh[vtdh][2][1].."/dhvt1","2."..dsdh[vtdh][2][2].."/dhvt2","3."..dsdh[vtdh][2][3].."/dhvt3","4."..dsdh[vtdh][2][4].."/dhvt4","Tro lai/main","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",7,"1."..dsdh[vtdh][2][1].."/dhvt1","2."..dsdh[vtdh][2][2].."/dhvt2","3."..dsdh[vtdh][2][3].."/dhvt3","4."..dsdh[vtdh][2][4].."/dhvt4","Tiep/hrlcdh2","Tro lai/main","Thoat/no")
end
end;

function hrlcdh2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][2])
if (sldh == 5) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",3,"5."..dsdh[vtdh][2][5].."/dhvt5","Tro lai/hrlcdh1","Thoat/no")
elseif (sldh == 6) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",4,"5."..dsdh[vtdh][2][5].."/dhvt5","6."..dsdh[vtdh][2][6].."/dhvt6","Tro lai/hrlcdh1","Thoat/no")
elseif (sldh == 7) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",5,"5."..dsdh[vtdh][2][5].."/dhvt5","6."..dsdh[vtdh][2][6].."/dhvt6","7."..dsdh[vtdh][2][7].."/dhvt7","Tro lai/hrlcdh1","Thoat/no")
elseif (sldh == 8) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",6,"5."..dsdh[vtdh][2][5].."/dhvt5","6."..dsdh[vtdh][2][6].."/dhvt6","7."..dsdh[vtdh][2][7].."/dhvt7","8."..dsdh[vtdh][2][8].."/dhvt8","Tro lai/hrlcdh1","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",7,"5."..dsdh[vtdh][2][5].."/dhvt5","6."..dsdh[vtdh][2][6].."/dhvt6","7."..dsdh[vtdh][2][7].."/dhvt7","8."..dsdh[vtdh][2][8].."/dhvt8","Tiep/hrlcdh3","Tro lai/hrlcdh1","Thoat/no")
end

end;


function hrlcdh3()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][2])
if (sldh == 9) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",3,"9."..dsdh[vtdh][2][9].."/dhvt9","Tro lai/hrlcdh2","Thoat/no")
elseif (sldh == 10) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",4,"9."..dsdh[vtdh][2][9].."/dhvt9","10."..dsdh[vtdh][2][10].."/dhvt10","Tro lai/hrlcdh2","Thoat/no")
elseif (sldh == 11) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",5,"9."..dsdh[vtdh][2][9].."/dhvt9","10."..dsdh[vtdh][2][10].."/dhvt10","11."..dsdh[vtdh][2][11].."/dhvt11","Tro lai/hrlcdh2","Thoat/no")
elseif (sldh == 12) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",6,"9."..dsdh[vtdh][2][9].."/dhvt9","10."..dsdh[vtdh][2][10].."/dhvt10","11."..dsdh[vtdh][2][11].."/dhvt11","12."..dsdh[vtdh][2][12].."/dhvt12","Tro lai/hrlcdh2","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",7,"9."..dsdh[vtdh][2][9].."/dhvt9","10."..dsdh[vtdh][2][10].."/dhvt10","11."..dsdh[vtdh][2][11].."/dhvt11","12."..dsdh[vtdh][2][12].."/dhvt12","Tiep/hrlcdh4","Tro lai/hrlcdh2","Thoat/no")
end

end;


function hrlcdh4()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vttdh = i
end
end
sldh = getn(dsdh[vtdh][2])
if (sldh == 13) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",3,"13."..dsdh[vtdh][2][13].."/dhvt13","Tro lai/hrlcdh3","Thoat/no")
elseif (sldh == 14) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",4,"13."..dsdh[vtdh][2][13].."/dhvt13","14."..dsdh[vtdh][2][14].."/dhvt14","Tro lai/hrlcdh3","Thoat/no")
elseif (sldh == 15) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",5,"13."..dsdh[vtdh][2][13].."/dhvt13","14."..dsdh[vtdh][2][14].."/dhvt14","15."..dsdh[vtdh][2][15].."/dhvt15","Tro lai/hrlcdh3","Thoat/no")
elseif (sldh == 16) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",6,"13."..dsdh[vtdh][2][13].."/dhvt13","14."..dsdh[vtdh][2][14].."/dhvt14","15."..dsdh[vtdh][2][15].."/dhvt15","16."..dsdh[vtdh][2][16].."/dhvt16","Tro lai/hrlcdh3","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon <color=fire>Danh Hieu<color> muon su dung",7,"13."..dsdh[vtdh][2][13].."/dhvt13","14."..dsdh[vtdh][2][14].."/dhvt14","15."..dsdh[vtdh][2][15].."/dhvt15","16."..dsdh[vtdh][2][16].."/dhvt16","Tiep/hrlcdh5","Tro lai/hrlcdh3","Thoat/no")
end

end;





function luachondanhhieub2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

if (vtdh == 0) then
Talk(1,"no","Thi chu chua co <color=red>Danh hieu bac 2<color>, khong the su dung")
else
if (getn(dsdh[vtdh][6]) == 0) then
Talk(1,"no","Thi chu chua co <color=red>Danh hieu bac 2<color>, khong the su dung")
else
hrlcdh1b2()
end
end
end;



function hrlcdh1b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][6])
if (sldh == 1) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",3,"1."..dsdh[vtdh][6][1].."/dhvt1b2","Tro lai/main","Thoat/no")
elseif (sldh == 2) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",4,"1."..dsdh[vtdh][6][1].."/dhvt1b2","2."..dsdh[vtdh][6][2].."/dhvt2b2","Tro lai/main","Thoat/no")
elseif (sldh == 3) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",5,"1."..dsdh[vtdh][6][1].."/dhvt1b2","2."..dsdh[vtdh][6][2].."/dhvt2b2","3."..dsdh[vtdh][6][3].."/dhvt3b2","Tro lai/main","Thoat/no")
elseif (sldh == 4) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",6,"1."..dsdh[vtdh][6][1].."/dhvt1b2","2."..dsdh[vtdh][6][2].."/dhvt2b2","3."..dsdh[vtdh][6][3].."/dhvt3b2","4."..dsdh[vtdh][6][4].."/dhvt4b2","Tro lai/main","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",7,"1."..dsdh[vtdh][6][1].."/dhvt1b2","2."..dsdh[vtdh][6][2].."/dhvt2b2","3."..dsdh[vtdh][6][3].."/dhvt3b2","4."..dsdh[vtdh][6][4].."/dhvt4b2","Tiep/hrlcdh2b2","Tro lai/main","Thoat/no")
end
end;


function hrlcdh2b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][6])
if (sldh == 5) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",3,"1."..dsdh[vtdh][6][5].."/dhvt5b2","Tro lai/hrlcdh1b2","Thoat/no")
elseif (sldh == 6) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",4,"1."..dsdh[vtdh][6][5].."/dhvt5b2","2."..dsdh[vtdh][6][6].."/dhvt6b2","Tro lai/hrlcdh1b2","Thoat/no")
elseif (sldh == 7) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",5,"1."..dsdh[vtdh][6][5].."/dhvt5b2","2."..dsdh[vtdh][6][6].."/dhvt6b2","3."..dsdh[vtdh][6][7].."/dhvt7b2","Tro lai/hrlcdh1b2","Thoat/no")
elseif (sldh == 8) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",6,"1."..dsdh[vtdh][6][5].."/dhvt5b2","2."..dsdh[vtdh][6][6].."/dhvt6b2","3."..dsdh[vtdh][6][7].."/dhvt7b2","4."..dsdh[vtdh][6][8].."/dhvt8b2","Tro lai/hrlcdh1b2","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",7,"1."..dsdh[vtdh][6][5].."/dhvt5b2","2."..dsdh[vtdh][6][6].."/dhvt6b2","3."..dsdh[vtdh][6][7].."/dhvt7b2","4."..dsdh[vtdh][6][8].."/dhvt8b2","Tiep/hrlcdh3b2","Tro lai/hrlcdh1b2","Thoat/no")
end
end;



function hrlcdh3b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
sldh = getn(dsdh[vtdh][6])
if (sldh == 9) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",3,"1."..dsdh[vtdh][6][9].."/dhvt9b2","Tro lai/hrlcdh2b2","Thoat/no")
elseif (sldh == 10) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",4,"1."..dsdh[vtdh][6][9].."/dhvt9b2","2."..dsdh[vtdh][6][10].."/dhvt10b2","Tro lai/hrlcdh2b2","Thoat/no")
elseif (sldh == 11) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",5,"1."..dsdh[vtdh][6][9].."/dhvt9b2","2."..dsdh[vtdh][6][10].."/dhvt10b2","3."..dsdh[vtdh][6][11].."/dhvt11b2","Tro lai/hrlcdh2b2","Thoat/no")
elseif (sldh == 12) then
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",6,"1."..dsdh[vtdh][6][9].."/dhvt9b2","2."..dsdh[vtdh][6][10].."/dhvt10b2","3."..dsdh[vtdh][6][11].."/dhvt11b2","4."..dsdh[vtdh][6][12].."/dhvt12b2","Tro lai/hrlcdh2b2","Thoat/no")
else
Say("<color=blue>Vo Danh Tang:<color> Thi chu hay lua chon danh hieu bac 2 muon su dung",7,"1."..dsdh[vtdh][6][9].."/dhvt9b2","2."..dsdh[vtdh][6][10].."/dhvt10b2","3."..dsdh[vtdh][6][11].."/dhvt11b2","4."..dsdh[vtdh][6][12].."/dhvt12b2","Tiep/hrlcdh4b2","Tro lai/hrlcdh1b2","Thoat/no")
end
end;

function sudungdanhieub2(vtcl)
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
DelMagic(303)
DelMagic(304)
DelMagic(391)
DelMagic(392)
DelMagic(393)
DelMagic(394)
DelMagic(395)
DelMagic(396)
DelMagic(397)
DelMagic(398)

AddMagic(dsdh[vtdh][7][vtcl],10)

msdhcs = 0
if (GetMagicLevel(470) == 10) then
msdhcs = 1
elseif (GetMagicLevel(457) == 10) then
msdhcs = 2
elseif (GetMagicLevel(458) == 10) then
msdhcs = 3
elseif (GetMagicLevel(459) == 10) then
msdhcs = 4
elseif (GetMagicLevel(460) == 10) then
msdhcs = 5
elseif (GetMagicLevel(461) == 10) then
msdhcs = 6
elseif (GetMagicLevel(462) == 10) then
msdhcs = 7
elseif (GetMagicLevel(463) == 10) then
msdhcs = 8
elseif (GetMagicLevel(464) == 10) then
msdhcs = 9
elseif (GetMagicLevel(465) == 10) then
msdhcs = 10
end

iddhcl = 20 * dsdh[vtdh][8][vtcl] + msdhcs + 1

SetRank(iddhcl)

KickOutSelf()


end;





function sudungdanhieu(vt)
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end
DelMagic(303)
DelMagic(470)
DelMagic(457)
DelMagic(458)
DelMagic(459)
DelMagic(460)
DelMagic(461)
DelMagic(462)
DelMagic(463)
DelMagic(464)
DelMagic(465)

AddMagic(dsdh[vtdh][3][vt],10)
iddh = 20 * GetTask(60) + dsdh[vtdh][4][vt] + 1
SetRank(iddh)

KickOutSelf()
end;


function dhvt1b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht1b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][1].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][1])
end;


function dhvt2b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht2b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][2].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][2])
end;

function dhvt3b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht3b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][3].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][3])
end;

function dhvt4b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht4b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][4].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][4])
end;

function dhvt5b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht5b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][5].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][5])
end;

function dhvt6b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht6b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][6].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][6])
end;



function dhvt7b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht7b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][7].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][7])
end;

function dhvt8b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht8b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][8].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][8])
end;



function dhvt9b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht9b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][9].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][9])
end;



function dhvt10b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht10b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][10].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][10])
end;

function dhvt11b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht11b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][11].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][11])
end;


function dhvt12b2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht12b2","Thi chu da su dung danh hieu bac 2 <color=blue>"..dsdh[vtdh][6][12].." <color>thanh cong","<color=blue>Tac dung ho tro: <color>"..dsdh[vtdh][9][12])
end;








function dhvt1()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht1","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][1].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][1])
end;

function dhvt2()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht2","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][2].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][2])
end;

function dhvt3()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht3","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][3].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][3])
end;

function dhvt4()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht4","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][4].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][4])
end;

function dhvt5()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht5","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][5].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][5])
end;

function dhvt6()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht6","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][6].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][6])
end;

function dhvt7()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht7","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][7].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][7])
end;

function dhvt8()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht8","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][8].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][8])
end;

function dhvt9()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht9","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][9].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][9])
end;



function dhvt10()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht10","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][10].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][10])
end;



function dhvt11()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht11","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][11].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][11])
end;

function dhvt12()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht12","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][12].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][12])
end;

function dhvt13()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht13","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][13].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][13])
end;

function dhvt14()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht14","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][14].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][14])
end;

function dhvt15()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht15","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][15].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][15])
end;


function dhvt16()
vtdh = 0
for i=1,getn(dsdh) do
if (GetUUID() == dsdh[i][1]) then
vtdh = i
end
end

Talk(2,"tlsddht16","Thi chu da su dung danh hieu <color=fire>"..dsdh[vtdh][2][16].." <color>thanh cong","<color=fire>Tac dung ho tro: <color>"..dsdh[vtdh][5][16])
end;








function tlsddht1b2()
sudungdanhieub2(1)
end;

function tlsddht2b2()
sudungdanhieub2(2)
end;
function tlsddht3b2()
sudungdanhieub2(3)
end;
function tlsddht4b2()
sudungdanhieub2(4)
end;
function tlsddht5b2()
sudungdanhieub2(5)
end;

function tlsddht6b2()
sudungdanhieub2(6)
end;
function tlsddht7b2()
sudungdanhieub2(7)
end;

function tlsddht8b2()
sudungdanhieub2(8)
end;

function tlsddht9b2()
sudungdanhieub2(9)
end;

function tlsddht10b2()
sudungdanhieub2(10)
end;

function tlsddht11b2()
sudungdanhieub2(11)
end;

function tlsddht12b2()
sudungdanhieub2(12)
end;





function tlsddht1()
sudungdanhieu(1)
end;

function tlsddht2()
sudungdanhieu(2)
end;
function tlsddht3()
sudungdanhieu(3)
end;

function tlsddht4()
sudungdanhieu(4)
end;
function tlsddht5()
sudungdanhieu(5)
end;

function tlsddht6()
sudungdanhieu(6)
end;

function tlsddht7()
sudungdanhieu(7)
end;
function tlsddht8()
sudungdanhieu(8)
end;

function tlsddht9()
sudungdanhieu(9)
end;
function tlsddht10()
sudungdanhieu(10)
end;
function tlsddht11()
sudungdanhieu(11)
end;

function tlsddht12()
sudungdanhieu(12)
end;

function tlsddht13()
sudungdanhieu(13)
end;

function tlsddht14()
sudungdanhieu(14)
end;

function tlsddht15()
sudungdanhieu(15)
end;
function tlsddht16()
sudungdanhieu(16)
end;


function no()
end;