View Single Post
01-27-11, 01:48 PM   #14
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Kendian View Post
Rofl, now this got me thinking if theres a script to show pets happiness?

Edit: To change a panels color depending on pets happiness, i.e red/yellow/green.
There's a script for almost anything

Code:
local Color = {r = 1, g = 1, b = 1}
if UnitExists("pet") then
	local happiness = GetPetHappiness()
	if happiness == 1 then
		Color = {r = 1, g = 0, b = 0}
	elseif happiness == 2 then
		Color = {r = 1, g = 1, b = 0}
	elseif happiness == 3 then
		Color = {r = 0, g = 1, b = 0}
	end
end
self:SetBackdropBorderColor(Color.r, Color.g, Color.b)
  Reply With Quote