没有学习的技能不能加入ifelse判断吗?魔蜂
自认为代码的逻辑是没有问题的,但是就是卡壳了,如果单写 if else 是可行的..
无法使用,因为还没学邪甲术
--#################自动补BUFF##################
local p_mana = 20 --法力值
if BeePlayerBuffTime("邪甲术")<1 and BeeUnitMana("player","%",0)>=p_mana and BeeIsRun("/cast 邪甲术") then
BeeRun("/cast 邪甲术")
elseif BeePlayerBuffTime("魔甲术")<1 and BeeUnitMana("player","%",0)>=p_mana and BeeIsRun("/cast 魔甲术") then
BeeRun("/cast 魔甲术")
elseifBeePlayerBuffTime("恶魔皮肤")<1 and BeeUnitMana("player","%",0)>=p_mana and BeeIsRun("/cast 恶魔皮肤") then
BeeRun("/cast 恶魔皮肤")
end
单独就是有效的..
local p_mana = 20 --法力值
if BeePlayerBuffTime("魔甲术")<1 and BeeUnitMana("player","%",0)>=p_mana and BeeIsRun("/cast 魔甲术") then
BeeRun("/cast 魔甲术")
end
我也遇到过这个没法运行……我就单独写了…… 本帖最后由 yangjiayizu 于 2023-3-15 03:53 PM 编辑
可能是BeeIsRun的问题,你不行把这个换成冷却的函数应该好用。buff类的用BeeIsRun经常不好用 官方的库有相关的函数可以判断技能是否已学习 这多简单,还是逻辑问题,第二条你加上BeePlayerBuffTime("邪甲术")<1,第三条加BeePlayerBuffTime("邪甲术")<1 and BeePlayerBuffTime("恶魔皮肤")<1不就行了,只要条件达到其中一个就会施放你已经学了的护盾
页:
[1]