求插件大师帮忙调个caelnametidyplates汉化!!!

:: 求caelNameplates姓名板加百分比的代码,望高手赐之 ::
求caelNameplates姓名板加百分比的代码,望高手赐之
5.04的caelNameplates显示百分比的代码在5.1已经不能用了,求高人路过的赐之,应该好多人想要来着
同求。。。。
[color=red]红色注释部分[/color](lua语句行数由于用的是以前的lua文件应该有出入 自己找找吧 [s:25] )第一个部分56.self.healthBar:SetStatusBarColor(self.r, self.g, self.b)[color=royalblue]之后添加[/color]self.healthBar.hp:SetText(self.healthBar:GetValue()) [color=red]--血量[/color]self.healthBar.hp2:SetText((math.floor(self.healthBar:GetValue()/select(2, self.barFrame:GetChildren():GetMinMaxValues())*100))..&%&) [color=red]--百分比[/color](self.barFrame:GetChildren()为5.1更新)第二个部分109.self.name:SetText(newName)[color=blue]之后添加[/color]self.healthBar.hp:SetText(self.healthBar:GetValue()) [color=red]--血量[/color]self.healthBar.hp2:SetText((math.floor(self.healthBar:GetValue()/select(2, self.barFrame:GetChildren():GetMinMaxValues())*100))..&%&) [color=red]--百分比[/color](self.barFrame:GetChildren()为5.1更新)第三个部分224.healthBar.hpGlow:SetBackdropBorderColor(0, 0, 0)[color=darkblue]之后添加[/color] [color=red]-- 血量设置位置颜色字体等[/color]
healthBar.hp= frame:CreateFontString()
healthBar.hp:SetPoint(&LEFT&, healthBar, &RIGHT&, -2, 1)
healthBar.hp:SetFont(font, 8, &Outline&)
healthBar.hp:SetTextColor(0.84, 0.75, 0.65) [color=red]-- 百分比设置位置颜色字体等[/color]
healthBar.hp2= frame:CreateFontString()
healthBar.hp2:SetPoint(&CENTER&, healthBar, &CENTER&, 0, 1)
healthBar.hp2:SetFont(font, 8, &Outline&)
healthBar.hp2:SetTextColor(0.84, 0.75, 0.65) [color=red]附图:[/color][img]./mon_/367_50c4ca9351f19.png[/img]
高人终于出现了,替大家谢谢了
[quote][pid=]Reply[/pid] [b]Post by titan9-12-10 01:11):[/b][color=red]红色注释部分[/color](lua语句行数由于用的是以前的lua文件应该有出入 自己找找吧 [s:25] )第一个部分56.self.healthBar:SetStatusBarColor(self.r, self.g, self.b)[color=royalblue]之后添加[/color]self.healthBar.hp:SetText(self.healthBar:GetValue()) [color=red]--血量[/color]self.healthBar.hp2:SetText((math.floor(self.healthBar:GetValue()/select(2, self.barFrame:GetChildren():GetMinMaxValues())*100))..&%&) [color=red]--百分比[/color](self.barFrame:GetChildren()为5.1更新)第二个部分109...[/quote]跪求大大放包...我在wowinterface下的最新版的...按照你的方法改..进魔兽直接卡死...求破~~~
[quote][pid=]Reply[/pid] [b]Post by 天翼龙少 ( 02:14):[/b]跪求大大放包...我在wowinterface下的最新版的...按照你的方法改..进魔兽直接卡死...求破~~~[/quote]包我就不放了 我也是在interface下的最新以下是caelNameplates.lua 代码,我修改了下,还以以前的版本看得舒服[code]]--[[
$Id: caelNameplates.lua -30 11:03:27Z
]] local _, caelNameplates = ... caelNameplates.eventFrame = CreateFrame(&Frame&, nil, UIParent) if not IsAddOnLoaded(&caelCore&) then
SetCVar(&bloattest&, 0) -- 1 might make nameplates larger but it fixes the disappearing ones.
SetCVar(&bloatnameplates&, 0) -- 1 makes nameplates larger depending on threat percentage.
SetCVar(&bloatthreat&, 0) -- 1 makes nameplates resize depending on threat gain/loss. Only active when a mob has multiple units on its threat table. end local barTexture = caelMedia.files.statusBarC local iconTexture = caelMedia.files.buttonNormal local raidIcons = caelMedia.files.raidIcons local overlayTexture = [=[Interface\Tooltips\Nameplate-Border]=] local font, fontSize, fontOutline = caelMedia.fonts.CAELNAMEPLATE_FONT, 8 local select = select local pixelScale = caelLib.scale local UpdateTime = function(self, curValue)
local minValue, maxValue = self:GetMinMaxValues()
if self.channeling then
self.time:SetFormattedText(&%.1f &, curValue)
self.time:SetFormattedText(&%.1f &, maxValue - curValue)
end end local ThreatUpdate = function(self, elapsed)
self.elapsed = self.elapsed + elapsed
if self.elapsed &= 0.2 then
if not self.oldglow:IsShown() then
self.healthBar.hpGlow:SetBackdropBorderColor(0, 0, 0)
local r, g, b = self.oldglow:GetVertexColor()
if g + b == 0 then
self.healthBar.hpGlow:SetBackdropBorderColor(1, 0, 0)
self.healthBar.hpGlow:SetBackdropBorderColor(1, 1, 0)
self.healthBar:SetStatusBarColor(self.r, self.g, self.b) self.healthBar.hp:SetText(self.healthBar:GetValue()) --血量 self.healthBar.per:SetText((math.floor(self.healthBar:GetValue()/select(2, self.barFrame:GetChildren():GetMinMaxValues())*100))..&%&) --百分比(self.barFrame:GetChildren()为5.1更新)
self.elapsed = 0
end end local UpdatePlate = function(self)
local r, g, b = self.healthBar:GetStatusBarColor()
local newr, newg, newb
if g + b == 0 then
-- Hostile unit
newr, newg, newb = 0.69, 0.31, 0.31
self.healthBar:SetStatusBarColor(0.69, 0.31, 0.31)
elseif r + b == 0 then
-- Friendly unit
newr, newg, newb = 0.33, 0.59, 0.33
self.healthBar:SetStatusBarColor(0.33, 0.59, 0.33)
elseif r + g == 0 then
-- Friendly player
newr, newg, newb = 0.31, 0.45, 0.63
self.healthBar:SetStatusBarColor(0.31, 0.45, 0.63)
elseif 2 - (r + g) & 0.05 and b == 0 then
-- Neutral unit
newr, newg, newb = 0.65, 0.63, 0.35
self.healthBar:SetStatusBarColor(0.65, 0.63, 0.35)
-- Hostile player - class colored.
newr, newg, newb = r, g, b
self.r, self.g, self.b = newr, newg, newb
self.healthBar:ClearAllPoints()
self.healthBar:SetPoint(&CENTER&, self.healthBar:GetParent())
self.healthBar:SetHeight(pixelScale(5))
self.healthBar:SetWidth(pixelScale(100))
self.healthBar.hpBackground:SetVertexColor(self.r * 0.33, self.g * 0.33, self.b * 0.33, 0.75)
self.castBar.IconOverlay:SetVertexColor(self.r, self.g, self.b)
self.castBar:ClearAllPoints()
self.castBar:SetPoint(&TOP&, self.healthBar, &BOTTOM&, 0, pixelScale(-4))
self.castBar:SetHeight(pixelScale(3))
self.castBar:SetWidth(pixelScale(100))
self.highlight:ClearAllPoints()
self.highlight:SetAllPoints(self.healthBar)
local oldName = self.oldname:GetText()
local newName = (string.len(oldName) & 20) and string.gsub(oldName, &%s?(.[\128-\191]*)%S+%s&, &%1. &) or oldName -- &%s?(.)%S+%s&
self.name:SetText(newName)
local level, elite, mylevel = tonumber(self.level:GetText()), self.elite:IsShown(), UnitLevel(&player&)
self.level:ClearAllPoints()
self.level:SetPoint(&RIGHT&, self.healthBar, &LEFT&, pixelScale(-2), 0)
if self.boss:IsShown() then
self.level:SetText(&??&)
self.level:SetTextColor(0.8, 0.05, 0)
self.level:Show()
elseif not elite and level == mylevel then
self.level:Hide()
self.level:SetText(level..(elite and &+& or &&))
end end local FixCastbar = function(self)
self.castbarOverlay:Hide()
self:SetHeight(pixelScale(3))
self:ClearAllPoints()
self:SetPoint(&TOP&, self.healthBar, &BOTTOM&, 0, pixelScale(-4)) end local ColorCastBar = function(self, shielded)
if shielded then
self:SetStatusBarColor(0.8, 0.05, 0)
self.cbGlow:SetBackdropBorderColor(0.75, 0.75, 0.75)
self.cbGlow:SetBackdropBorderColor(0, 0, 0)
end end local OnSizeChanged = function(self, width, height)
if floor(height) ~= 3 then
self.needFix = true
end end local OnShow = function(self)
self.channeling
= UnitChannelInfo(&target&)
if self.needFix then
FixCastbar(self)
if floor(self:GetHeight()) ~= 3 then --
print(&b) wrong size &..floor(self:GetHeight()))
ColorCastBar(self, self.shieldedRegion:IsShown())
self.IconOverlay:Show() end local OnValueChanged = function(self, curValue)
UpdateTime(self, curValue)
if self.needFix then
FixCastbar(self)
if floor(self:GetHeight()) ~= 5 then --
print(&c) wrong size &..floor(self:GetHeight()))
self.needFix = nil
end end local OnHide = function(self)
self.highlight:Hide()
self.healthBar.hpGlow:SetBackdropBorderColor(0, 0, 0) end local OnEvent = function(self, event, unit)
if unit == &target& then
if self:IsShown() then
ColorCastBar(self, event == &UNIT_SPELLCAST_NOT_INTERRUPTIBLE&)
end end local CreatePlate = function(frame)
frame.barFrame, frame.nameFrame = frame:GetChildren()
frame.healthBar, frame.castBar = frame.barFrame:GetChildren()
local healthBar, castBar = frame.healthBar, frame.castBar
local glowRegion, overlayRegion, highlightRegion, levelTextRegion, bossIconRegion, raidIconRegion, stateIconRegion = frame.barFrame:GetRegions()
local _, castbarOverlay, shieldedRegion, spellIconRegion = castBar:GetRegions()
local nameTextRegion = frame.nameFrame:GetRegions()
frame.oldname = nameTextRegion
nameTextRegion:Hide()
local newNameRegion = frame:CreateFontString()
newNameRegion:SetPoint(&BOTTOMLEFT&, healthBar, &TOPLEFT&, 0, pixelScale(2))
newNameRegion:SetFont(font, fontSize, fontOutline)
newNameRegion:SetTextColor(0.84, 0.75, 0.65)
newNameRegion:SetShadowOffset(1.25, -1.25)
frame.name = newNameRegion
frame.level = levelTextRegion
levelTextRegion:SetFont(font, fontSize, fontOutline)
levelTextRegion:SetShadowOffset(1.25, -1.25)
healthBar:SetStatusBarTexture(barTexture)
healthBar.hpBackground = healthBar:CreateTexture(nil, &BACKGROUND&)
healthBar.hpBackground:SetAllPoints()
healthBar.hpBackground:SetTexture(barTexture)
healthBar.hpGlow = CreateFrame(&Frame&, nil, healthBar)
healthBar.hpGlow:SetFrameLevel(healthBar:GetFrameLevel() -1 & 0 and healthBar:GetFrameLevel() -1 or 0)
healthBar.hpGlow:SetPoint(&TOPLEFT&, healthBar, &TOPLEFT&, pixelScale(-2), pixelScale(2))
healthBar.hpGlow:SetPoint(&BOTTOMRIGHT&, healthBar, &BOTTOMRIGHT&, pixelScale(2), pixelScale(-2))
healthBar.hpGlow:SetBackdrop(caelMedia.backdropTable)
healthBar.hpGlow:SetBackdropColor(0, 0, 0, 0)
healthBar.hpGlow:SetBackdropBorderColor(0, 0, 0)
healthBar.hp = frame:CreateFontString(nil, 'ARTWORK')
healthBar.hp:SetPoint(&LEFT&, healthBar, &RIGHT&, 5, 1)
healthBar.hp:SetFont(font, fontSize, Outline) --
healthBar.hp:SetTextColor(0.84, 0.75, 0.65)
healthBar.per= frame:CreateFontString(nil, &OVERLAY&)
healthBar.per:SetPoint(&BOTTOMLEFT&, healthBar, &TOPRIGHT&, 4, 4)
healthBar.per:SetFont(font, fontSize, Outline) --
healthBar.per:SetTextColor(0.84, 0.75, 0.65)
castBar.castbarOverlay = castbarOverlay
castBar.healthBar = healthBar
castBar.shieldedRegion = shieldedRegion
castBar:SetStatusBarTexture(barTexture)
castBar:HookScript(&OnShow&, OnShow)
castBar:HookScript(&OnSizeChanged&, OnSizeChanged)
castBar:HookScript(&OnValueChanged&, OnValueChanged)
castBar:HookScript(&OnEvent&, OnEvent)
castBar:RegisterEvent(&UNIT_SPELLCAST_INTERRUPTIBLE&)
castBar:RegisterEvent(&UNIT_SPELLCAST_NOT_INTERRUPTIBLE&)
castBar.time = castBar:CreateFontString(nil, &ARTWORK&)
castBar.time:SetPoint(&RIGHT&, castBar, &LEFT&, pixelScale(-2), 0)
castBar.time:SetFont(font, fontSize, fontOutline)
castBar.time:SetTextColor(0.84, 0.75, 0.65)
castBar.time:SetShadowOffset(1.25, -1.25)
castBar.cbBackground = castBar:CreateTexture(nil, &BACKGROUND&)
castBar.cbBackground:SetAllPoints()
castBar.cbBackground:SetTexture(barTexture)
castBar.cbBackground:SetVertexColor(0.25, 0.25, 0.25, 0.75)
castBar.cbGlow = CreateFrame(&Frame&, nil, castBar)
castBar.cbGlow:SetFrameLevel(castBar:GetFrameLevel() -1 & 0 and castBar:GetFrameLevel() -1 or 0)
castBar.cbGlow:SetPoint(&TOPLEFT&, castBar, pixelScale(-2), pixelScale(2))
castBar.cbGlow:SetPoint(&BOTTOMRIGHT&, castBar, pixelScale(2), pixelScale(-2))
castBar.cbGlow:SetBackdrop(caelMedia.backdropTable)
castBar.cbGlow:SetBackdropColor(0, 0, 0, 0)
castBar.cbGlow:SetBackdropBorderColor(0, 0, 0)
castBar.HolderA = CreateFrame(&Frame&, nil, castBar)
castBar.HolderA:SetFrameLevel(castBar.HolderA:GetFrameLevel() + 1)
castBar.HolderA:SetAllPoints()
spellIconRegion:ClearAllPoints()
spellIconRegion:SetParent(castBar.HolderA)
spellIconRegion:SetPoint(&LEFT&, castBar, pixelScale(8), 0)
spellIconRegion:SetSize(pixelScale(15), pixelScale(15))
castBar.HolderB = CreateFrame(&Frame&, nil, castBar)
castBar.HolderB:SetFrameLevel(castBar.HolderA:GetFrameLevel() + 2)
castBar.HolderB:SetAllPoints()
castBar.IconOverlay = castBar.HolderB:CreateTexture(nil, &OVERLAY&)
castBar.IconOverlay:SetPoint(&TOPLEFT&, spellIconRegion, pixelScale(-1.5), pixelScale(1.5))
castBar.IconOverlay:SetPoint(&BOTTOMRIGHT&, spellIconRegion, pixelScale(1.5), pixelScale(-1.5))
castBar.IconOverlay:SetTexture(iconTexture)
highlightRegion:SetTexture(barTexture)
highlightRegion:SetVertexColor(0.25, 0.25, 0.25)
frame.highlight = highlightRegion
raidIconRegion:ClearAllPoints()
raidIconRegion:SetPoint(&RIGHT&, healthBar, pixelScale(-8), 0)
raidIconRegion:SetSize(pixelScale(15), pixelScale(15))
raidIconRegion:SetTexture(raidIcons)
frame.oldglow = glowRegion
frame.elite = stateIconRegion
frame.boss = bossIconRegion
glowRegion:SetTexture(nil)
overlayRegion:SetTexture(nil)
shieldedRegion:SetTexture(nil)
castbarOverlay:SetTexture(nil)
stateIconRegion:SetTexture(nil)
bossIconRegion:SetTexture(nil)
UpdatePlate(frame)
frame:SetScript(&OnShow&, UpdatePlate)
frame:SetScript(&OnHide&, OnHide)
frame.elapsed = 0
frame:SetScript(&OnUpdate&, ThreatUpdate) end local CheckFrames = function(num, ...)
for i = 1, num do
local frame = select(i, ...)
if frame:GetName() and frame:GetName():find(&NamePlate%d&) and not frame.done then
CreatePlate(frame)
frame.done = true
end end local numKids = 0 local lastUpdate = 0 caelNameplates.eventFrame:SetScript(&OnUpdate&, function(self, elapsed)
lastUpdate = lastUpdate + elapsed
if lastUpdate & 0.1 then
local newNumKids = WorldFrame:GetNumChildren()
if newNumKids ~= numKids then
CheckFrames(newNumKids, WorldFrame:GetChildren()) --[[
for i = numKids + 1, newNumKids do
local frame = select(i, WorldFrame:GetChildren())
if frame:GetName() and frame:GetName():find(&NamePlate%d&) then
CreatePlate(frame)
numKids = newNumKids
lastUpdate = 0
end end) caelNameplates.eventFrame:SetScript(&OnEvent&, function(self, event, ...)
if type(self[event]) == &function& then
return self[event](self, event, ...)
end end) function caelNameplates.eventFrame:PLAYER_REGEN_ENABLED()
SetCVar(&nameplateShowEnemies&, 0) end function caelNameplates.eventFrame:PLAYER_REGEN_DISABLED()
SetCVar(&nameplateShowEnemies&, 1) end caelNameplates.eventFrame:RegisterEvent(&ADDON_LOADED&) function caelNameplates.eventFrame:ADDON_LOADED(event, addon)
if addon and addon:lower() == &caelnameplates& then
if not caelNameplatesDB then
caelNameplatesDB = {autotoggle = true}
caelNameplates.settings = caelNameplatesDB
if caelNameplates.settings.autotoggle then
self:RegisterEvent(&PLAYER_REGEN_ENABLED&)
self:RegisterEvent(&PLAYER_REGEN_DISABLED&)
end end SlashCmdList[&caelNameplates&] = function(parameters)
if parameters == &auto& then
local newsetting = not caelNameplates.settings.autotoggle
caelNameplates.settings.autotoggle = newsetting
local func = newsetting and &RegisterEvent& or &UnregisterEvent&
caelNameplates.eventFrame[func](caelNameplates.eventFrame, &PLAYER_REGEN_ENABLED&)
caelNameplates.eventFrame[func](caelNameplates.eventFrame, &PLAYER_REGEN_DISABLED&)
print(&Auto toggling of nameplates based on combat state & .. (caelNameplates.settings.autotoggle and &|cff00ff00enabled|r.& or &|cffff0000disabled|r.&))
end end SLASH_caelNameplates1 = &/caelnameplates& [/code]
[b]Reply to [pid=]Reply[/pid] Post by 天翼龙少 ( 02:14)[/b][color=blue]我把我的lua传上来 你看看吧 [s:25] [/color]
可用,多谢分享。
caelNameplates 能显示自己的DOT吗?
caelNameplates 能显示自己的DOT吗?
[quote][pid=]Reply[/pid] [b]Post by 不夜城的流氓 ( 00:33):[/b]caelNameplates 能显示自己的DOT吗?[/quote]不能 ,外加Platebuffs
谢谢titan90921和qcriser,我想把血量改成****K的形式而不是具体数值,请帮忙,再次感谢。
[b]Reply to [pid=]Reply[/pid] Post by qcriser ( 00:36)[/b]能不能把名字居中显示
还有 我的这个血条总是不显示 进战斗才有这是肿么了。
[quote][pid=]Reply[/pid] [b]Post by diyuhuo ( 16:22):[/b]能不能把名字居中显示
还有 我的这个血条总是不显示 进战斗才有这是肿么了。[/quote]newNameRegion:SetPoint(&BOTTOM&, healthBar, &CENTER&, 0, 5)
--这里0,5就是名字坐标,我在五楼图片就是调到居中了血条你要想一直者显示的话把从caelNameplates.eventFrame:SetScript(&OnEvent&, function(self, event, ...)开始到最后一段都注释掉 然后进游戏后shift+v一直显示就行
[b]Reply to [pid=]Reply[/pid] Post by 原石 ( 15:47)[/b]我移花接木 找到
local ThreatUpdate = function(self, elapsed)在
上面加两段[code]function round(num, idp)
if idp and idp & 0 then
local mult = 10^idp
return math.floor(num * mult + 0.5) / mult
return math.floor(num + 0.5)endfunction CoolNumber(num)& &if(num &= 1e6) then& && &return round(num/1e6,1)..& m&& &elseif(num &= 1e3) then& && &return round(num/1e3,1)..& k&& &else& && &return num& &endend[/code]然后把二楼的 self.healthBar.hp:SetText(self.healthBar:GetValue()) 改成& &local valueHealth = self.healthBar:GetValue()
self.healthBar.hp:SetText(CoolNumber(valueHealth))即可如下图
qcriser有心了,谢谢你。
[b]Reply to [pid=]Reply[/pid] Post by 原石 ( 00:07)[/b]瞎猫碰到死老鼠而已
[b]Reply to [pid=]Reply[/pid] Post by qcriser ( 23:36)[/b]caelNameplates.eventFrame:SetScript(&OnEvent&, function(self, event, ...)开始到最后一段都注释掉 然后进游戏后shift+v一直显示就行啥意思 = =!!
[b]Reply to [pid=]Reply[/pid] Post by diyuhuo ( 09:05)[/b][url]http://bbs.ngacn.cc/read.php?tid=5829267&_fp=3[/url]
[b]Reply to [pid=10054,1]Reply[/pid] Post by titan9-12-10 01:11)[/b]求最新版带百分比的:: caelNamePlates的设置问题 ::
caelNamePlates的设置问题
请教各位大大,如何把caelNamePlates的宠物血条以及镜像、LR毒蛇陷阱、DK吸血虫、SM TT之类的血条关掉。
caelNamePlates的设置界面在哪 [s:36]
这个插件貌似只能靠更改lua来设置
请问你们的caelNamePlates 插件可以显示职业着色吗?
可以。回LS
[quote][pid=][b]Post by luyuwei999 ( 13:24):[/b][/pid]可以。回LS[/quote]
啊 为什么我不行啊。。。你是3.22 版本吗?? 请教下 要改什么吗?
我也再找这个问题的答案
跪求lua高手解决啊 好多人都想知道
这个要顶啊~ 独乐乐不如众乐乐啊 高手来帮下
帮顶一下!铜球啊
这插件本身不支持吧?换个血条插件。。WOW的caelnameplates仇恨设置_百度知道
WOW的caelnameplates仇恨设置
178,无仇恨显示红.178.html" target="_blank">/://wow,象这个视频中的``<a href="http例如有仇恨显示绿色.com/
这个是插件里的。。插件太高级。不懂找个犀利点的朋友问问
其他类似问题
按默认排序
其他1条回答
大脚本身自带
你看看大脚吧··
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 tidyplates汉化 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信