thuanthienkiem
29-04-11, 03:26 PM
Cần pro giúp sửa cái script sao cho đẳng cấp chuyển sinh là 250 thay vì 200
server TTK của kingmax có mấy file liên quan đến cs
1 file resetpl
--Include("\\script\\两湖区\\巴陵县\\npc\\chuyensinh.lu a");
Include("\\Data\\dangcaptrungsinh.lua");
CASHTORESETPLAYER5X = 500
LISTFORTS5X = {
{200,15000,15000,710,40,20,38,5000000}, --51
{200,15000,15000,720,45,20,38,5000000}, --52
{200,15000,15000,730,45,20,38,5000000}, --53
{200,15000,15000,740,50,20,38,5000000}, --54
{200,15000,15000,750,50,20,38,5000000}, --55
{200,15000,15000,800,55,20,38,5000000}, --56
{200,15000,15000,850,55,20,38,5000000}, --57
{200,15000,15000,900,60,20,38,5000000}, --58
{200,15000,15000,950,60,20,38,5000000}, --59
{200,15000,15000,1000,65,20,39,10000000}, --60
{200,15000,15000,1050,65,20,39,10000000}, --61
{200,15000,15000,1100,70,20,39,10000000}, --62
{200,15000,15000,1150,70,20,39,10000000}, --63
{200,15000,15000,1200,75,20,39,10000000}, --64
{200,15000,15000,1250,75,20,39,10000000}, --65
{200,15000,15000,1300,80,20,39,10000000}, --66
{200,15000,15000,1350,80,20,39,10000000}, --67
{200,15000,15000,1400,85,20,39,10000000}, --68
{200,15000,15000,1450,85,20,39,10000000}, --69
{200,15000,15000,1500,90,20,39,15000000}, --70
{200,15000,15000,1550,90,20,39,15000000}, --71
{200,15000,15000,1600,95,20,39,15000000}, --72
{200,15000,15000,1650,95,20,39,15000000}, --73
{200,15000,15000,1700,100,20,39,15000000}, --74
{200,15000,15000,1750,100,20,39,15000000}, --75
{200,15000,15000,1800,105,20,39,15000000}, --76
{200,15000,15000,1850,105,20,39,15000000}, --77
{200,15000,15000,1900,110,20,39,15000000}, --78
{200,15000,15000,1950,110,20,39,15000000}, --79
{200,15000,15000,2000,120,20,39,20000000}, --80
{200,15000,15000,2050,120,20,39,20000000}, --81
{200,15000,15000,2100,130,20,39,20000000}, --82
{200,15000,15000,2200,130,20,39,20000000}, --83
{200,15000,15000,2300,140,20,39,20000000}, --84
{200,15000,15000,2400,140,20,39,20000000}, --85
{200,15000,15000,2500,150,20,39,20000000}, --86
{200,15000,15000,2600,150,20,39,20000000}, --87
{200,15000,15000,2700,160,20,39,20000000}, --88
{200,15000,15000,2800,160,20,39,20000000}, --89
{200,15000,15000,2900,170,20,39,25000000}, --90
{200,15000,15000,3000,170,20,39,25000000}, --91
{200,15000,15000,3200,180,20,39,25000000}, --92
{200,15000,15000,3400,180,20,39,25000000}, --93
{200,15000,15000,3600,190,20,39,25000000}, --94
{200,15000,15000,3800,190,20,39,25000000}, --95
{200,15000,15000,4000,200,20,39,25000000}, --96
{200,15000,15000,4200,220,20,39,25000000}, --97
{200,15000,15000,4400,240,20,39,25000000}, --98
{200,15000,15000,4600,260,20,39,25000000}, --99
{200,15000,15000,4800,280,20,39,30000000}, --100
{200,15000,15000,5000,300,20,39,30000000}, --101
}
function trungsinh5x_npc()
solan,diemdu,info = ThongTinNhanVat5X(GetName())
if info >= 102 then
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi da Chuyen Sinh duoc 101 lan roi khong them nua.\nDen gap <color=yellow>Ga Trong Vang<color> de duoc huong dan them ve Chuyen Sinh.","Thoat./Exit"})
else
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Chuyen Sinh: "..solan.." lan.\tLan Tiep Theo Can:\nLevel: "..LISTFORTS[info][1].." Cap.\tDanh Vong: "..LISTFORTS[info][2].." Diem.\nPhuc Duyen: "..LISTFORTS[info][3].." Diem.\tChuyen Sinh Kiep: "..LISTFORTS[info][6].." Cai.","Ta Muon Chuyen Sinh./chuyensinhZ5X","Kiem Tra Diem Du./testdiemdu","Thoat./Exit"})
end
end;
function ThongTinNhanVat5X(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
end
end
end
function chuyensinhZ5X()
solan,diemdu,info = ThongTinNhanVat5X(GetName())
--if info >= 47 then info = 47 end
if GetCash() >= Van(CASHTORESETPLAYER)*info then
if GetLevel() >= LISTFORTS5X[info][1] then
if AddDanhVong() >= LISTFORTS5X[info][2] then
if GetTask(TaskPhucDuyen) >= LISTFORTS5X[info][3] then
if GetItemCount(IDKEYTRUNGSINH) >= LISTFORTS5X[info][6] then
Pay(Van(CASHTORESETPLAYER)*info)
conglantrungsinh()
if RESETKEEPSTART == 1 then
MsgEx("Chuyen Sinh Giu Lai Toan Bo Diem Tu Cap Truoc.")
elseif RESETKEEPSTART == 0 then
RollPoint()
MsgEx("Chuyen Sinh Khong Giu Lai Toan Bo Diem Tu Cap Truoc.")
end
now = LISTFORTS5X[info][8]
if now <= 0 then now = 0 end
LuuExpSauKhiTrungSinh(now)
for i =1,LISTFORTS5X[info][6] do
DelItem(IDKEYTRUNGSINH)
end;
AddOwnExp(-now)
a = LISTFORTS5X[info][2]*(-1)
b = LISTFORTS5X[info][3]
AddDanhVong(a)
SetTask(TaskPhucDuyen,GetTask(TaskPhucDuyen)-b)
z = LISTFORTS5X[info][4]
x = LISTFORTS5X[info][5]
AddAll(z,x)
SetRank(LISTFORTS5X[info][7])
SetTask(TaskTayTuyKinh,0)
SetTask(TaskVoLamMatTich,0)
SetLevel(LEVELGOTWHENRESET)
solan,diemdu,info = ThongTinNhanVat(GetName())
MsgEx("Chuyen Sinh Nhan Vat Thanh Cong Lan Thu: "..solan)
MsgEx("Chuan bi thoat khoi Game...\n<Dang Cap Nhat Lai Thong Tin Nhan Vat>")
KickOutSelf()
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Co <color=red>"..LISTFORTS5X[info][6].."<color> Vien Chuyen Sinh Kiep Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Phuc Duyen <color=red>"..LISTFORTS5X[info][3].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Danh Vong <color=red>"..LISTFORTS5X[info][2].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Dang Cap <color=red>"..LISTFORTS5X[info][1].."<color> Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can <color=red>"..CASHTORESETPLAYER5X.."<color> Van moi co the Chuyen Sinh",1)
end
end;
FileDataTrungSinhthunghiem = "Data/dangcaptrungsinh.lua"
function taobangtrungsinh_thunghiem()
levelkhoidau = 100
danhvongkhoidau = 50
phucduyenkhoidau = 50
tiemnangkhoidau = 10
kynangkhoidau = 2
chuyensinhkiepkhoidau = 0
ranking = 25
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,2 5}
for i =1,8 do
levelkhoidau = levelkhoidau + 5
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 0
ranking = ranking + 1
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end
for i =1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = 1
ranking = 34
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 35
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 36
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 37
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 38
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,5000 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 39
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
lammoidanhsachthunghiem = TaoBang(CAUTRUC,"CAUTRUC","")
SaveData(FileDataTrungSinhthunghiem,lammoidanhsach thunghiem)
end;
file trungsinh.lua
Include("\\Script\\global\\sourcejx49.lua");
Include("\\script\\cacsukien\\banghoi\\tong.lua")
Include("\\Data\\danhsachtrungsinh.lua")
Include("\\Data\\dangcaptrungsinh.lua")
Include("\\script\\两湖区\\巴陵县\\npc\\resetpl.lua");
IDKEYTRUNGSINH = 128
LEVELGOTWHENRESET = 1 --Level nhan duoc sau khi Chuyen Sinh
CASHTORESETPLAYER = 200 --So tien dung de Chuyen Sinh.Gia Tri: Van
MAXCHUYENSINH = 1 --Tat/Mo Chuyen Sinh Vo Han.Mac Dinh: 1
RESETKEEPSTART = 0 --Tat/mo Trung Sinh co giu diem.
FileDataTrungSinh = "Data/danhsachtrungsinh.lua"
function main()
lapdanhsach_main()
end;
function trungsinh_npc()
solan,diemdu,info = ThongTinNhanVat(GetName())
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>:\nThong Tin:\nChuyen Sinh: "..GetTask(TaskTrungSinh).." lan.\nYeu Cau Ke Tiep:\nLevel: "..LISTFORTS[info][1].." Cap.\t\tDanh Vong: "..LISTFORTS[info][2].." Diem.\nPhuc Duyen:"..LISTFORTS[info][3].." diem.\t\tChuyen Sinh Kiep: "..LISTFORTS[info][6].." Cai.",
"Chuyen Sinh Nhan Vat./chuyensinhZ",
"Huong Dan Ve Chuyen Sinh./hdcs",
"Nhan Danh Hieu Chuyen Sinh./danhhieuchuyensinh",
"Cai Lao Hoan Dong./clhd",
"Thoat./Exit"})
end;
function clhd()
Msg2Player("Chuc Nang nay se cap nhat sau")
end
function phanthuongcs()
Msg2Player("Ra mat trong thoi gian som nhat")
end;
function danhhieuchuyensinh()
if GetTask(TaskTrungSinh) >= 1 and GetTask(TaskTrungSinh) < 10 then
if HaveMagic(457) <= 0 then
SetRank(25)
AddMagic(457,1)
Msg2Player("Ban nhan duoc Danh Hieu [Sieu Pham]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Sieu Pham<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 10 and GetTask(TaskTrungSinh) < 20 then
if HaveMagic(458) <= 0 then
DelMagic(457)
SetRank(26)
AddMagic(458,1)
Msg2Player("Ban nhan duoc Danh Hieu [Xuat Tran]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Xuat Tran<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 20 and GetTask(TaskTrungSinh) < 30 then
if HaveMagic(459) <= 0 then
DelMagic(458)
DelMagic(457)
SetRank(27)
AddMagic(459,1)
Msg2Player("Ban nhan duoc Danh Hieu [Lang Tuyet]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Lang Tuyet<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 30 and GetTask(TaskTrungSinh) < 40 then
if HaveMagic(460) <= 0 then
DelMagic(459)
DelMagic(458)
DelMagic(457)
SetRank(28)
AddMagic(460,1)
Msg2Player("Ban nhan duoc Danh Hieu [Kinh The]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Kinh The<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 40 then
if HaveMagic(461) <= 0 then
SetRank(29)
DelMagic(460)
DelMagic(458)
DelMagic(457)
DelMagic(459)
AddMagic(461,1)
Msg2Player("Ban nhan duoc Danh Hieu [Hon Thien]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Hon Thien<color> khong the nhan duoc nua")
end
else
Msg2Player("So lan trung sinh cua ban la : "..GetTask(TaskTrungSinh).." khong the nhan thuong")
end
end
function addrank()
if GetTask(TaskTrungSinh) >= 1 and GetTask(TaskTrungSinh) < 10 then
SetRank(25)
elseif GetTask(TaskTrungSinh) >= 10 and GetTask(TaskTrungSinh) < 20 then
SetRank(26)
elseif GetTask(TaskTrungSinh) >= 20 and GetTask(TaskTrungSinh) < 30 then
SetRank(27)
elseif GetTask(TaskTrungSinh) >= 30 and GetTask(TaskTrungSinh) < 40 then
SetRank(28)
elseif GetTask(TaskTrungSinh) >= 40 then
SetRank(29)
end
end
function hdcs()
Talk(4,"Exit","Chuyen Sinh giup gia tang cong luc, hoi sinh nguyen khi",
"Chuyen Sinh nhieu lan se co uu dai nhu gia tang diem <color=fire>Trang Phai<color> va luyen them duoc skill Mon Phai",
"Cap Bac:\n1 -> 10 : Sieu Pham\t\t10 -> 20 : Xuat Tran\n20 -> 30 : Lang Tuyet\t\t30 -> 40 : Hon Thien\n40 -> 50 : Hon Thien\t\t50 >> : Vo Song",
"Moi lan trung sinh se nhan duoc diem ky nang, tiem nang va dac biet la skill ho tro danh hieu kem theo")
end;
function lapdanhsach_main()
if timkiemtennhanvat(GetName()) == 1 then
trungsinh_npc()
else
LISTRESET[getn(LISTRESET)+1] = {GetName(),GetTask(TaskTrungSinh),0,GetTask(TaskTr ungSinh)+1,0}
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
trungsinh_npc()
end
end;
function updatetablecs()
if timkiemtennhanvat(GetName()) == nil then
LISTRESET[getn(LISTRESET)+1] = {GetName(),0,0,1,0}
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end;
function timkiemtennhanvat(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return 1
end
end
end;
function ThongTinNhanVat(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
a = GetTask(TaskTrungSinh) + 1
if a == LISTRESET[i][4] then
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
else
LISTRESET[i][2] = GetTask(TaskTrungSinh)
LISTRESET[i][4] = GetTask(TaskTrungSinh)+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
end
end
end
end;
function SOLANTRUNGSINH(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][2]
end
end
end;
function PHANTHUONGCHUYENSINH(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][5]
end
end
end;
function SUMALLREWAR()
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][5] = LISTRESET[i][5]+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function conglantrungsinh()
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][2] = GetTask(TaskTrungSinh)+1
LISTRESET[i][4] = LISTRESET[i][4]+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function LuuExpSauKhiTrungSinh(diemluu)
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][3] = LISTRESET[i][3]+diemluu
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function chuyensinhZ()
solan,diemdu,info = ThongTinNhanVat(GetName())
--if info >= 47 then info = 47 end
if GetCash() >= Van(CASHTORESETPLAYER)*info then
if GetLevel() >= LISTFORTS[info][1] then
if AddDanhVong() >= LISTFORTS[info][2] then
if GetTask(TaskPhucDuyen) >= LISTFORTS[info][3] then
if GetItemCount(IDKEYTRUNGSINH) >= LISTFORTS[info][6] then
Pay(Van(CASHTORESETPLAYER)*info)
conglantrungsinh()
if RESETKEEPSTART == 1 then
MsgEx("Chuyen Sinh Giu Lai Toan Bo Diem Tu Cap Truoc.")
elseif RESETKEEPSTART == 0 then
RollPoint()
MsgEx("Chuyen Sinh Khong Giu Lai Toan Bo Diem Tu Cap Truoc.")
end
now = GetExp()
if now <= 0 then now = 0 end
LuuExpSauKhiTrungSinh(now)
for i =1,LISTFORTS[info][6] do
DelItem(IDKEYTRUNGSINH)
end;
AddOwnExp(-now)
a = LISTFORTS[info][2]*(-1)
b = LISTFORTS[info][3]
AddDanhVong(a)
SetTask(TaskPhucDuyen,GetTask(TaskPhucDuyen)-b)
z = LISTFORTS[info][4]
x = LISTFORTS[info][5]
AddAll(z,x)
--SetRank(LISTFORTS[info][7])
SetTask(TaskTayTuyKinh,0)
SetTask(TaskVoLamMatTich,0)
SetTask(TaskTrungSinh,GetTask(TaskTrungSinh)+1)
SetLevel(LEVELGOTWHENRESET)
solan,diemdu,info = ThongTinNhanVat(GetName())
MsgEx("Chuyen Sinh Nhan Vat Thanh Cong Lan Thu: "..solan)
MsgEx("Chuan bi thoat khoi Game...\n<Dang Cap Nhat Lai Thong Tin Nhan Vat>")
KickOutSelf()
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Co <color=red>"..LISTFORTS[info][6].."<color> Vien Chuyen Sinh Kiep Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Phuc Duyen <color=red>"..LISTFORTS[info][3].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Danh Vong <color=red>"..LISTFORTS[info][2].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Dang Cap <color=red>"..LISTFORTS[info][1].."<color> Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can <color=red>"..CASHTORESETPLAYER.."<color> Van moi co the Chuyen Sinh",1)
end
end;
function RollPoint()
SucManh = {35,20,25,30,20}
ThanPhap = {25,35,25,20,15}
SinhLuc = {25,20,25,30,25}
NoiLuc = {15,25,25,20,40}
NguHanh = GetSeries() + 1
ResetBaseAttrib(0,SucManh[NguHanh]);
ResetBaseAttrib(1,ThanPhap[NguHanh]);
ResetBaseAttrib(2,SinhLuc[NguHanh]);
ResetBaseAttrib(3,NoiLuc[NguHanh]);
AddProp(-GetProp())
TaySkill()
AddMagicPoint(-GetMagicPoint())
end;
function testdiemdu()
diemdu = kiemtradiemdu(GetName())
strings = "Rut "..diemdu.." diem./rutexp"
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Hien tai nguoi dang co "..diemdu.." diem Kinh Nghiem du chua su dung.","Rut 500k diem./rutexp","Rut 1 Trieu diem./rutexp",strings,"Thoat./Exit"})
end;
function rutexp(nsel)
diemdu = kiemtradiemdu(GetName())
id = nsel+1
if id == 1 then
if diemdu >= 500000 then
for i=1,10 do
AddOwnExp(50000)
end
UseDiemExpDu(GetName(),-500000)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co du diem de rut ra...",1)
end
elseif id == 2 then
if diemdu >= 1000000 then
for i=1,20 do
AddOwnExp(50000)
end
UseDiemExpDu(GetName(),-1000000)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co du diem de rut ra...",1)
end
elseif id == 3 then
if diemdu > 0 then
diemduz = floor(diemdu/500000)
diemdut = mod(diemdu,500000)
for j=1,diemduz do
AddOwnExp(500000)
end
AddOwnExp(diemdut)
UseDiemExpDu(GetName(),-diemdu)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co diem nao de rut ra ca...",1)
end
end
end;
function kiemtravonglap(sodiem)
if sodiem > 0 and sodiem < 500000 then
return 10,floor(sodiem/10),1
elseif sodiem >= 500000 then
return 10,50000,1
elseif sodiem >= 1000000 then
return 20,50000,1
elseif sodiem >= 10000000 then
return 10,1000000,1
elseif sodiem >= 100000000 then
return 100,1000000,1
elseif sodiem >= 1000000000 then
return 100,1000000,10
elseif sodiem >= 2000000000 then
return 100,2000000,10
elseif sodiem >= 3000000000 then
return 100,3000000,10
end
end;
function UseDiemExpDu(tennguoirut,sodiem)
if sodiem == nil then
return
end
for i = 1,getn(LISTRESET) do
if tennguoirut == LISTRESET[i][1] then
LISTRESET[i][3] = LISTRESET[i][3] + sodiem
MsgEx("Hien tai ban con "..LISTRESET[i][3].." diem EXP du.")
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
break
end
end
end
function kiemtradiemdu(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][3]
end
end
end;
function ResetDataBaseCS(ten)
for i = 1,getn(LISTRESET) do
if ten == LISTRESET[i][1] then
LISTRESET[i][3] = 0
LISTRESET[i][2] = 0
LISTRESET[i][4] = 0
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
MsgEx("Bay gio ban co the chuyen sinh lai tu dau.")
end
end
end;
cần pro xem giúp thank nhiu`
server TTK của kingmax có mấy file liên quan đến cs
1 file resetpl
--Include("\\script\\两湖区\\巴陵县\\npc\\chuyensinh.lu a");
Include("\\Data\\dangcaptrungsinh.lua");
CASHTORESETPLAYER5X = 500
LISTFORTS5X = {
{200,15000,15000,710,40,20,38,5000000}, --51
{200,15000,15000,720,45,20,38,5000000}, --52
{200,15000,15000,730,45,20,38,5000000}, --53
{200,15000,15000,740,50,20,38,5000000}, --54
{200,15000,15000,750,50,20,38,5000000}, --55
{200,15000,15000,800,55,20,38,5000000}, --56
{200,15000,15000,850,55,20,38,5000000}, --57
{200,15000,15000,900,60,20,38,5000000}, --58
{200,15000,15000,950,60,20,38,5000000}, --59
{200,15000,15000,1000,65,20,39,10000000}, --60
{200,15000,15000,1050,65,20,39,10000000}, --61
{200,15000,15000,1100,70,20,39,10000000}, --62
{200,15000,15000,1150,70,20,39,10000000}, --63
{200,15000,15000,1200,75,20,39,10000000}, --64
{200,15000,15000,1250,75,20,39,10000000}, --65
{200,15000,15000,1300,80,20,39,10000000}, --66
{200,15000,15000,1350,80,20,39,10000000}, --67
{200,15000,15000,1400,85,20,39,10000000}, --68
{200,15000,15000,1450,85,20,39,10000000}, --69
{200,15000,15000,1500,90,20,39,15000000}, --70
{200,15000,15000,1550,90,20,39,15000000}, --71
{200,15000,15000,1600,95,20,39,15000000}, --72
{200,15000,15000,1650,95,20,39,15000000}, --73
{200,15000,15000,1700,100,20,39,15000000}, --74
{200,15000,15000,1750,100,20,39,15000000}, --75
{200,15000,15000,1800,105,20,39,15000000}, --76
{200,15000,15000,1850,105,20,39,15000000}, --77
{200,15000,15000,1900,110,20,39,15000000}, --78
{200,15000,15000,1950,110,20,39,15000000}, --79
{200,15000,15000,2000,120,20,39,20000000}, --80
{200,15000,15000,2050,120,20,39,20000000}, --81
{200,15000,15000,2100,130,20,39,20000000}, --82
{200,15000,15000,2200,130,20,39,20000000}, --83
{200,15000,15000,2300,140,20,39,20000000}, --84
{200,15000,15000,2400,140,20,39,20000000}, --85
{200,15000,15000,2500,150,20,39,20000000}, --86
{200,15000,15000,2600,150,20,39,20000000}, --87
{200,15000,15000,2700,160,20,39,20000000}, --88
{200,15000,15000,2800,160,20,39,20000000}, --89
{200,15000,15000,2900,170,20,39,25000000}, --90
{200,15000,15000,3000,170,20,39,25000000}, --91
{200,15000,15000,3200,180,20,39,25000000}, --92
{200,15000,15000,3400,180,20,39,25000000}, --93
{200,15000,15000,3600,190,20,39,25000000}, --94
{200,15000,15000,3800,190,20,39,25000000}, --95
{200,15000,15000,4000,200,20,39,25000000}, --96
{200,15000,15000,4200,220,20,39,25000000}, --97
{200,15000,15000,4400,240,20,39,25000000}, --98
{200,15000,15000,4600,260,20,39,25000000}, --99
{200,15000,15000,4800,280,20,39,30000000}, --100
{200,15000,15000,5000,300,20,39,30000000}, --101
}
function trungsinh5x_npc()
solan,diemdu,info = ThongTinNhanVat5X(GetName())
if info >= 102 then
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi da Chuyen Sinh duoc 101 lan roi khong them nua.\nDen gap <color=yellow>Ga Trong Vang<color> de duoc huong dan them ve Chuyen Sinh.","Thoat./Exit"})
else
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Chuyen Sinh: "..solan.." lan.\tLan Tiep Theo Can:\nLevel: "..LISTFORTS[info][1].." Cap.\tDanh Vong: "..LISTFORTS[info][2].." Diem.\nPhuc Duyen: "..LISTFORTS[info][3].." Diem.\tChuyen Sinh Kiep: "..LISTFORTS[info][6].." Cai.","Ta Muon Chuyen Sinh./chuyensinhZ5X","Kiem Tra Diem Du./testdiemdu","Thoat./Exit"})
end
end;
function ThongTinNhanVat5X(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
end
end
end
function chuyensinhZ5X()
solan,diemdu,info = ThongTinNhanVat5X(GetName())
--if info >= 47 then info = 47 end
if GetCash() >= Van(CASHTORESETPLAYER)*info then
if GetLevel() >= LISTFORTS5X[info][1] then
if AddDanhVong() >= LISTFORTS5X[info][2] then
if GetTask(TaskPhucDuyen) >= LISTFORTS5X[info][3] then
if GetItemCount(IDKEYTRUNGSINH) >= LISTFORTS5X[info][6] then
Pay(Van(CASHTORESETPLAYER)*info)
conglantrungsinh()
if RESETKEEPSTART == 1 then
MsgEx("Chuyen Sinh Giu Lai Toan Bo Diem Tu Cap Truoc.")
elseif RESETKEEPSTART == 0 then
RollPoint()
MsgEx("Chuyen Sinh Khong Giu Lai Toan Bo Diem Tu Cap Truoc.")
end
now = LISTFORTS5X[info][8]
if now <= 0 then now = 0 end
LuuExpSauKhiTrungSinh(now)
for i =1,LISTFORTS5X[info][6] do
DelItem(IDKEYTRUNGSINH)
end;
AddOwnExp(-now)
a = LISTFORTS5X[info][2]*(-1)
b = LISTFORTS5X[info][3]
AddDanhVong(a)
SetTask(TaskPhucDuyen,GetTask(TaskPhucDuyen)-b)
z = LISTFORTS5X[info][4]
x = LISTFORTS5X[info][5]
AddAll(z,x)
SetRank(LISTFORTS5X[info][7])
SetTask(TaskTayTuyKinh,0)
SetTask(TaskVoLamMatTich,0)
SetLevel(LEVELGOTWHENRESET)
solan,diemdu,info = ThongTinNhanVat(GetName())
MsgEx("Chuyen Sinh Nhan Vat Thanh Cong Lan Thu: "..solan)
MsgEx("Chuan bi thoat khoi Game...\n<Dang Cap Nhat Lai Thong Tin Nhan Vat>")
KickOutSelf()
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Co <color=red>"..LISTFORTS5X[info][6].."<color> Vien Chuyen Sinh Kiep Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Phuc Duyen <color=red>"..LISTFORTS5X[info][3].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Danh Vong <color=red>"..LISTFORTS5X[info][2].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Dang Cap <color=red>"..LISTFORTS5X[info][1].."<color> Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can <color=red>"..CASHTORESETPLAYER5X.."<color> Van moi co the Chuyen Sinh",1)
end
end;
FileDataTrungSinhthunghiem = "Data/dangcaptrungsinh.lua"
function taobangtrungsinh_thunghiem()
levelkhoidau = 100
danhvongkhoidau = 50
phucduyenkhoidau = 50
tiemnangkhoidau = 10
kynangkhoidau = 2
chuyensinhkiepkhoidau = 0
ranking = 25
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,2 5}
for i =1,8 do
levelkhoidau = levelkhoidau + 5
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 0
ranking = ranking + 1
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end
for i =1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = 1
ranking = 34
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 35
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 36
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 37
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,10 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 38
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
for i=1,5000 do
levelkhoidau = levelkhoidau + 5
if levelkhoidau >= 200 then levelkhoidau = 200 end
danhvongkhoidau = danhvongkhoidau + 50
phucduyenkhoidau = phucduyenkhoidau + 50
tiemnangkhoidau = tiemnangkhoidau + 10
kynangkhoidau = kynangkhoidau + 2
chuyensinhkiepkhoidau = chuyensinhkiepkhoidau + 1
if chuyensinhkiepkhoidau >= 20 then chuyensinhkiepkhoidau = 20 end
ranking = 39
CAUTRUC[getn(CAUTRUC)+1] = {levelkhoidau,danhvongkhoidau,phucduyenkhoidau,tie mnangkhoidau,kynangkhoidau,chuyensinhkiepkhoidau,r anking}
end;
lammoidanhsachthunghiem = TaoBang(CAUTRUC,"CAUTRUC","")
SaveData(FileDataTrungSinhthunghiem,lammoidanhsach thunghiem)
end;
file trungsinh.lua
Include("\\Script\\global\\sourcejx49.lua");
Include("\\script\\cacsukien\\banghoi\\tong.lua")
Include("\\Data\\danhsachtrungsinh.lua")
Include("\\Data\\dangcaptrungsinh.lua")
Include("\\script\\两湖区\\巴陵县\\npc\\resetpl.lua");
IDKEYTRUNGSINH = 128
LEVELGOTWHENRESET = 1 --Level nhan duoc sau khi Chuyen Sinh
CASHTORESETPLAYER = 200 --So tien dung de Chuyen Sinh.Gia Tri: Van
MAXCHUYENSINH = 1 --Tat/Mo Chuyen Sinh Vo Han.Mac Dinh: 1
RESETKEEPSTART = 0 --Tat/mo Trung Sinh co giu diem.
FileDataTrungSinh = "Data/danhsachtrungsinh.lua"
function main()
lapdanhsach_main()
end;
function trungsinh_npc()
solan,diemdu,info = ThongTinNhanVat(GetName())
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>:\nThong Tin:\nChuyen Sinh: "..GetTask(TaskTrungSinh).." lan.\nYeu Cau Ke Tiep:\nLevel: "..LISTFORTS[info][1].." Cap.\t\tDanh Vong: "..LISTFORTS[info][2].." Diem.\nPhuc Duyen:"..LISTFORTS[info][3].." diem.\t\tChuyen Sinh Kiep: "..LISTFORTS[info][6].." Cai.",
"Chuyen Sinh Nhan Vat./chuyensinhZ",
"Huong Dan Ve Chuyen Sinh./hdcs",
"Nhan Danh Hieu Chuyen Sinh./danhhieuchuyensinh",
"Cai Lao Hoan Dong./clhd",
"Thoat./Exit"})
end;
function clhd()
Msg2Player("Chuc Nang nay se cap nhat sau")
end
function phanthuongcs()
Msg2Player("Ra mat trong thoi gian som nhat")
end;
function danhhieuchuyensinh()
if GetTask(TaskTrungSinh) >= 1 and GetTask(TaskTrungSinh) < 10 then
if HaveMagic(457) <= 0 then
SetRank(25)
AddMagic(457,1)
Msg2Player("Ban nhan duoc Danh Hieu [Sieu Pham]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Sieu Pham<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 10 and GetTask(TaskTrungSinh) < 20 then
if HaveMagic(458) <= 0 then
DelMagic(457)
SetRank(26)
AddMagic(458,1)
Msg2Player("Ban nhan duoc Danh Hieu [Xuat Tran]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Xuat Tran<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 20 and GetTask(TaskTrungSinh) < 30 then
if HaveMagic(459) <= 0 then
DelMagic(458)
DelMagic(457)
SetRank(27)
AddMagic(459,1)
Msg2Player("Ban nhan duoc Danh Hieu [Lang Tuyet]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Lang Tuyet<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 30 and GetTask(TaskTrungSinh) < 40 then
if HaveMagic(460) <= 0 then
DelMagic(459)
DelMagic(458)
DelMagic(457)
SetRank(28)
AddMagic(460,1)
Msg2Player("Ban nhan duoc Danh Hieu [Kinh The]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Kinh The<color> khong the nhan duoc nua")
end
elseif GetTask(TaskTrungSinh) >= 40 then
if HaveMagic(461) <= 0 then
SetRank(29)
DelMagic(460)
DelMagic(458)
DelMagic(457)
DelMagic(459)
AddMagic(461,1)
Msg2Player("Ban nhan duoc Danh Hieu [Hon Thien]")
else
Talk(1,"addrank","Nguoi da nhan <color=fire>Danh Hieu Hon Thien<color> khong the nhan duoc nua")
end
else
Msg2Player("So lan trung sinh cua ban la : "..GetTask(TaskTrungSinh).." khong the nhan thuong")
end
end
function addrank()
if GetTask(TaskTrungSinh) >= 1 and GetTask(TaskTrungSinh) < 10 then
SetRank(25)
elseif GetTask(TaskTrungSinh) >= 10 and GetTask(TaskTrungSinh) < 20 then
SetRank(26)
elseif GetTask(TaskTrungSinh) >= 20 and GetTask(TaskTrungSinh) < 30 then
SetRank(27)
elseif GetTask(TaskTrungSinh) >= 30 and GetTask(TaskTrungSinh) < 40 then
SetRank(28)
elseif GetTask(TaskTrungSinh) >= 40 then
SetRank(29)
end
end
function hdcs()
Talk(4,"Exit","Chuyen Sinh giup gia tang cong luc, hoi sinh nguyen khi",
"Chuyen Sinh nhieu lan se co uu dai nhu gia tang diem <color=fire>Trang Phai<color> va luyen them duoc skill Mon Phai",
"Cap Bac:\n1 -> 10 : Sieu Pham\t\t10 -> 20 : Xuat Tran\n20 -> 30 : Lang Tuyet\t\t30 -> 40 : Hon Thien\n40 -> 50 : Hon Thien\t\t50 >> : Vo Song",
"Moi lan trung sinh se nhan duoc diem ky nang, tiem nang va dac biet la skill ho tro danh hieu kem theo")
end;
function lapdanhsach_main()
if timkiemtennhanvat(GetName()) == 1 then
trungsinh_npc()
else
LISTRESET[getn(LISTRESET)+1] = {GetName(),GetTask(TaskTrungSinh),0,GetTask(TaskTr ungSinh)+1,0}
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
trungsinh_npc()
end
end;
function updatetablecs()
if timkiemtennhanvat(GetName()) == nil then
LISTRESET[getn(LISTRESET)+1] = {GetName(),0,0,1,0}
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end;
function timkiemtennhanvat(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return 1
end
end
end;
function ThongTinNhanVat(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
a = GetTask(TaskTrungSinh) + 1
if a == LISTRESET[i][4] then
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
else
LISTRESET[i][2] = GetTask(TaskTrungSinh)
LISTRESET[i][4] = GetTask(TaskTrungSinh)+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
return LISTRESET[i][2],LISTRESET[i][3],LISTRESET[i][4]
end
end
end
end;
function SOLANTRUNGSINH(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][2]
end
end
end;
function PHANTHUONGCHUYENSINH(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][5]
end
end
end;
function SUMALLREWAR()
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][5] = LISTRESET[i][5]+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function conglantrungsinh()
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][2] = GetTask(TaskTrungSinh)+1
LISTRESET[i][4] = LISTRESET[i][4]+1
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function LuuExpSauKhiTrungSinh(diemluu)
for i=1,getn(LISTRESET) do
if LISTRESET[i][1] == GetName() then
LISTRESET[i][3] = LISTRESET[i][3]+diemluu
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
end
end
end;
function chuyensinhZ()
solan,diemdu,info = ThongTinNhanVat(GetName())
--if info >= 47 then info = 47 end
if GetCash() >= Van(CASHTORESETPLAYER)*info then
if GetLevel() >= LISTFORTS[info][1] then
if AddDanhVong() >= LISTFORTS[info][2] then
if GetTask(TaskPhucDuyen) >= LISTFORTS[info][3] then
if GetItemCount(IDKEYTRUNGSINH) >= LISTFORTS[info][6] then
Pay(Van(CASHTORESETPLAYER)*info)
conglantrungsinh()
if RESETKEEPSTART == 1 then
MsgEx("Chuyen Sinh Giu Lai Toan Bo Diem Tu Cap Truoc.")
elseif RESETKEEPSTART == 0 then
RollPoint()
MsgEx("Chuyen Sinh Khong Giu Lai Toan Bo Diem Tu Cap Truoc.")
end
now = GetExp()
if now <= 0 then now = 0 end
LuuExpSauKhiTrungSinh(now)
for i =1,LISTFORTS[info][6] do
DelItem(IDKEYTRUNGSINH)
end;
AddOwnExp(-now)
a = LISTFORTS[info][2]*(-1)
b = LISTFORTS[info][3]
AddDanhVong(a)
SetTask(TaskPhucDuyen,GetTask(TaskPhucDuyen)-b)
z = LISTFORTS[info][4]
x = LISTFORTS[info][5]
AddAll(z,x)
--SetRank(LISTFORTS[info][7])
SetTask(TaskTayTuyKinh,0)
SetTask(TaskVoLamMatTich,0)
SetTask(TaskTrungSinh,GetTask(TaskTrungSinh)+1)
SetLevel(LEVELGOTWHENRESET)
solan,diemdu,info = ThongTinNhanVat(GetName())
MsgEx("Chuyen Sinh Nhan Vat Thanh Cong Lan Thu: "..solan)
MsgEx("Chuan bi thoat khoi Game...\n<Dang Cap Nhat Lai Thong Tin Nhan Vat>")
KickOutSelf()
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Co <color=red>"..LISTFORTS[info][6].."<color> Vien Chuyen Sinh Kiep Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Phuc Duyen <color=red>"..LISTFORTS[info][3].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Danh Vong <color=red>"..LISTFORTS[info][2].."<color> Diem Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can Dang Cap <color=red>"..LISTFORTS[info][1].."<color> Moi co the Chuyen Sinh",1)
end
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Can <color=red>"..CASHTORESETPLAYER.."<color> Van moi co the Chuyen Sinh",1)
end
end;
function RollPoint()
SucManh = {35,20,25,30,20}
ThanPhap = {25,35,25,20,15}
SinhLuc = {25,20,25,30,25}
NoiLuc = {15,25,25,20,40}
NguHanh = GetSeries() + 1
ResetBaseAttrib(0,SucManh[NguHanh]);
ResetBaseAttrib(1,ThanPhap[NguHanh]);
ResetBaseAttrib(2,SinhLuc[NguHanh]);
ResetBaseAttrib(3,NoiLuc[NguHanh]);
AddProp(-GetProp())
TaySkill()
AddMagicPoint(-GetMagicPoint())
end;
function testdiemdu()
diemdu = kiemtradiemdu(GetName())
strings = "Rut "..diemdu.." diem./rutexp"
SayEx({"<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Hien tai nguoi dang co "..diemdu.." diem Kinh Nghiem du chua su dung.","Rut 500k diem./rutexp","Rut 1 Trieu diem./rutexp",strings,"Thoat./Exit"})
end;
function rutexp(nsel)
diemdu = kiemtradiemdu(GetName())
id = nsel+1
if id == 1 then
if diemdu >= 500000 then
for i=1,10 do
AddOwnExp(50000)
end
UseDiemExpDu(GetName(),-500000)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co du diem de rut ra...",1)
end
elseif id == 2 then
if diemdu >= 1000000 then
for i=1,20 do
AddOwnExp(50000)
end
UseDiemExpDu(GetName(),-1000000)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co du diem de rut ra...",1)
end
elseif id == 3 then
if diemdu > 0 then
diemduz = floor(diemdu/500000)
diemdut = mod(diemdu,500000)
for j=1,diemduz do
AddOwnExp(500000)
end
AddOwnExp(diemdut)
UseDiemExpDu(GetName(),-diemdu)
else
MsgEx("<color="..colorS()..">Chuyen Sinh Lao Nhan<color>: Nguoi khong co diem nao de rut ra ca...",1)
end
end
end;
function kiemtravonglap(sodiem)
if sodiem > 0 and sodiem < 500000 then
return 10,floor(sodiem/10),1
elseif sodiem >= 500000 then
return 10,50000,1
elseif sodiem >= 1000000 then
return 20,50000,1
elseif sodiem >= 10000000 then
return 10,1000000,1
elseif sodiem >= 100000000 then
return 100,1000000,1
elseif sodiem >= 1000000000 then
return 100,1000000,10
elseif sodiem >= 2000000000 then
return 100,2000000,10
elseif sodiem >= 3000000000 then
return 100,3000000,10
end
end;
function UseDiemExpDu(tennguoirut,sodiem)
if sodiem == nil then
return
end
for i = 1,getn(LISTRESET) do
if tennguoirut == LISTRESET[i][1] then
LISTRESET[i][3] = LISTRESET[i][3] + sodiem
MsgEx("Hien tai ban con "..LISTRESET[i][3].." diem EXP du.")
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
break
end
end
end
function kiemtradiemdu(ten)
for i = 1,getn(LISTRESET) do
if LISTRESET[i][1] == ten then
return LISTRESET[i][3]
end
end
end;
function ResetDataBaseCS(ten)
for i = 1,getn(LISTRESET) do
if ten == LISTRESET[i][1] then
LISTRESET[i][3] = 0
LISTRESET[i][2] = 0
LISTRESET[i][4] = 0
lammoidanhsach = TaoBang(LISTRESET,"LISTRESET","")
SaveData(FileDataTrungSinh,lammoidanhsach)
MsgEx("Bay gio ban co the chuyen sinh lai tu dau.")
end
end
end;
cần pro xem giúp thank nhiu`