Results 1 to 8 of 8

Thread: How can I do this?

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

    Default How can I do this?

    So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Just reverse the search coordinates (I think), so like this
    Simba Code:
    FindDTM(DTM, X, Y, MSX2, MSY2, MSX1, MSY1)
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    Just reverse the search coordinates (I think), so like this
    Simba Code:
    FindDTM(DTM, X, Y, MSX2, MSY2, MSX1, MSY1)
    Last I knew that gave an error. Search pattern is internal and can't be changed unless you use a different function or there's a way to change it via another method globally.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Ah fair enough. In that case I guess you could do multiple searches working upwards.
    Eg.
    Simba Code:
    FindDTM(DTM, X, Y MSX2-100, MSY2-100, MSX2, MSY2)
    And increase that 100 in intervals until you find what you want. Could be done easier in an for to do loop or a while do.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Or, is there a way to skip the found DTMs until the last one is reached?

  6. #6
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Simba Code:
    function FindLowDTM(DTM : LongInt, var X : LongInt, var Y : LongInt, XS, YS, XE, YE : LongInt) : Boolean;
    var
      sX, sY : Integer;

    begin
      sX:= XS;
      sY:= YS;
      repeat
        if FindDTM(DTM, X, Y, sX, sY, XE, YE) then
        begin
          Result:= True;
          sX:= X;
          sY:= Y;
        end;
      until(not(FindDTM(DTM, X, Y, sX, sY, XE, YE)))
    end;
    ?

    Something I just whipped up quickly. Haven't tested it but hopefully it'll work if I've thought it through properly...
    Last edited by Rich; 05-04-2012 at 07:48 PM.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  7. #7
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by peetu View Post
    So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?
    It's propably impossible ,but why you want to do this? You can simple use
    FindDTMs(); to get coords of all DTMs.

  8. #8
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Wow...Didn't even know about FindDTMs.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

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
  •