[Lua] 纯文本查看 复制代码
local IsBehind = BeeGetVariable("IsBehind")
if IsBehind=="你必须位于目标背后。" then
BeeRun("影袭","target")
else
BeeRun("背刺","target")
end
F = F or CreateFrame("Frame")
F:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
F:SetScript("OnEvent", function(_,_,_,a,_,b,_,_,_,_,_,_,_,c)
if a=="SPELL_CAST_FAILED" and b==UnitName("player") and c=="你必须位于目标背后。" then
BeeSetVariable("IsBehind", c)
F:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
end
if a=="SPELL_CAST_SUCCESS" and c==nil and b==UnitName("player") then
BeeSetVariable("IsBehind", c)
end
end)
用判断事件实现的。
写的不是很通顺,运行起来没问题,也没什么东西,就不收费了。
|