PDA

View Full Version : shopScreen



Element17
07-23-2014, 07:53 PM
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.



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;

Ashaman88
07-23-2014, 08:18 PM
What does the shopscreen look like :)

Element17
07-24-2014, 06:56 PM
What does the shopscreen look like :)

http://img4.wikia.nocookie.net/__cb20140128211242/runescape/images/thumb/e/e5/Brian%27s_Battleaxe_Bazaar_stock.png/180px-Brian%27s_Battleaxe_Bazaar_stock.png

Turpinator
07-24-2014, 07:07 PM
http://img4.wikia.nocookie.net/__cb20140128211242/runescape/images/thumb/e/e5/Brian%27s_Battleaxe_Bazaar_stock.png/180px-Brian%27s_Battleaxe_Bazaar_stock.png
http://gifrific.com/wp-content/uploads/2013/10/What-is-this-A-Center-For-Ants-Zoolander.gif

Element17
07-24-2014, 07:15 PM
Oh my that is small.

Try this one.

23651

Ashaman88
07-24-2014, 07:20 PM
Oh my that is small.

Try this one.

23651

http://gifrific.com/wp-content/uploads/2013/10/What-is-this-A-Center-For-Ants-Zoolander.gif

Element17
07-24-2014, 07:20 PM
Oh my that is small.

Try this one.

23652

Ashaman88
07-24-2014, 07:21 PM
Oh my that is small.

Try this one.

23652


I see I see, cool thanks!

Element17
07-24-2014, 07:30 PM
Yeah no problem! It should work for any shop in Runescape.

Turpinator
07-24-2014, 08:55 PM
Oh my that is small.

Try this one.

23652

i was expecting a small one again...

Element17
07-24-2014, 10:09 PM
i was expecting a small one again...

Haha well sorry to disappoint.

KeepBotting
08-06-2014, 04:18 PM
LOL this thread made me laugh, and has a great snippet in it as well :)

Incurable
08-13-2014, 04:27 AM
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

HKbotz
01-11-2015, 01:14 AM
Nice, saves me from having to make one :)
Had to change it slightly though.


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);