something like that
Code:
local numChildren = -1
local WorldFrame, UIParent = WorldFrame, UIParent
local CreatedPlates = {}
local handler = CreateFrame("Frame")
local function ScanFrames(...)
local index2 = 0
local row = 0
for index = 1, select('#', ...) do
local frame = select(index, ...)
local name = frame:GetName()
if(not CreatedPlates[frame] and (name and name:match("NamePlate%d"))) then
index2=index2+1
CreatedPlates[frame] = true
frame.OldSetPoint = frame.SetPoint
frame.SetPoint = function()end
frame:ClearAllPoints()
frame:OldSetPoint("LEFT", UIPatent, "LEFT", 700 -( 25*row), -200+(25*index2))
frame:OldSetPoint("RIGHT", UIPatent, "RIGHT", -500 -( 25*row), -200+(25*index2))
if index2 >= 2 then
row = row + 1
index2 = 0
end
end
end
end
handler:SetScript("OnUpdate", function(self, elapsed)
local count = WorldFrame:GetNumChildren()
if(count ~= numChildren) then
numChildren = count
ScanFrames(WorldFrame:GetChildren())
end
end)