Page 1 of 9 123 ... LastLast
Results 1 to 25 of 207

Thread: Yohojo's DTM Tut 1(Item finding with DTMs)

  1. #1
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default Yohojo's DTM Tut 1(Item finding with DTMs)

    Update: Learn all of the below in a video I created found here:
    http://www.youtube.com/watch?v=SlS4q9MiFX4



    *Well i love DTMs and decided to share my knowledge with all of the other scripters. In this tutorial i will show you how to make DTMs for locating items on Runescape and MapWalking*

    Whats a DTM?

    • DTM stands for: Deformable Template Model.

    • A DTM i a special point on the screen that SCAR recognizes by how far it is from certain points and colors


    Why use DTMs?

    • DTMs are easy to make once you know how. They are also very precise and accurate

    • DTMs are easier to make then bitmaps and DTM codes are a lot shorter than bitmap codes.


    How to make a DTM to locate an item

    • In this first have of the tutorial i will show you how to use DTMs to locate items on the runescape bank screen or inventory. DTMs can not be used to find items on the mainscreen because there are many camera angles ect...

    Step1:
    • The first thing you should do when making a DTM for an item is get a picture of that item.

    • This can be done by logging into runescape and getting a picture of the item you want. Do this by putting the item in you inventory or bank account and pressing the key.

    • BUT it you are a Ub3R /\/0ob and dont have the item you need just go to a runescape help site and find a picture of the item there.
    After this open a paint document and paste the picture there.


    Step2:
    • Now you should open up a SCAR CDE and drag the corsshair to the paint screen making shure you can still see your picture.

    • Then you should go back to your SCAR CDE and click Tools>DTM Editor:


    • Congrats! You have just opened up the screen where all DTMs are made. Now the first thing you should do is click the middel of you item. After that your screen should look something like this:


    • The info on the right tells the x and y coodianates and the color of the point you just clicked. Because this is the first point you clicked it is called the Parent. The parent is the point that SCAR refers to when you do anything with the DTM.

    Step3:
    • Now we must create some "links" to make the DTM unique. Jagex made making DTMs for items oh so easy for us by outlining all of their items.

    *CONTINUED BELOW*
    Last edited by YoHoJo; 11-19-2011 at 10:00 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    *CONTINUED FROM ABOVE*

    •As you can see in the top left corner of the DTM editor there is a close up of a 9 pixel square. This helps us be more prcise on picking our points. And EVERY item in runescape is oulined with a onc pixel long black line. So now move your mouse arround your item and when you see some of the black outline in the center of the 9 pixel box click. After you click your first point it should look something like this:


    • You have just created you first "link"! This liink shows the distance from your parent to the outline of your object. Now all you have to do is create a few more links arround the outline of the object like so:

    NOTE: Try not to make a link at the top left corner otherise it wont work for stackable items or if you have multiple in your bank!
    Step4: Making the DTM "Universal"
    Runescape Updated, 131072 is now the black color. So make sure the color on your outline points is 131072
    • Now we must make the DTM what i call "Universal" meaning it works for all items of the type. Example: All logs have the same outline so the back color is ok. BUT my parent has a unique color so it will only work work normal logs.

    • So all you have to do to make your DTM universal is add some tolerance to the parent point. So now click the info about the parent and change the tolerance to 255(MAX):


    Step5: Saving and Testing the DTM

    •Now we must save the DTM:


    •After this we must test it. So now exit out of the DTM editor and find/take a differnt picture of the same item. Then click DTM editor again so the picture will be displayed.

    *CONTIUED BELOW*
    Last edited by YoHoJo; 11-09-2009 at 11:25 PM.

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    *CONTINUED FROM ABOVE*

    •Now we must test to see if your DTM works. So click:


    • If it worked correctly you should see somthing like this:


    Step6:: Useing your DTM in your script:

    •Using a DTM in a script is similar to using a bitmap in a script. First you must convert you DTM to text. So open up the DTM editor and click File>Open>Where ever your DTM is saved and click


    •Now exit out of the DTM editor and look in the SCAR report box you should see somthing like this:

    Code:
    DTM := DTMFromString('78DA63AC666460286740017509960CFF81345' + '086E13F1030B663AA81C8C248205D0B64D51050934F849A2A202B' + '8B809A26202B13BF1A0034E80BCD');

    •See where it says "DTM" before the :=? That is where you name the DTM anything you want to!

    •Now all we have to do it use it in a script like a bitmap. The FindDTM function goes as followed:
    Code:
    FindDTM(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Integer

    •This is what all of they variables mean
    DTM= Name of Your DTM
    x,y= The x,y cords that the dtm is it. (Scar finds this)
    x1,y1,x2,y2: The box in which SCAR tries to find the DTM in

    •So here is an example of using this DTM in a script:

    Code:
    program New; 
    var Logs,x,y:integer; 
    begin
     Logs := DTMFromString('78DA63AC666460286740017509960CFF81345' + '086E13F1030B663AA81C8C248205D0B64D51050934F849A2A202B' + '8B809A26202B13BF1A0034E80BCD'); 
    if FindDTM(Logs,x, y,1, 1, 200, 200) then 
    writeln('Congratz! You have just found your first DTM!')
     end.

    And this concludes Yohojo's DTM Tutorial

  4. #4
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    nice tutorial :PXD
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  5. #5
    Neonknight77 Guest

    Default

    Did Sdouble teach you this?

  6. #6
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    why do i see all the tutorial as huge wide blocks? like Sdcit's post is normal, and everything above is wider than normal

  7. #7
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Jagex: Its because i got big ol pics

    Neon: Yes, Sdouble toght me the concept of making DTMs like that

  8. #8
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, Yohojo you release this on every forum.

    It's good.

  9. #9
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Its good to learn =)
    And thz to starblaster for recovering it from kaitnieks!

  10. #10
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I rep'd you on kaitnieks for this. It's very good.

  11. #11
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    cmon guys anyone else wana learn DTMs?
    they are usefel!=)

  12. #12
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i learned DTMs from this!. very useful

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  13. #13
    Join Date
    Nov 2006
    Location
    Bel Air, Maryland, USA
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you for creating this guide, i am going to follow it closely and tell you how i do, thx alot

    wow works great, and it makes me understand and use dtms pretty well, mad props for the guide, and thanks again, this is code i came up with
    and this code only searchs your inventory for the logs, im gonna try and make it so it stores all in bank, so ill have to learn how to search for rs2 text so i can store in inventory

    SCAR Code:
    program New;
    var Logs,x,y:integer;

    begin
    logs := DTMFromString('78DA639466606010674001BE969C0CFF81342' +
           '310FF07024611208397010D302291405A8A08359A404292801A45' +
           '202147400D3711E608030945FC6A008B9706F2');
           if FindDtm(logs, x, y, 550, 200, 740, 470) then
           writeln('congratz! You have just found your first DTM!')

    end.

  14. #14
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    This will bank all logs after you open the bank:

    program New;
    var Logs,x,y:integer;

    begin
    logs := DTMFromString('78DA639466606010674001BE969C0CFF813 42' +
    '310FF07024611208397010D302291405A8A08359A40429280 1A45' +
    '202147400D3711E608030945FC6A008B9706F2');
    if FindDtm(logs, x, y, 550, 200, 740, 470) then
    Begin
    Mouse(x,y,5,5,false)
    Wait(200+Random(1000))
    PopUp('Deposit All')
    end;
    end.

  15. #15
    Join Date
    Oct 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey there people, just got back from being away, now that this hunter skill has been introduced, now, the thing is, im not sure if im really getting this right, can someone(not me, ffs) tell me where i might be going wrong, its compiling successfully, but the writeln is not tellin me 'congrats'

    SCAR Code:
    program New;
    var barbtail,x,y:integer;
    begin
     barbtail := DTMFromString('78DA63F4676260D060644006D19EC60CFF813' +
           '448F43F103082D4A8A0AA81C8C24820ED0254638C5B0D187B00D5' +
           '68E356C304A2FD80A40E0135A140520DB71A16101D0954A340404' +
           'D30508D3C7E35004D5D09C7');
           if FindDTM(barbtail,x,y,1,1,200,200) then
           writeln('congrats')
    end.

  16. #16
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    If its not saying crongrats its not working
    either the DTM you made doesnt Follow the rules i made ^ OR
    the DTM isnt within the cords (1,1,200,200)

    Also iv noticed that the outline of Hunter still isnt 65536 like all other skills and items
    maybey jagex messed up =p

    try again, if it doesn work ill help you out

  17. #17
    Join Date
    Oct 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    weird, when testing the dtm, it can find it, but when i try run, it just wont say the congrats bit

  18. #18
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    well remember like i said
    make it properly
    remember to put 255 on your center point
    and then click border (black) outline of it
    Also like i said the outline is kinda weird so add a tolerance of about 20 to the outline points

    and also, it should always work when you test it..
    if you make a DTM with a pic, and test it on the same pic its always going to fin it
    to test it better, exit out of the DTM Editor, and enter it again and then test

    Make it just like you would for an item even though your are doing it for a Skill Picture

    Here try this

    SCAR Code:
    DTM := DTMFromString('78DA63BCC0C8C0E001C448C0C1C28EE13F900' +
           '689FE0702C6D340961DAA1A5111110639A81A1060BC4A849A3340' +
           '962F01355708AB0100F8530CA0');

  19. #19
    Join Date
    Oct 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahh sweet, got it now dude, thanks man, looks like ive just stuffed up making the DTM, its a tricky one tho that barbtail poon, need a still hand lol

  20. #20
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    lol i just tried making some and i cant get it
    tell me if yours works all the time
    i just tried making 5 and none worked!
    ill get one eventually
    happy yours worked good job

  21. #21
    Join Date
    Oct 2006
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    crap, im probably waaay ahead of myself here but:

    SCAR Code:
    program fisher;

    var barbtail, x, y: Integer;

    procedure findbarbtail;
    begin
     barbtail := DTMFromString('78DA63BCC0C8C0E001C448C0C1C28EE13F900' +
           '689FE0702C6D340961DAA1A5111110639A81A1060BC4A849A3340' +
           '962F01355708AB0100F8530CA0');
           if FindDTM(barbtail,x,y,1,1,200,200) then
           writeln('found barbtail');
    end;

    procedure equipbarb;
    begin
     function ClickMSDTM(DTM: Integer): true;
    end;

    begin
    findbarbtail;
    equipbarb;
    end.

    result:
    Failed when compiling
    Line 15: [Error] (15:1): Identifier expected in script


    why?

  22. #22
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,636
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    ROFL
    replace
    function ClickMSDTM(DTM: Integer): true;

    with
    ClickMSDTM(barbtail)

  23. #23
    Join Date
    Apr 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    One quick question about dtms, what is the area size and shape? Is it like the tolerance of where the point can be or is it the actual area of the point or something else?

  24. #24
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think with DTMs where their is more instances of the color than just the parent you will have to add to the area field for the parent. TY for help on MSN yohojo.

  25. #25
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The Area Size is like a position tolerance. So, if the point moves around like something on the minimap would, you will still pick it up as long as that point falls within the area you specify. I've had the best luck with the normal square area shape and increasing area sizes as necessary.

    This is NOT needed for items in inventory, since they do not change size or shape. Also, do NOT increase the area size for the original parent pixel. That will just make it lag as it searches every point multiple times, and it won't find things any better. Only change the area sizes for surrounding pixels.

Page 1 of 9 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help finding GE Item Text
    By Bad Processor in forum OSR Help
    Replies: 9
    Last Post: 10-30-2008, 12:04 PM
  2. finding DTMs
    By TheChineseMan in forum OSR Help
    Replies: 2
    Last Post: 08-30-2008, 01:03 PM
  3. Cooking Item DTMs or BMPs
    By travo in forum OSR Help
    Replies: 5
    Last Post: 12-07-2007, 11:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •