|
楼主 |
发表于 2019-2-27 14:17:00
|
显示全部楼层
本帖最后由 kkfromch@tj 于 2019-2-27 15:44 编辑
第十一步:战斗时嗑药设置
这个是job.lua里——
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.4 and cbw_cur>0 then--内力小于40%,优先嗑川贝丸!
exe('eat '.. drug.neili2)
end
if hp.neili<hp.neili_max*0.3 and hqd_cur>0 then--内力小于30%,再嗑黄芪丹!
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.1 and nxw_cur>0 then--内力小于10%,嗑内息丸!
exe('eat '.. drug.neili1)
end
-------
至此,所有设定完毕!三种内力药可以轮番使用了!
大家使用过程中,如果有任何问题,请随时回帖!
------
差点忘记了,最后还要设置iset药品购买列表,还是回到shujian.lua
function drugSet()
drugPrepare={}
local t={
["内息丸"] = "内息丸",
["川贝内息丸"] = "川贝内息丸",
["黄芪内息丹"] = "黄芪内息丹",--添加三种药品名称,然后在iset里选定即可!
["蝉蜕金疮药"] = "蝉蜕金疮药",
["活血疗精丹"] = "活血疗精丹",
["大还丹"] = "大还丹",
["火折"] = "火折",
["牛皮酒袋"] = "牛皮酒袋",
} |
|