Results 1 to 3 of 3

Thread: bank problems

  1. #1
    Join Date
    Nov 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default bank problems

    closeBank at the end is 'Out of Global Vars range'
    and it doesnt seem to be able to withdraw for some reason ><, been tryin to fix it for a long time now ><

    last part of my bot.. (at least until im a member and can see how to do ge operations)

    SCAR Code:
    //returns true if Item is withdrawn from bank
    function InBank(Item:String; Amount:Integer):Boolean;
    begin
     if not OpenBankFast(Bank) then
        Exit;
     DepositAll                                           //empties inv to refill later in this function
     SearchBank(Item)                                     //uses search function in bank
     wait(1000);
     MoveMouseSmooth(BankIndexToMSPoint(1).x+10,BankIndexToMSPoint(1).y+10); //move mouse to the first spot in bank
     if (Pos('withdraw',lowercase(GetUpText))>0) then     //check if found an item from search
     begin
          ClickMouse(BankIndexToMSPoint(1).x+10,BankIndexToMSPoint(1).y+10, false); //right clicks the item to withdraw
          wait(750);
          if Amount>27 then
          begin
            ChooseOption('Withdraw-All')
            Result:=true
          end;
          if Amount>0 then
          begin
            ChooseOption('Withdraw-X')
            Wait(1000 + Random(100));
            TypeSend(IntToStr(Amount));
            Result:=true;
          end;
          wait(1000)
        end;
     CloseBank
    end;

  2. #2
    Join Date
    Nov 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Someone plz help, its the last thing i need for my first script to work

    just need it to be a function taking in a string and int and withdrawing x of that string from the bank.. not sure if theres an easier way of doing this

  3. #3
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Seems a bit like you're trying to re-invent the wheel here...
    I have just copied the SRL Withdraw() function, and taken out the tab-fixing.
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    const
      Bank = 'db';
    procedure WithdrawX(col, row, Amount: Integer);
    Var
      BBox: TBox;
    begin
      //FixBank;
      //FixBankTab;
      BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col - 1, Row - 1)));
      If Amount = 1 Then
      Begin
        MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 1);
        Wait(RandomRange(50, 150));
      End
      Else
      Begin
        MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
        if (Amount = 5) or (Amount = 10) then
          ChooseOption('Withdraw-' +IntToStr(Amount))
        else if Amount = 0 then
          ChooseOption('Withdraw-All')
        else
        if (ChooseOption('Withdraw-X')) then
        begin
          Wait(1000 + Random(100));
          TypeSend(IntToStr(Amount));
        end;
      End;
    end;
    function InBank(Item:String; Amount:Integer):Boolean;
    begin
     if not OpenBankQuiet(Bank) then
        Exit;
     DepositAll                                           //empties inv to refill later in this function
     SearchBank(Item)                                     //uses search function in bank
     wait(1000);
     WithdrawX(1,1,Amount);
     CloseBank;
    end;
    begin
    SetUpSRL;
    InBank('feather', 2);
    end.

    P.S. Don't double post :P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. bank pin
    By ekamjit in forum OSR Help
    Replies: 3
    Last Post: 11-12-2008, 02:06 AM
  2. Hello bank help plz
    By Hobo in forum OSR Help
    Replies: 12
    Last Post: 01-01-2008, 10:29 AM
  3. Bank Pin
    By awesom in forum OSR Help
    Replies: 13
    Last Post: 11-28-2007, 04:11 AM
  4. Computer problems... Terrible computer problems...
    By Jason2gs in forum News and General
    Replies: 22
    Last Post: 04-26-2007, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •