当前位置:首页>>攻略文章>>正文
暗影盗贼的斩击解决办法及两个懒人宏
2013-11-22 15:28:46 作者:玩家 来源: 浏览次数:0
摘要:两个懒人宏,自动选取一个最近非死亡的敌对目标
 自动选取一个最近非死亡的敌对目标,潜行就[伏击]、不潜行战斗状态就[毒伤]、不潜行不战斗上[栗色马],并消耗没有消耗的星释放[切割]
 #showtooltip [noform,nocombat]栗色马;[form:1]伏击; [noform,combat]毒伤
/targetenemy [noexists][help][dead]
/cast [noform,nocombat]切割
/cast [noform,nocombat]栗色马
/cast [form:1]伏击
/cast [noform,combat]毒伤 
 
自动选取一个最近非死亡的敌对目标,潜行就[闷棍]、不潜行战斗状态就[毁伤]、不潜行不战斗就释放[潜行]
 #showtooltip
/targetenemy [noexists][help][dead]
/cast [noform,nocombat]!潜行
/cast [form:1]闷棍
/starattack [noform,combat]
/cast [noform,combat]毁伤 
 
 
 
---------- // 血量<36变红色 // ----------目标头像血条变红色
 
Code (c):
 
local function colour(statusbar, unit) 
if UnitExists(unit) and UnitIsConnected(unit) and unit == statusbar.unit then 
if UnitHealth(unit) < UnitHealthMax(unit) * .36 then 
statusbar:SetStatusBarColor(1,0,0) 
end 
end 
end 
hooksecurefunc("UnitFrameHealthBar_Update", colour) 
hooksecurefunc("HealthBar_OnValueChanged", function(self) colour(self, self.unit) end)
 
 
---------------// 血量 <36提示 //----------------- 目标血量小于36的法术警报(那个闪电)
 
Code (c):
 
if select(2, UnitClass("player")) ~= "ROGUE" then 
        return 
end 
local f = CreateFrame("frame","yxDispatch_frame",UIParent) 
f:SetScript("OnEvent", function(self, event, ...) if self[event] then return self[event](self, event, ...) end end)
 local isShown = false 
local TimerOnUpdate = function(self, time) 
        if UnitName("target") and UnitGUID("target") and UnitCanAttack("player", "target") then
                 self.OnUpdateCounter = (self.OnUpdateCounter or 0) + time 
                if self.OnUpdateCounter < 0.05 then return end 
                self.OnUpdateCounter = 0 
                if UnitIsDeadOrGhost("target") then 
                        isShown = false 
                        SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame, 111240)
                         f:SetScript("OnUpdate", nil) 
                        return 
                end 
                local percent = UnitHealth("target") / UnitHealthMax("target") * 100
                 if percent <= 36 and isShown == false then 
                        isShown = true 
                        SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame, 111240, "TEXTURES\\SPELLACTIVATIONOVERLAYS\\slice_and_dice.blp", "LEFT", 0.8, 255, 255, 255, false, false)
                 elseif percent <= 36 and isShown == true then 
 
                else 
                        isShown = false 
                        SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame, 111240)
                 end 
        else 
                SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame, 111240)
                 f:SetScript("OnUpdate", nil) 
                isShown = false 
                return 
        end 
         
end 
function f:PLAYER_LOGIN() 
        f:RegisterEvent("PLAYER_TARGET_CHANGED") 
        self:UnregisterEvent("PLAYER_LOGIN") 
        self.PLAYER_LOGIN = nil 
end 
function f:PLAYER_TARGET_CHANGED() 
        if UnitName("target") and UnitGUID("target") and UnitIsEnemy("player", "target") then
                 isShown = false 
                f:SetScript("OnUpdate", TimerOnUpdate) 
        end 
end 
if IsLoggedIn() then f:PLAYER_LOGIN() else f:RegisterEvent("PLAYER_LOGIN") end
 
 
---------------// 效果图 //-----------------


相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度