Results 1 to 7 of 7

Thread: DepositAllButEx

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

    Default DepositAllButEx

    Simba Code:
    procedure DepositAllButEx(Stuff: TIntegerArray);
    var
      i, j, x, y, TempNumber, ItemColor: Integer;
      Box, Box1: TBox;
      SpecialItem, DupeItem: Boolean;
    begin
      for i:=1 to 28 do
        if ExistsItem(i) then
        begin
          SpecialItem:= False;
          Box:= InvBox(i);
          writeln(length(Stuff));
          for j:=0 to High(Stuff) do
            if FindDTM(Stuff[j], x, y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
              SpecialItem:= True;
          if not SpecialItem then
          begin
            DupeItem:= False;
            TempNumber:= CountColor(131072, Box.X1, Box.Y1, Box.X2, Box.Y2);
            ItemColor:= GetColor(Box.X1+15, Box.Y1+15);
            for j:=i+1 to 28 do
            begin
              GetInvItemBounds(i, Box1);
              if ((CountColor(131072, Box1.X1, Box1.Y1, Box1.X2, Box1.Y2) = TempNumber) and (GetColor(Box.X1+15, Box.Y1+15) = Itemcolor)) then
              begin
                DupeItem:= True;
                break;
              end;
            end;
            if DupeItem then
            begin
              MouseBox(Box.X1+5, Box.Y1+5, Box.X2-5, Box.Y2-5, 2);
              Wait(200+Random(300));
              ChooseOption('it-All');
              Wait(500+Random(300));
            end else
            begin
              MouseBox(Box.X1+5, Box.Y1+5, Box.X2-5, Box.Y2-5, 1);
              Wait(600+Random(300));
            end;
          end;
        end;
    end;

    it will deposit everything apart from the DTM's which the user includes when they call the function

    it can be made more accurate if instead of getting a color and comparing it with the next boxes you use create and use a bmp of some sort, however im not entirely too sure of how to do this :s

    ~shut

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Why need DTMs? The other deposit functions use inventory slots, so why not make this one? DepositAllExcept(slots: TIntegerArray). If you want to don't want to deposit certain items, you can get the inventory slot using CoordsToItem and FindDTM.

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

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    We're making things too easy for people.

    I'm not going to add this because it's inconsistent with other Deposit methods. Someone else is welcome to add it, though.

  5. #5
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    I'm getting an error when I do this -

    DepositAllButEx(astralDTM);
    astralDTM is my DTM name.

    [Error] (118:30): Type mismatch at line 117

  6. #6
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Quote Originally Posted by S1N View Post
    I'm getting an error when I do this -

    DepositAllButEx(astralDTM);
    astralDTM is my DTM name.

    [Error] (118:30): Type mismatch at line 117
    It needs to be in an array: DepositAllButEx([astralDTM]);
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  7. #7
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    O.
    I didn't see the array part ..

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
  •