求教个Bee自定义函数的问题
function BFT()local ce1 = "碎手狂战士"
local ce2 = "狂战"
local ce3 = "老猫"
local bft= UnitName("target")
return bft == ce1 or bft == ce2 or bft == ce3
end
if BFT() then
print ("1")
end
请教大佬们个问题哈 有没有什么办法直接整合ce1 ce2 ce3 而不是单独分开写?
比如ce = "老猫, 碎手,XX,XX"
然后我只要return bft = ce一次就可以了 判断当前怪是我要找的怪 分开写太繁琐了 求教了 本帖最后由 vshrd 于 2022-11-27 02:59 PM 编辑
function isname()
local name={"a","b","c"}
for k,v in paris(name) do
if v==UnitName("target") then
return true
end
end
return false
end
if isname() then
print(1)
end
感谢大佬受教了{:5_236:}{:5_236:}{:5_236:}{:5_236:}{:5_236:}{:5_236:} 楼上正解。。正好来支持下刷点伸手!
页:
[1]