Jump to content
Ranqers

What is a DTM and how is it used?

Recommended Posts

i found a little tutorial and used DTM.

 

[scar]program New;

var x,y,DTM: Integer;

 

procedure LoadDTM;

begin

DTM := DTMFromString('78DA63DCC4C4C010C5C80002AC0C10E015940' +

'7A641A24C207A2B908C4555636E1B0457C300531305E34180A57D' +

'288A1A00723005E6');

end;

 

begin

LoadDTM;

if(FindDTM(DTM,x,y,0,0,1024,768)) then

begin

WriteLn('Armadyl Godsword FOUND');

MoveMouse(x,y);

Wait(30);

ClickMouse(x,y,False);

end;

end.[/scar]

 

how's a DTM any different from a bitmap? they do the same thing, right?

Edited by Ranqers
Link to comment
Share on other sites

i found a little tutorial and used DTM.

 

[scar]program New;

var x,y,DTM: Integer;

 

procedure LoadDTM;

begin

DTM := DTMFromString('78DA63DCC4C4C010C5C80002AC0C10E015940' +

'7A641A24C207A2B908C4555636E1B0457C300531305E34180A57D' +

'288A1A00723005E6');

end;

 

begin

LoadDTM;

if(FindDTM(DTM,x,y,0,0,1024,768)) then

begin

WriteLn('Armadyl Godsword FOUND');

MoveMouse(x,y);

Wait(30);

ClickMouse(x,y,False);

end;

end.[/scar]

 

how's a DTM any different from a bitmap? they do the same thing, right?

No, a DTM essentially works with points at certain relative distances from each other, but it allows you to make it find points that are displaced as well.

Link to comment
Share on other sites

how's a DTM any different from a bitmap? they do the same thing, right?
Not exactly. A bitmap is a (portion of an) image you are looking for. A dtm is a few points you are looking for. In theory uses less memory and is faster than bitmaps. Although I think Freddy has the bitmap functions pretty tweaked for speed/performance.

 

Edit: Yet again Freddy beats me to it.

Link to comment
Share on other sites

More for finding items/objects. I suppose it could be used for searching the minimap for walking but not really the intended purpose.

 

Edit: Nvm. Just reread your post. Answered a question you didn't even ask. Generally you would use RadarRoadWalk for walking although it is tricky to get your mind wrapped around it at first. Sadly there is a lack of decent path maker tool for it. Have a look at the contents of Map.scar in the OSI includes.

Edited by Bixby Sayz
Link to comment
Share on other sites

RadarRoadWalk is comparable to RadialWalk in SRL, with a few additional parameters. Like RadialWalk getting the correct path can be a serious pain in the butt but it works very well once you have it. SPS is a little more newbie friendly but I find when it goes wrong it goes horribly wrong so I don't entirely trust it.

Link to comment
Share on other sites

RadarRoadWalk is comparable to RadialWalk in SRL, with a few additional parameters. Like RadialWalk getting the correct path can be a serious pain in the butt but it works very well once you have it. SPS is a little more newbie friendly but I find when it goes wrong it goes horribly wrong so I don't entirely trust it.

 

I'll try it out sometime maybe.

 

The SPS system worked great, but yeah its just that...we can't seem to get it updated and working for the latest SCAR. One day I want to rewrite the whole thing. My first priority though is OSI. Just keep adding more functions/improving...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...