1. mình làm theo hướng dẫn [Only registered and activated users can see links. ] chiến trường mà sau khi đi chiến trường xong không nhận được gì xin mọi người chỉ cách fix
PHP Code:
-------------------------------------------------------文件名        :    battle_bouns.lua--创建者        :    zhouchenfei--创建时间        :    2007-10-23--功能描述        :    战场中的分值处理------------------------------------------------------
-- 
重置积分function Battle:ResetBonus(pPlayernNowTime)    pPlayer.Msg("Tích lũy bị trừ hết!");    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_TOTALBOUNS0);    pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_LASTBOUNSTIMEnNowTime);end
-- 重置使用积分上限function Battle:OnWeekEvent_ResetUseBouns()    local nUseBouns     me.GetTask(self.TSKGIDself.TSK_BTPLAYER_USEBOUNS);    Battle:DbgWrite(Dbg.LOG_INFO"OnWeekEvent_ResetUseBouns"self.TSKGIDself.TSK_BTPLAYER_USEBOUNS0);    me.SetTask(self.TSKGIDself.TSK_BTPLAYER_USEBOUNS0);end
-- 检查是否是新的一周function Battle:CheckNewWeek(pPlayernNowTime)    local nLastTime              pPlayer.GetTask(self.TSKGIDself.TSK_BTPLAYER_LASTBOUNSTIME);    local nLastDay             math.ceil(nLastTime / (3600 24));    local nNowDay            math.ceil(nNowTime / (3600 24));        if (nNowDay <= nLastDaythen        return;    end
    
-- 从星期天开始算,为一个星期的第一天    nLastDay             nLastDay 4;    nNowDay                nNowDay 4;    local nLastWeek        math.floor(nLastDay 7);    local nNowWeek        math.floor(nNowDay 7);    if (nNowWeek nLastWeekthen        return 1;    end    return 0;end
-- 处理连斩积分奖励function Battle:ProcessSeriesBouns(tbKillerBattleInfotbDeathBattleInfo)    local nMeRank            tbDeathBattleInfo.nRank;    local nPLRank            tbKillerBattleInfo.nRank;    -- 符合连斩条件 计算有效连斩    if (>= (nPLRank nMeRank)) then        local nSeriesKill    tbKillerBattleInfo.nSeriesKill 1;        tbKillerBattleInfo.nSeriesKill    nSeriesKill;
        if (
math.fmod(nSeriesKill3) == 0then                tbKillerBattleInfo.nTriSeriesNum    tbKillerBattleInfo.nTriSeriesNum 1;            self:AddShareBouns(tbKillerBattleInfoself.SERIESKILLBOUNS)            tbKillerBattleInfo.pPlayer.Msg(string.format("Quân %s - %s %s liên tiếp đẩy lùi %d quân địch, nhận thưởng Liên Trảm %d điểm tích lũy."Battle.NAME_CAMP[tbKillerBattleInfo.tbCamp.nCampId], Battle.NAME_RANK[tbKillerBattleInfo.nRank], tbKillerBattleInfo.pPlayer.szNametbKillerBattleInfo.nSeriesKillself.SERIESKILLBOUNS));        end
        
if (tbKillerBattleInfo.nMaxSeriesKill nSeriesKillthen            tbKillerBattleInfo.nMaxSeriesKill nSeriesKill;        end    end        -- 计算连斩        local nSeriesKillNum    tbKillerBattleInfo.nSeriesKillNum 1;    tbKillerBattleInfo.nSeriesKillNum    nSeriesKillNum;
    if (
tbKillerBattleInfo.nMaxSeriesKillNum nSeriesKillNumthen        tbKillerBattleInfo.nMaxSeriesKillNum nSeriesKillNum;    end    end
-- 获得杀死玩家积分奖励function Battle:GiveKillerBouns(tbKillerBattleInfotbDeathBattleInfo)    tbKillerBattleInfo.nKillPlayerNum    tbKillerBattleInfo.nKillPlayerNum 1;        -- 要不要做安全性检测呢?    local nMeRank        tbDeathBattleInfo.nRank;    local nPLRank        tbKillerBattleInfo.nRank;        local nRadioRank    1;    nRadioRank            = (10 - (nPLRank nMeRank)) / 10;    local nPoints        math.floor(Battle.tbBonusBase.KILLPLAYER nRadioRank);    local nBounsDif        self:AddShareBouns(tbKillerBattleInfonPoints)    if (nBounsDif 0then        tbKillerBattleInfo.nKillPlayerBouns tbKillerBattleInfo.nKillPlayerBouns nPoints;    endend
-- 获得战旗积分奖励function Battle:GetTheFlagBouns(tbBattleInfo)    local nCamp                tbBattleInfo.tbCamp.nCampId;    local nBounsDif         self:AddShareBouns(tbBattleInfoBattle.tbBonusBase.SNAPFLAG)    if (nBounsDif 0then        tbBattleInfo.nFlagsBouns tbBattleInfo.nFlagsBouns Battle.tbBonusBase.SNAPFLAG;    end    tbBattleInfo.nFlagNum    tbBattleInfo.nFlagNum 1;end
-- 获得珍宝积分奖励function Battle:GetTheTreasure(tbBattleInfo)    local nCamp                tbBattleInfo.tbCamp.nCampId;    local nBounsDif         self:AddShareBouns(tbBattleInfoBattle.tbBonusBase.GETITEM)    if (nBounsDif 0then        tbBattleInfo.nTreasureBouns tbBattleInfo.nTreasureBouns Battle.tbBonusBase.GETITEM;    end    tbBattleInfo.nTreasure    tbBattleInfo.nTreasure 1;end
-- 积分换经验function Battle:BounsChangeExp(nLevelnBouns)    local nExp 0;    if (nLevel 40then        return 0;    end        if (nLevel 120then        nLevel 120;    end        nExp math.floor(( 700 math.floor(( nLevel 40 ) / ) * 100 ) * 60 /3000 )    * nBouns -- 1个积分点的基础经验值        local nKinId me.dwKinId;    local cKin KKin.GetKin(nKinId);    if (cKinthen        local nWeeklyTask cKin.GetWeeklyTask();        if (Kin.TASK_BATTLE == nWeeklyTaskthen            nExp math.floor(nExp 1.5);        end    end    return nExp;end
-- 战局结束时的声望按排名奖励function Battle:AwardFinalShengWang(tbPlayerList)    local nNowShengWang 0;    local nMaxRank        0;    local nIndex        0;    for 1#tbPlayerList do        local tbBattleInfo     = tbPlayerList[i];        local nNowShengWang    = 0;        local nRankSheng    = 0;        local nBounsSheng    = 0;        if (1 == i) then            nRankSheng = Battle.tbRANKSHENGWANG[1];        elseif (2 <= i and 4 >= i) then            nRankSheng = Battle.tbRANKSHENGWANG[2];        elseif (5 <= i and 10 >= i) then            nRankSheng = Battle.tbRANKSHENGWANG[3];        elseif (11 <= i and 20 >= i) then            nRankSheng = Battle.tbRANKSHENGWANG[4];        end                for key, tbRankBouns in ipairs(Battle.tbBOUNSSHENGWANG) do            if (tbBattleInfo.nBouns >= tbRankBouns[1]) then                nBounsSheng = tbRankBouns[2];                break;            end        end        nNowShengWang = nRankSheng;        if (nBounsSheng > nNowShengWang) then            nNowShengWang = nBounsSheng;        end        local nCamp            = tbBattleInfo.tbCamp.nCampId;        tbBattleInfo.nShengWang     = tbBattleInfo.nShengWang + nNowShengWang;        tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> điểm danh vọng chiến trường.", i, tbBattleInfo.nShengWang));    endendfunction Battle:AwardJbCoin(tbPlayerList)    local nMaxRank        = 0;    local nIndex        = 0;    for i = 1, #tbPlayerList do        local tbBattleInfo     = tbPlayerList[i];        local nJbBonus    = 0;        if (1 == i) then            nJbBonus = Battle.tbJBCOINBONUS[1];            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            --tbBattleInfo.pPlayer.AddStackItem(18,1,1299,3,nil,30);            tbBattleInfo.pPlayer.AddExp(5000000);        elseif (2 == i ) then            nJbBonus = Battle.tbJBCOINBONUS[2];            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddExp(3000000);            --tbBattleInfo.pPlayer.AddStackItem(18,1,1299,3,nil,25);        elseif (3 == i ) then            tbBattleInfo.pPlayer.AddExp(2000000);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            --tbBattleInfo.pPlayer.AddStackItem(18,1,1299,3,nil,20);            nJbBonus = Battle.tbJBCOINBONUS[3];        elseif (4 <= i and 10 >= i) then            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddExp(1000000);            nJbBonus = Battle.tbJBCOINBONUS[4];            --tbBattleInfo.pPlayer.AddStackItem(18,1,1299,3,nil,15);        elseif (11 <= i) then            tbBattleInfo.pPlayer.AddItem(18,1,1190,4);            tbBattleInfo.pPlayer.AddExp(500000);            --tbBattleInfo.pPlayer.AddStackItem(18,1,1299,3,nil,10);        end        if ( tbBattleInfo.pPlayer.nLevel >= 90) then        tbBattleInfo.pPlayer.AddJbCoin(nJbBonus);        tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> Đồng.", i, nJbBonus));        else        tbBattleInfo.pPlayer.AddBindCoin(nJbBonus);        tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> Đồng khoa'.", i, nJbBonus));        end    endend-- 战局结束时的声望按排名奖励function Battle:AwardFinalHonor(tbPlayerList)    local nNowHonor = 0;    local nMaxRank        = 0;    local nIndex        = 0;    for i = 1, #tbPlayerList do        local tbBattleInfo     = tbPlayerList[i];        local nNowHonor    = 0;        local nRankHonor    = 0;        local nBounsHonor    = 0;        if (1 == i) then            nRankHonor = Battle.tbRANKHONOR[1];        elseif (2 <= i and 5 >= i) then            nRankHonor = Battle.tbRANKHONOR[2];        elseif (6 <= i and 10 >= i) then            nRankHonor = Battle.tbRANKHONOR[3];        elseif (11 <= i and 20 >= i) then            nRankHonor = Battle.tbRANKHONOR[4];        end                for key, tbRankBouns in ipairs(Battle.tbBOUNSHONOR) do            if (tbBattleInfo.nBouns >= tbRankBouns[1]) then                nBounsHonor = tbRankBouns[2];                break;            end        end        nNowHonor = nRankHonor;        if (nBounsHonor > nNowHonor) then            nNowHonor = nBounsHonor;        end        local nCamp            = tbBattleInfo.tbCamp.nCampId;        tbBattleInfo.nHonor = tbBattleInfo.nHonor + nNowHonor;        tbBattleInfo.pPlayer.Msg(string.format("Xếp hạng: <color=green>%d<color>, bạn nhận được <color=white>%d<color> điểm vinh dự chiến trường.", i, tbBattleInfo.nHonor));    endend
-- 战局结束时的功勋按排名奖励function Battle:AwardFinalGongXun(tbPlayerList)--    local nNowGongXun     0;--    local nMaxRank        0;--    local nIndex        0;--    for 1#tbPlayerList do--        if (i > nMaxRank) then--            nIndex = nIndex + 1;--            if (not self.tbGONGXUNRANK[nIndex]) then--        --        print("self.tbSHENGWANGRANK[nIndex] error (Battle:AwardFinalGongXun(tbPlayerList, tbBattleAwardSheng))");--            end--            nMaxRank        = self.tbGONGXUNRANK[nIndex][1];--            nNowGongXun        = self.tbGONGXUNRANK[nIndex][2];--        end--        local tbBattleInfo     = tbPlayerList[i];--        local nGongXun         = tbBattleInfo.nGongXun + nNowGongXun;--        local nCamp            = tbBattleInfo.tbCamp.nCampId;--        tbBattleInfo.pPlayer.Msg(string.format("排名为:<color=green>%d<color>,你获得了<color=white>%d<color>点战场功勋值奖励。", i, nGongXun));--        tbBattleInfo.nGongXun = nGongXun;--    endend
function Battle:AwardFinalWeiWang(tbPlayerListnBattleLevel)    if (not tbPlayerListthen        return;    end    local nFlag 0;    local nOpenTime KGblTask.SCGetDbTaskInt(DBTASD_SERVER_SETMAXLEVEL99);    if (nOpenTime <= 0then        nFlag 1;    else        if (nBattleLevel >= 2then            nFlag 1;        end    end    for iv in ipairs(tbPlayerList) do        if (self.tbWeiWangRank[1] == ithen            self:AwardWeiWang(v1050);    -- 冠军有6点威望        elseif (self.tbWeiWangRank[1] < and self.tbWeiWangRank[2] >= ithen            self:AwardWeiWang(v840);        elseif (self.tbWeiWangRank[2] and self.tbWeiWangRank[3] >= ithen            self:AwardWeiWang(v630);        else            if (nFlag == 1then                local nBouns v.nBouns;                if (4500 <= nBounsthen                    self:AwardWeiWang(v5201);                elseif (3000 <= nBounsthen                    self:AwardWeiWang(v4201);                elseif (1800 <= nBounsthen                    self:AwardWeiWang(v3151);                elseif (1500 <= nBounsthen                    self:AwardWeiWang(v2151);                elseif (1200 <= nBounsthen                    self:AwardWeiWang(v2101);                elseif (800 <= nBounsthen                    self:AwardWeiWang(v1101);                elseif (500 <= nBounsthen                    self:AwardWeiWang(v0101);                end                        end        end    endend
function Battle:AwardFinalOffer(tbPlayerListnBattleLevel)    if (not tbPlayerListthen        return;    end     local nStockBaseCount 0;    for iv in ipairs(tbPlayerList) do        if (>= and <= 3then            self:AwardOffer(v150);    -- 前3名有150的贡献度            nStockBaseCount 100;        elseif (<= and 10 >= ithen            self:AwardOffer(v120);    -- 前10名有120的贡献度            nStockBaseCount 80;        elseif (>= 10 and 20 >= ithen            self:AwardOffer(v100);    -- 前20名有100的贡献度            nStockBaseCount 60;        else            local nBouns v.nBouns;            if (5000 <= nBounsthen                self:AwardOffer(v80); -- 5000积分以上的有80的贡献度                nStockBaseCount 50;            elseif (5000 nBouns and 4000 <= nBounsthen                self:AwardOffer(v60); -- 4000积分以上的有60的贡献度                nStockBaseCount 30;            elseif (4000 nBouns and 3000 <= nBounsthen                self:AwardOffer(v40);    -- 3000积分以上的有40的贡献度                nStockBaseCount 20;            elseif (3000 nBouns and 1500 <= nBounsthen                self:AwardOffer(v30);    -- 1500积分以上的有30的贡献度                nStockBaseCount 10;            end        end        if and v.pPlayer then            -- 增加建设资金和族长、个人的股份            Tong:AddStockBaseCount_GS1(v.pPlayer.nIdnStockBaseCount0.750.20.0500WeeklyTask.GETOFFER_TYPE_BATTLE);        end                if (and <= 20 and nBattleLevel == 3then            -- 成就:高级战场前20名            Achievement:FinishAchievement(v.pPlayer.nIdAchievement.BATTLE_GAOJI_20);        end    endend
function Battle:AwardOffer(tbBattleInfonOffer)    local pPlayer tbBattleInfo.pPlayer;    if (not pPlayerthen        return 0;    end    pPlayer.AddOfferEntry(nOfferWeeklyTask.GETOFFER_TYPE_BATTLE);end
function Battle:AwardWeiWang(tbBattleInfonWeiWangnGongXiannFlag)    local pPlayer tbBattleInfo.pPlayer;    if (not pPlayerthen        return 0;    end        -- 加入帮会,并且帮会通过考验期 by zhangjinpin@kingsoft    if nFlag == 1 then        if not pPlayer.dwTongId or pPlayer.dwTongId == 0 then            return 0;        end            local pTong KTong.GetTong(pPlayer.dwTongId);        if not pTong or pTong.GetTestState() ~= 0 then            return 0;        end    end    -- end
    
if tbBattleInfo.tbMission and tbBattleInfo.tbMission.nBattleLevel then        if tbBattleInfo.tbMission.nBattleLevel == and TimeFrame:GetStateGS("OpenOneFengXiangBattle") == 1 then            nWeiWang math.floor(nWeiWang 2);        end        pPlayer.AddKinReputeEntry(nWeiWang"battle");    endend
function Battle:AwardFinalXinDe(tbPlayerList)    if (not tbPlayerListthen        return;    end    for 1#tbPlayerList do        if (1 == i) then            self:AwardXinDe(tbPlayerList[i].pPlayer, 300000);    -- 冠军由6点威望        elseif (2 <= i and 10 >= i) then            self:AwardXinDe(tbPlayerList[i].pPlayer, 200000);        else            local nBouns = tbPlayerList[i].nBouns;            if (3000 < nBouns) then                self:AwardXinDe(tbPlayerList[i].pPlayer, 150000);            elseif (3000 >= nBouns and 500 <= nBouns) then                self:AwardXinDe(tbPlayerList[i].pPlayer, 100000);            end        end    end    end
function Battle:AwardXinDe(pPlayernXinDe)    if (nXinDe <= 0then        return;    end    Setting:SetGlobalObj(pPlayer);    Task:AddInsight(nXinDe);    Setting:RestoreGlobalObj();end
-- 奖励积分大于3000的玩家可以获得物质奖励function Battle:AwardFinalGoods(tbPlayerListnBattleLevel)    if (not tbPlayerListthen        return;    end        local nItemId self.tbPaiItemId[nBattleLevel];    for 1#tbPlayerList do        local nBouns    = tbPlayerList[i].nBouns;        local pPlayer    = tbPlayerList[i].pPlayer;        if (self.tbAWARDBOUNS[1] <= nBouns) then            pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_ZHANCHANGLINGPAI, nItemId);            pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_FUDAI ,2);            Dialog:SendInfoBoardMsg(pPlayer, "Gặp Hiệu Úy Mộ Binh ở Báo danh chiến trường nhận thưởng.");        elseif (self.tbAWARDBOUNS[2] <= nBouns) then            pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_FUDAI ,1);            Dialog:SendInfoBoardMsg(pPlayer, "Gặp Hiệu Úy Mộ Binh ở Báo danh chiến trường nhận thưởng.");        end        if (nBouns > 0) then            pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_BOUNSFORWARD, 1);        end    end    end
-- 师徒成就:战场function Battle:GetAchievement(tbPlayerListnBattleLevel)    if (not tbPlayerListthen        return;    end    -- nBattleLevel 1(初级 扬州),2(中级 凤翔),3(高级 襄阳)    for 1#tbPlayerList do        local pPlayer = tbPlayerList[i].pPlayer;        -- 目前成就系统里面只需要添加扬州战场成就,如果以后要添加其他的,可以在这里补充        if (pPlayer and nBattleLevel == 1) then            Achievement:FinishAchievement(pPlayer.nId, Achievement.BATTLE_YANGZHOU);        end    endend
-- 获得一个战场令牌function Battle:AwardGood(pPlayernItemIdnPaiCountnFuCountnBounsnBattleLevel)    local nFreeCounttbExecute SpecialEvent.ExtendAward:DoCheck("Battle"pPlayernBounsnBattleLevel);        if (pPlayer.CountFreeBagCell() < (nPaiCount nFuCount nFreeCount) * Battle.nTimes then        return 0;    end    for 1Battle.nTimes do        if (nPaiCount 0then            pPlayer.AddItem(18,1,112,nItemId);            self:WriteLog("AwardGood"string.format("Give player %s a zhanchanglingpai"pPlayer.szName));            pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_ZHANCHANGLINGPAI0);        end        if (nFuCount 0then            for i=1nFuCount do                local pItem pPlayer.AddItem(18,1,80,1);                assert(pItem);                self:WriteLog("AwardGood"string.format("Give player %s a fudai"pPlayer.szName));                --local szDate os.date("%Y/%m/%d/%H/%M/%S"GetTime() + 3600 48);                --pPlayer.SetItemTimeout(pItemszDate);                --pItem.Sync();            end            pPlayer.SetTask(self.TSKGIDself.TSK_BTPLAYER_FUDAI0);        end        if (nBouns 0then            local nMyUserBouns        self:GetMyUseBouns();            local nFinalBouns        nBouns;            if (nMyUserBouns nBouns self.BATTLES_POINT2EXP_MAXEXPthen                nFinalBouns self.BATTLES_POINT2EXP_MAXEXP nMyUserBouns;            end            local nExp                 self:BounsChangeExp(pPlayer.nLevelnFinalBouns) * self.BOUNS2EXPMUL;            if (nExp 0then                pPlayer.AddExp(nExp);            end            self:AddUseBouns(pPlayernFinalBounsnMyUserBouns);            pPlayer.SetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_TOTALBOUNS0);        end        SpecialEvent.ExtendAward:DoExecute(tbExecute);    end    return 1;end
-- 更新每天玩家最大功勋值function Battle:UpdatePlayerHonorAndShengWang(tbPlayerList)    for _tbBattleInfo in pairs(tbPlayerList) do        tbBattleInfo:SetPlayerHonor();        tbBattleInfo:SetPlayerShengWang();    endend
-- 如果玩家的身份是未出师弟子,那么他的师徒任务当中的宋金战场次数加1function Battle:UpdateShiTuBattleCount(tbPlayerList)    if (not tbPlayerListthen        return;    end    local tbItem Item:GetClass("teacher2student");    for iv in ipairs(tbPlayerList) do        local pPlayer v.pPlayer;        if (pPlayerthen            if (pPlayer.GetTrainingTeacher()) then                local tbBattleInfo    Battle:GetPlayerData(pPlayer);                local nEnterBattleTime tbBattleInfo.nEnterBattleTime;                local nCurTime GetTime();                local nInBattleTime nCurTime nEnterBattleTime;                if (tbItem.BATTLE_VALID_TIME <= nInBattleTimethen                    local nNeed_Battle pPlayer.GetTask(Relation.TASK_GROUPRelation.TASK_ID_SHITU_BATTLE) + 1;                    pPlayer.SetTask(Relation.TASK_GROUPRelation.TASK_ID_SHITU_BATTLEnNeed_Battle);                end            end        end    endend
-- 计算离上次更新时间过了多少天function Battle:CalculateDay(nLastTimenNowTime)    local nLastDay     math.ceil(nLastTime / (3600 24));    local nNowDay    math.ceil(nNowTime / (3600 24));    local nDays        nNowDay nLastDay;    if (nDays 0then        nDays 0;    end    return nDays;end
-- 清零function Battle:ClearBouns(pPlayer)    self:SetTotalBouns(pPlayer0);end
-- 个人玩家奖励function Battle:AwardPlayerList(tbPlayerReaultListnBattleLevel)    self:AwardFinalHonor(tbPlayerReaultList);    self:AwardJbCoin(tbPlayerReaultList);    self:AwardFinalShengWang(tbPlayerReaultList);    self:UpdatePlayerHonorAndShengWang(tbPlayerReaultList);    self:UpdateShiTuBattleCount(tbPlayerReaultList);    self:AwardFinalWeiWang(tbPlayerReaultListnBattleLevel);    self:AwardFinalOffer(tbPlayerReaultListnBattleLevel);    self:AwardFinalXinDe(tbPlayerReaultList);    self:AwardFinalGoods(tbPlayerReaultListnBattleLevel);    self:GetAchievement(tbPlayerReaultListnBattleLevel);end
function Battle:_BTPrint(tbPlayerReaultList)    print("szName, nBouns, nGongXun, nShengWang");    for _tbBattleInfo in ipairs(tbPlayerReaultList) do        print(tbBattleInfo.pPlayer.szNametbBattleInfo.nBounstbBattleInfo.nGongXuntbBattleInfo.nShengWang);    endend
-- 累加积分--TODOfunction Battle:AddUseBouns(pPlayernChangeBounsnMyUserBouns)    if (== nChangeBounsthen        return;    end    pPlayer.SetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_USEBOUNSnChangeBouns nMyUserBouns);end
-- 获得已用积分记录--TODOfunction Battle:GetMyUseBouns()    local nMyBouns me.GetTask(Battle.TSKGIDBattle.TSK_BTPLAYER_USEBOUNS);    return nMyBouns;end
function Battle:AddShareBouns(tbBattleInfonBouns)    local tbShareTeamMember tbBattleInfo.pPlayer.GetTeamMemberList(1);    if (not tbShareTeamMemberthen        return tbBattleInfo:AddBounsWithCamp(nBouns);    end        local nResult    0;        local nCount    #tbShareTeamMember;    if (0 < nCount) then        local nTimes    = self.tbPOINT_TIMES_SHARETEAM[nCount];        local nPoints    = nBouns * nTimes;        nResult            = tbBattleInfo:AddBounsWithCamp(nPoints);    end
-- 组队共享暂时不用--    for _pPlayer in pairs(tbShareTeamMember) do--        if (pPlayer.nId ~= tbBattleInfo.pPlayer.nIdthen--            local nFactionnRoutId self:GetFactionNumber(pPlayer);--            if (~= nFactionthen--                local nTimes    self.tbPOINT_TIMES_SHAREFACTION[nFaction][nRoutId];--                local nPoints    nBouns nTimes;--                self:GetPlayerData(pPlayer):AddBounsWithCamp(nPoints);--            end--        end--    end    return nResult;end
function Battle:GetFactionNumber(pPlayer)    local nFaction     pPlayer.nFaction;    if (== nFactionthen        Battle:DbgOut("GetFactionNumber"pPlayer.szName"Chưa gia nhập môn phái!");        return 0;    end    local nRouteId    pPlayer.nRouteId;    if (== nRouteIdthen        Battle:DbgOut("GetFactionNumber"pPlayer.szName"Chưa chọn nhánh, không thể nhận Mật tịch môn phái!");        return 0;    end    return nFactionnRouteId;end
function Battle:OnWeekEvent_ResetBattleHonor()    -- TODO 排名    local pPlayer me;    for self.TSK_BTPLAYER_HONOR1self.TSK_BTPLAYER_HONOR4do        pPlayer.SetTask(self.TSKGIDi0);    endend
function Battle:GetRemainJunXu()    local nRemainJunXu me.GetTask(self.TSKGIDself.TSK_BTPLAYER_JUNXU);    return nRemainJunXu;end

PlayerSchemeEvent
:RegisterGlobalWeekEvent({Battle.OnWeekEvent_ResetUseBounsBattle});PlayerSchemeEvent:RegisterGlobalWeekEvent({Battle.OnWeekEvent_ResetBattleHonorBattle}); 

đây là file của mình. [Only registered and activated users can see links. ]
2. cách add huyền tinh vào tiêu dao cốc, quân doanh,bạch hổ đường.
3. cách fix lỗi kim tê chỉ sử dụng được ở trong thành. không sử dụng được ngoài thành.
-nếu được xin pm [Only registered and activated users can see links. ].
mình sẽ gủi card thoại