Code:
program KebabBuyer;
{$DEFINE SRL5}
{$DEFINE SMART}
{$i srl/srl.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
Var
x, y : Integer;
procedure WalkToKarim;
var
cx, cy: Integer;
begin
if ObjDTM_Find('95:24:7:7:7:44:76:7:7:40:89:7:7:115:81:7:7:83:125:7:7:64:18:10:7:70:70:10:7:69:90:4:81:11:104:11:104:34:82:34', cx, cy, True) then
begin
ObjDTM_Walk('95:24:7:7:7:44:76:7:7:40:89:7:7:115:81:7:7:83:125:7:7:64:18:10:7:70:70:10:7:69:90:4:81:11:104:11:104:34:82:34', 2, 100, 5, True);
end else
Writeln('We could not walk here, what a shame');
end;
procedure WalkToBank;
var
cx, cy: Integer;
begin
if ObjDTM_Find('64:131:5:10:7:55:122:10:7:130:78:7:7:50:70:7:7:97:133:10:7:55:134:4:45:104:75:104:76:153:44:149', cx, cy, True) then
begin
ObjDTM_Walk('64:131:5:10:7:55:122:10:7:130:78:7:7:50:70:7:7:97:133:10:7:55:134:4:45:104:75:104:76:153:44:149', 2, 100, 5, True);
end else
Writeln('We could not walk here, what a shame');
end;
function Karim(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.11);
if not(FindColorsTolerance(arP, 4796739, MSX1, MSY1, MSX2, MSY2, 8)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.23) and (X <= 8.05) and (Y >= 1.88) and (Y <= 6.72) and (Z >= 3.24) and (Z <= 11.95) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Karim')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
GetMousePos(fx, fy);
end;
Procedure GetKebab;
begin
Repeat
if Karim(x, y) then
mouse(x, y, 0, 0, 1);
Wait(500 + Random(50));
MouseBox(230, 463, 288, 472, 1);
Wait(500 + Random(50));
MouseBox(182, 428, 350, 438, 1);
Wait(500 + Random(50));
MouseBox(230, 463, 288, 472, 1);
Wait(500 + Random(50));
Until (InvFull);
end;
Procedure HandleBanking;
Begin
OpenBankFast('akb');
DepositAll;
CloseBank;
Wait(500 + Random(50));
End;
begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetUpSRL;
ObjDTM_Setup;
SetAngle(SRL_ANGLE_HIGH);
Repeat
GetKebab;
WalkToBank;
HandleBanking;
WalkToKarim;
Until(False);
TerminateScript;
end.
ty in advance