PDA

View Full Version : ai giúp em cái script với



caothiengthien
15-08-10, 05:02 PM
em có lấy cái script sứ giả liên đấu của mấy anh share và tách ra 1 cái đăng ky tham gia trong hội trường liên đấu nhung sao đã đăng ký tham gia rồi nó bảo đợi 266 giây.em đứng đợi mãi mà sao chả thay vô đánh(mặc dù đã dùng 2 acc) mấy anh xem giúp em cai nha tk

danhsach_account = {}
Include("\\script\\lien_dau\\liendau_head.lua")
Include("\\script\\Global\\su_gia_lien_dau.lua");
Include("\\script\\Global\\sourcejx49.lua");

--Include("\\script\\lien_dau\\danhsach_account.lua")
--{GetName(),GetLevel(),GetTask(106),GetTask(107),Ge tTask(105),GetFaction()}
xaphu = {}
DS_THAMGIA_LD = {}

function main()
Say("<bclr=green><color=yellow>Ban dang tham gia hoat dong Lien Dau do Manh Long Groups phat trien<color><bclr>",2,"Quan Vien/quanvienliendau","Roi khoi/out")
end;
function quanvienliendau()
SetFightState(0)
if GioLienDau() == "bao danh" then
Say("<bclr=green><color=yellow>Ban dang tham gia hoat dong Lien Dau do Manh Long Groups phat trien<color><bclr>",4,"Ta muon tham gia/DangKy","Thong tin ca nhan/thongtincanhan","Bang xep hang/Xem_BangXepHang","Roi khoi/out")
elseif GioLienDau() == "thi dau" then
Say("<bclr=green><color=yellow>Ban dang tham gia hoat dong Lien Dau do Manh Long Groups phat trien\nThoi gian thi dau con lai la: "..ThoiGianConLai().."<color><bclr>",3,"Thong tin ca nhan/thongtincanhan","Bang xep hang/Xem_BangXepHang","Roi khoi/out")
elseif GioLienDau() == "chua den gio" then
Talk(1,"","<color=yellow>Lien Dau Dien Ra Vao Luc 8h , 14h , 18h , 19 Hang Ngay !<color>")
end
end

function Xem_BangXepHang()
Say("<bclr=red><color=yellow>Nguoi muon biet thong tin ve bang xep hang lien dau phai ko?<color><bclr>",3,"10 hang dau/xephang","20 hang dau/xephang","Roi khoi/out")
end
function xephang(nsel)
BangXepHang((nsel+1)*10)
end

function DangKy()--Dang ky tham gia

if STT_LD() ~= luotliendau then
luotliendau = STT_LD()
DS_THAMGIA_LD = {}
end
if GioLienDau() ~= "bao danh" then
return
end
if TimKiem(DS_THAMGIA_LD,GetName()) == nil then
if getn(DS_THAMGIA_LD) < 2 then
DS_THAMGIA_LD[getn(DS_THAMGIA_LD)+1] = {GetName(),GetLevel(),GetTask(106),GetTask(107),Ge tTask(105),GetFaction()}
else
i = random(1,getn(DS_THAMGIA_LD))
DS_THAMGIA_LD[getn(DS_THAMGIA_LD)+1] = DS_THAMGIA_LD[i]
DS_THAMGIA_LD[i] = {GetName(),GetLevel(),GetTask(106),GetTask(107),Ge tTask(105),GetFaction()}
i = nil
end
LeaveTeam()
SetFightState(0)
SetCreateTeam(0);
SetPunish(0)
SetTaskTemp(100,0)
SetTaskTemp(101,GetPK())
SetTaskTemp(102,GetExp())
SetPK(0)
SetLogoutRV(1)
SetTempRevPos(31,47744/32,97440/32)
SetDeathScript("\\script\\lien_dau\\su_gia_lien_dau.lua")
Msg2Player("Ban da dang ky tham gia thi dau Lien Dau dot "..luotliendau)
--print("<<"..GetName()..">> dang ki tham gia Lien Dau luot thu "..luotliendau.."\nhien co "..getn(DS_THAMGIA_LD).." nguoi dang ky tham gia lien dau")
Msg2SubWorld("Chien doi ["..GetName().."] dang ki tham gia Lien Dau luot thu "..luotliendau)
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
for i = 1,getn(gio_liendau) do
if phut <= gio_liendau[i][2]+thoigianbaodanh then
thoigiancho = (gio_liendau[i][2]+thoigianbaodanh-phut)*60-giay
break
end
end
Msg2Player("Thoi gian cho doi: "..thoigiancho.." giay")
StopTimer()
SetTimer(thoigiancho*18,22)
else
Msg2Player("Ban da dang ky tham gia thi dau dot "..luotliendau..", xin doi it phut")
end
end

function TenDoiThu(tennhanvat)--tim ten doi thu cua tennhanvat
for i = 1,getn(DS_THAMGIA_LD) do
if GetName() == DS_THAMGIA_LD[i][1] then
if i == getn(DS_THAMGIA_LD) and mod(getn(DS_THAMGIA_LD),2) ~= 0 then
return ""
end
if mod(i,2) ~= 0 then --so le
return DS_THAMGIA_LD[i+1][1]
else --so chan
return DS_THAMGIA_LD[i-1][1]
end
end
end
return ""
end

function STT_LD()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
for i = 1,getn(gio_liendau) do
if gio == gio_liendau[i][1] and phut <= gio_liendau[i][2]+thoigianthidau+thoigianbaodanh-1 then
return i
end
end
end

function BangXepHang(hang)
--if GetName() ~= "admin_manhtuyen" then
-- Talk(1,"","Chuc nang nay chua duoc cap nhat")
-- return
--end
if getn(danhsach_account) < 2 then
Talk(1,"","<bclr=red><color=yellow>Bang xep hang chua duoc cap nhat<color><bclr>")
return
end
--if getn(danhsach_account) < 10 then
-- Talk(1,"","<bclr=red><color=yellow>So nguoi dang ky tham gia lien dau chua du 10 nguoi nen khong the xep hang<color><bclr>")
-- return
--end
bangxephang = {}
for k = 1,hang do
danhsach2 = {}
danhsach1 = {}
danhsach = {}
diem_vd_lonnhat = 0
tilethang_lonnhat = 0
level_nhonhat = 0
--so sanh diem vinh du
for i = 1,getn(danhsach_account) do
if danhsach_account[i][3] > diem_vd_lonnhat and TimKiem(bangxephang,danhsach_account[i][1]) == nil then
danhsach = {danhsach_account[i][1]}
diem_vd_lonnhat = danhsach_account[i][3]
elseif danhsach_account[i][3] == diem_vd_lonnhat and TimKiem(bangxephang,danhsach_account[i][1]) ==nil then
danhsach[getn(danhsach)+1] = danhsach_account[i][1]
end
end

--so sanh ti le thang
for i = 1,getn(danhsach) do
if TiLeThang(danhsach[i],0) > tilethang_lonnhat and TimKiem(bangxephang,danhsach[i]) ==nil then
danhsach1 = {danhsach[i]}
tilethang_lonnhat = TiLeThang(danhsach[i],0)
elseif TiLeThang(danhsach[i],0) == tilethang_lonnhat and TimKiem(bangxephang,danhsach[i]) ==nil then
danhsach1[getn(danhsach1)+1] = danhsach[i]
end
end
--so sanh dang cap
danhsach2 = {danhsach1[1]}
for i = 1,getn(danhsach1)-1 do
if Level_LD(danhsach1[i]) < level_nhonhat and TimKiem(bangxephang,danhsach1[i]) ==nil then
danhsach2 = {danhsach1[i+1][1]}
level_nhonhat = Level_LD(danhsach1[i])
elseif Level_LD(danhsach1[i]) == level_nhonhat and TimKiem(bangxephang,danhsach1[i]) ==nil then
danhsach2[getn(danhsach2)+1] = danhsach1[i+1][1]
end
end
if danhsach2[1] ~= nil then
bangxephang[getn(bangxephang)+1] = danhsach2
end
end
if getn(bangxephang) == 0 then
return
end
for i = 1,getn(bangxephang) do
for k = 1,getn(bangxephang[i]) do
str = "<<"..bangxephang[i][k]..">>\nDiem vinh du: "..DiemVinhDu(bangxephang[i][k]).."\nTi le thang: "..TiLeThang(bangxephang[i][k],1).."."
end
str = "Hang "..i..":\n"..str
Msg2Player(str)
str = ""
end
end

function TimKiem(tenbang,tukhoa)
if getn(tenbang) == 0 then
return nil
end
for i= 1,getn(tenbang) do
for k = 1,getn(tenbang[i]) do
if tenbang[i][k] == tukhoa then
return 1
end
end
end
end

function DiemVinhDu(tennhanvat)
for i = 1,getn(danhsach_account) do
if danhsach_account[i][1] == tennhanvat then
return danhsach_account[i][3]
end
end
end

function ThoiGianConLai()
gio = tonumber(date("%H"))
phut = tonumber(date("%M"))
giay = tonumber(date("%S"))
for i = 1,getn(gio_liendau) do
if gio == gio_liendau[i][1] and phut <= gio_liendau[i][2]+thoigianthidau+thoigianbaodanh then
thoigianconlai = (gio_liendau[i][2]+thoigianbaodanh+thoigianthidau-phut)*60-giay
break
end
end
return floor(thoigianconlai/60)
end

function Level_LD(tennhanvat)
for i = 1,getn(danhsach_account) do
if danhsach_account[i][1] == tennhanvat then
return danhsach_account[i][2]
end
end
return "biet chet lien"
end

function ThongTin_NhanVat_LD(tennhanvat)
for i = 1,getn(danhsach_account) do
if danhsach_account[i][1] == tennhanvat then
return tennhanvat..":Mon phai:"..danhsach_account[i][6].."\ndiem vinh du:"..danhsach_account[i][3].."\nTi le thang:"..TiLeThang(tennhanvat,1).."\nXep Hang:"..XepHang_LienDau()..""
end
end
end

function TiLeThang(tennhanvat,lamtron)
if tennhanvat == "" or tennhanvat == "Khong Xac Dinh" then
return 0
end
for i = 1,getn(danhsach_account) do
if danhsach_account[i][1] == tennhanvat then
if danhsach_account[i][4]+danhsach_account[i][5] == 0 then
return 0
else
if lamtron == 1 then
return floor(danhsach_account[i][4]*100/(danhsach_account[i][5]+danhsach_account[i][4]))
else
return danhsach_account[i][4]*100/(danhsach_account[i][5]+danhsach_account[i][4])
end
end
end
end
end

function thongtincanhan()
sotranthang = GetTask(107)
sotranthua = GetTask(105)
if sotranthua+sotranthang == 0 then
tilethang = 0
else
tilethang = floor(sotranthang*100/(sotranthua+sotranthang))
end
Say("<color=yellow>"..GetName().."<color>:Level:"..GetLevel().."\nMon Phai:"..GetFaction().."\nDiem vinh du:"..GetTask(106).."\nSo tran thang:"..GetTask(107).."\nSo tran thua:"..GetTask(105).."\nTi le thang:"..tilethang.."",0)
end

function NguoiThangCuoc(tennv1,tennv2)
if TiLeThang(tennv1,0) > TiLeThang(tennv2,0) then
return tennv1
elseif TiLeThang(tennv1,0) < TiLeThang(tennv2,0) then
return tennv2
else--neu ti le thang bang nhau thi set den dang cap(neu dang cap thap hon se thang)
if Level_LD(tennv1) > Level_LD(tennv2) then
return tennv1
elseif Level_LD(tennv1) < Level_LD(tennv2) then
return tennv2
else--neu den dang cap cung bang nhau thi he thong se random nguoi thang cuoc
i = random(1,2)
if i == 1 then
return tennv1
else
return tennv2
end
i = nil
end
end
end

function OnDeath(Launcher)
PlayerIndex1 = NpcIdx2PIdx(Launcher);
OrgPlayer = PlayerIndex;
DeathName = GetName();--------------------------nguoi thua
SetFightState(0);
camp = GetCamp();
SetCurCamp(camp);
SetCreateTeam(1);
SetPK(GetTask(103))
SetPunish(1)
SetDeathScript("");
if GetExp() < GetTaskTemp(102) then
AddOwnExp(GetTaskTemp(102) - GetExp())
end
SetTask(103,0)
SetTask(104,0)
SetTask(105,GetTask(105)+1)
AddOwnExp(random(5000000,10000000))
NewWorld(31,47744/32,97440/32)
SetLogoutRV(1)
Msg2Player("Do vo dung! danh dam nhu the ha, de cai thang "..MonPhai(TenDoiThu(GetName())).." cap "..Level_LD(GetName()).." no bat nat,di chet di!")
for i = 1,getn(danhsach_account) do
if GetName() == danhsach_account[i][1] then
danhsach_account[i] = {GetName(),GetLevel(),GetTask(106),GetTask(107),Ge tTask(105),GetFaction()}
end
end
StopTimer()

PlayerIndex = PlayerIndex1;------------------nguoi danh thang
LaunName = GetName();
SetFightState(0)
camp = GetCamp();
SetCurCamp(camp);
SetCreateTeam(1);
SetPK(GetTask(103))
SetPunish(1)
SetDeathScript("");
SetTask(106,GetTask(106)+4)
SetTask(107,GetTask(107)+1)
NewWorld(396,47744/32,97440/32)
SetLogoutRV(1)
Msg2Player("Xin chuc mung ban nhan duoc them 4 diem vinh du")
AddOwnExp(random(10000000,20000000))
str = "Chien doi ["..LaunName.."] danh bai chien doi ["..DeathName.."]"
Msg2SubWorld(str);
print(str)
StopTimer()
for i = 1,getn(danhsach_account) do
if GetName() == danhsach_account[i][1] then
danhsach_account[i] = {GetName(),GetLevel(),GetTask(106),GetTask(107),Ge tTask(105),GetFaction()}
end
end
PlayerIndex = OrgPlayer;
end

function MonPhai(tennhanvat)
for i = 1,getn(danhsach_account) do
if danhsach_account[i][1] == tennhanvat then
if danhsach_account[i][6] == "" then
return "Vo mon phai"
else
return danhsach_account[i][6]
end
end
end
return ""
end
function OnTimer()

if GetTaskTemp(50) == 0 then
--neu khong co ai la doi thu trong luot dau do thi se duoc su thang cuoc
if TenDoiThu(GetName()) == "" or TenDoiThu(GetName()) == "Khong Xac Dinh" then
NewWorld(31,47744/32,97440/32)
StopTimer()
SetTaskTemp(50,0)
SetFightState(0)
SetPunish(0)
SetTask(50,GetTask(60)+4)
SetDeathScript("")
SetTask(51,GetTask(81)+1)
camp = GetCamp();
SetCurCamp(camp);
for i = 1,getn(danhsach_account) do
if GetName() == danhsach_account[i][1] then
danhsach_account[i] = {GetName(),GetLevel(),GetTask(60),GetTask(81),GetT ask(82),GetFaction()}
break
end
end
Msg2Player("Xin chuc mung! ban nhan duoc 4 diem vinh du")
return
end
print("doi thu cua "..GetName()..":"..TenDoiThu(GetName()))
Msg2Player("\n[Thong tin doi thu]:"..TenDoiThu(GetName())..",level:"..Level_LD(TenDoiThu(GetName()))..",mon phai:"..MonPhai(TenDoiThu(GetName())))
for i = 1,getn(DS_THAMGIA_LD) do
if GetName() == DS_THAMGIA_LD[i][1] then
if mod(i,2) == 0 then
NewWorld(30, 200*8, 200*16)
print(GetName().." vao dau truong thu "..floor(i/2))
else
NewWorld(30, 200*8, 200*16)
print(GetName().." vao dau truong thu "..(floor(i/2)+1))
end
Msg2SubWorld("Chien doi ["..GetName().."] da vao khu vuc chuan bi thi dau")
break
end
end
for i = 1,getn(DS_THAMGIA_LD) do
if DS_THAMGIA_LD[i][1] == GetName() then
if mod(i,2) == 0 then
SetCurCamp(1)
else
SetCurCamp(2)
end
break
end
end
StopTimer()
SetTimer(18,14)
SetTaskTemp(50,1)
elseif GetTaskTemp(50) < 11 then
Msg2Player("Tran dau se bat dau sau "..(11-GetTaskTemp(50)).." giay!")
SetTaskTemp(50,GetTaskTemp(50)+1)
w,x,y = GetWorldPos()
if w ~= 30 then
Msg2SubWorld("["..GetName().."] tu y roi khoi dau truong lien dau nen bi su thua,chien thang thuoc ve ["..TenDoiThu(GetName()).."]")
for i = 1,getn(DS_THAMGIA_LD) do
if DS_THAMGIA_LD[i][1] == GetName() then
DS_THAMGIA_LD[i] = {"Khong Xac Dinh"}
break
end
end
return
end
if Player_Online_LD(TenDoiThu(GetName())) == "OffLine" and GetTaskTemp(50) == 10 then
NewWorld(31,47744/32,97440/32)
StopTimer()
SetTaskTemp(50,0)
SetFightState(0)
SetPunish(0)
SetTask(50,GetTask(60)+4)
SetDeathScript("")
SetTask(51,GetTask(81)+1)
camp = GetCamp();
SetCurCamp(camp);
for i = 1,getn(danhsach_account) do
if GetName() == danhsach_account[i][1] then
danhsach_account[i] = {GetName(),GetLevel(),GetTask(60),GetTask(81),GetT ask(82),GetFaction()}
break
end
end
Msg2Player("Xin chuc mung! ban nhan duoc 4 diem vinh du")
Msg2SubWorld("["..TenDoiThu(GetName()).."] tu y roi khoi dau truong lien dau nen bi su thua,chien thang thuoc ve ["..GetName().."]")
return
end
elseif GetTaskTemp(50) == 11 then
w,x,y = GetWorldPos()
if w ~= 30 then
Msg2SubWorld("["..GetName().."] tu y roi khoi dau truong lien dau nen bi su thua,chien thang thuoc ve ["..TenDoiThu(GetName()).."]")
for i = 1,getn(DS_THAMGIA_LD) do
if DS_THAMGIA_LD[i][1] == GetName() then
DS_THAMGIA_LD[i] = {"Khong Xac Dinh"}
break
end
end
return
end
SetTaskTemp(50,GetTaskTemp(50)+1)
Msg2Player("Tran dau bat dau!")
StopTimer()
SetFightState(1)
SetTimer(((thoigianthidau-1)*60-10)*18,14)
else
--Neu khong ai danh chet duoc doi thu thi se chay den doan script nay
if GetName() == NguoiThangCuoc(GetName(),TenDoiThu(GetName())) then
SetTask(50,GetTask(60)+4)
SetTask(51,GetTask(81)+1)
AddOwnExp(random(1000000,2000000))
Msg2Player("Xin chuc mung! ban nhan duoc 4 diem vinh du")
else
SetTask(52,GetTask(82)+1)
AddOwnExp(random(500000,1000000))
Msg2Player("Do vo dung! danh dam nhu the ha, de cai thang "..MonPhai(TenDoiThu(GetName())).." cap "..Level_LD(GetName()).." no bat nat,di chet di!")
end
for i = 1,getn(danhsach_account) do
if GetName() == danhsach_account[i][1] then
danhsach_account[i] = {GetName(),GetLevel(),GetTask(60),GetTask(81),GetT ask(82),GetFaction()}
break
end
end
StopTimer()
SetFightState(0)

SetPunish(1)
SetCreateTeam(1)
camp = GetCamp();
SetCurCamp(camp);
SetDeathScript("")
SetTaskTemp(50,0)
NewWorld(30,47744/32,97440/32)
end
end

function Player_Online_LD(tennhanvat)
player1 = PlayerIndex --nguoi choi hien tai
for i = 1,100 do
PlayerIndex = i
if GetName() == tennhanvat then
W,X,Y = GetWorldPos()
if W == 397 then
return "OnLine"
else
return "OffLine"
end
end
end
return "OffLine"
end
function phanthuong()
Say("Diem vinh du cua nguoi hien tai la:<color=pink>"..GetTask(106).."<color> diem",5,
"Trang Bi An Bang - Dinh Quoc./loaiab",
--"Do Pho Bach Kim[100 diem]/abmax",
--"Bi Kiep Mon Phai 120 [50 diem]/abnb",
"Doi Lenh Bai Vinh Du./lbvd",
"Thoat/out")
end
function loaiab()
Say("<color=red>: Su Gia Lien Dau <color>: Ban muon mua loai nao",3,
"Key Dinh Quoc Vip./vipdq",
"Key An Bang./vipab",
"Thoat./out")
end;
function lbvd()
Say("<color=red> Su Gia Lien Dau<color>: Ban muon lam gi",3,
"Doi Lenh Bai Lay Diem./diemld",
"Mua Lenh Bai Bang Diem./mualb",
"Thoat./out")
end;

function diemld()
Say("<color=red>Su Gia Lien DAu<color>: Ban muon doi Lenh Bai nao",4,
"Lenh Bai Dong [ 10 diem]./thaps",
"Lenh Bai Thiet [ 50 diem ]./trungs",
"Lenh Bai Vang [100 diem]./caos",
"Thoat./out")
end;


function thaps()
if GetItemCount(76) >= 1 then
SetTask(106,GetTask(106)+10)
DelItem(76)
Msg2Player("Nhan duoc 10 diem Lien Dau")
else
Talk(1,""," Can 1 Lenh Bai [ Thiet] de doi")
end
end;


function trungs()
if GetItemCount(77) >= 1 then
SetTask(106,GetTask(106)+50)
DelItem(77)
Msg2Player("Nhan duoc 50 diem Lien Dau")
else
Talk(1,""," Can 1 Lenh Bai [Dong] de doi")
end
end;


function caos()
if GetItemCount(78) >= 1 then
SetTask(106,GetTask(106)+100)
DelItem(78)
Msg2Player("Nhan duoc 100 diem Lien Dau")
else
Talk(1,""," Can 1 Lenh Bai [Vang] de doi")
end
end;
















function mualb()
Say("<color=red>Su Gia Lien Dau <color>: Ban muon doi Lenh Bai nao",4,
"Lenh Bai Dong [ Thap]./thap",
"Lenh Bai Thiet [ Trung ]./trung",
"Lenh Bai Vang [Cao]./cao",
"Thoat./out")
end;
function thap()
if GetTask(106) >= 11 then
SetTask(106,GetTask(106)-11)
AddEventItem(76)
Msg2Player("Nhan duoc 1 Lenh Bai Vinh Du [Thiet]")
else
Talk(1,""," Can 11 diem Vinh Du de co the mua")
end
end;


function trung()
if GetTask(106) >= 55 then
SetTask(106,GetTask(106)-55)
AddEventItem(77)
Msg2Player("Nhan duoc 1 Lenh Bai Vinh Du [Dong]")
else
Talk(1,""," Can 55 diem Vinh Du de co the mua")
end
end
;
function cao()
if GetTask(106) >= 111 then
SetTask(106,GetTask(106)-111)
AddEventItem(78)
Msg2Player("Nhan duoc 1 Lenh Bai Vinh Du [Vang]")
else
Talk(1,""," Can 111 diem Vinh Du de co the mua")
end
end;













function vipdq()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddItem(0,8,3,10,0,0,10)
AddItem(0,5,5,10,0,0,10)
AddItem(0,7,15,10,0,0,10)
AddItem(0,2,30,10,0,0,10)
AddItem(0,6,3,10,0,0,10)
Msg2Player("Nhan duoc 1 Bo An Bang - Dinh Quoc.")
else
Talk(1,""," Can 50 diem Vinh Du de co the mua trang bi Dinh Quoc")
end
end;
function vipab()
Say("<color=red>Su Gia Lien Dau:<color> O day co cac loai trang bi tran hung phuc quoc",5,
"Nhan An Bang [Hoa]./hoa",
"Nhan An Bang [Thuy]/thuy",
"Ngoc boi An Bang [Moc]./moc",
"Day Chuyen An Bang [Tho]./tho",
"Thoat/out")
end;

function moc()
if GetTask(106) >= 30 then
SetTask(106,GetTask(106)-30)
AddItem(0,9,3,10,0,0,10)

Msg2Player("Nhan duoc 1 mon An Bang ")
else
Talk(1,""," Can 30 diem Vinh Du de co the mua trang bi An Bang[Moc]")
end
end;


function tho()
if GetTask(106) >= 100 then
SetTask(106,GetTask(106)-100)
AddItem(0,4,3,10,0,0,10)
Msg2Player("Nhan duoc 1 mon An Bang ")
else
Talk(1,""," Can 100 diem Vinh Du de co the mua trang bi An Bang nay")
end
end;

function hoa()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddItem(0,3,3,10,0,0,10)

Msg2Player("Nhan duoc 1 mon An Bang ")
else
Talk(1,""," Can 50 diem Vinh Du de co the mua trang bi An Bang[Hoa]")
end
end;

function thuy()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddItem(0,3,4,10,0,0,10)
Msg2Player("Nhan duoc 1 mon An Bang ")
else
Talk(1,""," Can 50 diem Vinh Du de co the mua trang bi An Bang[Thuy]")
end
end;






function abnb()
Say("Ban Muon Lay Bi Kiep Mon Phai Nao",11,"Thieu Lam/tl2","Thien Vuong/tv2","Nga Mi/nm2","Thuy Yen/ty2","Ngu Doc/nd2","Cai Bang/cb2","Thien Nhan/tn2","Con Lon/cl2","Vo Dang/vd2","Duong Mon/dm2","Thoat./no")
end;
function nm2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)

AddEventItem(65)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function nd2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(66)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function tl2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(67)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function cb2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(68)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function ty2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(69)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function dm2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(70)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function cl2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(71)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function tn2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(72)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function tv2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(73)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end

function vd2()
if GetTask(106) >= 50 then
SetTask(106,GetTask(106)-50)
AddEventItem(74)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function nhanabthuy()
if GetTask(106) >= 100 then
AddItem(0,10,13,10,0,0,0)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function nhanabhoa()
Say("Ban Muon Lay Bi Kiep Mon Phai Nao",11,"Thieu Lam/tl1","Thien Vuong/tv1","Nga Mi/nm1","Thuy Yen/ty1","Ngu Doc/nd1","Cai Bang/cb1","Thien Nhan/tn1","Con Lon/cl1","Vo Dang/vd1","Duong Mon/dm1","Ket Thuc/no")
end;
function nm1()
if GetTask(106) >= 100 then
AddEventItem(161)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function nd1()
if GetTask(106) >= 100 then
AddEventItem(160)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function tl1()
if GetTask(106) >= 100 then
AddEventItem(157)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function cb1()
if GetTask(106) >= 100 then
AddEventItem(163)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function ty1()
if GetTask(106) >= 100 then
AddEventItem(162)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function dm1()
if GetTask(106) >= 100 then
AddEventItem(159)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function cl1()
if GetTask(106) >= 100 then
AddEventItem(166)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function tn1()
if GetTask(106) >= 100 then
AddEventItem(164)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function tv1()
if GetTask(106) >= 100 then
AddEventItem(158)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function vd1()
if GetTask(106) >= 100 then
AddEventItem(165)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end


function abmax()
SayEx({"<color=red>Su Gia Lien Dau: <color> Nguoi Muon Lay Do Pho Vu Khi Nao",
"Do Pho [Dao Bach Kim]/dbk",
"Do Pho [Kiem Bach Kim]/kbk",
"Do Pho [Thuong Bach Kim]/tbk",
"Do Pho [Chuy Bach Kim]/cbk",
"Do Pho [Bong Bach Kim]/bbk",
"Do Pho [Song Dao Bach Kim]/sdbk",
"Do Pho [Phi Tieu Bach Kim]/ptbk",
"Do Pho [Phi Dao Bach Kim]/pdbk",
"Do Pho [Am Khi Bach Kim]/akbk",
"Ket Thuc/no"})

end;
function dbk()
if GetTask(106) >= 100 then
AddEventItem(45)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function kbk()
if GetTask(106) >= 100 then
AddEventItem(46)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function tbk()
if GetTask(106) >= 100 then
AddEventItem(47)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function cbk()
if GetTask(106) >= 100 then
AddEventItem(48)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function bbk()
if GetTask(106) >= 100 then
AddEventItem(49)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function sdbk()
if GetTask(106) >= 100 then
AddEventItem(50)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function ptbk()
if GetTask(106) >= 100 then
AddEventItem(51)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function pdbk()
if GetTask(106) >= 100 then
AddEventItem(52)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function akbk()
if GetTask(106) >= 100 then
AddEventItem(53)
SetTask(106,GetTask(106)-100)
Msg2Player("So diem vinh du con lai cua ban la: "..GetTask(106))
else
Talk(1,"","Ban khong du diem tich luy de doi lay vat pham nay")
end
end
function PlayerBT()
SetDeathScript("")
SetCreateTeam(1)
StopTimer()
SetTask(103,0)
SetTask(104,0)
SetTaskTemp(100,0)
end
function xa_phu()
for i = 1,7 do
xaphu[getn(xaphu)+1] = GetStationName(i).."/gothanhthi"
end
xaphu[8] = "Ta khong muon di/out"
Say("<color=blue>Khach quan co muon tro lai cac thanh thi khong<color>",8,xaphu)
end;

function gothanhthi(nSel)
w,x,y = GetStationPos(nSel+1)
if SubWorldID2Idx(w) ~= -1 then
NewWorld(w,x,y)
SetFightState(0)
SetLogoutRV(1)
SetLogoutRV(0);
Msg2Player("Ngoi yen nhe! chung ta di "..GetStationName(nSel+1))
else
Say("<color=blue>Noi ban muon den khong duoc mo trong qua trinh khoi dong server!<color>",0)
end

end

function out()
end:((

anthonyluu
16-08-10, 08:12 AM
task ko phù hợp với server . Check lại cai task chắc là đc