Quantcast
WoWInterface - View Single Post - Help with Hunter pet addon (WoW classic)
View Single Post
10-15-20, 03:12 PM   #1
awildgoose11
A Defias Bandit
Join Date: Mar 2020
Posts: 3
Question Help with Hunter pet addon (WoW classic)

I am a complete noob with Lua, but the basic thing I want it to do is use the message to pop up on the screen when the "var1" from GetPetHappiness() goes from 3 to 2.

Any help would be appreciated!

Code:
local p = {}
local var1,var2,var3=GetPetHappiness()
function p.repeatloop()
    local var1,var2,var3=GetPetHappiness()
    local result
 
    result = ';repeat\n'
    repeat 
        result = result .. ":var1 = " .. var1 .. '\n'
        var1,var2,var3=GetPetHappiness()
    until var1 = 2
    message('Feed your pet!')
 
    return result
end

return p
  Reply With Quote