Jump to content
BryceTheCoder

+++ I need some OSI codes please +++

Recommended Posts

You can go to: Documents\SCAR Divi\Includes\OSI\RS2\Core\Bank.scar

 

To find the bank commands. But you can't just make it click som items out of it's name. From there u need color or coordinates. Or you can make the bank move along all the items and check IsUpText('Item'); But that would be pretty bot-alike

Link to comment
Share on other sites

Actually I haven't even got to start on that since I'm busy messing with Flag after the annoying update today. :(
All these updates are minor setbacks at best. I have to wonder if this is the best they got, or are they "testing the waters" in preparation for something bigger.

 

Nah, this is the best they got.

Link to comment
Share on other sites

All these updates are minor setbacks at best. I have to wonder if this is the best they got, or are they "testing the waters" in preparation for something bigger.

 

Nah, this is the best they got.

 

Most likely. These are stupid updates. The coin pouch is the most annoying thing ever. Anyways... I updated OSI, thread coming soon.

Link to comment
Share on other sites

ok. Soo i have found nothing of how to actaully right-click and open the falador west bank. Or any bank honestly.. i have only found "DepositAll(True);" which could be helpful but i need to know how to open the bank booth in fally west bank please?

 

HERE IS MY BANK CODE NOW:(doesnt work at all):

 

procedure OpentheBank;
var
 w, h: Integer;
 x, y: Integer;

begin
 if FindColor(w, h, 7768475, MSX1, MSY1, MSX2, MSY2) then
 begin
   WriteLn('--- FOUND BANK COLOR ---');
   MoveWindMouse(x, y, 3, 3);
   Wait(25 + Random(50));
   ClickWindMouse(x, y, 3, 3, False);
   Wait(80 + Random(100));
   ClickWindMouse(x, y+44, 1, 1, True);
   Wait(1000 + Random(3000));
 end;
 DepositAll(True);//If bank interface open, click deposit all
 Wait(999999999);
end;

 

 

NOTE: I have the "Wait(999999999);" just for test purposes so i may stop the bot with ease.

Edited by BryceTheCoder
Link to comment
Share on other sites

I wrote one to open to Falador west bank but haven't tested it lately. Worked by finding the red carpet behind the bankers and offsetting the mouse. I'll dig it out and if it works you can use it. Just got to rework it a bit to not use a bunch of my own custom helper functions.

 

Edit: Have a look at this and see if it helps you. Note this is proof of concept I wrote that hasn't been tested "in the wild" in a long running script, but has passed all testing I threw at it.

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function bsOpenFaladorWestBank(BankPin: String): Boolean;
Contributors: Bixby Sayz.
Description: Opens falador west bank by locating the red carpet behind the bank
            booths and using that to find and click on the nearest bank booth.
Date Created: 2011-12-07. By Bixby Sayz. RS2 Build 698.
Last Modified: 2011-12-07. By Bixby Sayz. RS2 Build 698.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
function bsOpenFaladorWestBank(BankPin: String): Boolean;
var
 TPA: TPointArray;     // Points making up red carpet.
 ATPA: T2DPointArray;  // Points grouped by proximity.
 P: TPoint;            // Location of bank booth.
 T: Integer;           // Time counter.
 I: Integer;           // Loop counter.
begin
 // Is bank screen already open?
 Result := BankScreen;
 if Result then
   Exit;
 // Check logged in.
 if not LoggedIn then
   Exit;

 // Adjust compass to north & camera to highest angle.
 ClickCompass(True);

 // Find the red carpet behind the bank booth. Group found points by
 // proximity to each other.
 if not FindColorsTolerance(TPA, 4475289, MSX1, MSY1, MSX2, MSY2, 10) then
   Exit;
 ATPA := SplitTPA(TPA, 20);
 SortATPAEx(ATPA, Point(MSCX, MSCY));

 for I := 0 to High(ATPA) do
 begin

   // Get point in this group closest to center of screen (player location).
   SortTPAEx(ATPA[i], Point(MSCX, MSCY));
   P := ATPA[i][0];

   // Offset to find bank booth location and randomize a bit.
   IncEx(P.X, RR((-10), 10));
   DecEx(P.Y, RR(15, 35));

   // Move mouse to point and check uptext.
   MMouse(P.X, P.Y, 0, 0);
   WaitRR(250, 500);
   if IsUpText('booth') then
     Break;
 end;  // for

 // Right click and wait for options menu.
 ClickMouse(P.X, P.Y, False);
 T := GetSystemTime + RandomRange(2500, 5000);
 repeat
   WaitRR(75, 100);
   if (GetSystemTime > T) then
     Exit;
 until OptionBoxExists;

 // Delay to appear more humanlike.
 WaitRR(500, 1000);

 // Select "Use-quickly" and wait for bank (or pin) screen to appear.
 ChooseOption('Use-quickly');
 T := GetSystemTime + RandomRange(2500, 5000);
 repeat
   WaitRR(75, 100);
   if (GetSystemTime > T) then
     Exit;
   Result := BankScreen;
   if Result then
     Exit;
 until PinScreen;

 // Delay to appear more humanlike.
 WaitRR(500, 1000);

 // Enter pin.
 if PinScreen then
   if not EnterBankPin(BankPin) then
     Exit;

 // Wait for bank screen to appear.
 T := GetSystemTime + RandomRange(2500, 5000);
 repeat
   WaitRR(75, 100);
   if (GetSystemTime > T) then
     Exit;
   Result := BankScreen;
 until Result;
end;  // function

Edited by Bixby Sayz
Link to comment
Share on other sites

ok thank you very much! But i have alittle missunderstanding of the usage. I try and use it under my "OpentheBank" procedure and i have this in the procedure: "bsOpenFaladorWestBank(1234);" so my bankpin is '1234' and

when i run that i get an error of:

Type mismatch -> Line 193

 

AND IN MY LINE 193 i have:

bsOpenFaladorWestBank(1234);

 

 

SOOOOOOO can u help or tell me how to use it correctly?

Link to comment
Share on other sites

awww thanks guys :) ill test and see if i got problems right now..

 

 

EDIT: Sweeettt! Thank you sooo much! :D now is it possible to have another function like "withrawBars"? and it check if the bank is open withraw "All" steel bars becuase that would be very nice if i had that:)

Edited by BryceTheCoder
Link to comment
Share on other sites

Lol, it's coming. Patience.

 

Freddy, do we still have only 1 entrant for scripting competition? Basically everything I want to share is part of the script I am working on, and technically shouldn't be released during competition period.

 

So far we have 3 contestants.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...