Results 1 to 9 of 9

Thread: Identyfying an object

  1. #1
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Identyfying an object

    Hello,
    I have the following problem


    my script is supposed to right click on the water talisman. I tried identyfying it by making a DTM and using color, but none work since the other talismans get recognized as well.
    Of course the noobiest method would be to just use the Mouse function, but what else could I do?

  2. #2
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't use the mouse function, you could try a bitmap, or just keep adding detail to your DTM until it only finds the water talisman. Alternatively, you could get a DTM of the water text, the move the mouse 20 pixels to the left of it.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    I say you use the mouse function, but that's often frowned upon. Try making a dtm that includes points from not only the talisman, but also from the "water" text.

    A more advanced way would be to gather all of the the green colors of the text into an tpa and then split it into an atpa and use the tpa whose length is closest to the amount of green pixels in the text "water".

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    I say you use the mouse function, but that's often frowned upon. Try making a dtm that includes points from not only the talisman, but also from the "water" text.

    A more advanced way would be to gather all of the the green colors of the text into an tpa and then split it into an atpa and use the tpa whose length is closest to the amount of green pixels in the text "water".
    Only reason I said no to mouse was because the window has a scroll bar, and it would fail miserably if it happened to be scrolled down.

    @OP, Nebula's method of using points from the talisman and the text is better then my just text idea.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  5. #5
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Make a box around it in your mind, grab the top left coordinate and the down right coordinate with the color picker tool. Substract 50 from both Y values. Make a MouseBox(X1, Y1-50, X2, Y2-50, 0); to right click on a random spot in the box. Then have a WaitOptionMulti(['all'], 500) to select buy-all or whatever option it gives.

    As you are just making a private script I guess to buy water talismans from the botted tokens just have a static wait. You can easily make a script for this with no knowledge within 1-2 days :P

    Script source code available here: Github

  6. #6
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    your dtm's motherpoint should be the colour of talisman. in this case you should select a blue pixel in the water symbol in the talisman and then make sure its not the same colour of body and law

  7. #7
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    made this DTM from your screenie
    Simba Code:
    DTM := DTMFromString('m6wAAAHic42ZgYAhhZGDwA+IYII4D4gAgDgLiMCD2AWIPII5ihKhbCVS/GYi3A/FGIF4OxGuBeCkSXgHEW4BYUnYdg5T8DgYh0XqG6RMmgPkzJk1iqK+qZCjKzQXy1wLlahmkFfYzcAHVE4sZScBIAAC96Rea');
    just make the dtm like this if my one doesnt work, finding the areas where the law and water talisman are different, use them as additional marking points

    gives this result
    Last edited by Enslaved; 10-15-2012 at 10:51 PM.

  8. #8
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    I'd say the easiest and most accurate way in this case is to just use OCR and find the text 'Water' and set x,y offset if you are supposed to click on the talisman.

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

    Default

    You are making the DTM wrong. I have a script that does exactly that.
    Add tolerance to the point(s) inside the black outlines. 20 always works.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

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
  •