Results 1 to 8 of 8

Thread: Withdraw

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

    Default Withdraw

    Bank.scar:
    SCAR Code:
    function WithdrawMod(col, row, Amount: Integer): boolean;

    Var
      ResInt, I, Count : Integer;
      P : TPoint;
      BBox: TBox;

    begin
      FixBank;
      //FixBankTab;
      Result := false;
      ResInt := InvCount;
      BBox := BankIndexToMSBox(BankPointToBankIndex(Point(Col, Row)));
      BBox := IntToBox(BBox.x1 + 8, BBox.y1 + 8, BBox.x2 - 8, BBox.y2 - 8);
      GetMousePos(P.x, P.y);
      if PointInBox(P, BBox) then
        BBox := IntToBox(P.x - 8, P.y - 8, P.x + 8, P.y + 8);
      case Amount of
        0: begin
             MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 2);
             Wait(RandomRange(75, 125));
             ChooseOption('Withdraw-All');
           end;
        1: begin
             MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 1);
             Wait(RandomRange(50, 150));
           end;
        else
        begin
          MouseBox(BBox.X1, BBox.Y1, BBox.X2, BBox.Y2, 2);
          Wait(RandomRange(75, 125));
          if not ChooseOption('Withdraw-' +IntToStr(Amount)) then
          begin
            GetMousePos(P.x, P.y);
            MouseBox(P.x - 3, P.y - 3, 3, 3, 2);
            Wait(RandomRange(75, 125));
            if (ChooseOption('Withdraw-X')) then
            begin
              Wait(RandomRange(700, 1200));
              TypeSend(IntToStr(Amount));
            end;
          end;
        end;
      end;
      Count := InvCount;
      while (Count <= ResInt) or (I < 200) do
      begin
        Wait(RandomRange(15, 40));
        Inc(i);
        Count := InvCount;
        if Count > ResInt then Break;
      end;
      Result := ResInt < InvCount;
    end;

    Like?
    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
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would be alot easier if you actully posted what you changed

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

    Default

    Second function, I created based off of Fwaki's, and the first was completely revamped from SRL.
    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

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

    Default

    Added PointInBox so that when withdrawing, if the mouse was already in that box, it wouldn't move crazy far in the box. Just a little bit more undetectable.
    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

  5. #5
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks really nice, I can't find any flaws xD


    Just one thing, you need waits before ChooseOption ^^
    I do 145 + Random(275) ms.

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

    Default

    Quote Originally Posted by EvilChicken! View Post
    Looks really nice, I can't find any flaws xD


    Just one thing, you need waits before ChooseOption ^^
    I do 145 + Random(275) ms.
    Only 75ms is needed. But I CANT BELIEVE I forgot that

    Edit: Added some waits etc, cleaned up a bit. Removed yet another annoying MMouse twitch.
    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

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Here's my modded one its very similar and less lines. Been using it for couple months. I do like your wait until the invcount is what the amount it is you took out.
    SCAR Code:
    procedure MyWithdraw(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 Not ChooseOption('Withdraw-' +IntToStr(Amount)) then
        begin
          MouseBox(BBox.X1 + 5, BBox.Y1 + 5, BBox.X2 - 5, BBox.Y2 - 5, 2);
          if (ChooseOption('Withdraw-X')) then
          begin
            Wait(1000 + Random(100));
            TypeSend(IntToStr(Amount));
          end;
        end;
      End;
    end;

    There's one problem that I've seen happen. (and i think i've mentioned it before)

    If say you do "Withdraw-9" and the last option recorded was "Withdraw-999" it doesn't recognize its "999" instead of just "9". Maybe this can be fixed by adding a space to the end? idk haven't tried it yet.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

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

    Default

    Hmm, I could test that. I will do it in the morning though. It is almost 2am..
    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
  2. Withdraw Slot 1
    By yanix in forum OSR Help
    Replies: 7
    Last Post: 11-12-2007, 09:21 PM
  3. withdraw
    By RS Rebel in forum OSR Help
    Replies: 11
    Last Post: 07-28-2007, 02:47 PM
  4. Withdraw
    By EL_TYCHO in forum OSR Help
    Replies: 12
    Last Post: 06-29-2007, 10:28 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
  •