SRL Archive - SRL Suggestions

Closing newbie ads


litoris

2012-08-08 17:49:31

I know that FindNormalRandoms doesn't close the ads you get when you get 5 magic or 10 strength on noob accounts, and I think that should be added. I was going to do it ymself but I can't use my own computer(overseas atm) till the 17th, and can't download any software to this PC I'm using. I gathered some images from the internet, seems like searching for the cross bitmap in the upper-right corner would suffice. Images for reference:
http://images3.wikia.nocookie.net/__cb57525/runescape/images/9/98/Wicked_hood_popup.png
http://i.imgur.com/G9OLo.png
Would be nice if someone with free time could do it.

Olly

2012-08-08 17:52:12

Look in the antiban include, I believe there is something that closes them :)

TehNeonFishy

2012-08-08 17:59:42

Or a new random event like a interface closer? I think that would be alot easier to keep on track and use.

Soulipsism

2012-12-13 00:12:31

I was about to suggest this when I came upon this thread, here is another picture.
http://i48.tinypic.com/2uyqb93.png

It looks like all of them have the x in the top right in common, it would be pretty easy, I'll take a look to see if there is anything already there to handle these annoyances.

edit: I didn't see any functions under the antiban include. I'll end up making something to detect these on one of my future scripts but it would be nice to have something built into SRL.

Olly

2012-12-13 00:16:45

^ Try this..

procedure ClickRedCross;
var
Cross_BMP, X, Y: Integer;
begin
Cross_BMP := BitmapFromString(9, 9, 'meJxjYMAHdDb+1Z75SNswU0k5VFI5QWvGQ92NfyFSQDZEVtG8FiKuPvU+REpRJR0iqwtGQHEe8SCIlJRUkKh2CVxKTKeUh8cZIiUsFak25R5WXRBxoAhQPZwNdyFEJTePE7dYIEQWr58YAPU3Qow=');
if FindBitmapTolerancein(Cross_BMP, X, Y, MSCX, MSY1, MSX2, MSCY, 20) then
if Pixelshift(IntToBox(164, 133, 339, 211), 400) < 5 then
begin
Mouse(X, Y, 3, 3, true);
Writeln('Closed a popup');
Wait(500 + Random(200));
end;
FreeBitmap(Cross_BMP);
end;

litoris

2012-12-13 12:10:06

IIRC I sent a pull request for this, and it was accepted. The function is called CloseAdWindow, might be outdated because of recent updates.

Olly

2012-12-13 12:17:18

Yeah it doesn't work when its a "big" ad, because uptext doesn't work when the ad is over half of the uptext but not the rest if you get me… which is why I used pixelshift around the middle.

footballjds

2012-12-13 12:19:04

Find this bmp:

blind click it.

/solution

litoris

2012-12-13 13:30:23

From: Ollybest
Yeah it doesn't work when its a "big" ad, because uptext doesn't work when the ad is over half of the uptext but not the rest if you get me… which is why I used pixelshift around the middle.

…which is why I did this in my functions:
From: footballjds
Find this bmp:

blind click it.

/solution

Olly

2012-12-13 13:36:46

Not sure if im missing anything but… if (WaitUptext('lose', 300)) then
?

footballjds

2012-12-13 13:52:06

From: Ollybest
Not sure if im missing anything but… if (WaitUptext('lose', 300)) then
?


pseudo code:

if FindBmp(BmpClose, x, y) then Mouse(x, y, 5, 5, Mouse_Left);