纳克萨玛斯NAXX,战神帕奇维克,治疗副坦克插件,一键无脑流。

localizations.lua

local AppName = ...
local AL = LibStub("AceLocale-3.0")
local L = AL:NewLocale(AppName, "enUS", true)
L.ADDON_NAME="PatchwerkHeal"
L.LoadInfo = "PatchwerkHeal Loaded"
L.UnLoadInfo = "PatchwerkHeal UnLoaded"
L["PatchwerkHeal_TOGGLE_TEXT"] = "click to open/close the PW Heal Frame"
L["ShowPatchwerkHeal"]="open the PW Heal assist,use mouse right key to drag the frame"
L["HidePatchwerkHeal"]="close the PW Heal assist"
L["Not Setting"]="No Target setted"
L["CannotModifyInCombat"]="Cannot in combat"
L["level"]="level"
L["HelpTips"]="Select target,then drap skill to PW frame,if no target ,the drag can clear the setting."L = AL:NewLocale(AppName, "zhCN")
if L thenL.ADDON_NAME="帕奇维克又来陪我们玩"L.LoadInfo= "|cff1eff00帕奇维克又来陪我们玩|r 已装载\nBy 一只傻安安@班尔法克斯"L["PatchwerkHeal_TOGGLE_TEXT"] = "点击以开启/关闭PW治疗框体"L["ShowPatchwerkHeal"]="开启帕奇维克治疗助手,右键移动框体"L["HidePatchwerkHeal"]="关闭帕奇维克治疗助手"L["Not Setting"]="未设置有效目标"L["CannotModifyInCombat"]="战斗中无法修改"L["level"]="等级"L["HelpTips"]="PW框体:选中目标,拖动设置的技能到PW治疗框体,不选中目标的拖曳可以清除当前选择。"
end

PatchwerkHeal.lua

local AppName = ...
local L = LibStub("AceLocale-3.0"):GetLocale(AppName)
PatchwerkHeal=LibStub("AceAddon-3.0"):NewAddon("PatchwerkHeal", "AceConsole-3.0","AceEvent-3.0","AceTimer-3.0")
PatchwerkHeal.Active=false
PatchwerkHeal.Debug=false
--PatchwerkHeal:UnregisterAllEvents()local function DPrint(...)if PatchwerkHeal.Debug thenprint(...)end
end
local spellRankTableData = {[1] = { 774, 8936, 5185, 740, 635, 19750, 139, 2060, 596, 2061, 2054, 2050, 1064, 331, 8004, 136, 755, 689, 746 },[2] = { 1058, 8938, 5186, 8918, 639, 19939, 6074, 10963, 996, 9472, 2055, 2052, 10622, 332, 8008, 3111, 3698, 699, 1159 },[3] = { 1430, 8939, 5187, 9862, 647, 19940, 6075, 10964, 10960, 9473, 6063, 2053, 10623, 547, 8010, 3661, 3699, 709, 3267 },[4] = { 2090, 8940, 5188, 9863, 1026, 19941, 6076, 10965, 10961, 9474, 6064, 913, 10466, 3662, 3700, 7651, 3268 },[5] = { 2091, 8941, 5189, 1042, 19942, 6077, 22009, 25314, 25316, 10915, 939, 10467, 13542, 11693, 11699, 7926 },[6] = { 3627, 9750, 6778, 3472, 19943, 6078, 10916, 959, 10468, 13543, 11694, 11700, 7927, 23569, 24412 },[7] = { 8910, 9856, 8903, 10328, 10927, 10917, 8005, 13544, 11695, 10838 },[8] = { 9839, 9857, 9758, 10329, 10928, 10395, 10839, 23568, 24413 },[9] = { 9840, 9858, 9888, 25292, 10929, 10396, 18608 },[10] = { 9841, 9889, 25315, 25357, 18610, 23567, 24414 },[11] = { 25299, 25297, 30020 },
}local function make_class_prefix(classid)local classid2color={"|cFFC79C6E","|cFFF58CBA","|cFFA9D271","|cFFFFF569","|cFFFFFFFF","|cFFC41F3B","|cFF0070DE","|cFF40C7EB","|cFF8787ED","|cFF00FF96","|cFFFF7D0A","|cFFA330C9"}return classid2color[classid]
endlocal SpellIDToRank = {}
for rankIndex, spellIDTable in pairs(spellRankTableData) dofor _, spellID in pairs(spellIDTable) doSpellIDToRank[spellID] = rankIndexend
endfunction PatchwerkHeal:BuildFrame()--DPrint("buldFrame")local texture_str = "Interface\\TARGETINGFRAME\\UI-StatusBar"if not PatchwerkHealFrame thenPatchwerkHealFrame=CreateFrame("Button", "myMacroButton", UIParent, "SecureActionButtonTemplate")PatchwerkHealFrame:SetAttribute("type1", "macro") -- left click causes macroPatchwerkHealFrame.bg = PatchwerkHealFrame:CreateTexture(nil,"BACKGROUND", nil, -5)PatchwerkHealFrame.bg:SetTexture(texture_str)PatchwerkHealFrame.bg:SetVertexColor(0,0.1,0,0.8)PatchwerkHealFrame.bg:SetAllPoints(PatchwerkHealFrame)print('/script print("'..L["HelpTips"]..'")')PatchwerkHealFrame:SetAttribute("macrotext1",'/script print("'..L["HelpTips"]..'")') PatchwerkHealFrame:SetMovable(true)PatchwerkHealFrame:SetSize(100,60)PatchwerkHealFrame:SetPoint("TOPLEFT",0,-10)PatchwerkHealFrame:EnableMouse(true)PatchwerkHealFrame:RegisterForDrag("RightButton")PatchwerkHealFrame:SetScript("OnDragStart", PatchwerkHealFrame.StartMoving)PatchwerkHealFrame:SetScript("OnDragStop", PatchwerkHealFrame.StopMovingOrSizing)PatchwerkHealFrame.HPTip = PatchwerkHealFrame:CreateFontString(nil, "ARTWORK", "GameTooltipTextSmall");PatchwerkHealFrame.HPTip:SetAllPoints( PatchwerkHealFrame)PatchwerkHealFrame.HPTip:SetTextColor(1,1,0)PatchwerkHealFrame.HPTip:SetText(L["Not Setting"])PatchwerkHealFrame:SetScript("OnReceiveDrag",function()if InCombatLockdown() thenprint(L["CannotModifyInCombat"])returnendlocal ret={GetCursorInfo()}if ret[1]=="spell" thenlocal dragtype,spellIndex, bookType, spellID=ret[1],ret[2],ret[3],ret[4]local level=SpellIDToRank[spellID]if level thenlevel="("..L["level"].." "..level..")"elselevel=""endlocal spellName=GetSpellInfo(spellID)local guid,playername = UnitGUID("target"), UnitName("target")local classFilename, classId = UnitClassBase("target")--DPrint(playername,guid,classId,spellID,level)if guid and spellName thenlocal type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-",guid);if type=="Player" thenDPrint("/cast "..'[@"' .. playername .. '",help,nodead] '..spellName..level)PatchwerkHealFrame.playername=playernamePatchwerkHealFrame.playerid=guidPatchwerkHealFrame:SetAttribute("macrotext1", "/cast ".."[@" .. playername .. ",help,nodead] "..spellName..level)PatchwerkHealFrame.TipText=("%s%s|r\n%s"):format(make_class_prefix(classId),PatchwerkHealFrame.playername,spellName..level)PatchwerkHealFrame.HPTip:SetText(PatchwerkHealFrame.TipText)PatchwerkHeal:UNIT_HEALTH("UNIT_HEALTH","target")--PatchwerkHealFrame.HPTip:SetText(PatchwerkHealFrame.playername.."\n"..spellName..level)ClearCursor()endelsePatchwerkHealFrame.playername=nilPatchwerkHealFrame.playerid=nilPatchwerkHealFrame.TipText=""PatchwerkHealFrame:SetAttribute("macrotext1",'/script print("'..L["HelpTips"]..'")') PatchwerkHealFrame.HPTip:SetText(L["Not Setting"])if PatchwerkHealMask thenPatchwerkHealMask.bar:SetValue(0)endClearCursor()endendend) PatchwerkHealFrame:Hide()end
--Mask Frameif not PatchwerkHealMask thenPatchwerkHealMask=CreateFrame("frame",nil)PatchwerkHealMask:SetFrameLevel(2)PatchwerkHealMask:SetSize(100,60)PatchwerkHealMask.maskbg=PatchwerkHealMask:CreateTexture(nil,"ARTWORK", nil,1)PatchwerkHealMask:EnableMouse(false)PatchwerkHealMask.maskbg:SetTexture(texture_str)PatchwerkHealMask.maskbg:SetVertexColor(0.8,0.1,0.1,0.0)PatchwerkHealMask.maskbg:SetAllPoints(PatchwerkHealMask)local border_texture_str = "Interface\\Tooltips\\UI-StatusBar-Border"  local border_texture1=PatchwerkHealMask:CreateTexture(nil,"BORDER")border_texture1:SetPoint("TOPLEFT",-3,3)border_texture1:SetSize(96,16)border_texture1:SetTexture(border_texture_str)PatchwerkHealMask.bar=CreateFrame("StatusBar",nil,PatchwerkHealMask)PatchwerkHealMask.bar:SetMinMaxValues(0,100)PatchwerkHealMask.bar:SetValue(0)PatchwerkHealMask.bar:SetStatusBarTexture(texture_str,"BACKGROUND", nil,3)PatchwerkHealMask.bar:SetStatusBarColor(0.1,0.8,0,0.85)PatchwerkHealMask.bar:SetSize(90,10)PatchwerkHealMask.bar:SetPoint("TOPLEFT",PatchwerkHealMask,"TOPLEFT",0,0)PatchwerkHealMask:SetAllPoints(PatchwerkHealFrame)endPatchwerkHealMask:Hide()
endfunction PatchwerkHeal:Toggle(force)if InCombatLockdown() thenprint(L["CannotModifyInCombat"])returnendif self:IsEnabled() and force~="Enable" thenself:Disable()elseif (not self:IsEnabled()) and force~="Disable" thenself:Enable()end
end
function PatchwerkHeal:SetupDataBroker()local LDB = LibStub('LibDataBroker-1.1')local PatchwerkHealLauncher = LDB:NewDataObject('PatchwerkHeal', {type = 'launcher',icon = "Interface\\Icons\\INV_Mace_15",label = L["PatchwerkHeal_TOGGLE_TEXT"],OnClick = function()return self:Toggle()end,OnTooltipShow = function(tt)tt:AddLine(L["PatchwerkHeal_TOGGLE_TEXT"])end,OnLeave = GameTooltip_Hide,})LibStub('LibDBIcon-1.0'):Register('PatchwerkHeal', PatchwerkHealLauncher,{ hide = false,radius = 110,})
end
--event
local function parseGUID(gid)if gid==nil thenreturn nil,nilendlocal type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-", gid or "")return npc_id,spawn_uid
end
function PatchwerkHeal:CombatLogEvent(timestamp, eventtype, hideCaster, srcGUID, srcName, srcFlags, srcRaidFlags, dstGUID, dstName, dstFlags, dstRaidFlags, ...)local direct_damage={["SWING_DAMAGE"]=1,["RANGE_DAMAGE"]=4,["SPELL_DAMAGE"]=4,["SPELL_PERIODIC_DAMAGE"]=4,["DAMAGE_SPLIT"]=4}local npc_id,spawn_uid=parseGUID(dstGUID)local do_damage=0if PatchwerkHealFrame.playerid~=nil and PatchwerkHealFrame.playerid==dstGUID then--DPrint(eventtype,srcName,dstName,...)if eventtype=="SPELL_HEAL" then--local data={...}--DPrint(("|cFFF58CBAHeal:%s:%d|r"):format(data[2],data[4]-data[5]))elseif eventtype=="SPELL_PERIODIC_HEAL" then--local data={...}--DPrint(("|cFFF58CBAHot:%s:%d|r"):format(data[2],data[4]-data[5]))elseif eventtype=="SPELL_DAMAGE" thenlocal data={...}if (data[2]=="仇恨打击" or data[2]=="寒冰箭") thenDPrint(GetTime(),(":|cFFFFF569:%s:%d|r"):format(data[2],data[4]))PatchwerkHealMask.maskbg:SetVertexColor(0.1,0.1,0.1,0.0)PlaySound(5275)PatchwerkHealMask:EnableMouse(false)C_Timer.After(1, function() DPrint(GetTime(),":","Disable")PatchwerkHealMask.maskbg:SetVertexColor(0.8,0.1,0.1,0.6)PatchwerkHealMask:EnableMouse(true) end)endelseif direct_damage[eventtype]~=nil thenelseif eventtype=="UNIT_DIED" thenend    endend
function PatchwerkHeal:UNIT_HEALTH(event,uid)--DPrint(uid)if PatchwerkHealFrame.playerid~=nil and PatchwerkHealFrame.playerid==UnitGUID(uid) and PatchwerkHealMask.bar then-- DPrint(UnitHealth(uid))-- if UnitHealth(uid)>=UnitHealthMax(uid) then-- PatchwerkHealMask:EnableMouse(true)-- else-- PatchwerkHealMask:EnableMouse(false)-- endlocal health_rate=UnitHealth(uid)*100/UnitHealthMax(uid)if health_rate<=30 thenPatchwerkHealMask.bar:SetStatusBarColor(0.8,0.1,0,0.85)elseif health_rate<=70 thenPatchwerkHealMask.bar:SetStatusBarColor(0.7,0.7,0,0.85)elsePatchwerkHealMask.bar:SetStatusBarColor(0.1,0.8,0,0.85)endPatchwerkHealMask.bar:SetValue(UnitHealth(uid)*100/UnitHealthMax(uid))end
end
function PatchwerkHeal:COMBAT_LOG_EVENT_UNFILTERED()PatchwerkHeal:CombatLogEvent(CombatLogGetCurrentEventInfo())
endfunction PatchwerkHeal:PLAYER_REGEN_ENABLED()if PatchwerkHealMask thenPatchwerkHealMask.maskbg:SetVertexColor(0.1,0.1,0.1,0.0)PatchwerkHealMask:EnableMouse(false)   end
end
function PatchwerkHeal:PLAYER_REGEN_DISABLED()if PatchwerkHealMask thenPatchwerkHealMask.maskbg:SetVertexColor(0.9,0.2,0.2,0.6)PatchwerkHealMask:EnableMouse(true)  end
endfunction PatchwerkHeal:OnInitialize()self:BuildFrame()self:SetEnabledState(false)self:SetupDataBroker()self:Print(L["LoadInfo"])
endfunction PatchwerkHeal:OnEnable()DPrint("Enable")if PatchwerkHealFrame thenPatchwerkHealFrame:Show()PatchwerkHealMask:Show()self:Print(SELECTED_CHAT_FRAME,L["ShowPatchwerkHeal"])self.timerCount=0 PatchwerkHeal.Active=true              PatchwerkHeal:RegisterEvent("UNIT_HEALTH")PatchwerkHeal:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")PatchwerkHeal:RegisterEvent("PLAYER_REGEN_ENABLED")PatchwerkHeal:RegisterEvent("PLAYER_REGEN_DISABLED")endendfunction PatchwerkHeal:OnDisable()DPrint("Disable")if PatchwerkHealFrame thenPatchwerkHealFrame:Hide()PatchwerkHealMask:Hide()PatchwerkHealMask:EnableMouse(false)self:Print(SELECTED_CHAT_FRAME,L["HidePatchwerkHeal"])PatchwerkHeal.Active=falsePatchwerkHeal:UnregisterEvent("UNIT_HEALTH")PatchwerkHeal:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")PatchwerkHeal:UnregisterEvent("PLAYER_REGEN_ENABLED")PatchwerkHeal:UnregisterEvent("PLAYER_REGEN_DISABLED")endend

PatchwerkHeal.toc

## Interface: 11302
## Title: PatchwerkHeal
## Title-zhCN: |cff1eff00帕奇维克又来陪我们玩|r
## Notes: Oracle开发组
## Author: 一只傻安安
## Version: 0.1
## SavedVariables: PatchwerkHeal_DB
## OptionalDeps: LibStub, CallbackHandler-1.0,AceAddon-3.0, AceDB-3.0, AceEvent-3.0,AceLocale-3.0
## DefaultState: disabledlocalizations.lua
PatchwerkHeal.lua

1:解压文件,其实里面就三个lua脚本文件,这些不用管

:2:放到wow安装插件目录下,是整个文件夹拷贝进去,本例的目录是:D:\World of Warcraft\_classic_\Interface\AddOns

大家根据自己安装的根目录查找下_classic_\Interface\AddOns

怀旧服的_classic_

文件目录注意下:

如果不对的,把这三个文件拷贝进去也可以的

实在不知道,就新建文件夹【PatchwerkHeal】

D:\World of Warcraft\_classic_\Interface\AddOns\PatchwerkHeal

3:登录游戏,角色列表,左下方插件(前提要安装下大脚插件)

很明显,我得创建个奶妈号,用我以前朋友名字纪念下:“小德的追逐”

鼠标右键可以把这个 【小方框】 拖动到自己习惯的位置上。

重点::::

锁定下目标不然等下,点点点点,给自己加血了!!!目标是你的副坦克,不然要罚款了哦。。。。

PatchwerkHeal相关推荐

最新文章

  1. slf4j 如何返回堆栈_重学JS系列 - JS 调用堆栈
  2. FEKO V7.0安装教程
  3. GIS工具篇(二):GIS最全数据下载指南
  4. 华为项目Tree canvas画图2
  5. python设置单元格宽度_Python xlwt-访问现有单元格内容,自动调整列宽
  6. 网页服务器攻击,WEB服务器攻击分析全过程_91Ri.org
  7. cisco帧中继实验
  8. 兔子数列规律怎么讲_“完美的几何学者,以斐波那契数列分割战场。”你是否能答出诸葛亮黄金分割率台词里暗藏问题的答案!...
  9. android hardware解析
  10. 求职季到来,你还在原地踏步吗?
  11. 学习大数据需要哪些数学知识?
  12. OpenCV读取海康4G摄像头
  13. Android Studio 3.4.1(3.5.2)入门教程( 2019.12.14修订)
  14. Mac配置python wind量化接口
  15. 如何承接软件外包项目
  16. linux内核内存管理slub
  17. TF-IDF算法详解与实践
  18. 【ECharts系列|03可视化大屏】大数据管理平台实时展示
  19. JS实现点赞变亮与取消点赞变灰样式
  20. OSError: pydot failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensur

热门文章

  1. 如何在html中快速的做出锚点图效果
  2. 无需手机热点的树莓派的初始化
  3. ubuntu下创建管理员权限的账户
  4. 突发!百度总裁张亚勤宣布退休
  5. ajax--->请求异常 jQuery提示parsererror错误解决办法
  6. 运动服饰品牌Champion(R)再次推出拳王阿里胶囊系列新品
  7. 【Hack The Box】linux练习-- Previse
  8. 公司中午开了周年庆典
  9. 2021-10-26 下划线转化为小驼峰
  10. pyzbar+uiautomation(实现扫码进入微信大学习)