Results 1 to 18 of 18

Thread: Selecting an item?

  1. #1
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Selecting an item?

    Im having trouble making my script right click on a picture, im trying to make it right click on an interface e.g a leather crafting interface but im having no luck. I have tried bitmaps, Dtm's colour and i have no idea what to do :S i think the colour on the pciture keeps changing because no matter what i do it doesnt work here is what i was trying:

    Code:
     If FindColorSpiralTolerance(x, y, 1783369, MSX1, MSY1, MSX2, MSY2, 4) Then
      Mouse(X, Y, 0, 0, false);
    but it just clicks somewhere else on the screen and not the colour its ment too -.- i have tried changing the colour many many times but with no luck.

    I have also tried to get a id for it so i could use reflecting but rsbot doesnt show id's for things on an interface it seems.

    -Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    164
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you tried TPA's? They look really intimidating at first, but after reading this tutorial they're actually not that bad: http://www.villavu.com/forum/showthread.php?t=33111

    I was having the same problem trying to find trees, but i got it working by reading that tutorial and following the code example. Good luck!

  3. #3
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i just tried that lol and it clicked somewhere else yet again:S

  4. #4
    Join Date
    Aug 2009
    Posts
    164
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Can you post a screenshot of the interface so we can get an idea of what you're trying to do?

  5. #5
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here it is its the oak log

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Hmm Bitmaps should work perfectly. In the code you posted you need a randomness in your Mouse, otherwise it won't move the mouse. So just use something like this:
    SCAR Code:
    Mouse(x, y, 4, 4, False);
    That should work.

    EDIT: I would still suggest using Bitmaps, make sure that if you are saving them using MS Paint, or whatever program, that you save them as a 24-Bitmap image, otherwise it won't find it.

  7. #7
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok il try it, also which part of it should i bitmap? i have been bitmapping the a block in the centre

  8. #8
    Join Date
    Aug 2009
    Posts
    164
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you tried reading the text?

    Also, those objects are pretty big, couldn't you just have it click on fixed coordinates?

  9. #9
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by scuz 10 View Post
    Have you tried reading the text?

    Also, those objects are pretty big, couldn't you just have it click on fixed coordinates?
    Not a good idea for item finding...

  10. #10
    Join Date
    Aug 2009
    Posts
    164
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Isn't he just trying to select an interface option? the button is pretty big and i doubt it would ever move out of range...

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by scuz 10 View Post
    Isn't he just trying to select an interface option? the button is pretty big and i doubt it would ever move out of range...
    It's not that it would move out of range, it's just if he clicks the exact same spot over and over again, that's an instant ban. I guess if he can make a sufficient randomness too it he would be fine, but what I said earlier should solve his problems.

  12. #12
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    mousebox????
    I do visit every 2-6 months

  13. #13
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Generally those types of items are clickable in a perfect square (no matter the shape). That being so, a MouseBox would be perfect, efficient, and completely not bannable

    EDIT: Ninja'ed

  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by ZaSz View Post
    mousebox????
    Oh yeah forget what I said, mousebox would work much better.

    EDIT: And what Tad said.

  15. #15
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is there a guide on Mousebox anywhere? Also i just tried another bitmap and still no joy.

    SCAR Code:
    Procedure BuyTheOaks;
    var
    x, y : Integer;
    begin
    Oaklog := BitmapFromString(41, 39, 'beNrFl11LQkEQhn9MUdHHdU' +
           'REEX1gWGalYoWIUZIhWIlYSRQEEUQQQXTTf21gYHrZ3dkzZwmC50L' +
           'Us895Z/ac3R1WhvXZj2FFeOvvCS+9kvB0UQzy3N0W8P/E69WugMO+' +
           'D/aZu+O5fm0m027RoUvTIUY16ixqzYsiUlPNjWX3yRUT1Z+3VVIbg' +
           '1uM8ZikQ1hNqfFLvNbpoE+aF9WaPVOnlTSoQ74fDuNqv57JMfFX6h' +
           'qrBcdumTkWryNlSJ0ZPE0XHAcfTFEzX6OagMPG0QIiKB2dbhKsRnv' +
           'mIHnBp5KlmlpSRyZn3KVV+Ka1LnTry6J27GleTYphScr4Xqfj9u7j' +
           '44DLDYbtVJeEoNqxB/Nqc16TSljipLxAZKbOdFnaikZGCo5e5+mOe' +
           'LUKD5prAtcWjU6v83qNbQ0arxurDKr9hTsYFteRx/MtQZKyDmdU72' +
           'hFkHtzqu14I6uGL23uzBOZRuK+XSAiak3qtzWXkaFrUa11U6tw0Ih' +
           'zDN8keCE/BdJiwvcGpY6RkJlDRGIK/D4XtV9Y/gN3kGkfLApYVUtS' +
           'XER4fNoQMhgTFYzWyjSpqC8PpvkzPn1BLFK/sNoOlrzd8hR9g0PZi' +
           'XczvmduFcYJnBsYIYJdqt1AY2OsU5pkcDRsFqKd+1hq3KszZ8UJKr' +
           'iQcKK0x3T2t5RaJjnBN2A8S1qIqCk1vkjlHiyX+6+dXOcU3Jvhhtx' +
           '5v/GWO/imzZU0og7uErVl9N/V/g0Yj0t/pTYmxfZZ1NoBKlnNKSJq' +
           '3DgFgyeE/T0h/gA7YeNy');
           If FindBitMap(OakLog, x, y) Then
           Mouse(x, y, 0, 0, False);
           ChooseOption('All');
           FreeBitMap(OakLog);
           end;

  16. #16
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by pl0xmypl0x View Post
    Is there a guide on Mousebox anywhere? Also i just tried another bitmap and still no joy.
    Well your bitmap is way too big to begin with, and you still use a randomness of 0 in your mouse click. You need to say:

    SCAR Code:
    Mouse(x, y, 4, 4, False);

    And to use MouseBox, you just specify the box you want to click in, and it will click somewhere in that box. Make sure you drag the crosshairs to the RS window before you try to get coordinates otherwise they could be messed up.

    The coordinates of the point you are moused over can be found at the bottom left of the SCAR window. Good luck.

  17. #17
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Personally I use the color picker when finding coords. For using MouseBox



    MouseBox(x1,y1,x2,y2,TypeClick);

    TypeClick is an integer too.

    1 - Left Click
    2 - Right Click
    3 - Mouse Over

  18. #18
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    box worked perfectly and thanks for that pic helped lots
    Last edited by pl0xmypl0x; 08-26-2009 at 09:53 AM.

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
  •