it runs off a bunch of loops that alter the pet's state after a different amount of time for each stat (at the moment they are all 60 but that will change and they will have different sleep times), what I think is happening is that the program is only running the first loop, so here's my code; advice?
Health = 50
Hunger = 5
Full = 1
Happy = 4
Weight = 3
Sick = 0
Tired = 0
Age = 1
Clean = 5
Weak = 0
Heat = 2
Dead = 0
function Stats()
print("Health ", Health)
print("Hunger ", Hunger)
print("Fullness ", Full)
print("Happiness ", Happy)
print("Weight ", Weight)
print("Sick ", Sick)
print("Tired ", Tired)
print("Age ", Age)
print("Clean ", Clean)
print("Weak ", Weak)
print("Heat ", Heat)
if Happy <= 2 then print(":(/>/>/>") end
if Happy == 3 then print(":I") end
if Happy >= 4 then print(":)/>/>/>") end
if Hunger >= 7 then print("Hungry") end
if Weight > 4 then print("Obsese") end
if Weight < 2 then print("Underweight") end
if Full == 5 then print("Full") end
if Sick == 1 then print("Sick") end
if Tired == 1 then print("Tired") end
if Clean <= 2 then print("Unclean") end
if Weak > 0 then print("Weak") end
if Heat == 1 then print("Cold") end
if Heat == 3 then print("Hot") end
print("-------------------")
end
while true do
sleep(60)
Hunger = Hunger + 1
if Hunger == 11 then Hunger = 10 end
end
while true do
sleep(60)
if (math.random(1, 15) + Weak - Clean) > 11 then
Sick = 1
end
end
while true do
sleep(60)
if math.random(1, 5) == 5 then
Clean = Clean - 1
if Clean == 0 then Clean = 1 end
end
end
while true do
sleep(60)
if math.random(1, 10) == 1 then Heat = 1 end
if math.random(1, 10) == 10 then Heat = 3 end
end
while true do
sleep(60)
if Hunger == 10 then Health = Health - 1 end
if Sick == 1 then Health = Health - 1 end
if Weight == 5 then Health = Health - 1 end
if Weight == 1 then Health = Health - 1 end
if Health <= 0 then Dead = 1 end
end
while true do
sleep(60)
if Dead == 1 then
print("Tami is Died...")
break
end
end
while true do
sleep(60)
Stats()
end