Results 1 to 9 of 9

Thread: Storing coords

  1. #1
    Join Date
    Jan 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Storing coords

    Yes i do feel like a dumbass for asking this, heres my procedure

    SCAR Code:
    procedure PickIt;
    var
    x, y, a, b, i : Integer;
    begin
      if (FindObjCustom(x, y, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)) then
      begin
        Status('Picking Flax');
        GetMousePos(a, b);
        repeat
        Mouse(a, b, random(10), random(10), True);
        Wait(50+random(100));
        FFlag(0);
        until (not(FindObjCustom(x, y, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)))
        if (InvFull) then Exit;
      end;
    end;

    i hope u can see what im trying to do here, basically if it finds the flax object, i want it to store the coords then click that particular pixel/flax bush, until its gone, once the bush is gone it ends the procedure. Thats all i need it to do.

    thanks in advance,
    prince

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

    Default

    The coords are already stored in x and y...So if you put findcolor(x, y, 5555, etc, etc, etc, etc) then it would store in x and y. So do Mouse(x, y, 0, 0, true); and it will click on it. Hope that helps Thanks,

    ~Kyle~

    EDIT: CAZAX GO ON MSN!!!!!! PL0X

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

    Default

    or could be:
    SCAR Code:
    Procedure FindFlax;
    var
      x,y,a,b : Integer;
    begin
      if (FindObjCustom(x,y,[Colors],[Uptext],Tolerance)) then
      begin
         MMouse(x,y,random(10),random(10))
         GetMousePos(a,b);
         repeat
           Mouse(a,b,5,5,True);
           wait(500+random(500))
         until (not(FindColorTolerance(a,b,FlaxColor,Tolerance))
      end;
    end;
    Gimme credits if you are going to use it

  4. #4
    Join Date
    Jan 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ Da-Owner, not wat i was looking for, but thanks anyways

    @ Cazax, tried it but it didnt work, produced same results as my procedure without the storing of coords etc.


    any other ideas? im open to anything...
    thanks,
    prince

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

    Default

    Try using this..

    SCAR Code:
    procedure PickFlax;
    var
    x, y, a, b : Integer;
    begin
      if (FindObjCustom(x, y, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)) then
      begin
      MMouse(x, y, 3, 3);
        Status('Picking Flax');
        GetMousePos(a, b);
        repeat
        Mouse(a, b, 10, 10, True);
        Wait(50+random(250));
        FFlag(0);
        until (not(FindObjCustom(a, b, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)))
        if (InvFull) then Exit;
      end;
    end;

  6. #6
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure PickIt;
    var
      x, y : Integer;
    begin
      repeat
        if FindObjCustom(x, y, ['ick', 'lax'], [Color1, Color2, Color3], Tol) then
        begin
          Mouse(x, y, 0, 0, true);
          FFlag(0);
          wait(100 + random(100));
        end else Exit;
        repeat
          if InvFull then Break;
          if IsUpTextMultiCustom(['ick', 'lax']) then
          begin
            Mouse(x, y, 0, 0, true);
            FFlag(0);
            wait(100 + random(100));
          end else Break;
        until(not(IsUpTextMultiCustom(['ick', 'lax'])));
      until(InvFull);
    end;

    Like that?
    Temporarily inactive.

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

    Default

    [offtopic] Ducels, I read ur pm...Wanna work on a fletcher? [/offtopic]

    What's different in yours then mine? Besides a few things...

  8. #8
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure PickFlax;
    var
      x, y, a, b : Integer;
    begin
      if (FindObjCustom(x, y, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)) then
      begin       // ^^Finds the flax and stores coords in x, y
        MMouse(x, y, 3, 3); //Move mouse to where we already are with random 3
        Status('Picking Flax');
        GetMousePos(a, b); //saves coords into a, b again? useless?
        repeat
          Mouse(a, b, 10, 10, True); //Click the mouse with a huge random on a spot with flax (hopefully?)
          Wait(50+random(250));
          FFlag(0);
          {there is no looping using the same coordinates here! it will keep resetting a, b because of your
          until line below this}

        until (not(FindObjCustom(a, b, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)))
        if (InvFull) then Exit; //!!!
      end;
    end;

    The line with exclamation points next to it will most likely never be run. FindObjCustom will almost never be false simply because there will be flax on the screen all of the time. So in essence you've created an endless loop.

    Randoms on that Mouse are way too high. That gives it a high probability of missing the flax entirely and just clicking next to it.
    Temporarily inactive.

  9. #9
    Join Date
    Jan 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ducels View Post
    SCAR Code:
    procedure PickFlax;
    var
      x, y, a, b : Integer;
    begin
      if (FindObjCustom(x, y, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)) then
      begin       // ^^Finds the flax and stores coords in x, y
        MMouse(x, y, 3, 3); //Move mouse to where we already are with random 3
        Status('Picking Flax');
        GetMousePos(a, b); //saves coords into a, b again? useless?
        repeat
          Mouse(a, b, 10, 10, True); //Click the mouse with a huge random on a spot with flax (hopefully?)
          Wait(50+random(250));
          FFlag(0);
          {there is no looping using the same coordinates here! it will keep resetting a, b because of your
          until line below this}

        until (not(FindObjCustom(a, b, ['Pick','Flax','ick','lax'], [Flax1,Flax2,Flax3], 8)))
        if (InvFull) then Exit; //!!!
      end;
    end;

    The line with exclamation points next to it will most likely never be run. FindObjCustom will almost never be false simply because there will be flax on the screen all of the time. So in essence you've created an endless loop.

    Randoms on that Mouse are way too high. That gives it a high probability of missing the flax entirely and just clicking next to it.

    thank you very much, haha you cleared a lot of stuff up for me and now i look like a complete douche

    thanks so much i'm trying ur procedure uptop...

    EDIT: Works very very very well. thank you so very much ducles!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with storing variable
    By Drew_Dawg in forum OSR Help
    Replies: 1
    Last Post: 02-02-2008, 11:54 AM
  2. Forms and storing
    By me_ntal in forum OSR Help
    Replies: 3
    Last Post: 04-12-2007, 08:34 AM
  3. int storing dtm
    By del_signo in forum OSR Help
    Replies: 4
    Last Post: 03-05-2007, 02:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •