Results 1 to 3 of 3

Thread: Withdraw Tweak

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

    Default Withdraw Tweak

    Here are some tweaked withdraw functions, to accomodate the new Withdraw-X thinger. They work flawlessly, small tweak but yeah!

    SCAR Code:
    {*******************************************************************************
    procedure Withdraw(Col, Row, Amount: Integer);
    by: Starblaster100, Town, Wizzup? and Nava2
    Description: Withdraws Amount at Column/Row.
    *******************************************************************************}


    procedure Withdraw(col, row, Amount: Integer);

    Var
      BBox: TBox;

    begin
      FixBank;
      FixBankTab; // <- That is really annoying at times... :(
      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 = 0 then
          ChooseOption('Withdraw-All')
        else
        if not(ChooseOption('Withdraw-' +IntToStr(Amount)) then
        begin
          ChooseOption('Withdraw-X');
          Wait(1000 + Random(100));
          TypeSend(IntToStr(Amount));
        end;
      End;
    end;

    This is a function made by me, well, I edited to use .
    SCAR Code:
    {*******************************************************************************
    procedure WithdrawPoint(px, py, Amount: Integer);
    by: Starblaster100, Town, Wizzup? and Nava2
    Description: Withdraws Amount at MSPoint, (px, py).
    *******************************************************************************}


    procedure WithdrawPoint(px, py, Amount: Integer);

    Var
      BPoint : TPoint;
      BBox: TBox;

    begin
      FixBank;
      FixBankTab; // <- That is really annoying at times... :(
      BBox := BankIndexToMSBox(BankPointToBankIndex(MSTPointToBankPoint(Point(px, py));
      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 = 0 then
          ChooseOption('Withdraw-All')
        else
        if not(ChooseOption('Withdraw-' +IntToStr(Amount)) then
        begin
          ChooseOption('Withdraw-X');
          Wait(1000 + Random(100));
          TypeSend(IntToStr(Amount));
        end;
      End;
    end;

    Old:

    SCAR Code:
    {*******************************************************************************
    procedure Withdraw(Col, Row, Amount: Integer);
    by: Starblaster100, Town and Wizzup?
    Description: Withdraws Amount at Column/Row.
    *******************************************************************************}


    procedure Withdraw(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;



    Nava2
    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

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's always good to add the old so we can see difference
    ~Hermen

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

    Default

    Ugh, Fine .

    Edit: added old to first post.

    Nava2
    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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what is the withdraw function, to withdraw X
    By ummmmm0k in forum OSR Help
    Replies: 3
    Last Post: 01-21-2008, 07:52 AM

Posting Permissions

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