If you gain a level during crafting, a clickcontinue would just do fine (you don't have to reselect the whole thing).. Oh and resting+running is faster than walking, so I made these minor changes:
Code:
procedure DoChecks;
var
cs: string;
begin
FindNormalRandoms;
if ( GetSystemTime >= LogTime ) then
LogoutSeq('');
if TakeSleeps then
TakeASleep(SleepAt);
if TakeBreaks then
TakeABreak;
if GetMMLevels('run',cs) < 20 then
RestUntil(50);
SetRun(true);
if not LoggedIn then
LogoutSeq('');
case Random(60) of
0: wait(1000+random(10000));
1: begin
RandomMovement;
SetAngle(true);
end;
2: HoverSkill('smithing' ,false);
3: PickUpMouse;
4: BoredHuman;
end;
FindNormalRandoms;
end;
And
Code:
repeat
If not LoggedIn then
Exit;
If RWait(4) then
Break;
If ClickContinue(true,true) and not (CraftGold or CraftSilver) then
Break;
until( iCount(BaseItem) < 1 ) or (GetSystemTime > Timer);