From: Zace
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
loadMyDTMs;//call this once, and you are good
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('e');
repeat
mainLoop;
until(false);
freeMyDTMs;//try freeing your DTMs at the bottom
end.
Nope, still get
The following DTMs were not freed: [0, 1, 2, 3]
Could it be because I'm manually stopping the script? I always press the red rectangle, but don't press the red circle.https://villavu.com/forum/archive/index.php/t-77920.htmlThis is my code:
program Thief;
{$DEFINE SMART}
{$i srl-osr/srl.simba}
var
Blood, Food, hX, hY, bX, bY: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='XX';
Players[0].Pass :='XX';
Players[0].Nick :='XX';
Players[0].Active:=True;
end;
procedure freeMyDTMs;
begin
Blood:= DTMFromString('mggAAAHicY2NgYJBjZGBQh2JhKJYF4nCgXAgQR0BxCBQz/MeBcQBGHBgCAKBsCL8=');
Food:= DTMFromString('mrAAAAHic42BgYHBkYmBwA2IfIPaFsm2B2AyIbYD4EVDNTSC+zQBhvwDid0D8CogfAPG0aiGGnmIhBmdzBgZzHQaGRH9OhtYcPobD8yUZlnWIMXAB1eDDjAQwDAAAXVYRJg==');
end;
procedure loadMyDTMs;
begin
Blood:= DTMFromString('mggAAAHicY2NgYJBjZGBQh2JhKJYF4nCgXAgQR0BxCBQz/MeBcQBGHBgCAKBsCL8=');
Food:= DTMFromString('mrAAAAHic42BgYHBkYmBwA2IfIPaFsm2B2AyIbYD4EVDNTSC+zQBhvwDid0D8CogfAPG0aiGGnmIhBmdzBgZzHQaGRH9OhtYcPobD8yUZlnWIMXAB1eDDjAQwDAAAXVYRJg==');
addOnTerminate('freeMyDTMs');
end;
Procedure Eat;
begin
if FindDTM(Blood, hX, hY, MSX1, MSY1, MSX2, MSY2) then
begin
if FindDTM(Food, bX, bY, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(bX, bY, 1, 1);
Wait(250 + Random(250));
If(IsUpText('ebab')) Then
Wait(100 + Random(50));
Mouse(bX, bY, 0, 0, True);
wait(5500+ Random(250));
end else
begin
if not FindDTM(Food, bX, bY, MIX1, MIY1, MIX2, MIY2) then
begin
Logout;
Writeln('Out of food');
TerminateScript;
end;
end;
end;
end;
Procedure Pickpocket;
Var
X, Y, Z: Integer;
begin
begin
if FindObjCustom(X, Y, ['ickpocket', 'arrior['], [9901841, 1844602], 7) then
begin
mouse(X, Y, 0, 0, true);
while IsMoving do wait(Z);
end;
end;
end;
Procedure mainLoop;
begin
if not LoggedIn then LoginPlayer else
begin
Eat;
Pickpocket;
end;
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
loadMyDTMs;
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('e');
addOnTerminate('freeMyDTMs');
repeat
mainLoop;
until(false);
TerminateScript;
freeMyDTMs;
end.