找回密码
 注册
搜索
查看: 294|回复: 3

怎么设置气血上限低于40就放弃JOB

[复制链接]
门派:明教
发表于 2021-4-7 16:10:33 | 显示全部楼层 |阅读模式
function hp_heqi_check(n,l,w)
    heqi = tonumber(w[1])
    print("heqi="..heqi)
if hp.qixue_per<35 and dhd_cur>0 then
    exe('fu dahuan dan')
end
if hp.qixue_per<70 and cty_cur>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 cbw_cur>0 then
       exe('eat '.. drug.neili2)
    end
        if hp.neili<hp.neili_max*0.1 and hqd_cur>0 then
       exe('eat '.. drug.neili3)
    end
    if hp.jingli<hp.jingli_max*0.5 or hp.jingli<500 then
       exe('yun jingli')
    end
   if hp.neili<hp.neili_max*0.05 and nxw_cur>0 then
       exe('eat '.. drug.neili1)
    end
        if job.name=='pk' or job.name=='diemenglou' then
           pk_heqi_control()
    end
这个是JOB.LUA 里面的气血变化吃药的,怎么设置气血低于40就放弃JOB 回去?
门派:铁掌帮
发表于 2021-4-8 16:43:01 | 显示全部楼层
气血上限低于90左右应该机器人就自动去薛神医哪里疗伤了,不用管吧
门派:明教
 楼主| 发表于 2021-4-8 18:01:32 | 显示全部楼层
公版机器不会 好像要低于70 才去呢
门派:明教
 楼主| 发表于 2021-4-8 18:02:14 | 显示全部楼层
我说的是战斗中气血上限低于40 就放弃任务,这个代码怎么设置?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-4 20:49 , Processed in 0.027728 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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