|
========================
huashan_cut=function()
DeleteTimer('huashan_killheqi')
EnableTriggerGroup("huashan_fight",false)
EnableTriggerGroup("huashan_find",false)
DeleteTriggerGroup("huashan_cut")
create_trigger_t('huashan_cut1','^(> )*你将(\\D*)的尸体扶了起来背在背上。','','huashan_cut_con')
create_trigger_t('huashan_cut2','^(> )*(乱切别人杀的人干嘛啊|你手上这件兵器无锋无刃|你得用件锋利的器具才能切下这尸体的头来)','','huashan_cut_weapon')
SetTriggerOption("huashan_cut1","group","huashan_cut")
SetTriggerOption("huashan_cut2","group","huashan_cut")
create_trigger_t('huashan_cut3','^(> )*只听“咔”的一声,你将(\\D*)的首级斩了下来,提在手中。','','huashan_cut_con')
SetTriggerOption("huashan_cut3","group","huashan_cut")
job.killer={}
fight.time.e=os.time()
fight.time.over=fight.time.e-fight.time.b
messageShowT('华山任务:战斗用时:【'..fight.time.over..'】秒,搞定蒙面人:【'..job.target..'】。')
road.id=nil --搜索结束的房间很大可能不是你的任务地点,交任务的go函数会认为你还在第一步的road.id,计算路径返程,这里地点就存在问题了,而且locate定位函数并不会更新road.id,所以偶尔会发呆。
return check_halt(huashan_cut_act)
end
====================
由于一开始我直接替换了切,所以导致1和3的位置变了,不过不影响,添加背尸体描述 执行 huashan_cut_con
huashan_cut_con=function(n,l,w)
if tostring(w[2]) ~= job.target then
exe('drop corpse 2')
else
exe('drop corpse 2')
EnableTimer('huashan_beishixia',false) --关闭计时器
DeleteTimer('huashan_beishixia') --删除计时器
huashan_beishix=0 --背尸体成功,设置判断所需变量为零
DeleteTriggerGroup("all_fight")
kezhiwugongclose()
exe('pfmset')
flag.find=1
if job.target~=tostring(w[2]) then
exe('drop corpse')
return check_halt(huashan_cut_act)
else
EnableTriggerGroup("huashan_cut",false)
return go(huashan_yls,'华山','祭坛')
end
end
end
=======================
这个就是背尸体的判断了,由于尸体不能多背--(会被喷的,我喷了别的背尸侠好久,终于下决心让与其喷人还不如让别人喷我),所以想要判断是不是自己的任务怪尸体,这里把上面触发语句中第二个括号的内容tostring(w[2])和任务抢令牌的蒙面人名字job.target进行比对,如果不是自己的任务怪,那么丢掉第二具尸体,如果成功,返回去交任务。接下来看看怎么去成为背尸侠
huashan_cut_act=function()
DeleteTimer('perform')
if string.find(job.where,"绝情谷大室") or string.find(job.where,"绝情谷小室") then --如果任务地点是绝情谷,换成切头模式
--weapon_unwield() --由于我不需要换武器,关闭了
--weaponWieldCut()
exe('wield chungou sword;uweapon shape chungou sword')
for i=1,2 do --原来是5
exe('halt;get ling pai from corpse '..i) --切头必须先拿令牌,不然尸体就被踢飞了
exe('qie corpse '..i)
end
else --不需要考虑负重的情况下,开始背尸侠操作
exe('get corpse;get ling pai from corpse') --直接拿corpse,然后拿身上corpse的令牌
end
return check_halt(huashan_qiecorpse) --由于会遇到类似铁掌帮众这些存在,有时候不能qie 头成功,或者战斗中给busy了,所以开始备胎
end
以前古墓有坐骑,转派到大轮寺之后我关闭了一个月的绝情谷大室小室,这里出问题会饿死,而且是切头的情况下,别提拿的是corpse了,所以还是切头好。
function huashan_qiecorpse() --这个程序也是直接就刷下来的,如果已经拿到尸体或者头,就不会执行了,因为程序已经跳转去找岳灵珊
if string.find(job.where,"绝情谷大室") or string.find(job.where,"绝情谷小室") then
exe('wield chungou sword;uweapon shape chungou sword')
for i=1,2 do
exe('qie corpse '..i)
exe('qie corpse '..i)
end
end
print('开启背尸侠预防计时器')
create_timer_s('huashan_beishixia',2,'huashan_beishixia') --打开计时器,开始背尸侠之旅,执行huashan_beishixia函数2秒一次
end
function huashan_beishixia()
huashan_beishix= huashan_beishix or 0 --定义一个变量huashan_beishix,如果值为空无状态,初始化为0
print('huashan_beishix'..huashan_beishix)
if huashan_beishix < 3 then --当这个值小于3的时候
huashan_beishix = huashan_beishix + 1 --增加1
print(huashan_beishix)
if string.find(job.where,"绝情谷大室") or string.find(job.where,"绝情谷小室") then --兵分两路,如果需要考虑绝情谷的负重问题
exe('wield chungou sword;uweapon shape chungou sword;qie corpse;qie corpse 2') --执行切头,或许可以考虑加上拿令牌指令在前面,保险一点
else
exe('get corpse;get ling pai from corpse;drop corpse 2') --还是安心当背尸侠好,丢下第二具尸体(如果有的话)
end
else --好了,经过几次尝试,我们可能已经拿不到正确的尸体了,被别的背尸侠折磨了,这时候huashan_beishix < 3已经不存在了
print('又被华山背尸侠折磨了!')
return huashanFindFail() --那就回去痛快的放弃任务吧
end
end
另外,搜索head,在需要给head的地方添加给尸体命令,在需要drop head的地方添加drop corpse命令,这里就不写了
|
评分
-
2
查看全部评分
-
|