Results 1 to 5 of 5

Thread: DropItemsWithName

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

    Default DropItemsWithName

    SCAR Code:
    Procedure DropItemsWithName(Name:TStringArray);
    var
      I:Integer;
      TP:Tpoint;
    begin
      For I:=1 to 28 do
      If ExistsItem(I) then
      begin
        TP:=ItemCoords(I);
        MMouse(Tp.x, Tp.y, 2, 2);
        If IsUpTextMultiCustom(Name) then
        begin
          MouseItem(I, False);
          Wait(200+Random(50));
          ChooseOption('rop');
        end;
      end;
    end;
    FeedBack anyone?

    Edit:
    SCAR Code:
    Procedure DropItemsWithName(Name:TStringArray);
    var
      I:Integer;
      TP:Tpoint;
    begin
      List[1, 2, 3, 4, 8, 7, 6, 5, 9, 10, 11, 12, 16, 15, 14, 13,
           17, 18, 19, 20, 24, 23, 22, 21, 25, 26, 27, 28];
      For I:=1 to 28 do
      If ExistsItem(List[I]) then
      begin
        MMouseItem(List[I]);
        If IsUpTextMultiCustom(Name) then
        begin
          MouseItem(List[I], False);
          Wait(200+Random(50));
          ChooseOption('rop');
        end;
      end;
    end;
    More human

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

    Default

    SCAR Code:
    procedure DropItemsWithName(Name: TStringArray);
    var
      X, Y: Integer;
      I: Byte;
     
    begin
      for I:= 1 to 28 do
        if ExistsItem(I) then
        begin
          MMouseItem(I);
          If IsUpTextMultiCustom(Name) then
          begin
            GetMousePos(X, Y);
            Mouse(X, Y, 0, 0, False);
            Wait(175 + Random(175));
            ChooseOption('rop');
          end;
        end;
    end;


    Nothing much to comment on, I would work on my standards if I were you ..
    Don't capitalize bold words in SCAR, for instance.



    Edit: There is no real difference between your first and second function btw ..

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

    Default

    How is that more human?

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

    Default

    it does in a different order

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Uhh. It still goes from 1 to 28?

    EDIT: See it now. I gotcha.

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
  •