local _, _, _, _, _, _, _, _, spellID = GetSpellInfo(spellName)
if IsSpellBlocked(spellID, target) then
return false -- 目标免疫,不执行技能
else
CastSpellByName(spellName, target)
return true -- 技能成功施放
end
end
while true do
-- 检查目标是否在攻击范围内
local inRange = IsSpellInRange("攻击技能", "target")
if not inRange then
AttackStop()
return
end
-- 尝试施放撕裂,如果目标免疫则跳过
if not CastSpellIfNotImmune("撕裂", "target") then
-- 目标免疫撕裂,跳过
else
-- 撕裂成功施放
end
-- 尝试施放断筋,如果是Boss或免疫则跳过
if UnitIsBoss("target") or not CastSpellIfNotImmune("断筋", "target") then
-- 目标是Boss或免疫断筋,跳过
else
-- 断筋成功施放
end
-- 其他攻击技能
-- ...
AttackStop() -- 停止自动攻击,防止重复攻击
return
end
自己删掉注释就行 fuqianmeng 发表于 2024-4-16 05:33 PM
一般这种小概率的。。最好就手动了
我也是这么解决的, 但是总觉得不够智能 2050115 发表于 2025-5-25 09:10 AM
local function CastSpellIfNotImmune(spellName, target)
local _, _, _, _, _, _, _, _, spellID =...
兄弟啊,AI写的不能当真啊 再有就是目标已经眩晕了不在执行嘲讽!{:5_250:}
页:
1
[2]