Results 1 to 9 of 9

Thread: Detecting a shop screen.

  1. #1
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Detecting a shop screen.

    I've reached a block in my script atm and cant think (or find ) anything to solve it.

    I basically want to detect if a shop screen (or something similar) is open.

    Right now i have a messy fail safe instead of a way to detect the screen, right now i have it check if it can find the trader after every 5 seconds when the shop screen is open so if it is not open it will trade the trader and continue with the script. This is very buggy and adds 30 seconds to the trading.

    I need something that can detect if the shop screen is open, if it is then it just does nothing, if it isn't then it trades the shop and continues.

    So to sum it up i need help creating something that can detect a shop screen, if found does nothing, if not it trades again.

    Any help is appreciated

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Check out the colors of the outlines of the name of the shop or the items in the shop.
    They black outline of the letter/items will be either 0 or the color of the outline of every item which is constant.

    Then just use a simple if getcolor(X,Y)=0 (or whatever color) then bla.

    Get me? Super fast, super easy! It's how I do it!

  3. #3
    Join Date
    Apr 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I use a find a color at coord x,y command in an if/then statement in my pizza base maker. it theres any color that wouldn't normally appear at a certain point on the screen unless your in the shop screen then this should be successful.

  4. #4
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    i did something like this for detecting if my teleport failed or not but i instead used findobjcustom, tried using the same thing for the trader but couldn't find a unique enough colour.

    So how would i use the getcolor(X,Y)=0 ? where does the colour go?

  5. #5
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by tieyob View Post
    I use a find a color at coord x,y command in an if/then statement in my pizza base maker. it theres any color that wouldn't normally appear at a certain point on the screen unless your in the shop screen then this should be successful.
    Yeah the thing i don't know how to do with that is how to find the x and y coordinates of a point on smart, how did you do it?

  6. #6
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    I read text off of the screen, much better
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  7. #7
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    I read text off of the screen, much better
    I tried doing this with ACA to read the shop's name, but it couldnt ever find it =p

  8. #8
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by ssshhhaaa View Post
    Yeah the thing i don't know how to do with that is how to find the x and y coordinates of a point on smart, how did you do it?
    You drag the cross-hairs to smart, click the color picker/dropper tool, and click on the point of interest. Then in the debug box it will tell you X, Y coordinate and the color picked!

  9. #9
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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
  •