Results 1 to 7 of 7

Thread: DiscardAll;

  1. #1
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DiscardAll;

    Meh, I was bored so I put together this procedure. Don't even know if it compiles really . Doing it straight from keyboard so dtn flame if it doesnt compile .(or work ).

    THIS IS STILL IN PROGRESS I POSTED HERE SO I WOULDNT HAVE TO SAVE ON COMP AND I WAS BORED. POST ANY SUGGESTIONS

    SCAR Code:
    program New;
    {.include srl/srl.scar}

    var
      Money : integer;
      UmArray : array of integer;
      None : TIntegerArray;

    procedure CreateInventoryArray(var TheArray : array of integer; TheDTM : integer);
    var
     ii : TPoint;
     i, iq : integer;
     z : integer;
    begin
    z := 0;
    i := 0;
      repeat
      I := I + 1;
      ii := ItemCoords(I);
      If(z <= 0)then Z := 1;
      If (FindDTM(TheDTM, x, y, ii.x - 25, ii.y - 25, ii.x + 25, ii.y + 25))then
        begin
          SetArrayLength(TheArray,Z + 1);
          TheArray[Z] := I;
          Z := Z + 1;
        end;
      until(I = 28);
    Z := GetArrayLength(TheArray) - 1;
    If (z <= 0)then Z := 1;
    Iq := 0;
      repeat
        Writeln(IntToStr(TheArray[IQ]));
        IQ := IQ + 1;
      until( IQ = Z);
    end;

    function DiscardAll(var ArrayToSkip : array of integer; Sell : boolean) : boolean;
    var
      z1,z2,z3 : integer;
    begin
      If ( Sell ) then
        begin
        z1 := 0;
          repeat
          If(IsFKeyDOwn(2))then TerminateScript;
          z1 := z1 + 1;
            If(ExistsItem(z1)) then
              begin
                z2 := GetArrayLength(ArrayToSkip);
                if (z2 = 0) then z2 := 1;
                for z3 := 0 to z2 do
                  begin
                      if not(z1 = ArrayToSkip[z3])then
                        begin
                          MouseItem(z1,false);
                          wait(30+random(400));
                          ChooseOption(x,y,'10');
                        end;
                  end;
              end;
          until(z1 = 28);
          result := true;
      end;
    end;
                   
             


    begin
    SetupSRL;
    //Money DTM was set here
    CreateInventoryArray(none,money);
    DiscardAll(None,true);
    end.

    Join the fastest growing merchanting clan on the the net!

  2. #2
    Join Date
    Jun 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    *Can't be bothered to test*

    What does it do though?

  3. #3
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by m0u53m4t View Post
    *Can't be bothered to test*

    What does it do though?
    Maybe, Discard All in the inventory?

  4. #4
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    its uses arrays which is very intresting

    but instead of the chooseoption of
    SCAR Code:
    '10'
    how about
    SCAR Code:
    'll'
    (which is all.)
    Darky has stopped by to say hello :).
    10-21-2010
    Updated-
    10-09-2012

  5. #5
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok

    Join the fastest growing merchanting clan on the the net!

  6. #6
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    uh. There's a much easier way to do this ?

    This is basically bankall or what? I'm not sure what you mean by discard..

    SCAR Code:
    procedure DiscardAll;
    var
      d : TPoint;
      i : Integer;
    begin
      for i:= 0 to 28 do
      begin
        if(ExistsItem(i))then
        begin
          d:= ItemCoords(i);
          Mouse(d.x, d.y, 3, 3, false);
          ChooseOption(x, y, 'all');
          Wait(1000 + random(1000));
        end;
      end;
    end;

  7. #7
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I think it finds and discards all items with a given DTM, not just any old item. Sorta like FindAllSlotsBlackListSkip

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
  •