Kết quả 91 đến 100 của 480
-
24-08-18, 11:27 AM #91
- Ngày tham gia
- May 2011
- Bài viết
- 61
- Thanks
- 0
- Thanked 2 Times in 2 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
FieldMapNpc.lua
Mọi người show giùm e code trong file này với ạ. Em bị mất hết thông số mặc định lỗi lửa trại ạ . Giúp em file này đi ạ mọi ngườiKhách viếng thăm hãy cùng cubao91 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 11:38 AM #92
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
tbFieldNpc.nGouHuoBaseExp = 150.5; --每分钟篝火基准经验(0.667点体力经验) Lửa Trại 66.7
tbFieldNpc.fExperienceScale = 0.5; --实际基准经验 = Experience * 该值 EXP nhận 0.001
--- Chế độ gộp bài viết ---
trong 2 file đó, chủ yếu set ngày mở thêm lv rồi chỉnh time bên máy ảo thêm ngày mình vừa set code trong 2 file đó
mới thêm 149, để code thêm xem sao ^^Khách viếng thăm hãy cùng ngocdpt xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 11:54 AM #93
- Ngày tham gia
- May 2011
- Bài viết
- 61
- Thanks
- 0
- Thanked 2 Times in 2 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
Khách viếng thăm hãy cùng cubao91 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 12:27 PM #94
- Ngày tham gia
- Jul 2012
- Bài viết
- 1,275
- Thanks
- 670
- Thanked 361 Times in 106 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
local tbFieldNpc = Npc:GetClass("FieldMapNpc");
tbFieldNpc.nGouHuoTime = 15 * 60; --篝火时效
tbFieldNpc.nGouHuoBaseExp = 66.7; --每分钟篝火基准经验(0.667点体力经验 )
tbFieldNpc.nPeriodTime = 6; --每多少秒加一次
tbFieldNpc.nGouHuoTotalRate = 100000; --篝火掉落的概率计算总值
tbFieldNpc.nMaxRankPos = 3; --输出伤害前3名拥有奖励分配
tbFieldNpc.fCtrlExpParam = 1.0; --经验分配的调节系数
tbFieldNpc.szGouHuoAchievement = "XiuLian_2"; --篝火成就
tbFieldNpc.fMaxMemberMainP = 0.6; --队员共享经验不得超过主打者的经验
tbFieldNpc.fExperienceScale = 0.001; --实际基准经验 = Experience * 该值
function tbFieldNpceathCalcAward(pNpc, tbDamageInfo, pKiller)
local nMaxPos = #tbDamageInfo;
if nMaxPos > self.nMaxRankPos then
nMaxPos = self.nMaxRankPos;
end
local nExperience = pNpc.GetExperience();
if nExperience > 0 then
local pFirstPlayer, tbFirstPlayer = self:CalcDeathExp(pNpc, tbDamageInfo, nMaxPos, pKiller);
if pFirstPlayer and tbFirstPlayer then
self:CallGouHuo(pFirstPlayer, pNpc, tbFirstPlayer);
end
else
local nFixExperience = pNpc.GetFixExperience();
if nFixExperience > 0 then
local pFirstPlayer, tbFirstPlayer = self:CalcDeathFixExp(pNpc, tbDamageInfo, nMaxPos, pKiller);
if pFirstPlayer and tbFirstPlayer then
self:CallGouHuo(pFirstPlayer, pNpc, tbFirstPlayer);
end
end
end
end
function tbFieldNpc:CalcDeathFixExp(pNpc, tbDamageInfo, nMaxPos, pKiller, bWithoutXiuLian)
local pKillerPlayer = nil;
if pKiller then
pKillerPlayer = pKiller.GetPlayer();
end
local nMainAttackID = nil;
if pKillerPlayer then
nMainAttackID = pKillerPlayer.dwID;
end
local nExperience = pNpc.GetFixExperience();
local nNpcLevel = pNpc.nLevel;
local nNpcMaxLife = pNpc.nMaxLife;
local pFirstPlayer = nil;
local tbFirstPlayer = nil;
for nI = 1, nMaxPos do
local tbDamage = tbDamageInfo[nI];
if tbDamage then
local tbPlayer, pCaptain, nTotalLevel, bMainAttack = Npc:GetAssignPlayer(pNpc, tbDamage, Npc.nMaxAwardLen, nMainAttackID);
if tbPlayer and #tbPlayer > 0 then
if nI == 1 then
pFirstPlayer = pCaptain;
tbFirstPlayer = tbPlayer;
end
local nTotalCount = #tbPlayer;
local nBaseExp = nExperience * tbDamage.nTotalDamage / nNpcMaxLife;
local fFactor = math.sqrt(nTotalCount);
local nMemberExp = nBaseExp * self.fCtrlExpParam * fFactor / nTotalLevel;
local nMainAttackExp = 0;
local nMaxMemberExp = 0;
if bMainAttack then
nMainAttackExp = nBaseExp * (100 + nTotalCount) / 100;
nMaxMemberExp = nMainAttackExp * self.fMaxMemberMainP;
end
for _, tbPlayerInfo in pairs(tbPlayer) do
local pPlayer = tbPlayerInfo.pPlayer;
local nAddExp = 0;
local nAddExpP = 0;
if pPlayer.dwID == nMainAttackID then
nAddExp = nMainAttackExp;
else
nAddExp = nMemberExp * pPlayer.nLevel;
if nMaxMemberExp > 0 and nAddExp > nMaxMemberExp then
nAddExp = nMaxMemberExp;
end
if bMainAttack and nMainAttackID and nMainAttackID > 0 then
local nImityLevel = FriendShip:GetFriendImityLevel(pPlayer.dwID, nMainAttackID);
nAddExpP = FriendShip:GetFriendImityExpP(nImityLevel);
end
end
nAddExp = nAddExp * (100 + nAddExpP) / 100;
if nAddExp > 0 then
if bWithoutXiuLian then
pPlayer.AddExperience(nAddExp, Env.LogWay_NpcDropAward);
else
Player:AddXiuLianExp(pPlayer, nAddExp, nNpcLevel,true);
end
end
end
end
end
end
return pFirstPlayer, tbFirstPlayer;
end
function tbFieldNpc:CalcDeathExp(pNpc, tbDamageInfo, nMaxPos, pKiller, bWithoutXiuLian)
local pKillerPlayer = nil;
if pKiller then
pKillerPlayer = pKiller.GetPlayer();
end
local nMainAttackID = nil;
if pKillerPlayer then
nMainAttackID = pKillerPlayer.dwID;
end
local nExperience = pNpc.GetExperience();
nExperience = nExperience * tbFieldNpc.fExperienceScale;
local nNpcLevel = pNpc.nLevel;
local nNpcMaxLife = pNpc.nMaxLife;
local pFirstPlayer = nil;
local tbFirstPlayer = nil;
for nI = 1, nMaxPos do
local tbDamage = tbDamageInfo[nI];
if tbDamage then
local tbPlayer, pCaptain, nTotalLevel, bMainAttack = Npc:GetAssignPlayer(pNpc, tbDamage, Npc.nMaxAwardLen, nMainAttackID);
if tbPlayer and #tbPlayer > 0 then
if nI == 1 then
pFirstPlayer = pCaptain;
tbFirstPlayer = tbPlayer;
end
local nBaseExp = nExperience * tbDamage.nTotalDamage / nNpcMaxLife;
for _, tbPlayerInfo in pairs(tbPlayer) do
local pPlayer = tbPlayerInfo.pPlayer;
local nAddExpP = 0;
if bMainAttack and pPlayer.dwID ~= nMainAttackID and nMainAttackID and nMainAttackID > 0 then
local nImityLevel = FriendShip:GetFriendImityLevel(pPlayer.dwID, nMainAttackID);
nAddExpP = FriendShip:GetFriendImityExpP(nImityLevel);
end
local nPlayerBaseExp = pPlayer.GetBaseAwardExp();
local nAddExp = nPlayerBaseExp * nBaseExp * (100 + nAddExpP) / 100;
if nAddExp > 0 then
if bWithoutXiuLian then
pPlayer.AddExperience(nAddExp, Env.LogWay_NpcDropAward);
else
Player:AddXiuLianExp(pPlayer, nAddExp, nNpcLevel, true);
end
end
end
end
end
end
return pFirstPlayer, tbFirstPlayer;
end
function tbFieldNpc:CallGouHuo(pCaptain, pNpc, tbFirstPlayer)
local nGouHuoRate = pNpc.GetGouHuoRate();
if nGouHuoRate <= 0 then
return;
end
if not pCaptain then
return;
end
local nRate = MathRandom(tbFieldNpc.nGouHuoTotalRate);
if nRate > nGouHuoRate then
return;
end
if tbFirstPlayer then
local tbAllMember = {};
for _, tbPlayerInfo in pairs(tbFirstPlayer) do
Achievement:AddCount(tbPlayerInfo.pPlayer, tbFieldNpc.szGouHuoAchievement, 1);
table.insert(tbAllMember, tbPlayerInfo.pPlayer.dwID);
end
local nTotalCount = #tbAllMember;
if nTotalCount >= 2 then
for nI = 1, nTotalCount - 1 do
for nJ = nI + 1, nTotalCount do
local nPlayer1 = tbAllMember[nI];
local nPlayer2 = tbAllMember[nJ];
FriendShip:AddImitityByKind(nPlayer1, nPlayer2, Env.LogWay_KillFieldMapNpc);
end
end
end
end
local nGouHuoX, nGouHuoY = pNpc.GetDeathPos();
if nGouHuoX <= 0 and nGouHuoY <= 0 then
local _, nX, nY = pNpc.GetWorldPos();
nGouHuoX = nX;
nGouHuoY = nY;
end
local tbGouhuoNpc = Npc:GetClass("GouHuoNpc");
tbGouhuoNpc:CallTeamGouhuoNpc(pCaptain, nGouHuoX, nGouHuoY, tbFieldNpc.nGouHuoTime, tbFieldNpc.nGouHuoBaseExp, tbFieldNpc.nPeriodTime, 1);
endLần sửa cuối bởi nobitajx2, ngày 24-08-18 lúc 12:32 PM.
Khách viếng thăm hãy cùng nobitajx2 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 02:14 PM #95
- Ngày tham gia
- May 2011
- Bài viết
- 61
- Thanks
- 0
- Thanked 2 Times in 2 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
ăn lửa rồi mấy anh ạ. Giờ gặp vấn đề là lửa không tắt ạ
Khách viếng thăm hãy cùng cubao91 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 03:51 PM #96
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
Khách viếng thăm hãy cùng ngocdpt xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 04:03 PM #97
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
local tbUi = Ui:CreateClass("GMListPanel");
-- 我要各个AI的同伴 (同伴ID配置)
local tbAllTestAIPartner = "{57, 23, 13, 20, 22, 29, 12, 52, 26, 41, 37, 11, 21, 66}"
-- 决定显示顺序
local tbDataIndex = GMpanel lỗi, sever không nhận
LuaQ @Script/Ui/Windows/GMPanel.lua *o @@ € €€AÀ Š ‰@A‚‰ÀAƒ‰@B„‰ÀB…‰@C†‰ÀC‡ ‰@Dˆ‰ÀD‰‰@EŠ‰ÀE‹‰@FŒ‰ÀF‰ @GŽ‰ÀG‰@H‰ÀH‘‰@I’‰ÀI“‰@J ”‰ÀJ•‰@K–‰ÀK—‰@L˜‰ÀL™Á@ Á AÁ Á ÁA
 J IÂJšŠ€ÁB à AÃ
¢B€I‚‚šŠ€ÁB à AÃ
¢B€I‚› B‚‚J IÂMšŠ€Á Ã
AÃ
¢B€I‚‚šŠ€Á à Cái GM này dùng ok nhưng mã hóa, chỉnh sai cũng lỗi, không thể full chức năng
Bác nào biết giãi mã không nhờKhách viếng thăm hãy cùng ngocdpt xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 04:41 PM #98
- Ngày tham gia
- Jan 2012
- Bài viết
- 102
- Thanks
- 23
- Thanked 20 Times in 7 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
lửa không tắt thì bạn thử config cái dòng đầu tiên là 15*60 thành 1 *60 xem lửa sau 1p có tắt ko nhé sợ nhiều quá bạn k kiểm soát đc đâu ~~
Chứ sv bác toandaik mình thấy vẫn ổn mà .
Nhân tiện có bác nào thử add đồ vào kì trân các mà ko lỗi mục ngân sức chưa có cho em xin file ạ sao e cứ add là lỗi ko chịu đc ~~~Khách viếng thăm hãy cùng kfcneed2 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
24-08-18, 07:27 PM #99
- Ngày tham gia
- Jan 2016
- Bài viết
- 22
- Thanks
- 6
- Thanked 2 Times in 2 Posts
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
Khách viếng thăm hãy cùng ThanhTamPK xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến ThanhTamPK vì bài viết này !
themen9978 (24-08-18)
-
24-08-18, 07:54 PM #100
Ðề: [JXM]- Hướng dẫn mọi thứ về VLTKM (update thêm sau)
Lần sửa cuối bởi ngocdpt, ngày 24-08-18 lúc 07:58 PM.
Khách viếng thăm hãy cùng ngocdpt xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
Các Chủ đề tương tự
-
[Share] File việt hóa Server VLTKM (2 file idx+dat)
Bởi bddl30589 trong diễn đàn Các Server Không Nằm Trong BoxTrả lời: 66Bài viết cuối: 15-03-19, 10:15 AM -
VLTKM hướng dẫn chạy sever và vào game cho newbie
Bởi cwalker trong diễn đàn Các Server Không Nằm Trong BoxTrả lời: 90Bài viết cuối: 30-01-19, 12:35 AM -
[Xin Giúp Đỡ] Lữa trại khị đánh quái không lên EXP của VLTKM
Bởi ndduonghtvn trong diễn đàn Yêu Cầu - Hỏi ĐápTrả lời: 12Bài viết cuối: 03-09-18, 09:41 AM