SCAR Code:
program EdgevilleClaySoftener;
{.include srl/srl.scar}
const
username='';
password='';
var
BankBooth=3691620;
EmptyBucket, FullBucket, SoftClay, HardClay, x, y: Integer;
x := MMCX;
y := MMCY;
Procedure login;
begin
mouse(410,459,4,6,true);
Wait(250+Random(400));
mouse(378,546,4,6,true);
Wait(250+Random(400));
TypeSend(username);
Wait(250+Random(400));
TypeSend(password);
Wait(1250+Random(700));
mouse(316,351,4,6,true);
End;
Procedure Start;
Begin
if not(loggedIn) then login;
Wait(1250+Random(1400));
makecompass('n');
CheckInvenAtStart;
End;
Procedure CheckInvenAtStart;
Begin
If (findbitmap(SoftClay, x, y))Then
writeln('Please start with only hard clay. (no soft clay)');
If (findbitmap(EmptyBucket, x, y))Then
writeln('Please start with full buckets. (no empty ones)');
If not (findbitmap(HardClay, x, y))Then
writeln('Please start with 14 hard clay.');
If not (findbitmap(FullBucket, x, y))Then
writeln('Please start with 14 full buckets.');
End;
Procedure DeclareBitmaps;
Begin
EmptyBucket := BitmapFromString(15, 11, 'beNqrccsOkq6Kk4v3l' +
'ACiZB9JZAQUaSgvT4+Pjw0L87UWBqJ0fymISjTFEJFoN3G44iB7Ea' +
'A4UASP4pTY2KiQkGBfX08LIYgIHsXhzqJAk4EIqAvIBiI0xXCHQZy' +
'RFB2dmZRYkJEOdAnE8bgUZ6ck56alluRkVxUV5kcbF8eZAg0HOsnO' +
'gN9Smw+IjNV5gEhHiRuIirIyKwryO/LteosdgSrLEswqk81rUi3rM' +
'6zyQ2XQEFBZV6EDUCVEMURlU5ZNa44tUAoiC1cAZEwocwKinqYmoP' +
'uBBgJVoqmBKJhc4Qwl21o76uuAJgONBXqhr6UFTRkQTa1yBSKgMqD' +
'sDADEXp6P');
FullBucket := BitmapFromString(14, 11, 'beNqrcauKk/O1FrYz4D' +
'dW56mqnoWMGsrL0+PjY8PCXEwEPS2EgMhSmw9NDRzBVQbZi+BSA0E' +
'psbFRISHBvr5AA/GrBCKgmUAE1IJfGdD2pOjozKTEgox0oHeACJfK' +
'7JTk3LTUkpzsqqLC4jjTaDdxoGKgs4EhAPQdMBCASEeJG4iKsjIrC' +
'vJbc2yBqCzBrDLZvCbVsj7DKj9UBg01ZdlAEFAN0ExkxUBBoPaOfL' +
'uuQofeYke4MqADciKM8qONcakHsoGCTZWVHfV1QCmgm4Few6oexC4' +
'p7mtpmQEAWEG3Yg==');
HardClay := BitmapFromString(7, 5, 'beNqbmDC5NnhafciMxjAgY2' +
'JVYF9FQGeJ7/z2qEWd0UByVnM4UAqoACi7emLCyv74Zb1xEKm5rRF' +
'A2S0zUtdPTYZLLemOAcrumpe5bVb6pmkpECkQAgCuBjVU');
SoftClay := BitmapFromString(12, 14, 'beNp9z7EKgDAMRdHd1n6R' +
'g+AgCIIiFHRxcHBxcBD8fSORZ0hK4U7JoSWtG6si1l9L4xBPaMsA8' +
'7X9k0zOVWBb55NJtvdeZZncHkOpJDOaqyw7pxJZyUwaJcGuGJCVzO' +
'45cFaCwSQZRX9lDD9Cd+XBe/sD/Ap+hw==');
End;
Procedure Soften;
Begin
If (findbitmap(FullBucket, x, y))Then
Mouse(x, y, 5, 5, true);
Wait(200+Random(400));
If (findbitmap(SoftClay, x, y))Then
Mouse(x, y, 5, 5, true);
Wait(600+Random(400));
Mouse(254, 438, 5, 5, false);
Wait(200+Random(400));
Mouse(245, 780, 5, 5, true);
End;
Procedure WalkToWell;
Begin
SymbolAccuracy := 0.5;
if (FindSymbol(x, y, 'water source')) then
begin
Mouse(x, y, 5, 5, True);
SymbolAccuracy := 0.8;
wait(500+Random(1000));
end;
End;
Procedure FindWell;
Begin
If (findbitmap(EmptyBucket, x, y))Then
Mouse(x, y, 5, 5, true);
if (FindColorSpiralTolerance(x, y, 2900815, MMX1, MMY1, MMX2, MMY2, 5)) then
MMouse(x, y, 5, 5);
if(IsUpText('ell'))then
Mouse(x, y, 5, 5, true);
End;
////////////////////////// Main Loop /////////////////////
Begin
SetupSRL;
ActivateClient;
ClearDebug;
Start;
DeclareBitmaps;
repeat
Soften;
WalkToWell;
FindWell;
until(false)
End.