--Nameplate HP order
function()
	local enemies = {}
	local output = ""
	for i = 1, 40 do
		if UnitIsEnemy("nameplate" .. i, "player") and UnitAffectingCombat("nameplate" .. i) then
			--print(UnitGUID("nameplate" .. i), UnitHealth("nameplate" .. i), UnitHealthMax("nameplate" .. i), (UnitHealth("nameplate" .. i) / UnitHealthMax("nameplate" .. i)) * 100)
			--local ID = UnitGUID("nameplate" .. i):match("%a+%-%d+%-%d+%-%d+%-%d+%-%d+%-(.+)")
			--ID = ID:gsub(0, "")
			--print(ID)
			enemies[UnitGUID("nameplate" .. i)] = (UnitHealth("nameplate" .. i) / UnitHealthMax("nameplate" .. i)) * 100
		end
	end
	for k,v in pairs(enemies) do
		--local ID = UnitGUID("target"):match("%a+%-%d+%-%d+%-%d+%-%d+%-%d+%-(.+)")
		--ID = ID:gsub(0, "")
		print("Target " .. UnitGUID("target") .. "  key " .. k)
		if k == UnitGUID("target") then
			print("GREEN")
			output = "|cFF00FF00" .. output .. k .. " " .. v .. "|r\n"
		else
			print("WHITE")
			output = "|cFFFFFFFF" .. output .. k .. " " .. v .. "|r\n"
		end
	end
	return output
end


local enemies = 
{
	["Creature-0-5-1220-0-109349-0000002871"] = 17,
	["Creature-0-5-1220-0-109349-0000002870"] = 13
}
local target = "Creature-0-5-1220-0-109349-0000002871"
local output = ""
for k,v in pairs(enemies) do
	if target == k then
		output = output .. k .. " " .. v .. " GREEN\n"
	else
		output = output .. k .. " " .. v .. "\n"
	end
end
print(output)