SRL Archive - OSR Help

DTMs not working


EZ41

2015-02-01 10:43:49

I'm trying to get DTMs to work. I have made the DTM in the editor, when I click 'Find DTMs' in the editor it puts crosses on the right items.

http://imgur.com/MlBtJtw

http://imgur.com/r31cK00

But when I go to actually use it in a script, the DTM never seems to be found.


program DTMTest;
{$I SRL-OSR\SRL.simba}

var
dtm, X, Y: Integer;
begin
dtm := DTMFromString('mqAEAAHiczcrBCkBQFATQeb7Bmo2FsvGS5AkhJL/nn/yWeTXFwtLCrdN0750QwBgAC+20Kf0+0Uw91eKopU7pf4O6q/q5ATIqySodNQ8VFebuppRQTJEkutvzwJ/HfOxtLgobCrE=');
if FindDTM(dtm, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('You found the item!');
MMouse(X, Y, 7, 7);
//if IsUpText('pray') then
//Mouse(X, Y, 0, 0, true);
end;
FreeDTM(dtm);
end.

What am I doing wrong?, this is getting really frustrating.

Thanks.

Flight

2015-02-01 10:56:23

Going off of the image you posted, try this DTM:

DTMFromString('mggAAAHicY2NgYGgA4iogLgPiOiDuBOJ2IH4AxHeA+AkQvwLiZ1Axi7PzGLABSSBmJAFDAADKzAoc');

EZ41

2015-02-01 11:08:00

Hi Flight,

Thanks for the response, I pasted your DTM in and it worked!

Any idea where I might have gone wrong for next time?

Harrier

2015-02-01 11:17:10

From: EZ41
Hi Flight,

Thanks for the response, I pasted your DTM in and it worked!

Any idea where I might have gone wrong for next time?

The first point you make is the centre point for the rest

Flight

2015-02-01 11:20:50

Yeah the center point I used was the light blue in the middle of the potion with a 25 tolerance. The rest I made like 4 or 5 sub points on the black outline of the vial with 1 tolerance.

EZ41

2015-02-01 11:24:16

From: Hawker
The first point you make is the centre point for the rest


Thanks, but I don't think that was the problem, here is my main point.

http://imgur.com/MSU5VvY

P.S. If tolerance 0 on the main point is a problem, I could try with higher but I did use higher tolerance before and it still wasn't working :/

EZ41

2015-02-01 11:25:30

From: Flight
Yeah the center point I used was the light blue in the middle of the potion with a 25 tolerance. The rest I made like 4 or 5 sub points on the black outline of the vial with 1 tolerance.


Ok, I'll try that for the next item I need to use.

honeyhoney

2015-02-15 23:20:31

From: EZ41
P.S. If tolerance 0 on the main point is a problem, I could try with higher but I did use higher tolerance before and it still wasn't working :/


I'm fairly sure having a tolerance of 0 or 1 on the main point would be a problem, what tolerance did you try increasing it to?

As Flight said, 25 is suitable for the main point. I usually use 15 and that works fine too.

Let us know how you get on with the next DTM you make.

(do I smell a Nightmare Zone script?)