Page 1 of 2 12 LastLast
Results 1 to 25 of 27

Thread: Withdraw from bank with reflection?

  1. #1
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Withdraw from bank with reflection?

    Well there's all sorts of function on finding items in the bank, but nothing with withdrawing. How could I go about withdrawing an item using reflection and knowing only the ID of the item?

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    SCAR Code:
    var
      Item : TBankSlot;
      Index : Integer;
      ItemPoint : TPoint;



    Item.ID:= 1234;
    if BankContains(Item, Index) then
    begin
      ItemPoint:= BankIndexToMSPoint(index);
      Mouse(ItemPoint.x, ItemPoint.y, 20, 20, False);
      {etc...}
    end;

    ~shut

  3. #3
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh so for it to be able to withdraw you don't need to fill out all of the parts of the TBankSlot variable?

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  5. #5
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah I know I just didn't realize we didn't have to fill out all these

    Index, ID, Stack : Integer;
    Name : String;
    For it to function correctly. Thanks

  6. #6
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry for double post but, it's not working :\

    SCAR Code:
    function BankIt: boolean;   //ty shuttleu for help
    var
      BankTile,ItemPoint : TPoint;
      x,y, opening,Index, waiting : Integer;
      Rod, Ess: TBankSlot;
    begin
      if not LoggedIn then LoginPlayer;
      proggy;
      SetRun(true);
      if RingCharged then
      begin
        Charged := true;
      end else
      begin
        Charged := false;
      end;
      if not WalkToTile(Point(2443,3083),1,0) then
      begin
        wait(4000+random(1500));
        if not WalkToTile(Point(2443,3083),1,0) then
        begin
          Players[CurrentPlayer].Strings[2] := 'Failed Getting to Bank';
          writeln('FAILED GETTING TO BANK. Next Player');
          result := false;
          exit;
        end;
      end;
      marktime(waiting);
      repeat
        wait(500+Random(300));
      until not (CharacterMoving) or (TimeFromMark(waiting) > 10000);
      BankTile := TileToMS(Point(2445,3083),2);
      MMouse(BankTile.x, BankTile.y, 2, 2);
      wait(300+random(100));
      if IsUpText('ank') then
      begin
        GetMousePos(x,y);
        Mouse(x,y,0,0,true);
      end else
      begin
        Players[CurrentPlayer].Strings[2] := 'Failed Finding Bank';
        writeln('FAILED FINDING BANK. Next Player');
        result := false;
        exit;
      end;
      MarkTime(opening);
      repeat
        wait(400+random(200));
        InPin(Players[currentplayer].Pin);
      until (R_BankScreen) or (TimeFromMark(Opening) > 19000);
      if not BankScreen then
      begin
        Players[CurrentPlayer].Strings[2] := 'Failed Opening Bank';
        writeln('FAILED OPENING BANK. Next Player');
        result := false;
        exit;
      end;
      DepositAll;
      Ess.ID := 1437;
      if not Charged then
      begin
        Rod.ID := 2553;
        if BankContains(Rod, Index) then
        begin
          ItemPoint:= BankIndexToMSPoint(index);
          Mouse(ItemPoint.x, ItemPoint.y, 2, 2, True);
          marktime(waiting);
        end else
        begin
          Players[CurrentPlayer].Strings[2] := 'No more RODs';
          writeln('NO MORE RODS. Next Player');
          result := false;
          exit;
        end;
      end;
      if BankContains(Ess, Index) then
      begin
        ItemPoint:= BankIndexToMSPoint(index);
        Mouse(ItemPoint.x, ItemPoint.y, 2, 2, False);
        marktime(waiting);
        repeat
          wait(200+random(100));
        until (R_chooseoption('ll')) or (TimeFromMark(waiting) > 7000);
      end else
      begin
        Players[CurrentPlayer].Strings[2] := 'No more ess';
        writeln('NO MORE ESS. Next Player');
        result := false;
        exit;
      end;
      CloseBank;
      marktime(waiting);
      repeat
        wait(100+random(100));
      until (InvFull) or (TimeFRomMark(waiting) > 7000);
      if not InvFull then
      begin
        Players[CurrentPlayer].Strings[2] := 'Failed Withdrawing';
        writeln('FAILED WITHDRAWING. Next Player');
        result := false;
        exit;
      end;
      if not Charged then
      begin
        mouseitem(1, true);
        Charged := true;
      end;
      result := true;
    end;

    It's giving me 'NO MORE ESS'

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Why not just use Search Bank


    ~Home

  8. #8
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, that wouldn't be quite as efficient

    Anyone have any ideas on why the code I posted above isn't working?

  9. #9
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    probably the wrong id.

  10. #10
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I used

    DebugTItemArray(GetInventoryItemsEx);
    To get the ID

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    use the bank debugger to get the bank id...

  12. #12
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    They're different? Didn't even know there was a thing like that...Lol. Rep+

    EDIT: Where do I find all of those debug functions?

  13. #13
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Runescapian View Post
    They're different? Didn't even know there was a thing like that...Lol. Rep+

    EDIT: Where do I find all of those debug functions?
    in the include

  14. #14
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -.- Which file I mean Can't seem to find them...

    EDIT: Or you can tell me the bank debug one

  15. #15
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    {************************************************* ******************************
    procedure DebugTBankSlotArray(arrBS : TBankSlotArray);
    By: Nava2
    Description: Writes all the values in the TBankSlotArray, useful for scripters.
    ************************************************** *****************************}

    in the bank.scar

  16. #16
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Just so you know, the Index is different from the bank index.. =/
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  17. #17
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Just so you know, the Index is different from the bank index.. =/
    ya, i was going to mention that you can't find where on the screen the item is without client hacking... but idk y i didn't

  18. #18
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Just so you know, the Index is different from the bank index.. =/
    Mm, so I can't really withdraw items with Reflection?

  19. #19
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Just check to see if the item is in there, then search for it, and use a dtm to click it.

  20. #20
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Why isnt this in reflection section?

    But my suggestion was to just make a simple dtm.

  21. #21
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  22. #22
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    What you could do, is check if its there, then follow up with a SearchBank then simply find a bitmap/dtm/colour.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  23. #23
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  24. #24
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, I ended up using DTMs, doing the job great

  25. #25
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    item ID in inventory is itemdatabase ID + 1.
    http://itemdb-rs.runescape.com/viewitem.ws?obj=1375
    ID in database for Bronze b axe = 1375

    in inventory its 1375 + 1 = 1376

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Posting Permissions

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