PDA

View Full Version : How to open Bank at GE



lanadekat
08-02-2014, 01:57 PM
I can't find a way to open the bank at the GE

bankscreen.open(BANK_NPC_GREY) doens't work, works on places where there are no people but not on the GE.
mainscreen.findobject also doesn't work.

Is there a simple way to open the bank? Walking to another bank is no option would make script halve as effective.

edit: I'm currently using another banker , with less people , but when there are more people it will probably stop working ...

KeepBotting
08-02-2014, 02:46 PM
mainScreen.findObject will work.

lanadekat
08-02-2014, 03:44 PM
mainScreen.findObject will work.
Well I can't find the correct collor to use ... or I get whole the GE ( almost everything is grey ) or I get 1 pixel to click on. Rotating the camera does help, but I don't know how to do it.

KeepBotting
08-02-2014, 03:52 PM
Well I can't find the correct collor to use ... or I get whole the GE ( almost everything is grey ) or I get 1 pixel to click on. Rotating the camera does help, but I don't know how to do it.

Zoom in to grab better colors

Sin
08-02-2014, 03:53 PM
function TRSGE.isOpen():Boolean;
var
s:String;
begin
s := tesseractGetText(IntToBox(139,76,438, 91), FILTER_SMALL_CHARS);
Result := Pos('Shown', s) or Pos('offers', s);
end;

function TRSGE.waitGEOpen(waitPerLoop, maxTime:Integer):Boolean;
var
t:Integer;
begin
Result := TRSGE.isOpen();
while (not Result) do
begin
wait(waitPerLoop);
t := t + waitPerLoop;
Result := TRSGE.isOpen();
if t >= maxTime then
break;
end;
end;

function TRSGE.open():Boolean;
var
TPA:TPointArray;
ATPA:array of TPointArray;
i, j:Integer;
T:TPoint;
begin
if TRSGE.isOpen() then
begin
Result := true;
exit;
end;
for i := 0 to 5 do
begin
colorSetting(2, 0.26, 1.04);
FindColorsTolerance(TPA, 4333872, mainScreen.getBounds(), 3 + i);
ATPA := TPAToATPAEx(TPA, 4, 4);
SortATPAFrom(ATPA, mainScreen.getCenterPoint());
for j := 0 to high(ATPA) do
begin
MiddleTPAEx(ATPA[j], T.x, T.y);
Mouse(T, MOUSE_RIGHT);
if chooseOption.optionsExist(['xchan', 'lerk'], 500) then
begin
chooseOption.select(['ge G']);
Result := GE.waitGEOpen(500, 5000);
if Result then
break(2);
end;
end;
end;
end;




From my merchanting script. Feel free to use it.


EDIT:
Oh DAMN, you wanted to open the BANK at GE, not the GE itself... My bad! but NPC GREY should work :S

lanadekat
08-02-2014, 04:02 PM
Zoom in to grab better colors

It looks like the girl her yellow hair has fixed it :spot:
I'm gonna test stability now for a few hours and after that I got to add a good antiban.
Do you know any antiban tutorial?
Cus now it always clicks the same point when opening bank/walking to fountain/walking to banker/...
and it never does "human stuff" like rotating camera/moving mouse around/...

edit: still doesn't click the banker sometimes and I got no idea why. It happens like 5/10 times

lanadekat
08-02-2014, 04:04 PM
function TRSGE.isOpen():Boolean;
var
s:String;
begin
s := tesseractGetText(IntToBox(139,76,438, 91), FILTER_SMALL_CHARS);
Result := Pos('Shown', s) or Pos('offers', s);
end;

function TRSGE.waitGEOpen(waitPerLoop, maxTime:Integer):Boolean;
var
t:Integer;
begin
Result := TRSGE.isOpen();
while (not Result) do
begin
wait(waitPerLoop);
t := t + waitPerLoop;
Result := TRSGE.isOpen();
if t >= maxTime then
break;
end;
end;

function TRSGE.open():Boolean;
var
TPA:TPointArray;
ATPA:array of TPointArray;
i, j:Integer;
T:TPoint;
begin
if TRSGE.isOpen() then
begin
Result := true;
exit;
end;
for i := 0 to 5 do
begin
colorSetting(2, 0.26, 1.04);
FindColorsTolerance(TPA, 4333872, mainScreen.getBounds(), 3 + i);
ATPA := TPAToATPAEx(TPA, 4, 4);
SortATPAFrom(ATPA, mainScreen.getCenterPoint());
for j := 0 to high(ATPA) do
begin
MiddleTPAEx(ATPA[j], T.x, T.y);
Mouse(T, MOUSE_RIGHT);
if chooseOption.optionsExist(['xchan', 'lerk'], 500) then
begin
chooseOption.select(['ge G']);
Result := GE.waitGEOpen(500, 5000);
if Result then
break(2);
end;
end;
end;
end;




From my merchanting script. Feel free to use it.


EDIT:
Oh DAMN, you wanted to open the BANK at GE, not the GE itself... My bad! but NPC GREY should work :S

NPC_GREY works, but sometimes stops working, I don't know why.
When I restart the script or rotate camera it works again.

Hoodz
08-02-2014, 04:42 PM
NPC_GREY works, but sometimes stops working, I don't know why.
When I restart the script or rotate camera it works again.

If (not bankscreen.open(BANK_NPC_GREY)
//rotate screen
Continue with script..


Idk what the srl6 code is for rotate the camera since ive never used srl6 doc but this should work if you enter the rotate screen function.

lanadekat
08-02-2014, 04:52 PM
If (not bankscreen.open(BANK_NPC_GREY)
//rotate screen
Continue with script..


Idk what the srl6 code is for rotate the camera since ive never used srl6 doc but this should work if you enter the rotate screen function.
yes I know lol, but I don't know how to rotate the camera ...
anyway, it might help if I post the code here:

program vialfiller;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

var
i : integer;

procedure Clickbank();
var
x, y: integer;
begin

if mainscreen.findObject(x, y, 1398387, 55, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['ank Banker'], MOUSE_LEFT) then
begin
wait(randomRange(540, 861));
writeLn('bank opened!');
wait(randomRange(531, 712));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomRange(540, 861));
bankScreen.withdraw(1, WITHDRAW_AMOUNT_ALL, ['ial']);
wait(randomRange(512, 1312));
bankScreen.close();
end;
end;



procedure fillvials();
var
x, y: integer;

begin
tabBackPack.mouseSlot(1, MOUSE_LEFT); //clicks vial in backpack
if mainscreen.findObject(x, y, 12757145, 25, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['se Vial'], MOUSE_LEFT) then //clicks fontain
begin
wait(randomRange(2000, 3000));
mouse(391, 338, 5, 20, MOUSE_MOVE); //click Fill
fastClick(MOUSE_LEFT);
wait(randomRange(17001, 18005));
writeLn('Fountain clicked!')
end;
end;

procedure walkfontain();
var
pathfontain: TPointArray;
begin
pathfontain := [Point(192, 205), Point(158, 223), Point(140, 249)]

if SPS.walkPath(pathfontain) then
minimap.waitPlayerMoving()
else
writeLn('We failed to walk to the mine');
end;

procedure walkbank();
var
pathbank: TPointArray;
begin
pathbank := [Point(140, 249), Point(158, 223), Point(192, 205)]

if SPS.walkPath(pathbank) then
minimap.waitPlayerMoving()
else
writeLn('Failed deleting windows, please try again with ubuntu');
end;


begin
// initialize and prepare things
//
addOnTerminate('scriptTerminate');
ClearDebug();
smartEnableDrawing := true;
SetupSRL();
Players.Setup(['lol'], 'lol');
currentPlayer := 0;
SPS.setup('GEmap', RUNESCAPE_OTHER); // Setup map
for i := 0 to high(players) do
begin
players[i].isActive := true;
end;
// do the work
//
while (players.getActive() > 0) do
begin
if (not isLoggedIn()) then
begin
if (not players[currentPlayer].login()) then break;
mainscreen.setangle(MS_ANGLE_HIGH);
exitSquealOfFortune();
end;
Clickbank();
walkfontain();
fillvials();
walkbank();
end;
end.

The Mayor
08-02-2014, 08:41 PM
yes I know lol, but I don't know how to rotate the camera ...

minimap.setAngle(MM_DIRECTION_NORTH);

minimap.setAngle(45);

minimap.setAngle(randomRange(30, 100));

randomCompass(0, 360, false);