Results 1 to 6 of 6

Thread: DTM Troubles

  1. #1
    Join Date
    Jan 2012
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DTM Troubles

    I've recently been using DTMs to find some very specific items on the main screen. I've got the script set up, everything checked and ready to go but every time I set my DTMs they simply don't work.

    I've been using the DTM editor but every time I re-paste my DTM strings into the DTM string portion of the editor it places my DTM in the far left corner of the screen even though I meticulously created the DTM at an entirely different part of the screen.

    I can't seem to figure it out and I'm probably making a stupid error/assumption, which wouldn't be the first time when it came to SRL. Anyway, any help would be greatly appreciated! Any thoughts on how I can remedy this problem of the DTM editor placing my DTM's in the far left of the screen and thus making them not work in my script?

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Are you looking for something like an item in a bank, or a moving object, such as an item on the ground? If it's a moving object you will have to use FindDTMRotated();

    Either way post some code so we can help you further.

  3. #3
    Join Date
    Jan 2012
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm looking for a static object on the main screen that doesn't move (I'm making, err, trying to make a wilderness agility course script so the DTMs are for the various obstacles), and I have been using DTMRotated for this object (could that cause problems?). I think the trouble may possibly be coming from colors in general as the objects are in the wilderness that only has the vibrant colors of black, grey, brown, and the occasional off-grey so color identification could be causing some problems but I honestly don't think that should affect my dtms [I]that[I] much.

    I had the script working immediately after I made my DTMs, but I came back to it today and the strings I had set no longer worked. I considered that it could be due to runescape updating or an error in setting camera angle/direction but that wasn't the case, and after checking my strings in the editor it showed me that they were way out in the middle of nowhere in comparison to what I had the day before.

    This is the script that I had been using to test my dtms (as such there isn't really standards as it's more a proof of concept than anything), which worked but sadly does not work now with the same strings haha.

    Code:
    program dtmTester;
     {$DEFINE SRL5}
     {$i SRL/srl.simba}
    var
    
    tube,x,y:integer;
    afound: Extended;
    
    begin
    SetupSRL;
    
    tube :=DTMFromString('m6wAAAHic42ZgYPgPxD+AmJORgYENiL8A2QxA+htU7BOQ/gDEXEB2AJCOBuIIIPYFYj8gzgbiHCDOAOIkIA4D4kAgNjE1Y/ALCATTeYXFDFGxcQy8vLwM7p5ecOzq5sEQEBTMQApgJAEjAQDN/BL4');
    
    
    
    if FindDTMRotated(tube, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) Then
    begin
      writeln('Yay we found it');
      MMouse(x, y, 3, 3);
      Mouse(x, y, 0, 0, True);
      end;
    
      If not FindDTM(tube, x, y, MSX1, MSY1, MSX2, MSY2) then
      begin
      writeln('we didnt find it');
      end;
      
    
    FreeDTM(Tube);
    
    
    
    end.

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

    Default

    I highly suggest using DTMs for the main screen, as do many other people.
    Color is the way to go for mainscreen stuff. Check this out: http://www.youtube.com/watch?v=98wVrr6GwyU

  5. #5
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Find the obstacles using TPAs, it will be much more efficient. If you don't know how to use TPAs, try FindObjCustom(); or FindObjTPA;
    Last edited by Nebula; 02-11-2012 at 12:34 AM. Reason: added two more options

  6. #6
    Join Date
    Jan 2012
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok! Color it is. I have done some personal stuff with color, I just thought I'd give DTMs a go. But for now we'll put those away haha. Though I may bring them out for food usage. Thank you guys for your help! And Yoho, I've watched all your tutorial vids--they're awesome! They've helped little ol' me try a little scripting. I've used a little ACA, but now it looks like i'm gonna get a bit more familiar with it.

    I'm still a bit curious though, why would my DTMs mess up like that all of a sudden? Rookie mistakes probably?

Thread Information

Users Browsing this Thread

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

Posting Permissions

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