PDA

View Full Version : [JX] Giúp tôi cái Scrip hỗ trợ tân thủ nên AWJX



NotIAm
13-12-14, 02:51 PM
Include("\\script\\source\\thuvien.lua")
function main()
SayEx({"<color=blue>LÓ Quan:<color> C¸c H¹ Cã ThÓ NhËn Quµ NÕu §¹t C¸c §iÒu KiÖn Sau:",
"Hæ Trî T©n Thñ/nhanquaht",
"§¹t Level 60 ( Set T©n Thñ )/nhanquaht",
"§¹t Level 90 ( Vò KhÝ M«n Ph¸i )/nhanquaht",
"§¹t Level 120 ( Set §å + 4 )/nhanquaht",
"§¹t Level 150 (30 ThiÕt La H¸n )/nhanquaht",
"§¹t Level 180( 4 HuyÒn Tinh CÊp 5 )/nhanquaht",
"§¹t Level 220( Vò KhÝ + 6 )/nhanquaht",
"Tho¸t/Exit"})
end

function timhieuhtro(nsel)
Talk(1,"Exit","§¹t Level <color=red>60<color> SÏ NhËn §­îcc 1 Set Trang BÞ T©n Thñ + 30 V¹n\n§¹t Level <color=red>90<color> S· NhËn §­îc 1 Set Vò KhÝ Hoµng Kim\n§¹t Level <color=red>120<color> SÏ NhËn §­îc 1 Set Trang BÞ Hoµng Kim\n§¹t Level <color=red>150<color> NhËn §­îc 30 ThiÕt La H¸n\n§¹t Level <color=red>180<color> SÏ NhËn §­îc 4 HuyÒn Tinh CÊp 5\n§¹t Level <color=red>220<color> SÏ NhËn §­îc Vò KhÝ CÊp 6")
end

function nhanquaht(nsel)
id = nsel + 1
a = tongsoxu()
b = soxudadung()
if id == 1 then
if GetTask(17) == 0 then
if GetTask(130) == 1 then
SaveTaskUser(tongsoxu()+1)
ThemTien(100000)
ThemVatPham(43)
while GetLevel() < 60 do AddOwnExp(9999999) end
Talk(1,"","B¹n NhËn §­îc 1 VËt PhÈm Hç Trî Ng­êi Ch¬i Vµ 60 Level!")
SetTask(17,1)
else
ThongBaoGamer("B¹n H·y NhËn ChuyÓn Sinh MiÔn PhÝ T¹i NPC ChuyÓn Sinh Tr­íc (Täa §é 203/199) !")
end
else
ThongBaoGamer("B¹n §· NhËn PhÇn Quµ Nµy Råi Kh«ng ThÓ NhËn N÷a !")
end
elseif id == 2 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 60 then
if GetTask(17) == 1 then
ThemTrangBi("Trang Phuc","Ao","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Day Chuyen","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","That Lung","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Ngoc Boi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Tren","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Duoi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Bao Tay","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Non","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Giay","Tan Thu",nil,random(1,6))
ThemTien(300000)
Talk(1,"","B¹n NhËn §­îc 1 Set Trang BÞ T©n Thñ + 30 V¹n !")
SetTask(17,2)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ Hç Trî T©n Thñ Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 3 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 90 then
if GetTask(17) == 2 then

mp = KiemTraMonPhai()
if mp == "Thieu Lam" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Thien Vuong" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Chuy","Hoang Kim",mp,4)
elseif mp == "Duong Mon" then
ThemTrangBi("Vu Khi","Phi Dao","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Phi Tieu","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Tu Tien","Hoang Kim",mp,4)
elseif mp == "Ngu Doc" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Nga My" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,4)
elseif mp == "Thuy Yen" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Cai Bang" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,4)
elseif mp == "Thien Nhan" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,4)
elseif mp == "Vo Dang" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,4)
elseif mp == "Con Lon" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
end
Talk(1,"","B¹n NhËn §­îc Vò KhÝ M«n Ph¸i "..mp.." !")
SetTask(17,3)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 6X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 4 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 120 then
if GetTask(17) == 3 then
ThemTrangBi("Trang Phuc","Ao","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Day Chuyen","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","That Lung","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Ngoc Boi","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Nhan Tren","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Nhan Duoi","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Bao Tay","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Non","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Giay","Hoang Kim",KiemTraMonPhai(),4)
Talk(1,"","B¹n NhËn §­îc 1 Set Trang BÞ Hoµng Kim !")
SetTask(17,4)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 9X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 5 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 150 then
if GetTask(17) == 4 then
for i=1,30 do ThemVatPham(3) end
Talk(1,"","B¹n NhËn §­îc 30 Cuèn ThiÕt La H¸n !")
SetTask(17,5)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 12X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 6 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 180 then
if GetTask(17) == 5 then
for i=1,4 do ThemVatPham(20) end
Talk(1,"","B¹n NhËn §­îc 4 HuyÒn Tinh CÊp 5 !")
SetTask(17,6)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 15X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 7 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 220 then
if GetTask(17) == 6 then

mp = KiemTraMonPhai()
if mp == "Thieu Lam" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Thien Vuong" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Chuy","Hoang Kim",mp,6)
elseif mp == "Duong Mon" then
ThemTrangBi("Vu Khi","Phi Dao","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Phi Tieu","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Tu Tien","Hoang Kim",mp,6)
elseif mp == "Ngu Doc" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Nga My" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,6)
elseif mp == "Thuy Yen" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Cai Bang" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,6)
elseif mp == "Thien Nhan" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,6)
elseif mp == "Vo Dang" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,6)
elseif mp == "Con Lon" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
end
Talk(1,"","B¹n NhËn §­îc Vò KhÝ M«n Ph¸i "..mp.." !")
SetTask(17,7)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 18X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
end
end
function SaveCoinUsed(num) -- Ham Them Xu Da Su Dung
if (num >= 0) then
SaveLog("dulieu/soxudadung/"..GetUUID()..".LOG",num,"w+")
end
end

function SaveTaskUser(num) -- Ham Them Xu Da Su Dung
if (num >= 0) then
SaveLog("dulieu/tongsoxu/"..GetUUID()..".LOG",num,"w+")
end
end

function tongsoxu() -- Tong So Xu Da Nap
local f = ReadLog("dulieu/tongsoxu/"..GetUUID()..".LOG")
if (type(f) == "table" and getn(f) > 0) then
return tonumber(f[1][1])
end
return 0
end

function soxudadung() -- Tong So Xu Da Dung
local f = ReadLog("dulieu/soxudadung/"..GetUUID()..".LOG")
if (type(f) == "table" and getn(f) > 0) then
return tonumber(f[1][1])
end
return 0
end



function SaveLog(file,_name,types)
local types = types or "a+"
local _name = _name or "NULL"
local fs_log = openfile(file, types);
write(fs_log, _name.."\n");
closefile(fs_log);
end;

function ReadLog(file)
local F_Tong = openfile(file, "r");
if F_Tong == nil then
return 0
end
local str_data = read(F_Tong,"*all")
local tab_data = split(str_data,"\n")
local DataCount = getn(tab_data) - 1
local id_data = {}
local id_data_temp = {}
for i=1,DataCount do
id_data[i] = split(tab_data[i],"\t")
id_data_temp[i] = id_data[i]
end;
closefile(F_Tong);
return id_data_temp
end

function split(str,splitor)
if(splitor==nil) then
splitor=","
end
local strArray={}
local strStart=1
local splitorLen = strlen(splitor)
local index=strfind(str,splitor,strStart)
if(index==nil) then
strArray[1]=str
return strArray
end
local i=1
while index do
strArray[i]=strsub(str,strStart,index-1)
i=i+1
strStart=index+splitorLen
index = strfind(str,splitor,strStart)
end
strArray[i]=strsub(str,strStart,strlen(str))
return strArray
end
function LeFaction(idtask,money,msg)
if GetCash() >= money then
Pay(money)
SetTask(idtask,0)
SetCamp(4)
SetCurCamp(4)
SetRank(11)
SetTask(85,kiemtraft())
SetFaction("")
ThongBaoGamer(msg)
else
Talk(1,"","Muon suat su ban can phai co <color="..colorS(3)..">"..money.."<color> moi co the roi khoi mon phai duoc...")
end
end

function ReFaction(idtask,camp,money,msg,rank)
if GetCash() >= money then
Pay(money)
SetTask(idtask,1)
SetCamp(camp)
SetCurCamp(camp)
ThongBaoGamer(msg)
SetRank(rank)
else
Talk(1,"","Muon quay ve mon phai ban can phai co <color="..colorS(3)..">"..money.."<color> moi co the thuc hien duoc...")
end
end

function colorS(number)
if number == nil then
style = GetSeries()
if style == 0 then
return "metal"
elseif style == 1 then
return "wood"
elseif style == 2 then
return "water"
elseif style == 3 then
return "fire"
elseif style == 4 then
return "earth"
end;
elseif number == 1 then
return "cyan"
elseif number == 2 then
return "blue"
elseif number == 3 then
return "yellow"
elseif number == 4 then
return "pink"
elseif number == 5 then
return "red"
elseif number == 6 then
return "green"
end;
end











Nhận thì nó toàn báo
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Ai giúp với :(

killer20099
13-12-14, 02:54 PM
chắc là râu ông này cắm cằm bà kia chứ gì :))

NotIAm
13-12-14, 03:00 PM
Ai giúp với :(
30charrrrrrrrrrrrrr

phongmous96
13-12-14, 03:19 PM
Cho cái yahoo đi bạn, để mình xem thử, lỗi hàm thôi :)

NotIAm
13-12-14, 03:20 PM
Cho cái yahoo đi bạn, để mình xem thử, lỗi hàm thôi :)

Yahoo ở chữ ký đó ạ :(

30chartrrrrrrrrrrr

chip2014
16-12-14, 11:50 PM
Include("\\script\\source\\thuvien.lua")
function main()
SayEx({"<color=blue>LÓ Quan:<color> C¸c H¹ Cã ThÓ NhËn Quµ NÕu §¹t C¸c §iÒu KiÖn Sau:",
"Hæ Trî T©n Thñ/nhanquaht",
"§¹t Level 60 ( Set T©n Thñ )/nhanquaht",
"§¹t Level 90 ( Vò KhÝ M«n Ph¸i )/nhanquaht",
"§¹t Level 120 ( Set §å + 4 )/nhanquaht",
"§¹t Level 150 (30 ThiÕt La H¸n )/nhanquaht",
"§¹t Level 180( 4 HuyÒn Tinh CÊp 5 )/nhanquaht",
"§¹t Level 220( Vò KhÝ + 6 )/nhanquaht",
"Tho¸t/Exit"})
end

function timhieuhtro(nsel)
Talk(1,"Exit","§¹t Level <color=red>60<color> SÏ NhËn §­îcc 1 Set Trang BÞ T©n Thñ + 30 V¹n\n§¹t Level <color=red>90<color> S· NhËn §­îc 1 Set Vò KhÝ Hoµng Kim\n§¹t Level <color=red>120<color> SÏ NhËn §­îc 1 Set Trang BÞ Hoµng Kim\n§¹t Level <color=red>150<color> NhËn §­îc 30 ThiÕt La H¸n\n§¹t Level <color=red>180<color> SÏ NhËn §­îc 4 HuyÒn Tinh CÊp 5\n§¹t Level <color=red>220<color> SÏ NhËn §­îc Vò KhÝ CÊp 6")
end

function nhanquaht(nsel)
id = nsel + 1
a = tongsoxu()
b = soxudadung()
if id == 1 then
if GetTask(17) == 0 then
if GetTask(130) == 1 then
SaveTaskUser(tongsoxu()+1)
ThemTien(100000)
ThemVatPham(43)
while GetLevel() < 60 do AddOwnExp(9999999) end
Talk(1,"","B¹n NhËn §­îc 1 VËt PhÈm Hç Trî Ng­êi Ch¬i Vµ 60 Level!")
SetTask(17,1)
else
ThongBaoGamer("B¹n H·y NhËn ChuyÓn Sinh MiÔn PhÝ T¹i NPC ChuyÓn Sinh Tr­íc (Täa §é 203/199) !")
end
else
ThongBaoGamer("B¹n §· NhËn PhÇn Quµ Nµy Råi Kh«ng ThÓ NhËn N÷a !")
end
elseif id == 2 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 60 then
if GetTask(17) == 1 then
ThemTrangBi("Trang Phuc","Ao","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Day Chuyen","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","That Lung","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Ngoc Boi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Tren","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Duoi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Bao Tay","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Non","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Giay","Tan Thu",nil,random(1,6))
ThemTien(300000)
Talk(1,"","B¹n NhËn §­îc 1 Set Trang BÞ T©n Thñ + 30 V¹n !")
SetTask(17,2)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ Hç Trî T©n Thñ Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 3 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 90 then
if GetTask(17) == 2 then

mp = KiemTraMonPhai()
if mp == "Thieu Lam" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Thien Vuong" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Chuy","Hoang Kim",mp,4)
elseif mp == "Duong Mon" then
ThemTrangBi("Vu Khi","Phi Dao","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Phi Tieu","Hoang Kim",mp,4)
ThemTrangBi("Vu Khi","Tu Tien","Hoang Kim",mp,4)
elseif mp == "Ngu Doc" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Nga My" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,4)
elseif mp == "Thuy Yen" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
elseif mp == "Cai Bang" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,4)
elseif mp == "Thien Nhan" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,4)
elseif mp == "Vo Dang" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,4)
elseif mp == "Con Lon" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,4)
end
Talk(1,"","B¹n NhËn §­îc Vò KhÝ M«n Ph¸i "..mp.." !")
SetTask(17,3)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 6X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 4 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 120 then
if GetTask(17) == 3 then
ThemTrangBi("Trang Phuc","Ao","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Day Chuyen","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","That Lung","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Ngoc Boi","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Nhan Tren","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Nhan Duoi","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Bao Tay","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Non","Hoang Kim",KiemTraMonPhai(),4)
ThemTrangBi("Trang Phuc","Giay","Hoang Kim",KiemTraMonPhai(),4)
Talk(1,"","B¹n NhËn §­îc 1 Set Trang BÞ Hoµng Kim !")
SetTask(17,4)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 9X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 5 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 150 then
if GetTask(17) == 4 then
for i=1,30 do ThemVatPham(3) end
Talk(1,"","B¹n NhËn §­îc 30 Cuèn ThiÕt La H¸n !")
SetTask(17,5)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 12X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 6 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 180 then
if GetTask(17) == 5 then
for i=1,4 do ThemVatPham(20) end
Talk(1,"","B¹n NhËn §­îc 4 HuyÒn Tinh CÊp 5 !")
SetTask(17,6)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 15X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
elseif id == 7 then
if kiemtraft() == 11 then
ThongBaoGamer("Xin Hay Gia Nhap Phai !")
return
end
if KiemTraLVL() >= 220 then
if GetTask(17) == 6 then

mp = KiemTraMonPhai()
if mp == "Thieu Lam" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Thien Vuong" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Chuy","Hoang Kim",mp,6)
elseif mp == "Duong Mon" then
ThemTrangBi("Vu Khi","Phi Dao","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Phi Tieu","Hoang Kim",mp,6)
ThemTrangBi("Vu Khi","Tu Tien","Hoang Kim",mp,6)
elseif mp == "Ngu Doc" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Nga My" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,6)
elseif mp == "Thuy Yen" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
elseif mp == "Cai Bang" then
ThemTrangBi("Vu Khi","Bong","Hoang Kim",mp,6)
elseif mp == "Thien Nhan" then
ThemTrangBi("Vu Khi","Thuong","Hoang Kim",mp,6)
elseif mp == "Vo Dang" then
ThemTrangBi("Vu Khi","Kiem","Hoang Kim",mp,6)
elseif mp == "Con Lon" then
ThemTrangBi("Vu Khi","Dao","Hoang Kim",mp,6)
end
Talk(1,"","B¹n NhËn §­îc Vò KhÝ M«n Ph¸i "..mp.." !")
SetTask(17,7)
else
ThongBaoGamer("B¹n CÇn NhËn PhÇn Quµ 18X Tr­íc Míi Cã ThÓ NhËn PhÇn Quµ Nµy !")
end
else
ThongBaoGamer("§¼ng CÊp Cßn Qu¸ BÐ Kh«ng ThÓ NhËn §­îc !")
end
end
end
function SaveCoinUsed(num) -- Ham Them Xu Da Su Dung
if (num >= 0) then
SaveLog("dulieu/soxudadung/"..GetUUID()..".LOG",num,"w+")
end
end

function SaveTaskUser(num) -- Ham Them Xu Da Su Dung
if (num >= 0) then
SaveLog("dulieu/tongsoxu/"..GetUUID()..".LOG",num,"w+")
end
end

function tongsoxu() -- Tong So Xu Da Nap
local f = ReadLog("dulieu/tongsoxu/"..GetUUID()..".LOG")
if (type(f) == "table" and getn(f) > 0) then
return tonumber(f[1][1])
end
return 0
end

function soxudadung() -- Tong So Xu Da Dung
local f = ReadLog("dulieu/soxudadung/"..GetUUID()..".LOG")
if (type(f) == "table" and getn(f) > 0) then
return tonumber(f[1][1])
end
return 0
end



function SaveLog(file,_name,types)
local types = types or "a+"
local _name = _name or "NULL"
local fs_log = openfile(file, types);
write(fs_log, _name.."\n");
closefile(fs_log);
end;

function ReadLog(file)
local F_Tong = openfile(file, "r");
if F_Tong == nil then
return 0
end
local str_data = read(F_Tong,"*all")
local tab_data = split(str_data,"\n")
local DataCount = getn(tab_data) - 1
local id_data = {}
local id_data_temp = {}
for i=1,DataCount do
id_data[i] = split(tab_data[i],"\t")
id_data_temp[i] = id_data[i]
end;
closefile(F_Tong);
return id_data_temp
end

function split(str,splitor)
if(splitor==nil) then
splitor=","
end
local strArray={}
local strStart=1
local splitorLen = strlen(splitor)
local index=strfind(str,splitor,strStart)
if(index==nil) then
strArray[1]=str
return strArray
end
local i=1
while index do
strArray[i]=strsub(str,strStart,index-1)
i=i+1
strStart=index+splitorLen
index = strfind(str,splitor,strStart)
end
strArray[i]=strsub(str,strStart,strlen(str))
return strArray
end
function LeFaction(idtask,money,msg)
if GetCash() >= money then
Pay(money)
SetTask(idtask,0)
SetCamp(4)
SetCurCamp(4)
SetRank(11)
SetTask(85,kiemtraft())
SetFaction("")
ThongBaoGamer(msg)
else
Talk(1,"","Muon suat su ban can phai co <color="..colorS(3)..">"..money.."<color> moi co the roi khoi mon phai duoc...")
end
end

function ReFaction(idtask,camp,money,msg,rank)
if GetCash() >= money then
Pay(money)
SetTask(idtask,1)
SetCamp(camp)
SetCurCamp(camp)
ThongBaoGamer(msg)
SetRank(rank)
else
Talk(1,"","Muon quay ve mon phai ban can phai co <color="..colorS(3)..">"..money.."<color> moi co the thuc hien duoc...")
end
end

function colorS(number)
if number == nil then
style = GetSeries()
if style == 0 then
return "metal"
elseif style == 1 then
return "wood"
elseif style == 2 then
return "water"
elseif style == 3 then
return "fire"
elseif style == 4 then
return "earth"
end;
elseif number == 1 then
return "cyan"
elseif number == 2 then
return "blue"
elseif number == 3 then
return "yellow"
elseif number == 4 then
return "pink"
elseif number == 5 then
return "red"
elseif number == 6 then
return "green"
end;
end




Hài với đoạn code :


ThemTrangBi("Trang Phuc","Ao","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Day Chuyen","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","That Lung","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Ngoc Boi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Tren","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Nhan Duoi","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Bao Tay","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Non","Tan Thu",nil,random(1,6))
ThemTrangBi("Trang Phuc","Giay","Tan Thu",nil,random(1,6))

đoạn code trên và source gọi Include("\\script\\source\\thuvien.lua") ;;) gọi Script đó lên mà trong source đó có hàm ko ? , sửa lại đi nhé !
rãnh ghé qua hỗ trợ tui mã lệnh kêu gọi MsSQL để chuyển xu trong game giùm ! bí quá, server AWJX luôn nhưng ko có kỳ trân các nên kêu gọi hàm khác sau đó tạo 1 NPC kỳ trân các để giao dịch, mà sửa giá trị xu trong data của MSSQL nhận nhưng trong server ko chịu nhận, có cách nào ko