Ai Sửa Dùm Em Với!!!!!
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 1 của 1
  1. #1
    Thành Viên
    Ngày tham gia
    Apr 2011
    Bài viết
    97
    Thanks
    32
    Thanked 26 Times in 7 Posts

    Icon10 Ai Sửa Dùm Em Với!!!!!

    Liên Đấu Vào 2 người Chưa Kiệp Đánh Thì Bi Văng Ra Ngoài.Thua Hoặc Thắng




    Code:
    Include("\\script\\lien_dau\\liendau_head.lua")
    Include("\\script\\source\\sourcejx49.lua")
    Include("\\script\\GetFaction.lua")
    -------Author: Manh Tuyen Kute ------
    -----Edit Online By Ohishu Kuto------
    -------Task 53 So Tran Thang---------
    -------Task 54 So Tran Thua----------
    -------Task 57 Diem Vinh Du----------
    danhsach_account = {}
    DS_THAMGIA_LD = {}
    function main(sel)
        W,X,Y = GetWorldPos()
        if W == 42 then
            quanvienliendau()
        else
            sugiadangkyliendau()
        end
    end
    function sugiadangkyliendau()
        Say("<bclr=red><color=yellow>Ta la su gia lien dau,nguoi co muon tham gia hoat dong nay khong<color><bclr>",4,"Dang ky chien doi/DangKyChienDoi","Den hoi truong lien dau/VaoHoiTruongLienDau","Phan thuong lien dau/phanthuong","Thoat/out")
    end
    function VaoHoiTruongLienDau()
        if TimKiem(danhsach_account,GetName()) == nil then
            Talk(1,"","<bclr=red><color=yellow>Ban phai dang ky chien doi truoc khi vao dau truong<color><bclr>")
            return
        end
        NewWorld(42,47744/32,97440/32)
        SetFightState(0)
        SetLogoutRV(1)
        SetDeathScript("")
        SetTask(59,0)
        Msg2Player("Ban da den hoi truong lien dau!")
        if TimKiem(DS_THAMGIA_LD,GetName()) == 1 and GioLienDau() == "bao danh" then
            LeaveTeam()
            SetFightState(0)
            SetCreateTeam(0);
            SetPunish(0)
            SetTask(59,0)
            SetTask(55,GetPK())
            SetTask(56,GetExp())
            SetPK(0)
            SetLogoutRV(1)
            SetTempRevPos(42,47744/32,97440/32)
            SetDeathScript("\\script\\lien_dau\\su_gia_lien_dau.lua")
            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,16)
        end
    end
    function DangKyChienDoi()
        if TimKiem(danhsach_account,GetName()) == nil then
            danhsach_account[getn(danhsach_account)+1] = {GetName(),GetLevel(),GetTask(57),GetTask(53),GetTask(54),tenmonphai()}
            Msg2Player("Ban da lap thanh cong chien doi ["..GetName().."]")
        else
            Msg2Player("Ban da lap chien doi,khong can lap lai nua")
        end
    end
    
    function quanvienliendau()
        SetFightState(0)
        if GioLienDau() == "bao danh" then
            Say("<color=yellow>Ban dang tham gia hoat dong lien dau do TSBD phat trien<color>",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("<color=yellow>Ban dang tham gia hoat dong lien dau do TSBD phat trien\nThoi gian thi dau con lai la: "..ThoiGianConLai().."<color> phut",3,"Thong tin ca nhan/thongtincanhan","Bang xep hang/Xem_BangXepHang","Roi khoi/out")
        elseif GioLienDau() == "chua den gio" then
            Talk(1,"","<color=yellow>hien tai chua den gio tham gia Lien Dau<color>")
        end
    end
    --***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    function Xem_BangXepHang()
        Say("<color=yellow>Nguoi muon biet thong tin ve bang xep hang lien dau phai ko?<color>",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(57),GetTask(53),GetTask(54),tenmonphai()}
            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(57),GetTask(53),GetTask(54),tenmonphai()}
                i = nil
            end
            LeaveTeam()
            SetFightState(0)
            SetCreateTeam(0);
            SetPunish(0)
            SetTask(59,0)
            SetTask(55,GetPK())
            SetTask(56,GetExp())
            SetPK(0)
            SetLogoutRV(1)
            SetTempRevPos(42,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,16)
        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(53)
        sotranthua = GetTask(54)
        if sotranthua+sotranthang == 0 then
            tilethang = 0
        else
            tilethang = floor(sotranthang*100/(sotranthua+sotranthang))
        end
        Say("<color=yellow>"..GetName().."<color>:Level:"..GetLevel().."\nMon Phai:"..tenmonphai().."\nDiem vinh du:"..GetTask(57).."\nSo tran thang:"..GetTask(53).."\nSo tran thua:"..GetTask(54).."\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(55))
        SetPunish(1)
        SetDeathScript("");
        if GetExp() < GetTask(56) then
            AddOwnExp(GetTask(56) - GetExp())
        end
        SetTask(55,0)
        SetTask(56,0)
        SetTask(54,GetTask(54)+1)
        AddOwnExp(random(500000,1000000))
        NewWorld(42,47744/32,97440/32)
        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(57),GetTask(53),GetTask(54),tenmonphai()}            
            end
        end
        StopTimer()
        --******************************************
        PlayerIndex = PlayerIndex1;------------------nguoi danh thang
        LaunName = GetName();
        SetFightState(0)
        camp = GetCamp();
        SetCurCamp(camp);
        SetCreateTeam(1);
        SetPK(GetTask(55))
        SetPunish(1)
        SetDeathScript("");
        SetTask(57,GetTask(57)+10)
        SetTask(53,GetTask(53)+1)
        NewWorld(42,47744/32,97440/32)
        Msg2Player("Xin chuc mung ban nhan duoc them 10 diem vinh du")
        AddOwnExp(random(1000000,2000000))
        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(57),GetTask(53),GetTask(54),tenmonphai()}        
            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()
    gio = tonumber(date("%H"))
    w,x,y = GetWorldPos()
        if GetTask(59) == 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(42,47744/32,97440/32)
                StopTimer()                
                SetTask(59,0)
                SetFightState(0)
                SetPunish(0)
                SetTask(57,GetTask(57)+10)
                SetDeathScript("")
                SetTask(53,GetTask(53)+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(57),GetTask(53),GetTask(54),tenmonphai()}                
                        break
                    end
                end            
                Msg2Player("Xin chuc mung! ban nhan duoc 10 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(43,DAUTRUONGPOSXY[floor(i/2)][1]*8,DAUTRUONGPOSXY[floor(i/2)][2]*16)
                        print(GetName().." vao dau truong thu "..floor(i/2))
                    else
                        NewWorld(43,DAUTRUONGPOSXY[floor(i/2)+1][1]*8,DAUTRUONGPOSXY[floor(i/2)+1][2]*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,16)
            SetTask(59,1)
        elseif GetTask(59) >= 1 and GetTask(59) < 11 then
        if w ~= 43 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
                StopTimer()
                return
            end    
    Msg2Player("Tran dau se bat dau sau "..(11-GetTask(59)).." giay!")
    SetTask(59,GetTask(59)+1)        
        elseif GetTask(59) == 11 then    
            if w ~= 43 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
            StopTimer()
                return
            end    
    SetTask(59,GetTask(59)+1)
    SetFightState(1)
    Msg2Player("Tran dau bat dau!")        
            if Player_Online_LD(TenDoiThu(GetName())) == "OffLine" and GetTask(59) == 12 then
                NewWorld(42,47744/32,97440/32)
                StopTimer()                
                SetTask(59,0)
                SetFightState(0)
                SetPunish(0)
                SetTask(57,GetTask(57)+10)
                SetDeathScript("")
                SetTask(53,GetTask(53)+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(57),GetTask(53),GetTask(54),tenmonphai()}                
                        break
                    end
                end
                Msg2Player("Xin chuc mung! ban nhan duoc 10 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
    StopTimer()
    SetTimer(((thoigianthidau-1)*60-10)*18,16)
        else
            if w ~= 43 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
            StopTimer()
                return
            end    
            --Neu khong ai danh chet duoc doi thu thi se chay den doan script nay
            if GetName() == NguoiThangCuoc(GetName(),TenDoiThu(GetName())) then
                SetTask(57,GetTask(57)+10)
                SetTask(53,GetTask(53)+1)
                AddOwnExp(random(1000000,2000000))
                Msg2Player("Xin chuc mung! ban nhan duoc 10 diem vinh du")
            else
                SetTask(54,GetTask(54)+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(57),GetTask(53),GetTask(54),tenmonphai()}
                    break
                end
            end
            StopTimer()
            SetFightState(0)
            SetLogoutRV(1)
            SetPunish(1)
            SetCreateTeam(1)
            camp = GetCamp();
            SetCurCamp(camp);
            SetDeathScript("")
            SetTask(59,0)
            NewWorld(42,47744/32,97440/32)
        end
    end
    --**************************************************************************************
    function Player_Online_LD(tennhanvat)
        player1 = PlayerIndex --nguoi choi hien tai
        for i=1,GetPlayerCount() do
            PlayerIndex = i
                if GetName() == tennhanvat then
                    W,X,Y = GetWorldPos()
                    if W == 43 then
                        return "OnLine"
                    else
                        return "OffLine"
                    end
                end
        end
    return "OffLine"
    end
    --****************************************************************************************
    function phanthuong()
        SayEx({"<color=red>Su gia lien dau:<color> nguoi hay chon phan thuong muon doi ! dung diem vinh du de doi",
                "Sieu Quang [1000 Diem]/phanthuongcond",
                "Trang Suc Vo Danh [5000 Diem]/phanthuongcond",
                "Doi Exp [50 Diem]/phanthuongcond",
                "Set Bach Kim [1000 Diem]/phanthuongcond",
                "Set Hoang Kim [600 Diem]/phanthuongcond",
                "Thoat/out"})
    end
    
    function phanthuongcond(nsel)
    id = nsel + 1
    if id == 1 then
    point = 1000
    elseif id == 2 then
    point = 5000
    elseif id == 3 then
    point = 50
    elseif id == 4 then
    point = 1000
    tb = "Bach Kim"
    elseif id == 5 then
    point = 600
    tb = "Hoang Kim"
    end
    a = GetTask(57)
        if GetTask(57) >= point then
            SetTask(57,GetTask(57)-point)
            if GetTask(57) == (a-point) then
    if id == 1 then
    z = random(0,4)
    AddItem(0,10,11,10,z,0,10)
    Msg2Player("Nhan duoc ngua sieu quang")
    elseif id == 2 then
        SayEx({"<color=yellow>Su gia lien dau:<color> xin hay chon loai trang suc !",
                "Nhan [Vo Danh]/trangbivodanh",
                "Day Chuyen [Vo Danh]/trangbivodanh",
                "Ngoc Boi [Vo Danh]/trangbivodanh",
                "Thoat/Exit"})
    elseif id == 3 then
    j = random(30,50)
    for i=1,j do AddOwnExp(99999999) end
    Msg2Player("Ban Nhan Duoc "..j.." Level !")
    else
    addtbmp(tb,"Ao",tenmonphai(),4,1)
    addtbmp(tb,"Mu",tenmonphai(),0,1)
    addtbmp(tb,"Dai Lung",tenmonphai(),3,1)
    addtbmp(tb,"Bao Tay",tenmonphai(),1,1)
    addtbmp(tb,"Giay",tenmonphai(),2,1)
    addtbmp(tb,"Nhan",tenmonphai(),2,1)
    addtbmp(tb,"Nhan",tenmonphai(),3,1)
    addtbmp(tb,"Ngoc Boi",tenmonphai(),1,1)
    addtbmp(tb,"Day Truyen",tenmonphai(),4,1)
    end
            else
        Msg2Player("Ban khong du "..point.." diem tich luy lien dau !")
            end
        else
        Msg2Player("Ban khong du "..point.." diem tich luy lien dau !")
        end
    end
    
    function trangbivodanh(sel)
    id = sel + 1
    z = random(0,4)
        if id == 1 then
    j = random(1,2)
    AddItem(0,3,21,j,z,0,10)
        elseif id == 2 then
    AddItem(0,4,20,1,z,0,10)
        elseif id == 3 then
    AddItem(0,9,20,1,z,0,10)    
        end
    Msg2Player("Ban Nhan Duoc 1 Mon Trang Suc Vo Danh !")
    end
    Lần sửa cuối bởi thaihoa91, ngày 19-09-11 lúc 10:36 PM.
    Khách viếng thăm hãy cùng boykho xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Tag của Chủ đề này

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 03:51 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.