How do I deal with the immense color changes in DDTM's when walking in OSRS? I have my points auto -colored, but it changes too much even at 25 ?/:
How do I deal with the immense color changes in DDTM's when walking in OSRS? I have my points auto -colored, but it changes too much even at 25 ?/:

Depending on the environment you can create DTM's with tolerances as high as 50-70
In a air runner I wrote, some of the DTM's for walking through fally are one point in the water another on the path and one in a building etc but its very area dependent, maybe post a picture of the map you're trying to walk?
i'm trying to make DDTMs too and i finally got my tolerances so it will find the dtms and click but alot of times it will click somewhere i don't want it to go at all. this is what i have so far. wanting it to click inside the yanil bank then north of the bank at the gate just to test and start my path that will eventually go to the mining pit but taking it one click at a time.
Simba Code:program ddtmworkinprogress;
{$DEFINE SMART8}
{$i srl-osr/srl.simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
var
x,y : integer;
function bankMP: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 7171449, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function bankSP1: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 7171449, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function bankSP2: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15066602, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function bankSP3: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15066602, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function bankSP4: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15066602, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function bankSP5: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15066602, MMX1, MMY1, MMX2, MMY2, 20) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateMP: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 4144966, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateSP1: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 4144966, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateSP2: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15392, MMX1, MMY1, MMX2, MMY2, 12) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateSP3: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15392, MMX1, MMY1, MMX2, MMY2, 12) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateSP4: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15392, MMX1, MMY1, MMX2, MMY2, 12) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function gateSP5: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 4144966, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceMP: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 806443, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceSP1: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 806443, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceSP2: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 212009, MMX1, MMY1, MMX2, MMY2, 18) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceSP3: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 15724018, MMX1, MMY1, MMX2, MMY2, 5) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceSP4: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 212009, MMX1, MMY1, MMX2, MMY2, 18) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function fenceSP5: Integer;
var
TPA : TPointArray;
begin
SMART_DrawDots(TPA);
if FindColorsTolerance(TPA, 212009, MMX1, MMY1, MMX2, MMY2, 18) then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;
function DDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin
dtmMainPoint.x := 1067;
dtmMainPoint.y := 241;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := bankMP;
dtmMainPoint.Tolerance := 30;
dtmSubPoints[0].x := 1067;
dtmSubPoints[0].y := 241;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := bankSP1;
dtmSubPoints[0].Tolerance := 30;
dtmSubPoints[1].x := 1053;
dtmSubPoints[1].y := 238;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := banksp2;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 1093;
dtmSubPoints[2].y := 236;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := banksp3;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 1065;
dtmSubPoints[3].y := 223;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := banksp4;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 1060;
dtmSubPoints[4].y := 257;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := banksp5;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2: begin
dtmMainPoint.x := 1045;
dtmMainPoint.y := 242;
dtmMainPoint.AreaSize := 5;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := gateMP;
dtmMainPoint.Tolerance := 10;
dtmSubPoints[0].x := 1045;
dtmSubPoints[0].y := 242;
dtmSubPoints[0].AreaSize := 5;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := gateSP1;
dtmSubPoints[0].Tolerance := 10;
dtmSubPoints[1].x := 1049;
dtmSubPoints[1].y := 215;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := gateSP2;
dtmSubPoints[1].Tolerance := 10;
dtmSubPoints[2].x := 1035;
dtmSubPoints[2].y := 213;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := gateSP3;
dtmSubPoints[2].Tolerance := 10;
dtmSubPoints[3].x := 1029;
dtmSubPoints[3].y := 246;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := gateSP4;
dtmSubPoints[3].Tolerance := 10;
dtmSubPoints[4].x := 1066;
dtmSubPoints[4].y := 274;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := gateSP5;
dtmSubPoints[4].Tolerance := 10;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3: begin
dtmMainPoint.x := 1047;
dtmMainPoint.y := 222;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := fenceMP;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 1047;
dtmSubPoints[0].y := 222;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := fenceSP1;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 1048;
dtmSubPoints[1].y := 211;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := fenceSP2;
dtmSubPoints[1].Tolerance := 10;
dtmSubPoints[2].x := 1054;
dtmSubPoints[2].y := 218;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := fenceSP3;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 1036;
dtmSubPoints[3].y := 231;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := fenceSP4;
dtmSubPoints[3].Tolerance := 10;
dtmSubPoints[4].x := 1028;
dtmSubPoints[4].y := 239;
dtmSubPoints[4].AreaSize := 4;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := fenceSP5;
dtmSubPoints[4].Tolerance := 10;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;
function walkinbank: boolean;
var
WalkDTM: integer;
aFound: Extended;
begin
WalkDTM := DDTMWalk(1);
if FindDTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2, - 35, 35, 1, aFound) then
begin
writeln('found dtm');
MMouse(x,y,0,0);
ClickMouse2(MOUSE_LEFT);
FFlag(0);
Result := True;
end else
begin
writeln(' could not find dtm')
end;
end;
function walktogate: boolean;
var
WalkDTM: integer;
aFound: Extended;
begin
WalkDTM := DDTMWalk(2);
if FindDTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2, - 35, 35, 1, aFound) then
begin
writeln('found dtm');
MMouse(x,y,0,0);
ClickMouse2(MOUSE_LEFT);
FFlag(0);
Result := True;
end else
begin
writeln(' could not find dtm')
end;
end;
procedure walktopit;
begin
walkinbank;
walktogate;
end;
begin
setupSRL;
makecompass('E');
walktopit;
end.
^ +1 haha. can u put the link in here when posted? thankyouuu!
View my OSR Script Repository!
Botted to max
Guides: How to Report Bugs to the Scripter
~~~~ Moved to Java. Currently Lurking ~~~~
Yeah no doubt this is difficult. I found the best way (if using DTMs) of walking would be using objects on the minimap as your sub points as they don't move. Now, for them to be found every time you'll need to keep a few things in mind. First of all, make the area size on each sub-point 2 or 3, which increases the radius in which that pixel can be found. Also, choose objects that are no where near a MM symbol (bank symbols, shop symbols, ect...) because these move often and might spawn over top of the object you're using as a sub-point. Another tip is to make your main DTM point with a tolerance of 255, meaning only the X & Y are absolute but no matter what color is at that point it will be found. So if someone (or NPC, ect) is standing on your main point it will still be found.
And through my experience I'd definitely say the best tolerance to use on all your sub points is 30-40. The only way to test this thoroughly is through multiple clients. Good luck!
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
There are currently 1 users browsing this thread. (0 members and 1 guests)