- 精华
- 阅读权限
- 80
- 好友
- 相册
- 分享
- 听众
- 收听
- 注册时间
- 2020-9-12
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
本帖最后由 q2430591974 于 2025-7-19 15:51 编辑
一.双人副本单人可进
只修改服务端dpk目录下的data\script\scene\special_script\mojiawuguan\wuguan_cmn_trans.lua
(1) 修改函数function judge_team_num(player, num)
if allnum == num and cur_Teammate == 1 then
改成
if allnum >= 1 then
(2)修改函数function check_cmn_all_state(player, excelID, isPayNow, isCheckInviteid)
if member == nil then
return false
end
改成
local cur_num = player:GetAllMember()
if member == nil then
if cur_num > 1 then
return false
end
member = player
end
(3)修改函数function on_ack(player, m, datatable, ack_index)
第一处修改:
else
player:ShowUIText(bo2.eSendModeFlag_Self, 73126)
return
改成(直接注释)
--else
--player:ShowUIText(bo2.eSendModeFlag_Self, 73126)
--return
第二处修改:
player:AddCooldown(id)
member:AddCooldown(id)
player:GM_AddActivation(5)
member:GM_AddActivation(5)
改成
if member == player then
member:AddCooldown(id)
member:GM_AddActivation(5)
else
player:AddCooldown(id)
member:AddCooldown(id)
player:GM_AddActivation(5)
member:GM_AddActivation(5)
end
二.赛马单人可进
(1)修改战场配置文件data\mb\etc\battle_list.txt,服务端和客户端目录的这个文件都要修改
赛马 5 112*153 120 2 30 2 10 20 100 10 40 1 2
改成
赛马 5 112*153 1800 2 30 2 10 20 100 10 40 1 2
(2)只修改服务端dpk目录下的data\script\scene\activity\horse_racing\interface\horse_race_scn.lua
function OnStateChgWaiting(scn)
local function Broadcast_SoonBegin(player)
local v = sys.variant()
v:set(L("leave_time"), TimeTip[scn.OnlyID])
player:ShowUIText(bo2.eSendMode_Self, 2046, v)
end
local function SendSoonBegin()
if scn == nil then
return
end
scn:ForEachScnPlayer(Broadcast_SoonBegin)
TimeTip[scn.OnlyID] = TimeTip[scn.OnlyID] - 30
end
TimeTip[scn.OnlyID] = 90
for i = 1, 3 do
bo2.AddTimeEvent(750 * i, SendSoonBegin)
end
end
改成
function OnStateChgWaiting(scn)
local function Broadcast_SoonBegin(player)
local v = sys.variant()
v:set(L("leave_time"), TimeTip[scn.OnlyID])
player:ShowUIText(bo2.eSendMode_Self, 2046, v)
end
local function SendSoonBegin()
if scn == nil then
return
end
if TimeTip[scn.OnlyID] > 0 then
scn:ForEachScnPlayer(Broadcast_SoonBegin)
TimeTip[scn.OnlyID] = TimeTip[scn.OnlyID] - 30
else
BattleGroupStateChg(scn, bo2.eBattleGroupState_Begin)
end
end
TimeTip[scn.OnlyID] = 90
for i = 1, 4 do
bo2.AddTimeEvent(750 * i, SendSoonBegin)
end
end
(3)打包客户端和服务端的dpk并替换
说明:lua代码非常注重代码缩进,稍有不慎编译出错。有些端的lua文件是编译后的,需要对lua文件进行反编译后才能修改。不会修改DPK基础的,先在宝湾找基础修改教程再看这个。
自己修改的附件,可以参考:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
评分
-
查看全部评分
|