Results 1 to 14 of 14

Thread: shopScreen

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default shopScreen

    I wrote this function to determine if a shop's screen was open. I didn't see anywhere in the include that this was already done. I'm not sure how well it works. It gets the job done for me.


    Simba Code:
    function shopScreen(Wait: integer = 0): boolean;
    var
      t: integer;
      b: TBox;
      TPA: TPointArray;
    begin
      if not isLoggedIn() then
        exit;
      t := (getSystemTime() + Wait);
      repeat
        b := IntToBox(520, 39, 532, 51);                                             //may add another check
        if findColorsTolerance(TPA, 1072344, b, 24, colorSetting(2, 0.24, 0.53)) then  // red box top right
          writeln('Shopscreen is open');
          result := true;
          exit;
      until (getSystemTime() >= t);
    end;
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  2. #2
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,656
    Mentioned
    179 Post(s)
    Quoted
    1868 Post(s)

  3. #3
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    What does the shopscreen look like
    http://img4.wikia.nocookie.net/__cb2...zaar_stock.png
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  4. #4
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

  5. #5
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Oh my that is small.

    Try this one.

    180px-Gerrant's_Fishy_Business_stock.png
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  6. #6
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,656
    Mentioned
    179 Post(s)
    Quoted
    1868 Post(s)

  7. #7
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Oh my that is small.

    Try this one.

    shopScreen.png
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  8. #8
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,656
    Mentioned
    179 Post(s)
    Quoted
    1868 Post(s)

  9. #9
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Yeah no problem! It should work for any shop in Runescape.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  10. #10
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by Element17 View Post
    Oh my that is small.

    Try this one.

    shopScreen.png
    i was expecting a small one again...

  11. #11
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    i was expecting a small one again...
    Haha well sorry to disappoint.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  12. #12
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,217
    Mentioned
    112 Post(s)
    Quoted
    1861 Post(s)

    Default

    LOL this thread made me laugh, and has a great snippet in it as well
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  13. #13
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    Quote Originally Posted by Element17 View Post
    Haha well sorry to disappoint.
    I was actually incredibly disappointed, I laughed so hard when I saw the second small image and the same reply from Ashaman. XD

  14. #14
    Join Date
    Jul 2014
    Location
    My computer
    Posts
    78
    Mentioned
    8 Post(s)
    Quoted
    21 Post(s)

    Default

    Nice, saves me from having to make one
    Had to change it slightly though.

    Simba Code:
    repeat
      b := IntToBox(520, 39, 532, 51);                                             //may add another check
      if findColorsTolerance(TPA, 1072344, b, 24, colorSetting(2, 0.24, 0.53)) then  // red box top right
      begin //added begin and end because it was just executing the writeln() part if it was true, but the rest would always execute making it always exit true without wait.
        writeln('Shopscreen is open');
        exit(true); //shorter, just saves a line, no real difference.
      end;
    until (getSystemTime() >= t);

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
  •