更新代码, 这次可以 改 剧情任务,小鬼,鬼王,修罗
1. 代码中有开启关闭剧情模式, 开启后可以直接飞任务所在地. NPC为 白无常
2.其他任务请关闭剧情模式.
3.小鬼任务,鬼王任务,NPC为 阎罗殿的魔族使者,其他任务npc为白无常.
4.接任务后,点击执行.切换场景到npc处.选最后一个选项开始飞.
5.注意: 一定要接任务后,点击执行,执行后一定要切换地图,如:钟馗处到魔族使者,因为换地图修改的信息才能生效
6.代码中有注释 修改任务次数,如: local c = 6, 意思就是如果任务小于6次,则任务次数改成6次,
如果不想修改,请设置 task_count = 1
代码如下:
return targetDo([==[
-- '开启任务模式' = true
-- '关闭任务模式' = false
local jq_open = false
-- '修改的任务次数'
local task_count = 6
local task_event_table = _G['通用数据']['任务事件表']
local map_envent_table = _G['通用数据']['地图事件表']
local task_type = ''
_G['控制台']['服务配置']['expRatio'] = 1
local data = {}
local rt = '修改传送 地点 \n'
local task_type = ''
local task = {}
local ID = 0
local x = 0
local y = 0
local map_name = ''
for map_id,map_tab in pairs(task_event_table) do
for ind,tab in pairs(map_tab) do
map_name = tab['地图名']
local pos = tab['坐标']
task_type = tab['任务类别']
x = pos[1]
y = pos[2]
ID = map_id
rt = rt ..'地图下的任务'.. ind .. ' tab 地图名='.. map_name ..'\t'
rt = rt .. '地图ID ='.. ID .. '\t'
rt = rt .. 'x=' ..x ..' y=' ..y .. '\n'
end
end
if jq_open then
local jq = _G['控制台']['主角']['临时数据']['剧情信息']
x = jq['坐标'][1]
y = jq['坐标'][2]
ID = jq['map']
map_name = jq['地图名']
task_type = '剧情任务'
end
task_map = {}
if task_type == '修罗任务' or task_type == '剧情任务' then
-- '轮回司'
task_map = _G['场景事件表'][4001]
else
-- '阎王殿'
task_map = _G['场景事件表'][4002]
end
for ind,p_tab in pairs(task_map) do
if task_type == '小鬼任务' or task_type == '鬼王任务' then
if p_tab['名称'] == '魔族使者' then
c = p_tab['选项']
c[3] = {'-------------------------','取消'}
c[4] = {'小鬼任务:'.. map_name .. ' x:' ..x .. ' y:' .. y,
'传送',
{ID,map_name,x,y}
}
rt = rt .. '修改完毕' .. ' 地图名: ' .. map_name .. ' x:' ..x .. ' y:' .. y
end
else
if p_tab['名称'] == '白无常' then
c = p_tab['选项']
c[7] = {'-----------------------','取消'}
c[8] = {task_type .. map_name .. ' x:' .. x .. ' y:'.. y ,
'传送',
{ID,map_name,x,y}
}
rt = rt .. '修改完毕' .. ' 地图名: ' .. map_name .. ' x:' ..x .. ' y:' .. y
end
end
end
if jq_open == false then
task = _G['控制台']['主角']['任务轮次'][task_type]
if task['次数'] < task_count then
_G['控制台']['主角']['_防改数据包'] = nil
task['次数'] = task_count
rt = rt .. '\n修改任务次数为 '..task['次数']..' 次'
end
end
return rt
]==])