本帖最后由 abc110 于 2023-8-9 05:33 编辑
最下面有视频可以看,下面是简单教程,供有能力的WOWER去改装,
我平时比较忙,不一定有时间回答得上,以及做特定的插件,或宏,这些由有能力的高手继续自由发挥了。
插件:
这个宏查找对应的技能代码,因为1.12的是按角色的技能书序号做编码,可能会因为学习了新的技能导致技能ID发生变化,请自行检测。
- /script local s,i,n="邪恶攻击",1;while 1 do n=GetSpellName(i,"spell");if n then if strfind(n,s) then ChatFrame1:AddMessage(i);break;end;i=i+1;else break;end;end;
复制代码 抽筋判断条件
- function CastSpell()
- local p, c, b, i, f = GetComboPoints(); -- 获取玩家的连击点数,并将它们存储在本地变量p,c,b,i和f中。
- -- 循环遍历玩家的增益效果(buffs),检查是否存在一个名字中包含"DualWield"的增益效果。
- for i = 1, 16 do
- b = UnitBuff("player", i); -- 获取玩家单位(角色)在索引i处的增益效果信息。
- if b and strfind(b, "DualWield") then -- 检查增益效果是否存在,并且它是否包含"DualWield"。
- f = 1; -- 将f设置为1,表示玩家拥有"DualWield"增益效果。
- break; -- 早早地退出循环,因为我们找到了"DualWield"增益效果。
- end;
- end;
- if p > 0 and not f then -- 检查玩家是否有连击点数(p > 0),并且没有"DualWield"增益效果(not f)。
- return "兴奋"; -- 返回字符串"兴奋"。
- elseif p == 5 and f then -- 检查玩家是否有5个连击点数(p == 5),并且有"DualWield"增益效果(f为true)。
- return "剔骨"; -- 返回字符串"剔骨"。
- else
- -- 如果以上条件不满足,则检查"鬼魅攻击"法术(动作ID为50)是否可用,不处于冷却状态,并且玩家的法力值足够(>=40)。
- if IsUsableAction(50) and GetSpellCooldown(50, "spell") == 0 and UnitMana("player") >= 40 then
- return "鬼魅攻击"; -- 返回字符串"鬼魅攻击"。
- end;
- -- 如果以上条件不满足,则检查玩家的法力值是否足够(>=40),并返回"邪恶攻击"。
- if UnitMana("player") >= 40 then
- return "邪恶攻击"; -- 返回字符串"邪恶攻击"。
- end
- -- 如果以上条件都不满足,则检查"还击"法术(动作ID为37)是否可用,不处于冷却状态,并且玩家的法力值足够(>=10)。
- if IsUsableAction(37) and GetSpellCooldown(37, "spell") == 0 and UnitMana("player") >= 10 then
- return "还击"; -- 返回字符串"还击"。
- end;
- end;
- end
复制代码 抽筋执行宏
- /Equip 安图苏尔之手
- /script tsx=CastSpell() if (tsx) then CastSpellByName(tsx);end
复制代码
我是这样的天赋
------------------------------------分割线---------------------------------------------
超级科技盗贼FARM宏。
思路:自动下马,潜行,智能换主匕首,伏击,智能换主剑,兴奋,智能打还击,鬼魅攻击,邪恶,(看情况,卡一个切割),继续一个循环。
需要下载ClassicMacros 经典简化宏 插件
因为乌龟采用的是1.12的端,在界面上有很多判断的BUG,比如反击,单纯属用自带的IsUsableAction是无法判断的,因为在法术书里,均为启亮的状态。
启亮状态
实际判断的要为非启亮状态。
那问题来了!那如何解决这个问题呢?
正确答案:创建一个简单的执行功能宏,
然后拖放到按键槽里,记注这个位置。
利用ClassicMacros 的IsUsableAction判断这个按键是否可用,ClassicMacros 里有很多的一些命令,想进阶的,自己自行学习。
- local canhj,_=IsUsableAction(3,"player");
- if canhj and GetSpellCooldown(38, "spell") == 0 and UnitMana("player") >= 10 then
- return "还击";
- end
复制代码比如这样,IsUsableAction后面的3 就是上述按键3了,至于38 是法术书的还击技能ID,技能ID会因为洗天赋等情况,改变而改变,要注意更新!!!
自行替换这些武器的名称,自动会在背包里查找武器
主手武器潜行状态
zswqQX = "断肠";
副手武器潜行状态
fswqQX = "迅击匕首";
主手武器非潜行状态
zswqNQX = "安图苏尔之手";
副手武器非潜行状态
fswqNQX = "迅击匕首";
- LoadAddOn("ClassicMacros")
- function CastRun()
- CastXWG();
- local tsx = CastSpellx();
- if tsx and tsx ~= "" then
- CastSpellByName(tsx);
- end
- end
- function CastXWG()
- local i, b;
- for i = 1, 16 do
- b = UnitBuff("player", i);
- if b and (strfind(b, "speedy") or strfind(b, "RidingHorse")) then
- CastQHWQ(1);
- if strfind(b, "speedy") then
- CastSpellByName("骑乘乌龟");
- else
- CastSpellByName("白马");
- end
- break;
- end
- end
- end
- function CastQHWQ2(mainHand, offHand)
- local mhEquipped = GetInventoryItemLink("player", 16);
- local ohEquipped = GetInventoryItemLink("player", 17);
- if not strfind(mhEquipped, mainHand) or not strfind(ohEquipped, offHand) then
- PickupInventoryItem(GetInventorySlotInfo("MainHandSlot"));
- PickupInventoryItem(GetInventorySlotInfo("SecondaryHandSlot"));
- end
- end
- function CastQHWQ(a1)
- local zswqQX, fswqQX, zswqNQX, fswqNQX, zswq, fswq;
- zswqQX = "断肠";
- fswqQX = "痛击之刃";
- zswqNQX = "痛击之刃";
- fswqNQX = "断肠";
- if a1 == 1 then
- zswq, fswq = zswqQX, fswqQX;
- else
- zswq, fswq = zswqNQX, fswqNQX;
- end
- if zswqQX == fswqNQX and fswqQX == zswqNQX then
- return CastQHWQ2(zswq, fswq);
- end
- local mainHandName = GetInventoryItemLink("player", 16);
- local b, s, l;
- if strfind(mainHandName , zswq) then
- for b = 0, 4 do
- for s = 1, 18 do
- l = GetContainerItemLink(b, s);
- if l and strfind(l, zswq) then
- PickupContainerItem(b, s);
- PickupInventoryItem(16);
- break;
- end
- end
- end
- end
- mainHandName = GetInventoryItemLink("player", 17);
- if strfind(mainHandName , fswq ) then
- for b = 0, 4 do
- for s = 1, 18 do
- l = GetContainerItemLink(b, s);
- if l and strfind(l, fswq) then
- PickupContainerItem(b, s);
- PickupInventoryItem(17);
- break;
- end
- end
- end
- end
- end
- function CastSpellx()
- local p, c, b, i, f = GetComboPoints();
- local a, a1,bftime, _;
- for i = 1, 16 do
- b = UnitBuff("player", i);
- if b and strfind(b, "Stealth") then
- a1 = 1;
- break;
- end
- end
- if not UnitAffectingCombat("player") then
- if a1 then
- CastQHWQ(1);
- _, _, a = GetShapeshiftFormInfo(1);
- return "伏击";
- end
- if not a then
- if GetSpellCooldown(46, "spell") == 0 then
- CastQHWQ(1);
- return "潜行";
- else
- print("潜行法术CD中");
- return nil;
- end
- end
- else
- if a1 and UnitMana("player") >= 60 then
- CastQHWQ(1);
- return "伏击";
- end
- CastQHWQ(0);
- for i = 1, 16 do
- b = UnitBuff("player", i);
- if b and strfind(b, "DualWield") then
- f = 1;
- bftime= GetPlayerBuffTimeLeft(i)
- break;
- end
- end
- if p > 0 and not f then
- return "兴奋";
- elseif p > 0 and f and bftime>=4 and UnitMana("player")>=25 then
- return "切割";
- else
- if IsUsableAction(51) and GetSpellCooldown(51, "spell") == 0 and UnitMana("player") >= 45 then
- return "鬼魅攻击";
- end
- local canhj,_=IsUsableAction(3,"player");
- if canhj and GetSpellCooldown(38, "spell") == 0 and UnitMana("player") >= 10 then
- return "还击";
- end
- if UnitMana("player") >= 45 then
- return "邪恶攻击";
- end
- end
- end
- return nil;
- end
复制代码
- 以下附件需要回复 1 次可见,已回复 0 次
- 1、QQ录屏20230809053041~1.mp4 23.67MB 已下载 212 次
- 2、ClassicMacros.rar 10KB 已下载 23 次
- 3、QQ录屏20230807112557~1.mp4 32.84MB 已下载 261 次
- 4、QQ录屏20230806173342~1.mp4 10.57MB 已下载 433 次
- 5、SuperMacro.rar 40KB 已下载 28 次
|
|