SRL Archive - OSR Help

What did I do wrong :(?


mastah

2012-01-30 10:44:07

Currently I have this code:

program New;
var AxeDTM,x,y:integer;
begin
AxeDTM := DTMFromString('mWAAAA345icY2FgYOBggAABH8ZHYk4GBOAF4rrKSoaXbYpgbG3NwZDCgaoY0TAIAAD+PgVg');

if FindDTM(AxeDTM,x, y,1, 1, 800, 800) then
writeln('Congratz! You have just found your first DTM!');
FreeDTM(AxeDTM);
end.

The DTM should work because I checked in the editor. The problem is that I have the axe in my inventory but I still don't see the 'Congratz!' in my debug box :(.

I thought the FindDTM should return true because the axe is in the box from 1,1 until 800,800 . But it doesnt do that why is that?

Regards!



SOLVED: I had to put tolerance to 15 on all points not just one point, stupid me.

RyGuy

2012-01-30 10:49:24

instead of 1, 1, 800, 800 use MIX1, MIY1, MIX2, MIY2. this will search only your inventory

Hobbit

2012-01-30 10:50:33

Every since the bot nuke, jagex has had a bug they haven't been able to fix (as of yet). I makes items in the inventory sometimes appear distorted or incomplete. This may be your problem. Try using a bitmap of a small, distinct area in the axe? Maybe where the handle meets the axe head. Then go into paint and black out everything that is not part of the axe, like the inventory background. This is because for bitmaps, black is the ignore color.

Give that a try :)


Moved to proper section.

mastah

2012-01-30 11:01:52

yes sorry, I sometimes post it accidently in the wrong section :(

Hobbit

2012-01-30 11:03:48

From: mastah
yes sorry, I sometimes post it accidently in the wrong section :(


That's okay, there are a lot of sections to get to know :)

Jhangir

2012-01-30 17:04:29

Try what rygy said it should work.