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