SRL Archive - OSR Help

Can't figure out DTM walking!


juunhoad

2013-03-01 17:57:35

Right now I have this code just for testing. I want to know why it doesn't walk to the first point [0]?

program Walker;
{$i SRL/SRL.simba}
{$I P07Include.Simba}
var
x, y, i: Integer;
Q: Array [0..4] of Integer;
aFound: Extended;

procedure SetDTM;//DTM Defining procedure.
begin
Q[0] := DTMFromString('mggAAAHicY2NgYFjJxMCwAYpXQvEiIF4LlFsFxDuAeDkQb2GAiEVWyDHE1iswRNfIgTGIH1oix4ALMOLAEAAAzrUN2A==');
Q[1] := DTMFromString('mbQAAAHicY2VgYNjNxMCwgwlCbwHis0A8Byg+FYiXA/ESIJ4GxDElcgwJhdJgOhmKsQFGLBgMAF/cC4g=');
Q[2] := DTMFromString('mbQAAAHicY2VgYHjKxMBwHYg/APF7IH4IxHMZILgfiS4skGZITZFgyCqRYygplmPIKZRmwAYYsWAwAACtowxc');
Q[3] := DTMFromString('mggAAAHicY2NgYLjHxMBwDYhfAPEtKA0SqwTK1TJA6CIobgDinEJpOC4sgGAQGxdgxIEhAAD1vA4A');
Q[4] := DTMFromString('mbQAAAHicY2VgYLjOxMBwHorfA/EbIO4Dik8C4g4gbmeA8CvyCxjyMzLAeGJHB0OWsQgDNsCIBYMBANeiDUk=');
end;


procedure FrDTM;//DTM Freeing procedure.
begin
FreeDTM(Q[0]);
FreeDTM(Q[1]);
FreeDTM(Q[2]);
FreeDTM(Q[3]);
FreeDTM(Q[4]);
end;



begin
SetupP07Include;
P07_MakeCompassNorth;
MouseSpeed := 18;
if FindDTMRotated(Q[0], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) then
begin
MMouse(x, y, 3, 3);
ClickMouse2(mouse_left);
FFlag(6);
end;
end.

Wetish

2013-03-01 18:11:28

Your coordinates are off.

mcbain

2013-03-01 18:48:19

Coords have to be P07_MMX1, P07_MMY1, etc.

juunhoad

2013-03-01 19:59:19

From: Wetish
Your coordinates are off.


What you mean with off?

juunhoad

2013-03-01 20:04:41

From: mcbain
Coords have to be P07_MMX1, P07_MMY1, etc.


Still doesn't work

Sjoe

2013-03-01 20:10:36

From: juunhoad
Still doesn't work


Use DDTM's

juunhoad

2013-03-01 20:15:47

From: Sjoekeloe
Use DDTM's


you mean this ?http://villavu.com/forum/showthread.php?t=97538&p=1182921#post1182921

Sjoe

2013-03-01 20:20:09

From: juunhoad
you mean this ?http://villavu.com/forum/showthread.php?t=97538&p=1182921#post1182921


That's the one :) If it clicks on wrong spots make betters Dtm's points.

mcbain

2013-03-01 21:49:25

From: juunhoad
Still doesn't work


could be your DTMs have really low tolerance, RS changes colors very frequently so if you have lower tolerance on your DTMs, your DTMs will never work right. Also like Sjoekeloe said, DDTMs are awesome, using them will most likely solve your problem.