您的位置:首页 > 其它

士宏—一键自动上DOT

2006-05-09 15:13 459 查看
术士宏:一键自动上DOT
这个宏出自MF官方站,是一个牛人写的。我略汉化了一下,希望对大家有帮助。特别适合出了虹吸和诅咒增幅的术士。

注意:使用这个宏需要supermacro插件的支持,下载地址:http://www.thewow.cn/soft/1159.html

功能介绍:
1.自动check目标身上的DEBUFF。
2.如果没有虹吸就上虹吸,如果没有腐蚀就上腐蚀,如果没有痛苦就上痛苦(自动使用诅咒增幅),如果没有献祭就上献祭。

另外有一处需要修改:

local start, duration = GetSpellCooldown(163, SpellBookFrame.bookType);
if (duration <= 0) then
CastSpellByName("诅咒增幅");

里面的“163”是我自己的诅咒增幅在法书书里的位置,需要运行以下宏

/script for id = 1, 180, 1 do local spellName, subSpellName = GetSpellName(id, SpellBookFrame.bookType);if spellName and string.find(spellName, "诅咒增幅", 1, true) then ChatFrame1:AddMessage("ID is "..id, 1.0, 1.0, 0.5); end; end;

用得到的数字来替换。

====================小分割线========================
以下内容复制到supermacro右侧的LUA编辑框内,并保存。

function ScanDebuffs()
if UnitExists("target") then
local i=1;
HasCOA=0;
HasCorruption=0;
HasImmolate=0;
HasSiphon=0;
while UnitDebuff("target", i) do
GameTooltipTextLeft1:SetText(nil);
GameTooltip:SetUnitDebuff("target",i);
local DebuffName = GameTooltipTextLeft1:GetText();
if DebuffName == "痛苦诅咒" then
HasCOA = 1;
elseif DebuffName == "腐蚀术" then
HasCorruption = 1;
elseif DebuffName == "献祭" then
HasImmolate = 1;
elseif DebuffName == "生命虹吸" then
HasSiphon = 1;
end
i = i + 1;
end
end
end

function CastDebuffs()
if UnitExists("target") then
if HasSiphon == 0 then
CastSpellByName("生命虹吸(等级 4)");
elseif HasCorruption == 0 then
CastSpellByName("腐蚀术(等级 6)");
elseif HasCOA == 0 then
local start, duration = GetSpellCooldown(163, SpellBookFrame.bookType);
if (duration <= 0) then
CastSpellByName("诅咒增幅");
else
CastSpellByName("痛苦诅咒(等级 6)");
end
elseif HasImmolate == 0 then
CastSpellByName("献祭(等级 7)");
end
end
end

==========================继续的分割线=====================

以下内容复制到左侧的宏编辑框并保存。

/script ScanDebuffs(); CastDebuffs();

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: