Results 1 to 14 of 14

Thread: DropAllEx ~ Inventory.scar

  1. #1
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default DropAllEx ~ Inventory.scar

    SCAR Code:
    {*******************************************************************************
    procedure DropAllEx;
    By: Tickyy
    Description: Drops all the items from the first given position, till to the second given position
    *******************************************************************************}

    procedure DropAllEx(z_from, z_to: integer);
    var
      i : Integer;
    begin
      for i := z_from to z_to do
        DropItem(i);
    end;

    Like it?
    Hi

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think DropItemEx would be better

  3. #3
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by 99_ aka ian. View Post
    I think DropItemEx would be better
    The name doesn't matter that much, but whatever.... developers can make any changes later.
    Hi

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No I don't like it >.>.

  5. #5
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    No I don't like it >.>.
    haha, i love you too !
    Hi

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I swear there was something like this in SRL before...

  7. #7
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    mine drops if the uptext


    Code:
    procedure DropStuff(textup : string);
    var
      i, NSPosC, SPos: Integer;
      TB: TBox;
    begin
    
      if not LoggedIn then
        LoginPlayer;
      if (SPos < 1) then
      begin
        for i := 1 to 28 do
        begin
          TB := InvBox(i);
          MMouse(RandomRange(TB.X1 + 4, TB.X2 - 4), RandomRange(TB.Y1 + 4,
            TB.Y2 - 4), 3, 3);
          if (Uppercase(GetUpText) = ((textup))) then
            DropItem(i)
          else
          begin
            NSPosC := NSPosC + 1;
            Continue;
          end;
        end;
      end
      else
      begin
        for i := SPos to 28 do
        begin
          TB := InvBox(i);
          MMouse(RandomRange(TB.X1 + 4, TB.X2 - 4), RandomRange(TB.Y1 + 4,
            TB.Y2 - 4), 3, 3);
          if (Uppercase(GetUpText) = ((textup))) then
            DropItem(i)
          else
          begin
            NSPosC := NSPosC + 1;
            Continue;
          end;
        end;
      end;
      if (NSPosC > 0) then
      begin
        ArrangeInv;
        SPos := SPos + NSPosC;
      end;
    end;
    Last edited by Simtoon; 07-01-2009 at 07:20 PM.


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

    Default

    Quote Originally Posted by ZephyrsFury View Post
    I swear there was something like this in SRL before...
    +1, but I've got a feeling we're confusing this with something else.
    Anyway, I'll add it briefly.

    Thanks for the idea, Tickyy.

    Edit: committed.
    And, Da 0wner, the proc I committed already does that. Sort of.
    Last edited by EvilChicken!; 07-01-2009 at 08:02 PM.

  9. #9
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    procedure DropItemsSkipEx;
    By: Tickyy and Da 0wner
    Description: Drops all the items from the first given position, till to the second given position. Skips all slots in Skip TIntegerArray.
    *******************************************************************************}

    procedure DropItemsSkipEx(z_from, z_to: integer; Skip : TIntegerArray);
    var
      i : Integer;
    begin
      for i := z_from to z_to do
        if not InIntArray(i, Skip) then
          DropItem(i);
    end;

    Also commit that one EvilChicken.

  10. #10
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Isn't that just the old DepositAll from SRL?

    Even so, seems kind of like a down graded version of this:
    SCAR Code:
    {*******************************************************************************
    Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
    by: WT-Fakawi/PPLSUQBAWLZ/Stupid3ooo/Town
    Description: 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)
    *******************************************************************************}


    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;
      Case VarType(vType) Of
        3: Begin
             DepositX := Not InIntArray([1, 5, 10], vType);
             If vType = 1 Then
               All := False
             Else
               All := True;
           End;
        11: All := vType;
      End;
      For I := SlotFrom To SlotTo Do
      Begin
        if (BScreen) then
        begin
          If Not ExistsItem(I) Then
            Continue;
          MouseItem(I, Not All);
        end else
        begin
          B := DepositItemBox(I);
          if (not(FindColor(X, Y, 65536, B.X1, B.Y1, B.X2, B.Y2))) then
            Continue;
          Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, not All);
        end;
        If DepositX Then
        Begin
          ChooseOption('Deposit-X');
          T := GetSystemTime;
          While (Not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) And (GetSystemTime - T < 3000) Do
            Wait(100);
          TypeSend(vType);
        End Else If VarType(vType) = 3 Then
          ChooseOption('Deposit-' + vType)
        Else
          ChooseOption('Deposit-All');
        T := GetSystemTime;
        Wait(RandomRange(200, 300));
        repeat
          if (BScreen) then
            if (not(ExistsItem(I))) then Break;
          if (DScreen) then
            if (not(FindColor(X, Y, 65536, B.X1, B.Y1, B.X2, B.Y2))) then Break;
          Wait(50);
        until(GetSystemTime - T > 2000);
      End;
    End;
    Since they both do the same thing...
    Last edited by NCDS; 07-02-2009 at 12:00 AM.

  11. #11
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    First of all, i wanna thank you all for your nice comments (if there was any).

    Second, i just needed something like this and made it up pretty fast, i've been searching for it and haven't found anything.
    Hi

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

    Default

    Quote Originally Posted by Tickyy View Post
    First of all, i wanna thank you all for your nice comments (if there was any).

    Second, i just needed something like this and made it up pretty fast, i've been searching for it and haven't found anything.
    That you stole it was absolutely not what I meant, and I believe that applies to every poster in this thread posting somewhat the same as me.

    It simply confused me that something like this wasn't in SRL although I was certain seeing it being there some time ago.

  13. #13
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    That you stole it was absolutely not what I meant, and I believe that applies to every poster in this thread posting somewhat the same as me.

    It simply confused me that something like this wasn't in SRL although I was certain seeing it being there some time ago.
    k thanks, i hope you liked it , its pretty short, but very useful.
    Hi

  14. #14
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Yea. Last night on the IRC I looked for the DropAll Function in SRL, and when I found it, it looked very different from the last time I saw it. I especially noticed that it was by Lorax, instead of one of the current devs.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

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
  •