Results 1 to 7 of 7

Thread: Deposit all failing

  1. #1
    Join Date
    Dec 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Deposit all failing

    I have the following in myscript

    begin
    if BankScreen then
    begin
    Deposit(2,28, false);
    end;
    end;

    and although (it was)banking all, it is now banking one by one. I have force-updated srl but to no avail.
    HELP!

  2. #2
    Join Date
    Jul 2012
    Location
    London
    Posts
    1,549
    Mentioned
    0 Post(s)
    Quoted
    86 Post(s)

    Default

    ask The Killer for help he fixed his deposit all functions

  3. #3
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Try replacing deposit with the code below (would give u my bank.simba as an attachment but it exceeds my limit -.-. I Can't test because it's not happening to me but try it and see if it works.
    Simba Code:
    (*
    Deposit
    ~~~~~~~

    .. code-block:: pascal

        Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);

     Deposits from Slot to ToSlot.
      vType True = Deposit All. vType False = Deposit one by one.
      Any integer is deposit with Deposit X. (except for 5 and 10)

    .. note::

        Author: WT-Fakawi/PPLSUQBAWLZ/Stupid3ooo/Town
        Last Modified: Unknown

    Example:

    .. code-block:: pascal

        Deposit(1, 28, True);
    *)

    procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
    var
       DepositX, BScreen, DScreen: Boolean;
       All: Variant;
       I, T, x, y: Integer;
       B: TBox;
    begin
      BScreen := BankScreen;
      if (not(BScreen)) then
        DScreen := DepositScreen;
      if not (BScreen or DScreen) then
        Exit;
      if vType = 2 then
        srl_Warn('Deposit', '2 now means store per 2, not ''All''', 15);
      DepositX := False;
      if VariantIsInteger(vType) then
      begin
        DepositX := not InIntArray([1, 5, 10], vType);
        All := vType <> 1;
      end
      else if VariantIsBoolean(vType) then
        All := vType;
      if (SlotFrom = 1) and (SlotTo = 28) and (All = true) then
        if DepositAll then
          exit;
      for I := SlotFrom to SlotTo do
      begin
        if (BScreen) then
        begin
          If Not ExistsItem(I) Then
            Continue;
          if (not All) then
            MouseItem(I, mouse_left)
          else
            MouseItem(I, mouse_right);
        end else
        begin
          B := DepositItemBox(I);
          if (not(FindColor(X, Y, srl_outline_black, B.X1, B.Y1, B.X2, B.Y2))) then
            Continue;
          if (not All) then
            Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, mouse_left)
          else
            Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, mouse_right);
        end;
        if DepositX then
        begin
          WaitOptionMulti(['Deposit-X', 'Deposit'], 200);
          T := GetSystemTime;
          while (not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) and (GetSystemTime - T < 3000) do
            Wait(100);
          TypeSend(vType);
        end else if VariantIsInteger(vType) then
          WaitOptionMulti(['Deposit-' + IntToStr(Integer(vType)), 'Deposit'], 200)
        else
          if not WaitOptionMulti(['Deposit-All', 'All'], 200) then
            ChooseOptionMulti(['Deposit' , 'osit']);
        T := GetSystemTime;
        Wait(RandomRange(200, 300));
        repeat
          if (BScreen) then
            if (not(ExistsItem(I))) then Break;
          if (DScreen) then
            if (not(FindColor(X, Y, srl_outline_black, B.X1, B.Y1, B.X2, B.Y2))) then Break;
          Wait(50);
        until(GetSystemTime - T > 2000);
      end;
    end;

  4. #4
    Join Date
    Dec 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    brilliant it works now. Time to get going with my 1 million vials...

  5. #5
    Join Date
    Nov 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    68 Post(s)

    Default

    updated mine with The Killer's version and everything works fine now.

  6. #6
    Join Date
    Oct 2006
    Posts
    206
    Mentioned
    2 Post(s)
    Quoted
    45 Post(s)

    Default

    It's quite simple. The simple fix is that If(Bankscreen) is to quick.

    // Do some things
    ClickBank;
    Wait(1000);
    If(Bankscreen) then...

    If you don't use wait it will not see the DepositAll; thus will fail.

  7. #7
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by Eduard View Post
    It's quite simple. The simple fix is that If(Bankscreen) is to quick.

    // Do some things
    ClickBank;
    Wait(1000);
    If(Bankscreen) then...

    If you don't use wait it will not see the DepositAll; thus will fail.
    Actually it's because WaitOptionMulti has 'osit' for when the item is singular (doesn't have deposit all option). However what is going wrong is that it's finding 'osit' first and using that. where as we want it to select deposit all:P
    to fix this I changed it to
    Simba Code:
    if not WaitOptionMulti(['Deposit-All', 'All'], 200) then
      ChooseOptionMulti(['Deposit' , 'osit']);

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
  •