I'm trying to add break-taking into my script, but the problem that I'm having is that whenever it's time for a break it doesn't break.
My break procedure:
Simba Code:
procedure Breaker;
var
BreakingTime:Integer;
begin
if (Loads > (LoadsBeforeBreak + (RandomRange(-(LoadsBeforeBreak / 10), LoadsBeforeBreak / 10)))) or (TimeSinceBreak > (HoursBeforeBreak + (RandomRange(-(HoursBeforeBreak / 10), HoursBeforeBreak / 10))) * (3600000)) then
begin
MarkTime(BreakingTime);
Status := 'Breaking';
Proggy;
ExitToLobby;
repeat
wait(RandomRange(1000, 10000))
until((TimeFromMark(BreakingTime) > ( BreakTime + (RandomRange(-(BreakTime / 10), BreakTime / 10)))));
LoginPlayer;
end;
end;
My constants:
Simba Code:
LoadsBeforeBreak = 1; //About how any loads to do before taking a break?
HoursBeforeBreak = 4; //About how many hours to run before taking a break?
BreakTime = 1; //About how many minutes to break for?
The part of my mainloop with breaking:
Simba Code:
MineOre;
DropOre;
Breaker;
Proggy;
DropGems;
Sorry if it's a bit hard to tell what's going on, but I'll try to explain more if needed.
It ran for a few hours and 24 loads without taking a break, so I don't know what's up.