Im working on a private butter churner, I have it all working except using the churn. I need to have a static wait time for the butter churning, it takes approx 2.3 minutes to do a full inventory of wheels.
This is what I have for my churn function
Simba Code:
Procedure UseChurn;
Begin
repeat
If FindDTMRotated(Churn, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) Then
Begin
CheckXP; <-- finds initial exp
WriteLn('We found the churn');
MMouse(X, Y, 3, 3);
ClickMouse2(False);
WaitOption('hurn',250);
IncEx(Wheels, 28);
wait(1200+random(50))
While IsMoving Do Wait(RandomRange(50,100));
Mouse(322,427,5,5,True);
Wait(250+random(50));
repeat
CheckXP2; <--- checks the amount again
if (XP-XP2<1792) then <-- subtracts them and checks difference, if not
begin <----- specified difference then it waits half a second and checks
wait(500); <--- again until it is the specified difference
end;
until(XP-XP2>=1792);
wait(500+random(250));
exit;
End Else
WriteLn('We could not find the churn');
Inc(Fail);
until(FindDTMRotated(Churn, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or (Fail=10))
End;
Simba Code:
procedure CheckXP;
begin
XP:=GetXPBar(1);
end;
procedure CheckXP2;
begin
XP2:=GetXPBar(1);
end;
^ These are my checking procedures that are called in the script. It does not stop after it reaches the full exp, can anybody see why? Also I know my standards are horrible XD Thanks for any help. Any ohter suggestions as to how to know when it is out of cheese wheels?