PDA

View Full Version : Ai giúp đc mình nào ?



luxfarm
07-10-10, 11:49 AM
---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON then
MsgEx("Diem Kinh Nghiem khong du de tao Huyen Tran Don.")
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;
đây là code của SV jx pro nofont
ai sửa cho em thành cần 1knb mới có đc Huyền chân đơn đc k ?
còn CS nữa
Khi CS đến lần thứ 11 thì cần 1 knb cứ thế ai giúp đc k ?
+ làm cái chữ trên đầu nữa
Xin cái bộ đồ gamemaster luôn
Cho xin luôn cái liên đấu :D

quangken
07-10-10, 04:42 PM
---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON then
MsgEx("Diem Kinh Nghiem khong du de tao Huyen Tran Don.")
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;
đây là code của SV jx pro nofont
ai sửa cho em thành cần 1knb mới có đc Huyền chân đơn đc k ?
còn CS nữa
Khi CS đến lần thứ 11 thì cần 1 knb cứ thế ai giúp đc k ?
+ làm cái chữ trên đầu nữa
Xin cái bộ đồ gamemaster luôn
Cho xin luôn cái liên đấu :D

Tự Viết Sờ pít đi chứ...........................

ph4mduc4n
07-10-10, 05:06 PM
âcí này toàn pro đưa vào sv của họ , bạn xin thì hơi khó đó

LàmGìĐểCóTiền
07-10-10, 05:18 PM
---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON then
MsgEx("Diem Kinh Nghiem khong du de tao Huyen Tran Don.")
else if GetItemCount("id queskey knb") <= 0 then
MsgEx("You ko co knb.")
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
DelItem(id queskey knb)
end
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;

Mình ko phải là pro j`, tại thấy script là thích. Ko biết có đúng theo yêu cầu bạn ko

luxfarm
08-10-10, 04:59 PM
---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON then
MsgEx("Diem Kinh Nghiem khong du de tao Huyen Tran Don.")
else if GetItemCount("id queskey knb") <= 0 then
MsgEx("You ko co knb.")
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
DelItem(id queskey knb)
end
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;

Mình ko phải là pro j`, tại thấy script là thích. Ko biết có đúng theo yêu cầu bạn ko

Lỗi Fix lại hộ cái......................

LàmGìĐểCóTiền
08-10-10, 05:07 PM
---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

idknb =
IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON then
MsgEx("Diem Kinh Nghiem khong du de tao Huyen Tran Don.")
else if GetItemCount(idknb) <= 0 then
MsgEx("You ko co knb.") end
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
DelItem(idknb)
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;

Cái hồi bữa bị sai chắc do nhiễm code LUA của TLKD. Xem thử cái này dc ko.
Điền id queskey knb ở trên cùng. hoặc xài cái này:


---------------------------------------------------------
----Author: DNTmaster
----Thong Tin:
----Script Huyen Tran Don.
---------------------------------------------------------
Include("\\script\\Global\\sourcejx49.lua");

idknb =
IDHUYENTRANDON = 167
EXPOFHUYENTRANDON = 1500000000 --//So diem Kinh Nghiem Huyen Tran Don rut ra
LEVELDOEXP = 160 --//Dang cap co the tao duoc Huyen Tran Don
LEVELCANUSE = 50 --//Dang cap co the su dung Huyen Tran Don
CANBEUSEINMONTH = 1 --//Tat/Mo Su dung Huyen Tran don 1 lan trong 1 thang: Mac dinh = 1
EXPINFOR = 700000 --//So kinh nghiem duoc them vao trong moi vong lap
EXPREMAIN = 500000 --//So kinh nghiem mat di trong moi vong lap bo sung vao

function ruthuyentrandon()
SayEx({"<color="..colorS()..">Huyen Tran Don<color>: Huyen tran don chi duoc rut khi dat duoc dang cap: "..LEVELDOEXP..".\nTrong 1 thang chi co the su dung Huyen Tran Don "..CANBEUSEINMONTH.." lan...","Ta muon tao Huyen Tran Don./taohuyentrandon","Su dung Huyen Tran Don./sudunghuyentrandon","Thoat./Exit"})
end;

function taohuyentrandon()
if GetLevel() < LEVELDOEXP then
Say("<color="..colorS()..">Huyen Tran Don<color>:\nDang cap cua ban khong du de thuc hien viec nay.\nChe tao Huyen Chan Don can dang cap "..LEVELDOEXP..".",1,"Thoat./Exit")
else
createhtd()
end
end;

function createhtd()
if GetExp() <= EXPOFHUYENTRANDON and GetItemCount(idknb) <= 0 then
MsgEx("Diem Kinh Nghiem,knb khong du de tao Huyen Tran Don.")
else
AddEventItem(IDHUYENTRANDON)
EXPOFHUYENTRANDON = EXPOFHUYENTRANDON*-1
AddOwnExp(EXPOFHUYENTRANDON)
MsgEx("Nhan duoc 1 vien Huyen Tran Don...")
DelItem(idknb)
end
end;

function sudunghuyentrandon()
thangnay = tonumber(date("%M"))
if CANBEUSEINMONTH == 1 then
if GetTask(TaskHuyenTranDon) ~= thangnay then
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
else
Talk(1,"","<color="..colorS()..">Huyen Tran Don<color>: Thang nay ban da su dung Huyen Tran Don nen khong the tiep tuc su dung nua...")
end
else
if GetItemCount(IDHUYENTRANDON) >= 1 then
SetTask(TaskHuyenTranDon,thangnay)
nowlevel = GetLevel()
nowexp1 = GetExp()
cot = LoadLevelExp()
nowexp2 = cot[nowlevel+1][2]
--nextexp = cot[nowlevel+2][2]
needexp = nowexp2 - nowexp1
AddOwnExp(needexp)
lastexp = EXPOFHUYENTRANDON - needexp
vonglap = floor(lastexp/EXPINFOR)
for i = 1,vonglap do
AddOwnExp(EXPINFOR)
end;
for i = 1,vonglap do
upexp = EXPREMAIN*vonglap
AddOwnExp(upexp)
end;
DelItem(IDHUYENTRANDON)
MsgEx("Su dung Huyen Tran Don dang cap tang len: "..GetLevel())
else
MsgEx("Khong co vien Huyen Tran Don nao trong nguoi...")
end
end
end;