
Originally Posted by
Heavenguard
I was told that DDTM Colors should all be the same.
You need to Make your AreaSize at least 1. If your AreaSize is 0 scar has no area to search in.
Try that. If it still doesn't work, or it does something entirely different, tell us exactly whats happening.
Now ive maded it
SCAR Code:
program New;
{.include SRL/SRL.scar}
Var Tol:integer;
function SetDDTM(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
Case WalkNumber Of
0: begin
dtmMainPoint.x := 945;
dtmMainPoint.y := 346;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8881803;
dtmMainPoint.Tolerance := Tol;
dtmSubPoints[0].x := 945;
dtmSubPoints[0].y := 346;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8881803;
dtmSubPoints[0].Tolerance := Tol;
dtmSubPoints[1].x := 953;
dtmSubPoints[1].y := 387;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 6587026;
dtmSubPoints[1].Tolerance := Tol;
dtmSubPoints[2].x := 946;
dtmSubPoints[2].y := 372;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 6784405;
dtmSubPoints[2].Tolerance := Tol;
dtmSubPoints[3].x := 925;
dtmSubPoints[3].y := 349;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8487045;
dtmSubPoints[3].Tolerance := Tol;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;
Function Walk(WalkNumber: Integer): Boolean;
var
TheDDTM, x, y : Integer;
begin
SetRun(True);
Tol := 5;
TheDDTM := SetDDTM(WalkNumber);
repeat
if not DTMRotated(TheDDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('Didn''t find DDTM, increasing tolerance...');
Wait(1000+random(1000))
IncEx(Tol, 10);
FreeDTM(TheDDTM);
TheDDTM := SetDDTM(WalkNumber);
end else
begin
Writeln('Walking');
Mouse(x, y, 4, 4, True);
Result := True;
Break;
end;
until((Tol >= 90) or not LoggedIn);
Tol := 5;
FreeDTM(TheDDTM);
end;
begin
SetupSRL;
If Walk(0) Then
Writeln('we should be in shop');
end.
and its still not working i get
Code:
New client targeted
Successfully compiled (7075 ms)
SRL Compiled in 31 msec
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Didn't find DDTM, increasing tolerance...
Successfully executed
it would be creat help if some one could creat a working one to get from VEB to the magic shop or help me