linhpl2001
28-02-13, 07:29 PM
function Battle:AwardGood(pPlayer, nItemId, nPaiCount, nFuCount, nBouns, nBattleLevel)
local nFreeCount, tbExecute = SpecialEvent.ExtendAward:DoCheck("Battle", pPlayer, nBouns, nBattleLevel);
if (pPlayer.CountFreeBagCell() < (nPaiCount + nFuCount + nFreeCount) * Battle.nTimes ) then
return 0;
end
for i = 1, Battle.nTimes do
if me.CountFreeBagCell() < 15 then
me.Msg("Túi của bạn đã đầy, cần ít nhất 15 ô trống.");
end
if (nPaiCount > 0) then
pPlayer.AddItem(18,1,112,nItemId);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
self:WriteLog("AwardGood", string.format("Give player %s a zhanchanglingpai", pPlayer.szName));
pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_ZHANCHANGLINGPAI, 0);
end
cho mình hỏi code additem vào 3k điểm khi tham gia tống kim đúng chưa sao khi đi xong nhận ko có gì
ai pro giúp vé thank nhìu
local nFreeCount, tbExecute = SpecialEvent.ExtendAward:DoCheck("Battle", pPlayer, nBouns, nBattleLevel);
if (pPlayer.CountFreeBagCell() < (nPaiCount + nFuCount + nFreeCount) * Battle.nTimes ) then
return 0;
end
for i = 1, Battle.nTimes do
if me.CountFreeBagCell() < 15 then
me.Msg("Túi của bạn đã đầy, cần ít nhất 15 ô trống.");
end
if (nPaiCount > 0) then
pPlayer.AddItem(18,1,112,nItemId);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,114,9);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
pPlayer.AddItem(18,1,25128,1);
self:WriteLog("AwardGood", string.format("Give player %s a zhanchanglingpai", pPlayer.szName));
pPlayer.SetTask(self.TSKGID, self.TSK_BTPLAYER_ZHANCHANGLINGPAI, 0);
end
cho mình hỏi code additem vào 3k điểm khi tham gia tống kim đúng chưa sao khi đi xong nhận ko có gì
ai pro giúp vé thank nhìu