mob
proc
Daytime()
if(global.host == "Strawgate")
spawn()Food()
sleep(15)
global.Minute += 1
global.Hour += round(global.Minute /60)
global.Minute -= round(global.Minute/60)*59
global.Hour -= round(global.Day /12)*11
global.Day += round(global.Hour/24)
global.Month += round(global.Day/30)
global.Day -= round(global.Hour/25)*24
global.Month -= round(global.Day/30)*29
if(global.Hour >= 11)
if(global.AP == "PM")
global.AP = "AM"
global.Hour = 1
spawn()EndofDay()
else
global.AP = "PM"
global.Hour = 1
if(global.host == "Strawgate")
spawn()Daytime()
if(global.host == 0)
spawn()Food()
Can anyone help me figure out if any part of that should be changed to help fix it?
My old code used many if suquences, which caused great lag...
I'm not really sure what statements like this are supposed to do:
This crap is all over that code, with round(a/b)*(b-1), which makes absolutely no sense. It strikes me that the % operator is called for here.
In any case it's all moot, since as I said you're a lot better off checking world.time as needed and just outputting the offset time based on that. A loop constantly running for a clock is really not a good idea.
Lummox JR