PDA

View Full Version : DTM's = Easy



NiCbaZ
04-18-2008, 07:56 AM
DTM's

This a Full Tut On How to Make DTM;s And How To Use Them

Contents




Getting The Image
Making the item DTM
Use the item DTM
Making The Banking DTM ~HOT~
Using the Banking DTM// coming soon
testing the DTM//coming soon



Getting The Image

1.
We are making a DTM of a yew log so we would find the "Print Screen" key on my our key bored located just up from the keypad and press it.

2.Open up paint and press crl V you should have this:

http://img134.imageshack.us/img134/4792/tut1nu9.png

then select the yew log crl C

open up a new paint document and control V and you should have this:
http://img89.imageshack.us/img89/945/tut2dc8.png

save the file then open up scar and go to

>File you should have this:
http://img216.imageshack.us/img216/2979/tut3vl4.png

>DTM editor you should have this:
http://img216.imageshack.us/img216/1364/tut4xr1.png

Then Go Edit>load image you should have this:

http://img89.imageshack.us/img89/195/tut5wm1.png

find the image on your computer and open it up if you have followed this tut correctly you should have this:


http://img89.imageshack.us/img89/1265/tut6yx5.png



if your page looks like that then

Part 1 of TUT Done;



Making The Item DTM

Ok if you have Done part 1 you are up to part 2 you should have your image loaded in the DTM editor if you dont go back to part 1 if you do keep on reading.

A DTM uses a main point where it clicks and a sub point(s), to create your Mainpoint you simply click in the middle of the image you want to make the DTM of like so....

http://i25.tinypic.com/110dlad.jpg

notice the yellow dot in the middle that is the mainpoint on the side of the DTM editor there is a box called tolerance that means it will find the the color pixles (to how much you set the tolerance at) so a good one for items is 12 so put the tolerance at 12 and now it is time to start making our sub points.


to make the first sub point find the black border on the outside of the image ( you can see the colors on the color box on top of the image) then click on that border somewhere around the item and you should have this.

http://i27.tinypic.com/2wheemr.jpg


then do that again 5-7 times around the border of the image and it should look like this.
http://i31.tinypic.com/23u3rbn.jpg


then you simply go file>DTM to text it will come up in your debug box, how simple is that?

Well Done you have completed Part 2 of this Tut.


Using The Item DTM

There are many ways to use the item DTM in runescape when you are using your DTM you should make a procedure at the start of the script called

procedure LoadDTMs;

and place your DTM in there like so

procedure LoadDTMs;
begin

DTM := DTMFromString('78DA63146360601066400141765C609A11C A6' +
'7E406125C0C688011558D0AA639186A1480040F01357C4042 9680' +
'1A36202146408D3890E020A0460A4848E15703006F5801ED' );
end;

and when you do this always remember to call on the DTM in the mainloop

begin
setupsrl;
LoadDTMs;


also you have to declare the DTM in your var at the start of your script like so

var
DTM: integer;
x, y: integer; // dont forget to include this for the clicking



to use the dtm in your script there are many ways i will teach you one of the many ways.


procedure DropTheYewLogs;
begin
if FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('rop');
end;
end;


this would be the procedure you would use to drop a yew log

the MIX1 ect are the inventory coords in runescape it will try and find the dtm in there..

Mouse(x,y, 5, 5, false);

Right clicks on the yew log in the center of it if you made your DTM correctly

ChooseOption('rop');

chooses the Option drop so it will drop the logs see how simple is that!

If it all works out for you have completed Part 3 of this Tut

NiCbaZ
04-18-2008, 08:01 AM
Making The Banking DTM

Before You attempt this part of the tut Read Part 1 and 2.

Open up your image through the DTM editor as i told you how to in part 1.

have your image something like this:

http://i30.tinypic.com/1zfh6vo.jpg

one you got that open it up in your DTM editor and select the main point in the bankers box behind the bankers yellow dots.

It should look like this:

http://i30.tinypic.com/99qa2x.jpg

I would put the toll to about 230 because it works alot better with a high toll level on the bank dtms then pic each sub points of the bankers around it and set the area size to 2 on each one ( the area size button is above the toll)

it should look something like this:
http://i27.tinypic.com/2z6tg05.jpg

and then go >edit>DTM to text and look in the debig box and the DTM will be there

Well done you have finished part 4 of this tut!

Making The Banking DTM

There is one or to ways to use the DTM with the minimap we are going to use DTMRotated.

procedure LoadDTMs;

and place your DTM in there like so

procedure LoadDTMs;
begin

DTM := DTMFromString('78DA634C63606030674001E5F9F9609A118 8F' +
'F03016316906184AAE6EB5706B81A309D07248C51D5BC7D8B A626' +
'17D3AE3F7F9850D5140309535435FFFEF1A1AA4920C29C488 49B9' +
'970B9390248981130270853CDBF7FC2286A0090341A79');
end;


and when you do this always remember to call on the DTM in the mainloop

begin
setupsrl;
LoadDTMs;


also you have to declare the DTM in your var at the start of your script like so

var
DTM: integer;
x, y: integer; // dont forget to include this for the clicking



to use the dtm in your script there are many ways i will teach you one of the many ways.


procedure GetInToBank;
begin
MakeCompass('S');
wait(1000);
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln ('found bank dtm');
wait(1000)
Mouse(x, y, 5, 5, true);
FFlag(0);
end;



this would be the procedure you would use to get into the bank.

the..
MMX1, MMY1, MMX2, MMY2)

they are the mini-map co-ords so it will search there in the mini-map


MakeCompass('S'); makes the compass south

Mouse(x, y, 5, 5, true);
that will click on the DTM if you have it correct


FFlag(0); waits till you get into the bank.

Well Done you have completed Part 4 of this Tut!!!!


Testing Your DTM

After you make a dtm save it to a file by going
file>save then quit our of the editor then go back into it and go
edit>load new image and open up one of the images you used for your DTM and then go file>open and open up the DTM you saved just before and if there is a big cross over it then you are done
http://img74.imageshack.us/img74/6793/finaltutzv8.jpg

If it looks like this then

YOU NOW KNOW DTM's

Lee Lok Hin
04-18-2008, 08:22 AM
Nice tut, but you still havent fixed "pait" :P

Anyway, Great tut, Work on your standards. Nice pictures :D


procedure DropTheYewLogs;
begin
if FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('rop');
end;
end;

NiCbaZ
04-18-2008, 09:21 AM
thanks for the fast feedback yeah thanks for pointing that put to.

Naum
04-18-2008, 10:52 AM
Very nice tutorial will help noobs alot,
I Like it!!! rep++!
GJ

NiCbaZ
04-18-2008, 11:07 AM
np just telling every one that DTM's are very easy

PvH
04-20-2008, 02:03 PM
nice tut.. but i think bank dtm isnt working that way:

procedure WalkToEdgeBank;
begin
if (not(loggedIn)) then exit;
status('Walking To bank');
radialWalk(findVarrockRoadColor,125,180,55,2,2);
FFlag(0);
if DTMRotated(EdgeBank, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Status('found bank dtm');
wait(1000+random(250));
Mouse(x, y, 5, 5, true);
FFlag(0);
wait(1000+random(450));
end else
begin
writeln('Could not find Edgeville Bank, switching players!');
nextplayer(false);
end;
end;

it finds the bank, but clicks not even near the dtm!
it clicks on the south west of the minimap

NiCbaZ
04-21-2008, 02:18 AM
Mouse(x, y, 5, 5, true);

was for cammy just use 2,2 o something 5,5 was made for cammy..

HyperSecret
04-21-2008, 02:46 AM
looks like a good tut, you should also show them how they can just do it straight from the RS client instead of making and saving files...that is how i do it, works a lot faster and easier IMO

P1nky
04-21-2008, 03:20 AM
1 sec i dont understand the testing DTM why didnt you do that for log.. thats where i go wrong always.. sometimes the X goes half off the log and half on log?

could you explain why?

otherwise great tut

NiCbaZ
04-21-2008, 06:50 AM
just make the mainpoint in the middle of the DTM and it should be in the middle

thomaswood5
04-21-2008, 07:04 AM
Great tutorial, I haven't used DTMs before, this makes them seem really easy, hope they really are that easy.

M_Back
04-22-2008, 12:28 PM
One thing I don't get is what the difference between DTMs and bitmaps are? Which one of them are best? Or maby both are good at a certain area? For example, that bitmaps would be good at finding stuff in the inventory and DTMs would be good at finding stuff at the minimap. Idk, plz tell. ;)
And if both are just as good, then which one is best/easiest to learn? Or maby that changes from person to person...

Thx in advance. :)
Billy

PvH
04-22-2008, 12:33 PM
dtms use points.. and require less memory
bitmaps are pictures and require a lot of memory.
its up to you which one to use^^
i recommend dtms, as they are not that hard to make and they use less memory

p.s.
got the dtm working..
i made a wrog dtm :duh:
thanks!

NiCbaZ
04-30-2008, 10:11 PM
kk thx hope it helped

Jackrawl
05-05-2008, 04:17 AM
I don't mean to point and laugh, but you should change the title. DTM's = Easy evaluates to a boolean, you should have it so that it's DTM's := Easy.
Just in case, that is.

iamcool04
08-01-2008, 02:50 AM
very nice, it will help a lot

0wn 4 skill
08-09-2008, 11:28 AM
This is great!
However, when I tried to run my own it opens up the "Color" include in the Core SRL folder. It says there is an access violation. I have re-installed SRL and Rev. Any ideas?

AzulDrake
08-25-2008, 06:08 AM
Nice tut. thanx for the time and effort . Can't wait for the rest :)

masterBB
09-11-2008, 05:10 PM
Dear "who_ever_wants_to_respond_this",

When I use DTM to find the bank, it doesn't work like I want it. The first few times it works, but after that I logged out and in again, it can't find the bank/DTM.

I also tried your "camelot bank" code from the tut but its not working...

Can anyone help me? Or does anyone knows what I am doing wrong?

plz reply

*edit*
TheVoiceInYourHead, ty, I didn't know the main point needed a high tol. And I just forgot to try it.

TViYH
09-11-2008, 08:06 PM
I'd say you need a higher tol on the main point.