PDA

View Full Version : DTM's



skilld u
04-11-2008, 03:16 PM
DTM's =]


In This Tut I Will Teach You:


Uses of DTM's
Making DTM's
Using DTM's
Finding DTM's In Your Inventory
Finding DTM's On the Mini-Map


Uses of DTM's:

Dtm's are very useful in scripting. You can use them to find items in your inventory and walking.

Making DTM's:

Making a DTM is extremely easy. The first thing you have to do is open the DTM editor in SCAR.

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

Next you need to paste an image into the DTM editor. Open up RuneScape and press the PrtScn button on you keyboard and go back to the DTM editor. Paste the image in by clicking the paste image button:

http://i32.tinypic.com/25sn0k3.jpg

Next you need to pick the center of the item that you are making the DTM of and set the tolerance, I usually use 10:

http://i26.tinypic.com/2wck9af.jpg

Here are the places that you should put the main and sub-points at:

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

After setting the tolerance you need to pick around 5 - 10 sub-points around the outside of the object. Make sure that they are the black color. The color is 65536. Once you have selected the sub-points you need to press DTM to text button:

http://i30.tinypic.com/2uijgwo.jpg

Exit out of the DTM editor and you will see your DTM in the debug box.

http://i29.tinypic.com/35b8qrd.jpg

Now that you have your DTM you are ready to use it :D

Using DTMs:

You have to declare your DTM as an integer at the beginning of your script.

program New;
{.include SRL/SRL.scar} //srl

var //variable
Log: integer; //DTMs are declared as integers

procedure DTMs; //declare all of your dtms in a
begin //procedure and call it in your main loop
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;

begin
SetupSRL; //don't forget srl
DTMs; //your DTM procedure
FreeDTM(Log); // don't forget to free your dtm at the end of your script
end.

Now you have to make it search for your DTM:

program New;
{.include SRL/SRL.scar}

var
Log: integer;
x, y: integer; //don't forget to declare x and y

procedure DTMs;
begin
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;

procedure DropTheLog;
begin
if FindDTM(Log, x, y, MIX1, MIY1, MIX2, MIY2) then // MIX and MIY are the
begin //Inventory coords
Mouse(x, y, 5, 5, false); //right clicks the log in the center.
ChooseOption('rop'); //chooses the drop option
end;
end;

begin
SetupSRL;
DTMs;
DropTheLog;
FreeDTM(Log);
end.



Making DTM's for Walking:

For this I am going to use the bankers in Draynor to show you. Make the main-point the white dot where you want to be and the sub-points each of the bankers.

http://i30.tinypic.com/w88faa.jpg

Finding DTM's on the Mini-Map:

First make a DTM of something on the mini-map. If you don't know how to make a DTM than re-read the beginning of the tutorial. Now that you have your DTM you need to make it search the minimap for it.

This will search the Mini-Map for the bankers DTM and if it finds it then it clicks. It is made for the bankers in Draynor.

program New;
{.include SRL/SRL.scar}

var
Bankers: integer;
x, y: integer;

procedure DTMs;
begin
Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C5 03' +
'EA31090904455F3E70F13A61A41026A8481841C7E3500E041 09A4' +
'');
end;

procedure EnterBank;
begin
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then // MMX and MMY are the
begin //mini-map coords, use DTMRotated when searching the mini-map
Mouse(x, y, 5, 5, true); //clicks
FFlag(0); //waits until the flag is gone
end;
end;

begin
SetupSRL;
DTMs;
EnterBank;
FreeDTM(bankers);
end.



rep++ =]

LordGregGreg
04-11-2008, 03:19 PM
Very nice :)
You may want to mention exactly where the dtm is clicked (the center point i believe)

You are also 80% done on making a tutorial for DDTMs... ;)

Thanks for doing this though :)

skilld u
04-11-2008, 03:22 PM
thanks, i remember that you were the very first person that ever helped me. it was on my restless ghost quest runner. :D

ShowerThoughts
04-11-2008, 03:23 PM
Maybe explain the DTM making part more-.-

skilld u
04-11-2008, 03:24 PM
what do you want me to add to that part? i thought that part was the most in depth part :o

PvH
04-11-2008, 03:34 PM
add pictures of clicking points on the picture in the dtm editor and setting tolerance and so on:p
anyway
very nice tut!
you should make more:)
rep++

Torrent of Flame
04-11-2008, 03:35 PM
The Whole DTM Making?

The

- Click Centre of DTM
- Make Subpoints
- Up Centre Tolerance
- Saving
- Testing

Lots to go in depth about..

skilld u
04-11-2008, 03:36 PM
thanks, ill put up a picture of the subpoints soon.


edit: thanks TOF, I'll get started on that.

LordGregGreg
04-11-2008, 03:37 PM
what do you want me to add to that part? i thought that part was the most in depth part :o
Well, perhaps a picture showing what points you picked and why, explain how picking bad non-unique points is a bad idea, and can end up making you dtm found in other places, or not exactly where you want it to be.

Also, mention the memory issues of dtms, I think once you get above 3-4 points it's better to use a picture... so picking efficant points is necissary.

also, you may want to mention something about find rotated dtm, thats a pretty handy and fancy method.

skilld u
04-11-2008, 03:39 PM
I meant to use DTMRotated in the banker part, I'm working on all those things right now.

do you think i should add a DDTM part?

LordGregGreg
04-11-2008, 04:09 PM
I meant to use DTMRotated in the banker part, I'm working on all those things right now.

do you think i should add a DDTM part?
yes, althought, make a whole new tutorial methinks. seince ddtms arent really "beginer" stuff.

ShowerThoughts
04-11-2008, 04:10 PM
Btw, it is pretty much self explanatory, if you are good at it they can do much!

King of the Nites
04-12-2008, 03:06 AM
It's a nice Tut. You should just go in depth on how to check it. You know like what Yohojo said in his thread about DTM's.

Press Play
04-12-2008, 03:44 AM
nice tut...i understand it now:)

HyperSecret
04-12-2008, 03:47 AM
i think it was mentioned but yes add what you used as subpoints and mainpoints for the bankers and also the tolerance (why you picked it) and area size(why you pick it also)...would be helpful for people wondering about such things...

NiCbaZ
04-15-2008, 12:31 AM
very nice helped me with lots i got all except the banking i made the DTM and tested it but i still carnt get it to click n the bank help please also i tryed putting my dtm in your example as well and it didnt work either

thanks for help and +REP

mixster
04-15-2008, 12:37 AM
nicbaz, did you make sure to change the co-ords to MSX1 etc. and not leave them as MIX1 etc. as it would then be searching in your inventory rather than the bank.

Anyway, it's a nice tutorial, though you may want to suggest they add a small amount of tolerance for walking due to the slight colour changes between worlds and you've got a messed up [colour*] for the "Making DTM's for Walking:" bit :)

NiCbaZ
04-15-2008, 02:01 AM
nicbaz, did you make sure to change the co-ords to MSX1 etc. and not leave them as MIX1 etc. as it would then be searching in your inventory rather than the bank.

Anyway, it's a nice tutorial, though you may want to suggest they add a small amount of tolerance for walking due to the slight colour changes between worlds and you've got a messed up [colour*] for the "Making DTM's for Walking:" bit :)

oh im a dummy i make all theese silly mistakes ty.

thebob142
04-28-2008, 03:18 AM
great tut it really explained well just now i'm getting a file access error when i run script other then that it complies and should work.

EvilChicken!
04-30-2008, 10:07 PM
5-star'ed the thread and rep+'ed you!
Good tutorial.

Now go and make more. (I voted yes btw.. 26 votes on yes ATM. Ha.)

skilld u
04-30-2008, 10:20 PM
thanks :D any ideas on what i should make my next tut on?

EvilChicken!
04-30-2008, 10:25 PM
Something that has never been done before or just been done one time, but poorly and forgotten a long time ago.

Just.. A high-quality pictorial tut that is fun to read. Like. Reaaaly fun. An INSPIRING tutorial. About something useful that many people don't know about? Or just a bunch of small things that are related to each other stuck together in a huge tut?

Its up to you..

Griff
05-03-2008, 04:34 PM
im just beginning to script, so it would be a little bit nicer if you would be going more in depth because im new at this whole scripting buisness

slayerkiller13
05-04-2008, 06:37 AM
im just beginning to script, so it would be a little bit nicer if you would be going more in depth because im new at this whole scripting buisness

same but it is good enough now i know how to use dtms in scripts ...tyvm :)

Baked0420
05-05-2008, 12:45 AM
yea, I'm pretty knew too, but I kinda understood DTM's but didn't get the sub and main points at all, the picture helped A LOT, but what does "free"ing the DTM do, you mentioned to free it, but didn't really say why/what it does.

kor
05-05-2008, 03:57 PM
whats the ''code'' to look for stuff at the main screen? you like the inventory is MIX1, MIY1, MIX2, MIY2, but whats the main screen?

TViYH
05-05-2008, 04:39 PM
yea, I'm pretty knew too, but I kinda understood DTM's but didn't get the sub and main points at all, the picture helped A LOT, but what does "free"ing the DTM do, you mentioned to free it, but didn't really say why/what it does.

Free'ing the DTM releases the DTMs memory-using...stuff...from the...memory, basically. It removes memory leaks, allowing SCAR to work faster.


whats the ''code'' to look for stuff at the main screen? you like the inventory is MIX1, MIY1, MIX2, MIY2, but whats the main screen?

The main screen coordinates are MSX1, MSY1, MSX2, and MSY2.

kor
05-05-2008, 05:01 PM
would it work to look for maybe a shop keeper with a dtm? and do i have to crop the image before pasting it? (or can i just print from rs, make those red lines and press dtm to text?)

TViYH
05-05-2008, 05:19 PM
Well, it depends on whether or not the shop keeper is stationary. Generally, DTMs are used for stationary objects that don't move, such as mining spots, or trees, whereas I believe DDTMs (Dynamic DTMs) are used for slightly moving objects. I honestly don't know anything about DDTMs, but I am sure that DTMs are used for still-standing objects.

EDIT: No, the image doesn't need to be cropped.

kor
05-07-2008, 06:26 PM
WOOT! helped me alot! i had a rough time trying to walk at first, but now it works :D

AC Lova123
05-08-2008, 08:34 PM
Thanks alot! this helped me understand how to use SCAR alot more!:)

ilyadusoleil
05-18-2008, 08:32 AM
Wow - i'll try an use these instead of bitmaps now :P

insanomano
05-20-2008, 02:32 AM
I didnt get how to make them??? with the clicking points and stuff to me it made no sense???

kor
05-20-2008, 09:46 AM
I didnt get how to make them??? with the clicking points and stuff to me it made no sense???
its really simple actually. first click the middle point / main point of your item. then you make subpoints on the sides of your item, click DTM to text and do the rest..

AzulDrake
08-25-2008, 06:28 AM
Good for a basic tut on DTMs