try DDTMs on something easier. Like moving mouse to Awkwardsaw's Dp using it.
If you manage to get that to work, then you know that your code works.
How about try making the DDTM without use of Auto Colour? just screen shot and go :).
Here's one of my trial attemps few weeks ago. Cohn helped lots :). It doesn't work, but it will move your RS character from VEB to the south east. I learn best by example, perhaps you do too. (700 lines of inefficient xD)
program QuickMineVEM; //Varrok East Bank
{.include srl/srl.scar}
{.include srl/srl/skill/mining.scar}
//{.include srl/srl/core/AutoColor.scar}
var
DDTMTolerance: Integer;
function DDTMToMine1: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
// VRoadColor := FindVarrockRoadColor; // Not working
dtmMainPoint.x := 1035;
dtmMainPoint.y := 332;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 5921877;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 1035;
dtmSubPoints[0].y := 332;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 5921877;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 1036;
dtmSubPoints[1].y := 329;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 4539711;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 1035;
dtmSubPoints[2].y := 334;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 4539711;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 1037;
dtmSubPoints[3].y := 337;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 4539711;
dtmSubPoints[3].Tolerance := DDTMTolerance;
dtmSubPoints[4].x := 1033;
dtmSubPoints[4].y := 333;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 4539711;
dtmSubPoints[4].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine2: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 1001;
dtmMainPoint.y := 390;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 16509686;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 1001;
dtmSubPoints[0].y := 390;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 16509686;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 998;
dtmSubPoints[1].y := 406;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1268001;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 1008;
dtmSubPoints[2].y := 405;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 1268001;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 1012;
dtmSubPoints[3].y := 398;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 1268001;
dtmSubPoints[3].Tolerance := DDTMTolerance;
dtmSubPoints[4].x := 1006;
dtmSubPoints[4].y := 397;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 1268001;
dtmSubPoints[4].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine3: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 1016;
dtmMainPoint.y := 385;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 5995385;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 1016;
dtmSubPoints[0].y := 385;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 5995385;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 997;
dtmSubPoints[1].y := 381;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1654105;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 984;
dtmSubPoints[2].y := 372;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 1654105;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 991;
dtmSubPoints[3].y := 352;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 1654105;
dtmSubPoints[3].Tolerance := DDTMTolerance;
dtmSubPoints[4].x := 975;
dtmSubPoints[4].y := 361;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 1654105;
dtmSubPoints[4].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine4: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 981;
dtmMainPoint.y := 407;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 600119;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 981;
dtmSubPoints[0].y := 407;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 600119;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 984;
dtmSubPoints[1].y := 416;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3436365;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 987;
dtmSubPoints[2].y := 379;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 3436365;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 994;
dtmSubPoints[3].y := 379;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 3436365;
dtmSubPoints[3].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine5: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 966;
dtmMainPoint.y := 419;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1190980;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 966;
dtmSubPoints[0].y := 419;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1190980;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 956;
dtmSubPoints[1].y := 414;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 16249069;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 958;
dtmSubPoints[2].y := 398;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 16249069;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 975;
dtmSubPoints[3].y := 397;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 16249069;
dtmSubPoints[3].Tolerance := DDTMTolerance;
dtmSubPoints[4].x := 983;
dtmSubPoints[4].y := 406;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 16249069;
dtmSubPoints[4].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine6P1: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 935;
dtmMainPoint.y := 407;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 2640231;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 935;
dtmSubPoints[0].y := 407;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 2640231;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 934;
dtmSubPoints[1].y := 405;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 2837880;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 935;
dtmSubPoints[2].y := 404;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 2837880;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 935;
dtmSubPoints[3].y := 409;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 2837880;
dtmSubPoints[3].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function DDTMToMine6P2: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 955;
dtmMainPoint.y := 405;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 2969210;
dtmMainPoint.Tolerance := DDTMTolerance;
dtmSubPoints[0].x := 955;
dtmSubPoints[0].y := 405;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 2969210;
dtmSubPoints[0].Tolerance := DDTMTolerance;
dtmSubPoints[1].x := 955;
dtmSubPoints[1].y := 404;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3430278;
dtmSubPoints[1].Tolerance := DDTMTolerance;
dtmSubPoints[2].x := 955;
dtmSubPoints[2].y := 403;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 3430278;
dtmSubPoints[2].Tolerance := DDTMTolerance;
dtmSubPoints[3].x := 957;
dtmSubPoints[3].y := 403;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 3430278;
dtmSubPoints[3].Tolerance := DDTMTolerance;
dtmSubPoints[4].x := 957;
dtmSubPoints[4].y := 404;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 3430278;
dtmSubPoints[4].Tolerance := DDTMTolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function LoadDDTM(WhichDDTM:integer):integer;
begin
case WhichDDTM of
0: Result := DDTMToMine1;
1: Result := DDTMToMine2;
2: Result := DDTMToMine3;
end;
end;
{
function ToMine(LoadWhichDDTM: Integer):Boolean;
var
x, y, DDTMVarrokToMine: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := LoadDDTM(LoadWhichDDTM);
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then //Covers the Bitmap Area in "just fitting" Box
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 4;
try
FreeDTM(DDTMVarrokToMine);
except
WriteLn('DDTM Freeing Failed');
end;
// DDTMVarrokToMine := DDTMToMine1;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y+10+random(4),2+random(3),2+random(3),true);
Result := True;
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 25) or not LoggedIn)
DDTMTolerance := (0);
end;
}
function ToMine1:Boolean;
var
DDTMVarrokToMine, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine1;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,MMX1,MMY1,MMX2,MMY2) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine1;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y-18-random(4),2+random(3),2+random(3),true);
wait(4000);
FFlag(20);
Result := True;
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
function ToMine2:Boolean;
var
DDTMVarrokToMine, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine2;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine2;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y+random(4),2+random(3),2+random(3),true);
wait(4000);
FFlag(20);
Result := True;
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
function ToMine3:Boolean;
var
DDTMVarrokToMine, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine3;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine3;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y+random(4),2+random(3),2+random(3),true);
Result := True;
FFlag(15);
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
function ToMine4:Boolean;
var
DDTMVarrokToMine, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine4;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine4;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y+random(4),2+random(3),2+random(3),true);
Result := True;
FFlag(15);
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
function ToMine5:Boolean;
var
DDTMVarrokToMine, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine5;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine5;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y+random(4),2+random(3),2+random(3),true);
Result := True;
FFlag(15);
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
function ToMine6Final: Boolean;
var
DDTMVarrokToMine,DDTMVarrokToMine2, x, y: Integer;
begin
if not LoggedIn then Exit;
SetRun(True);
DDTMTolerance := (3);
DDTMVarrokToMine := DDTMToMine6P1;
DDTMVarrokToMine2 := DDTMToMine6P2;
repeat
if not DTMRotated(DDTMVarrokToMine,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance of P1');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine := DDTMToMine6P1;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y-random(4),2-random(3),2+random(3),true);
Result := True;
FFlag(15);
FreeDTM(DDTMVarrokToMine);
Break;
end;
if not DTMRotated(DDTMVarrokToMine2,x,y,550,8,703,161) then
begin // When Not Find DDTM, Increase Tolerance
Writeln('DDTM not found, increasing Tolerance of P2');
DDTMTolerance := DDTMTolerance + 5;
FreeDTM(DDTMVarrokToMine);
DDTMVarrokToMine2 := DDTMToMine6P2;
end else
begin // DDTM is Found
Writeln('Moving along the Varrok Road...');
Mouse(x,y-random(4),2-random(3),2+random(3),true);
Result := True;
FFlag(15);
FreeDTM(DDTMVarrokToMine);
Break;
end;
Until ((DDTMTOLERANCE >= 26) or not LoggedIn)
DDTMTolerance := (0);
end;
{
Procedure ToMineVEM(CheckPointNum:Integer; ToMine:Boolean);
begin
if (ToMine) then
begin
Writeln('Walked Past CheckPoint ' + inttostr(CheckPointNum));}
begin
SetupSRL;
ActivateClient;
if (MakeCompass('n')) then
begin
if ToMine1 then
begin
Writeln('Walked to Varrok East Gates --- PASS');
end else
begin
Writeln('Walked to Varrok East Gates --- FAIL');
end;
if ToMine2 then //////////
begin
Writeln('Walked Past Building SE of Gates --- PASS');
end else
begin
Writeln('Walked Past Building SE of Gates --- FAIL');
end;
if ToMine3 then //////////
begin
Writeln('Walked to Third Checkpoint --- PASS');
end else
begin
Writeln('Walked to Third Checkpoint --- FAIL');
end;
if ToMine4 then //////////
begin
Writeln('Walked to 4th Checkpoint --- PASS');
end else
begin
Writeln('Walked to 4th Checkpoint --- FAIL');
end;
if ToMine5 then //////////
begin
Writeln('Walked to 5th Checkpoint --- PASS');
end else
begin
Writeln('Walked to 5th Checkpoint --- FAIL');
end;
if ToMine6Final then //////////
begin
Writeln('Walked to sixth Checkpoint --- PASS');
end else
begin
Writeln('Walked to sixth Checkpoint --- FAIL');
end;
end;
end.