请教最新镶嵌DP的问题,任务完成券会清除排除项里面的任务
如题:主线任务完成券设置成功了,不会清除排除项里的任务,但是普通和成就任务完成券会清理排除项的任务,各路大佬帮忙看看dp代码,是不是哪里错了 --这里是避免被任务完成券所完成的任务代码,如果有不想被完成的任务,可以填代码到这里,按格式来填!
evade_lst = {
--活动任务
20001,20060,20085,4414,4476,10100,10101,10102,9524,9525,
10103,10104,10019,10016,10017,5465,5466,5461,9526,9527,
5467,5468,5469,5433,5473,5474,5475,5472,5470,9528,9529,
5476,5678,5477,5479,5480,5481,5471,5432,5424,5425,5426,
5427,5428,5429,5430,5431,5409,5462,5463,7704,9501,9502,
9503,9504,9506,9505,9507,9511,9521,9530,9531,9532,9533,
9534,9535,9536,9537,9538,9539,9522,9540,9541,9542,9543,
9544,9545,9546,9523,9547,20231,20232,20229,20226,20221,
20222,20223,20224,9901,9902,9903,9904,9905,9906,9907,
20225,355,349,2708,2710,2712,2702,
}
--这里是避免被任务完成券所完成的任务代码,如果有不想被完成的任务,可以填代码到这里,按格式来填!
-- 主线任务完成
item_handler = function(user, item_id)
local quest = dpx.quest
local lst = quest.all(user.cptr)
local chr_level = user:GetCharacLevel()
local q = 0
for i, v in ipairs(lst) do
local id = v
local info = quest.info(user.cptr, id)
if info then
if not info.is_cleared and info.type == game.QuestType.epic and info.min_level <= chr_level then
quest.clear(user.cptr, id)
q = q + 1
end
end
end
if q > 0 then
quest.update(user.cptr)
user:SendNotiPacketMessage(string.format("恭喜: %d个主线任务清理 成功!", q))
else
user:SendNotiPacketMessage("注意: 主线任务清理 失败!")
dpx.item.add(user.cptr, item_id)
end
end -- 支线/普通任务完成(请转职觉醒之后在用,否者转职觉醒任务会被清理!)
item_handler = function(user, item_id)
local quest = dpx.quest
local lst = quest.all(user.cptr)
local chr_level = user:GetCharacLevel()
local q = 0
for i, v in ipairs(lst) do
local id = v
local info = quest.info(user.cptr, id)
if info then
if not info.is_cleared and info.type == game.QuestType.common_unique and info.min_level <= chr_level then
quest.clear(user.cptr, id)
q = q + 1
end
end
end
if q > 0 then
quest.update(user.cptr)
user:SendNotiPacketMessage(string.format("恭喜: %d个支线/普通任务清理 成功!", q))
else
user:SendNotiPacketMessage("注意: 支线/普通任务清理 失败!")
dpx.item.add(user.cptr, item_id)
end
end -- 成就任务完成
item_handler = function(user, item_id)
local quest = dpx.quest
local lst = quest.all(user.cptr)
local chr_level = user:GetCharacLevel()
local q = 0
for i, v in ipairs(lst) do
local id = v
local info = quest.info(user.cptr, id)
if info then
if not info.is_cleared and info.type == game.QuestType.achievement and info.min_level <= chr_level then
quest.clear(user.cptr, id)
q = q + 1
end
end
end
if q > 0 then
quest.update(user.cptr)
user:SendNotiPacketMessage(string.format("恭喜: %d个成就任务清理 成功!", q))
else
user:SendNotiPacketMessage("注意: 成就任务清理 失败!")
dpx.item.add(user.cptr, item_id)
end
end 自顶,在线等 你自己拿着dp里任务代码对照你的pvf里面的任务改就是了 顶 有人吗 那以前的dp能用吗?能用的话可以等下次更新,我现在换回之前的dp了 你这列表嘎嘎写了一堆排除任务的ID 结果下面三个完成券的代码部分没有这个evade_lst 列表的循环检查语句 所以结论:排除了个寂寞 至于你说主线任务完成券能排除 盲猜你写的那些个排除的列表里面的任务没有一个是主线任务类型大部分估计是普通任务类型以及成就任务类型 所以后面那俩完成券肯定会完成这些任务
想问一下大佬使用了任务完成券但是魂图啥都开不了是不是坏档了得重新建了,显示有任务但是进去一片空白,选不了地图,
求求救救孩子吧!
页:
[1]