Results 1 to 12 of 12

Thread: Fast dropping: FastDrop; and ChooseOptionMultiEx

  1. #1
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default Fast dropping: FastDrop; and ChooseOptionMultiEx

    SCAR Code:
    procedure FastDropExcept(A : TIntegerArray);
    var
      Arr: TIntegerArray;
      I, J, MS : Integer;
      TP : TPoint;
    begin
      MS := MouseSpeed;
      MouseSpeed := 25 + Random(5);
      Arr := [1, 5, 9,  13, 17, 21, 25,
              2, 6, 10, 14, 18, 22, 26,
              3, 7, 11, 15, 19, 23, 27,
              4, 8, 12, 16, 20, 24, 28];
      for J := 0 to High(A) do
        for I := 0 to 27 do
          if (A[J] = Arr[i]) then
            Arr[i] := 0;
      for I := 0 to 27 do
      begin
        if (Arr[i] = 0) then
          Continue;
        if not ExistsItem(Arr[i]) then
          Continue;
        TP := ItemCoords(Arr[i]);
        Mouse(TP.x, TP.Y, 0, 0, False);
        ChooseOptionMultiEx(['rop'], True);
      end;
      MouseSpeed := MS;
    end;
     
    procedure FastDrop;
    begin
      FastDropExcept([]);
    end;
    USE: FastDrop; or FastDropExcept([1, 2, 3, 28]);
    This function will drop your logs/ores/anything with 3 options (Use, Drop, Examine) like a human would do it.

    I did some comparing and this is the result I got:
    SCAR Code:
    FastDrop: 27937ms
    DropAll:  44438ms

    For this to work as fast as possible, you should have this procedure:
    SCAR Code:
    function ChooseOptionMultiEx(Text: TStringArray; ClickUnder : Boolean): Boolean;
    var
       B: TBox;
       TPA: TPointArray;
       X, Y, I, C: Integer;
       P: TPoint;
     
    begin
      Result := False;
      GetClientDimensions(B.X2, B.Y2);
      B.X1 := 0;
      B.Y1 := 0;
      FindColorsTolerance(TPA, 4674653, B.X1, B.Y1, B.X2, B.Y2, 0);
      If Length(TPA) < 10 Then
        Exit;
      B.X2 := 0;
      B.Y2 := 0;
     
      P := TPA[0];
      For I := 0 To High(TPA) - 1 Do
        If TPA[i].X = TPA[I+1].X - 1 Then
        Begin
          If C > 5 Then
          Begin
            B.X1 := P.X;
            B.Y1 := P.Y;
            Break;
          End Else
            C := C + 1;
        End
        Else
        Begin
          P := TPA[I + 1];
          C := 0;
        End;
      If I = Length(TPA) Then
      Begin
        WriteLn('Choose Option Menu Getting Failed');
        Exit;
      End;
      InvertTPA(TPA);
      C := 0;
      P := TPA[0];
      For I := 0 To High(TPA) - 1 Do
        If TPA[i].X = TPA[I+1].X + 1 Then
        Begin
          If C > 5 Then
          Begin
            B.X2 := P.X;
            B.Y2 := P.Y;
            Break;
          End Else
            C := C + 1;
        End Else
        Begin
          P := TPA[I + 1];
          C := 0;
        End;
      If I = Length(TPA) Then
      Begin
        WriteLn('Choose Option Menu Getting Failed');
        Exit;
      End;
     
      For i:=0 To High(Text) do
        If FindText(X, Y, Text[i], upchars, B.X1, B.Y1, B.X2, B.Y2) Then
        Begin
          Result := True;
          if ClickUnder then
            Mouse(B.X1 + 58, y + 3, 4, 0, True)
          else
            Mouse(B.X1 + 5, y + 1, B.X2 - B.X1 - 5, 13, True);
          Exit;
        End;
     
      MMouse(B.X1 - 50, B.Y1 - 50, 40, B.Y2 - B.Y1);
      Wait(200 + Random(100));
    end;
    USE: ChooseOptionMultiEx(['rop'], True);. ChooseOptionMultiEx(['rop'], False); would be the same as ChooseOptionMulti(['rop']);

    This function clicks at 'Drop' without any randomness.

    I honestly think it should be added to SRL

    EDIT: I added some more information .

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

    Default

    Wouldn't this to the exact same thing as SRL's dropping functions, if you just set the mousespeed a bit higher before calling the procedure(s)?

  3. #3
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Should the array be, for increased fastness
    SCAR Code:
    Arr := [1, 5, 9,  13, 17, 21, 25,
            26, 22, 18, 14, 10, 6, 2,
            3, 7, 11, 15, 19, 23, 27,
            28, 24, 20, 16, 12, 8, 4];

  4. #4
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by EvilChicken! View Post
    Wouldn't this to the exact same thing as SRL's dropping functions, if you just set the mousespeed a bit higher before calling the procedure(s)?
    Nope. I'll make a video later showing FastDrop; compared to DropAll;
    Quote Originally Posted by Mylesmadness View Post
    Should the array be, for increased fastness
    True, it would be maybe 1 sec faster or so Thanks
    EDIT: No it should not, I will show you why in the vid

  5. #5
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I made it .gif for you :

    That is FastDrop;


  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    I made it .gif for you :
    (.gif here; removed to save all ppl with lousy internet dw-speed )
    That is FastDrop;
    Again; Thank you, I never used Movie Maker before so you saved me alot of time

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Why not chnage Arr to this?

    Arr := [1..28]

  8. #8
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Why not chnage Arr to this?

    Arr := [1..28]
    That would make it drop from 1 to 28

  9. #9
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Which is what you want to do??

  10. #10
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Which is what you want to do??
    Look at the gif, it goes long ways down... you should make the Item array a simple case so its random(2) of dropping vertical or horiziontal thus making it more random, and a third option where it grabs a random amound from each array and drops like that ( i do that sometime drop half vertical then change to horizontal).

    Good job.

  11. #11
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by NiCbaZ View Post
    Look at the gif, it goes long ways down... you should make the Item array a simple case so its random(2) of dropping vertical or horiziontal thus making it more random, and a third option where it grabs a random amound from each array and drops like that ( i do that sometime drop half vertical then change to horizontal).

    Good job.
    Making it drop horiziontal would ruin the point

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

    Default

    Why is it faster...?

    E:
    SCAR Code:
    procedure FastDropExcept(A : TIntegerArray);
    var
      Arr: TIntegerArray;
      I, H, II, HH, J, MS : Integer;
      TP : TPoint;
    begin
      MS := MouseSpeed;
      MouseSpeed := 25 + Random(5);
      Arr := [1, 5, 9,  13, 17, 21, 25,
              2, 6, 10, 14, 18, 22, 26,
              3, 7, 11, 15, 19, 23, 27,
              4, 8, 12, 16, 20, 24, 28];
    {  HH := 27;
      for I := 0 to HH do
        if not ExistsItem(Arr[I]) then
        begin
          HH := High(Arr);
          for II := J to HH - 1 do
            Swap(Arr[II], Arr[II] + 1);
          SetLength(Arr, HH);
        end;  }

      H := High(A);
      for I := 0 to H do
        if InIntArrayEx(Arr, J, A[I]) then
        begin
          HH := High(Arr) - 1;
          for II := J to HH do
            Swap(Arr[II], Arr[II] + 1);
          SetLength(Arr, HH + 1);
        end;
      H := High(Arr);
      for I := 0 to H do
      begin
        if not ExistsItem(Arr[i]) then
          Continue;
        TP := ItemCoords(Arr[i]);
        Mouse(TP.x, TP.Y, 0, 0, False);
        ChooseOptionMultiEx(['rop'], True);
      end;
      MouseSpeed := MS;
    end;

    I may have made it faster... not really sure
    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. fast dropping
    By dallas574 in forum OSR Help
    Replies: 5
    Last Post: 06-04-2008, 03:17 PM
  2. Help with dropping.
    By Lancelot074 in forum OSR Help
    Replies: 8
    Last Post: 02-19-2008, 11:13 PM
  3. Dropping
    By hardman in forum RS3 Outdated / Broken Scripts
    Replies: 10
    Last Post: 08-01-2007, 02:47 PM
  4. More dropping help
    By RudeBoiAlex in forum OSR Help
    Replies: 5
    Last Post: 03-06-2007, 04:38 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
  •