SRL Archive - RS3 Help

Banking at GE


allinall

2014-03-26 16:07:56

I was wondering how to bank at the GE. Like what code our tool due i need to use?

Ian

2014-03-26 16:43:12

You'll need to use an object finding technique to find the the banker. I'd recommend reading scripting tutorials that cover basic TPA usage.

This one should work: http://villavu.com/forum/showthread.php?t=107757 :)

allinall

2014-03-26 17:44:50

I looked at that one but the banker at the GE is wearing gray and everything around him is gray so it found the color everywhere.

Ian

2014-03-26 21:27:08

Could you send me a screenshot of the banker?

bonsai

2014-03-27 07:56:58

Here's a function I was working on at some point. It worked a lot of the time but with all the people moving around, blocking things, matching the colors you are looking for, etc, it's still unreliable.

If you were standing in one place with the banker in view it would work. If you're moving back and forth it's going to fail with some regularity.

It looks for three possible matches. The books on the column behind the banker, the gold color on his jewelry, and the black of his shirt. If all three fail, it tries the gold and black again with smaller boxes.


function findBankGE(var objBox: TBox): boolean;

var
searchBox: TBox;

begin
result := false;

// needs a rewrite

writeln('---- in findBank()');
mouse(lastFoundBank, MOUSE_MOVE);
if (isMouseOverText(['ank'])) then
begin
writeln('---- findbank() found bank at last known position, ', lastFoundBank, ' exiting');
result := true;
x := lastFoundBank.x;
y := lastFoundBank.y;
exit;
end
else
begin
searchBox := mainscreen.getBounds();
searchBox.y1 := searchBox.y1 + 20; // reduce false positives from "subscribe" ad
searchBox.y2 := mainscreen.getBounds().getMiddle().y+65; // it should be above us

result := mainscreen.findObject(x, y, [1913431], [7], colorSetting(2, 0.41, 1.61),
mainscreen.getCenterPoint(), 60, 60, 600, ['ank'], searchBox, MOUSE_NONE);
y := y + 35;
mouse(point(x, y), MOUSE_MOVE);
if (isMouseOverText(['ank'])) then
writeln('---- findbank() matched books')
else
begin
// goldish color matches face, necklace, belt
result := mainscreen.findObject(x, y, [6463945], [17], colorSetting(2, 0.17, 1.00),
mainscreen.getCenterPoint(), 50, 85, 400, ['ank'], searchBox, MOUSE_NONE);
if (result) then
writeln('---- findbank() matched gold color (large)')
else
begin
// matches black color (shirt/belt)
result := mainscreen.findObject(x, y, [1186330], [7], colorSetting(2, 1.63, 2.35),
mainscreen.getCenterPoint(), 25, 25, 200, ['ank'], searchBox, MOUSE_NONE);
if (result) then
writeln('---- findbank() matched black color (large)')
else
begin
// if we couldn't find it, lets try smaller boxes
result := mainscreen.findObject(x, y, [6463945], [17], colorSetting(2, 0.17, 1.00),
mainscreen.getCenterPoint(), 25, 42, 200, ['ank'], searchBox, MOUSE_NONE);
if (result) then
writeln('---- findbank() matched gold color (small)')
else
begin
result := mainscreen.findObject(x, y, [1382425], [4], colorSetting(2, 2.09, 1.40),
mainscreen.getCenterPoint(), 15, 15, 90, ['ank'], searchBox, MOUSE_NONE);
if (result) then
writeln('---- findbank() matched black color (small)')
end;
end;
end;
end;
if (result) then
begin
lastFoundBank := point(x,y);
writeln('---- findbank() found bank at new position, ', lastFoundBank, ' exiting');
end
else
writeln('---- findbank() bank not found.');
end;
end;