Results 1 to 18 of 18

Thread: How do you find an image that can rotate?

  1. #1
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How do you find an image that can rotate?

    How do I find an image but when its in the game it rotates and hovers up and down. I tried finding the DTM buy I looks like DTMs can't be found if they're rotated.

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can use DTMRotated from SRL or FindDTMRotated from SCAR


  3. #3
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nvm I found out how to use it but, It still won't find the Image...

    http://www.miniclip.com/games/monkey-snowfight/en/

    Coconut in that game.

    SCAR Code:
    program Monkeysnowfight;
    {.IncludeSRL/SRL.Scar}


      Var

      x, y, CocoDTM: Integer;
      DTMAngle : Extended;

    Procedure Init;
    begin
      CocoDTM := DTMFromString('78DA631467606090634001D73A2C197418191' +
           '88088E13F10304A011902A86A5444D9C0342394CF280F242450D5' +
           '24590AA0AA51006924A0461A4868A3AAE1E7E74755230C24B450D' +
           '5D8DBDBA3AA016951465513622E8DA9469A805D22404204558DAD' +
           'A5098A1A0021300BB0');
    end;

    Procedure Createroom;
    begin

    end;


    Procedure Setpower;
    begin
      HoldMouse(545, 215, True);
      Wait(731);
      ReleaseMouse(545, 215,True);
    end;

    Procedure Findpowerup;
    begin
      if FindDTMRotated(CocoDTM, x, y, 0, 0, 100, 180, -1, 360, 5, DTMAngle) then
      Writeln('I found the DTM.');
    end;



    begin
    Init;
    Findpowerup;
    Setpower;


    end.

  4. #4
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Your chances at finding something that rotates are pretty slim, even with using a few DTMs and rotating them, or the mordaut random wouldn't be such a problem.
    What exactly is it that you need to find?
    Your best bet will probably be TPointArrays, but it depends on what you are finding.

  5. #5
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by almost View Post
    Your chances at finding something that rotates are pretty slim, even with using a few DTMs and rotating them, or the mordaut random wouldn't be such a problem.
    What exactly is it that you need to find?
    Your best bet will probably be TPointArrays, but it depends on what you are finding.
    If the thing that is rotating is 2d, it's very easy. Using a TPointArray would just be.. stupid.

  6. #6
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm trying to find the power ups that pop up out of the pipe.

  7. #7
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    FindDtmRotated(.... should work for that, just use a TPA as a back up though

  8. #8
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Baked0420 View Post
    FindDtmRotated(.... should work for that, just use a TPA as a back up though
    Mind explaining how he would even go about using a TPA..?

  9. #9
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    FindColorsSpiralTolerance(x, y, Coconut, coconutcolor, x1, y1, x2, y2, 5)?

  10. #10
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah, but how could he use that to find something that's rotating?

  11. #11
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    it's just finding a color, it doesn't matter if the object is rotating or not, right? how does it rotating mess up finding the color?

  12. #12
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    Yeah, but how could he use that to find something that's rotating?
    Using TPA's for this isn't hard either...



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  13. #13
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Using TPA's for this isn't hard either...
    Way harder than it could be.

  14. #14
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If the thing that is rotating is 2d, it's very easy. Using a TPointArray would just be.. stupid.
    Wtf are you talking about?
    I didn't know if the object was rotating on 1, 2, or 3 axises.
    If it is one (just moving around the screen or spinning) then you could use a DTM.
    If it is rotating like in the mordaut random, use a TPA.
    Otherwise you most likely won't find your object.

    You can use a TPA no matter what kind of rotation it is doing though.
    So that would be what I would go with, rather than messing with making a DTM and doing the testing to make sure it finds it at all the different angles.

    Way harder than it could be.
    Seriously, do you know what a TPA is?

  15. #15
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by almost View Post
    Wtf are you talking about?
    I didn't know if the object was rotating on 1, 2, or 3 axises.
    I didn't either. I think you misinterpreted the way I said that; I wasn't trying to say that what you said was stupid, but that if it's a rotating 2d object, then using a TPA would be overkill since you could use a DTM instead.

    Seriously, do you know what a TPA is?
    Yes..

  16. #16
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    it is a 2D object, if you just click on the link real quick and play the game once you'd see, but it does exactly what he says, it moves up and down, and rotates in circles. I would just use a FindDtmRotated, it should find your coconut, so have you made something to find the coconut yet Kasmember?

  17. #17
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I decided to use 'FindColorTolerance' It works fine because the colors are such that there is no confusion.

    Does anyone have any hit on setting the angle of the cannon before it shoots? The problem is, it needs to find the button that angles the cannon and then from there it needs to adjust according to where it clicked. Idk how to explain it.

  18. #18
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I just found out that this wasn't for RuneScape lol.
    I clicked on the link and it says I can't connect to play the game though...

    I didn't either. I think you misinterpreted the way I said that; I wasn't trying to say that what you said was stupid, but that if it's a rotating 2d object, then using a TPA would be overkill since you could use a DTM instead.
    K gotchya
    Just IMO DTMs are more work than TPAs.
    Well, as far as RuneScape.
    I can't take a look at this game though.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 14
    Last Post: 06-07-2013, 02:46 AM
  2. How to rotate ?
    By Dervish in forum OSR Help
    Replies: 6
    Last Post: 01-11-2009, 05:23 PM
  3. how to rotate and search?and findmouse?
    By chitin in forum OSR Help
    Replies: 7
    Last Post: 12-23-2007, 04:00 AM
  4. How to rotate screen, can't find :S
    By PwNZoRNooB in forum OSR Help
    Replies: 7
    Last Post: 07-28-2007, 06:28 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
  •