找回密码
 注册
搜索
楼主: liumaisj@tj

三种内力药完美服用解决方案!

[复制链接]
门派:天龙寺
发表于 2019-3-1 20:44:32 | 显示全部楼层
解决了,我最初的job.lua漏掉了这一句:print("heqi="..heqi),现在可以用了,谢谢
门派:明教
发表于 2019-3-1 23:59:07 | 显示全部楼层
drug.neili不要覆盖掉,给他赋值一个药品即可
门派:丐帮
发表于 2019-3-2 17:57:08 | 显示全部楼层
prepare_neili_idle=function()
   local l_cnt=0
   local l_db=3/2

   for p in pairs(skills) do
       if skillEnable[p] and skillEnable[p]=="force" then
          tmp.fskill=p
          break
       end
   end
   if perform.force then
      tmp.fskill=perform.force
   end

   if ((hp.neili_max>hp.neili_lim-20 and score.party and score.party=="峨嵋派") or hp.neili_max>=hp.neili_lim-5 or flag.jixu==1 or skills[tmp.fskill].full==0) and hp.neili>hp.neili_max*l_db then
      if hp.neili>hp.neili_max*7/4 then
         l_cnt=l_cnt + math.modf((hp.neili-hp.neili_max*7/4)/10)
      end
      l_cnt=l_cnt + math.modf(hp.neili_max/300)
      if l_cnt<1 then l_cnt=1 end
      lianxi(l_cnt)
   end
   if score.gold and score.gold>1000 and hp.neili<hp.neili_max*0.5 then
      exe('eat '.. drug.neili)
   end

无法,发现一个报错的地方,涂红的这句要改掉。不然wd任务会卡住。
门派:丐帮
发表于 2019-3-2 18:03:46 | 显示全部楼层
   create_trigger_t('fight12',"^(> )*你(的内力太少|现在内力太弱|现在真气|现在内力不|的内力不|内力现在不够|目前内力太少|的真气不足,无法|的真气不足以|发现自己现在真气太弱|真气太弱|的真气不够!)",'','fightDrug')

还有这句触发对应的函数
function fightDrug()
    if isInBags(drug.neili) then
       exe('eat '.. drug.neili)
    end
end

也需要改掉,对应的drug.neili现在是个空的变量了。
门派:丐帮
发表于 2019-3-2 18:07:38 | 显示全部楼层
function fightHpCheck()
    --if score.party and score.party=="峨嵋派" and hp.qixue_per<75 then
    --   exe('yun yinyang')
    --end
    --if score.party and score.party=="峨嵋派" and hp.qixue_per<40 then
    --   exe('yield yes;fu '..drug.heal..';yield no')
    --end
    --if score.party and score.party=="神龙教" and hp.qixue_per<50 then
    --   exe('yun wudi '.. score.id)
    --end
        if hp.qixue_per<50 and cty_cu>0 then
       exe('eat chantui yao')
    end
        if (hp.qixue / (hp.qixue_max / hp.qixue_per ) < 35) and cty_cur>0 then
       exe('eat chantui yao')
    end
    if hp.qixue<hp.qixue_max*0.7 then
       exe('yun qi')
    end
    if hp.jingxue<hp.jingxue_max*0.5 then
       exe('yun jing')
    end
        if hp.neili<hp.neili_max*0.5 and nxw_cur>0 then
       exe('eat '.. drug.neili)
    end
    if hp.jingli<hp.jingli_max*0.5 or hp.jingli<500 then
       exe('yun jingli')
    end
end

还有这个函数里面的drug.neili也是个空的变量了。
门派:姑苏慕容
发表于 2019-3-2 18:08:04 | 显示全部楼层
honglian@tj 发表于 2019-3-2 18:03
create_trigger_t('fight12',"^(> )*你(的内力太少|现在内力太弱|现在真气|现在内力不|的内力不|内力现 ...

改成3即可了吧..........
门派:姑苏慕容
发表于 2019-3-2 18:09:49 | 显示全部楼层
honglian@tj 发表于 2019-3-2 18:03
create_trigger_t('fight12',"^(> )*你(的内力太少|现在内力太弱|现在真气|现在内力不|的内力不|内力现 ...

还有蝶梦楼也有哦.找找看
门派:丐帮
发表于 2019-3-2 18:10:37 | 显示全部楼层
ooxx@tj 发表于 2019-3-2 18:08
改成3即可了吧..........

我是改成drug.neili2了,还在测试,不知道是不是还有其他问题。

函数fightHpCheck里面的if hp.neili<hp.neili_max*0.5 and nxw_cur>0 then
也要改掉,吃的是哪个内力药,就改成对应的变量,不然背囊药丸存量会有问题。
门派:丐帮
发表于 2019-3-2 18:12:47 | 显示全部楼层
ooxx@tj 发表于 2019-3-2 18:09
还有蝶梦楼也有哦.找找看

我也是今天早上改完之后挂机测试偶然发现的。突然发现正神任务每小时挂机效率下降4~5K,查了LOG才发现的,这几个地方不改会在宋远桥那里卡住报错。
门派:姑苏慕容
发表于 2019-3-2 18:13:56 | 显示全部楼层
honglian@tj 发表于 2019-3-2 18:10
我是改成drug.neili2了,还在测试,不知道是不是还有其他问题。

函数fightHpCheck里面的if hp.neili0  ...

不用了吧,checkbags是会刷新的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|书剑永恒MUD ( 闽ICP备14012032号|闽公网安备 35050202000162号 )

GMT+8, 2025-6-9 13:45 , Processed in 0.030203 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表