FindDTM Isn't Storing Coordinates! Help!

Discussion in 'Scar/Simba Help' started by A13594, Aug 21, 2008.

FindDTM Isn't Storing Coordinates! Help!
  1. Unread #1 - Aug 21, 2008 at 12:16 PM
  2. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Hi. I am kind of new to SCAR but I have created simple scripts with the function of FindDTM. It worked great. But today, I made a script with FindDTM and realized that it wasn't storing the mouse coordinates to x and y.

    Example: Here is a simple script that doesn't work for me:
    Code:
    program Test;
    {.include SRL\SRL.Scar}
    
    var
    x,y: Integer;
    Test: Integer;
    
    procedure TestDTM;
    begin
      Test := DTMFromString('78DA6354656260F06740017F0E406846289F5' +
           '102530D0CC0D5C803D5441050A308541346408D1A116A0C816A02' +
           '09A85106AA7123A04607A8C61DBF1A00214D0580');
      If(FindDTM(x,y,Test,0,0,1000,1000)) then
      begin
        MMouse(x,y,0,0);
        Writeln('Test DTM found.');
      end else
      begin
        Writeln('Test DTM not found.');
      end;
    end;
    
    begin
      SetUpSRL;
      TestDTM;
    end.
    Now when I run the script, it does check to see if it can find the DTM but when it does find it, it moves the mouse totally to the left side of the screen, outside of the client instead of where it found the DTM.

    Why isn't that simple script working??

    Helpful info:
    - It IS finding the DTM, just not moving the mouse to the right location.
    - It used to store the coordinates into x and y until today.
    - The DTM is perfectly fine.
     
  3. Unread #2 - Aug 21, 2008 at 12:44 PM
  4. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    Make sure the client is targeted (drag the crosshair from SCAR to the client). Other than that, the only thing I could think of is to try to remake the DTM. Also try having it display what coordinates it found to you, by doing something like

    Code:
    writeln('x:'+intToStr(x)+' y:'+intToStr(y));
    before the mmouse.
     
  5. Unread #3 - Aug 21, 2008 at 1:12 PM
  6. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Ok... yes the client is targeted properly and I placed that code into my script and it returned the x coordinate to be 0 and the y coordinate to be 549.

    x: 0 and y: 549 is not where my DTM is located. My DTM is located at approximately 548,78. I don't understand why its not moving the mouse to the right location :(
     
  7. Unread #4 - Aug 21, 2008 at 1:31 PM
  8. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    Weird... It might be finding the wrong thing or something. Did you try making a new DTM? Is brightness on max? Maybe try changing to tolerance on the DTM.
     
  9. Unread #5 - Aug 21, 2008 at 2:28 PM
  10. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Yep i've tried all those...

    I think i'll try to re-install SCAR.
     
  11. Unread #6 - Aug 21, 2008 at 2:31 PM
  12. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    Wait, I might see the problem, one sec I'll edit this post with a fix.

    Code:
    program Test;
    {.include SRL\SRL.Scar}
    
    var
    x,y: Integer;
    Test: Integer;
    
    procedure TestDTM;
    begin
      Test := DTMFromString('78DA6354656260F06740017F0E406846289F5' +
           '102530D0CC0D5C803D5441050A308541346408D1A116A0C816A02' +
           '09A85106AA7123A04607A8C61DBF1A00214D0580');
      If(FindDTM(Test,x,y,0,0,1000,1000)) then
      begin
        MMouse(x,y,0,0);
        Writeln('Test DTM found.');
      end else
      begin
        Writeln('Test DTM not found.');
      end;
    end;
    
    begin
      SetUpSRL;
      TestDTM;
    end.
    
    There we go. You had FindDTM(x,y,Test,0,0,1000,1000) when it should have been FindDTM(Test,x,y,0,0,1000,1000) :p I'm surprised it didn't give an error for that. Then again, they're all integers, so yeah... Should work now.
     
  13. Unread #7 - Aug 21, 2008 at 2:39 PM
  14. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Oh! Thanks lol I feel so dumb :p

    Thanks alot :)

    Also, I have a problem using SCAR 3.15b with SRL.

    Whenever I try to run a script in SCAR 3.15b with SRL, I get an error that reads "Line 205: [Error] (364:1): Semicolon (';') expected in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Math.scar" and it opens Math.Scar in a new tab and brings me to line 205 which reads "MaxAngle := Angle1;"

    Know any way I can fix this? Until then I guess i'll be using SCAR 3.12?
     
  15. Unread #8 - Aug 21, 2008 at 3:34 PM
  16. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    It's probably just a line with a missing semicolon, put that on there and it should work. But, did you download SRL using Subversion? If not, you might have an outdated version of SRL. Here's my guide on how to get SRL using SvN if you haven't already -

    http://www.srl-forums.com/forum/ss15-your-full-t31202.html
     
  17. Unread #9 - Aug 21, 2008 at 4:04 PM
  18. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Um I downloaded the SRL through SCAR by going to File > Download SRL.

    So you have to download SRL through SVN by clicking a link?

    Shouldn't everything be obtainable and functionable through the SCAR program?

    Why is there even a "Download SRL" in File > Download of SCAR if it doesn't work properly..
     
  19. Unread #10 - Aug 21, 2008 at 4:24 PM
  20. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    No, it's much more simpler than that :p (That link in my guide installs Subversion, a program, which can be used to download the newest SRL Rev) Once you set up Subversion, two new options will appear on your File > ... in SCAR - File > Update SRL SvN, and File > Update SRL SvN to Rev... The download SRL is there I guess just because nobody felt like taking it off when SvN came along :p

    And, yeah, using Download SRL gets you like Rev 10 I think (Newest Rev is Rev 21, so you'd be a bit behind :p)
     
  21. Unread #11 - Aug 21, 2008 at 5:03 PM
  22. A13594
    Referrals:
    0

    A13594 Guest

    FindDTM Isn't Storing Coordinates! Help!

    Ok um so when I clicked "checkout" it opened that black cmd screen and started downloading stuff.

    When it is finished do I need to click file > Update SRL SVN? or does clicking "checkout" get u up-to-date already?
     
  23. Unread #12 - Aug 21, 2008 at 5:06 PM
  24. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    Checkout gets you up-to-date, though in the future you can now just use Update SRL SvN. Make sure you click the Move Plugins button (above Checkout), and you're all set.
     
  25. Unread #13 - Sep 8, 2008 at 9:09 PM
  26. Nightmare0
    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0

    Nightmare0 Active Member

    FindDTM Isn't Storing Coordinates! Help!

    lol you put variables reverse. don't worry, happens to the best of us.
     
< Need help with Runescape SCAR Script! | Is SCAR minimizable? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site