Results 1 to 12 of 12

Thread: How would i do this?

  1. #1
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How would i do this?

    Ok, since im not that much experienced with simba.. how would i do something along these lines?


    if(posequals [cords, cords]) then
    mouse(x, y, 0, 1, false);

    probably easy.. just can't think of it >.<
    Last edited by lolhahauad; 11-20-2011 at 03:09 AM.

  2. #2
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Something like:
    Simba Code:
    if ((X = 0) and (Y = 0)) then
    begin
    end;

    Or are you looking to find an object on the screen and move your mouse to it?

  3. #3
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah thanks.. that might work .. let me go test it, hold up

    what about the opposite? like, if im not in that cords, how would i do that?
    Last edited by lolhahauad; 11-20-2011 at 03:20 AM.

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Then it would be this:
    Simba Code:
    if ((not(X = 0) and (not(Y = 0)))) then
    begin
    end;

    Quote Originally Posted by lolhahauad View Post
    Ah thanks.. that might work .. let me go test it, hold up

    what about the opposite? like, if im not in that cords, how would i do that?

  5. #5
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Procedure 403;
    var x, y:integer;
    begin
    if ((X = 259) and (Y = 180)) or
    ((X = 267) and (Y = 183)) then
    if findobj(x, y, 'ride', 2041912, 10) then
    mouse(x, y, 0, 0, true);
    wait(1000);
    end;
    Shouldn't that work? What im reading is, if the player is in the coords 259, 180 or 267, 103 then the player would find a obj with ride in it and left click it then wait 1 second?

    It doesn't seem to work though :/.. yes i did put 403; in my main loop
    Last edited by lolhahauad; 11-20-2011 at 03:32 AM.

  6. #6
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Try this:
    Simba Code:
    procedure Example;
    var mX, mY : Integer;
    begin
      if (not(LoggedIn)) then Exit;
      FindNormalRandoms;
      // Never use the first word of the object you are trying to find; it's slow.
      if FindObj(mX, mY, 'ide', 2041912, 10) then
      begin
        Mouse(mX, mY, 4, 4, True);
        Wait(1000); // I suggest you change this.
      end;
    end;

    "FindObj" searches the screen for the object with the parameters you chose. You don't need to specifically locate the coordinates yourself.
    Last edited by RISK; 11-20-2011 at 03:34 AM.

  7. #7
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, i kinda want it to be in a specific area before it finds the obj :/.. ;s

    So should i use findSprialColorTolerance for that?
    Last edited by lolhahauad; 11-20-2011 at 03:05 PM.

  8. #8
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I also had to do something like that. You are correct about FindColor function, although I use a different one. This is what I had to do to correctly find a chicken pen on the minimap using just colors.
    Simba Code:
    FindColorsSpiralTolerance(MMCX, MMCY, TPA, 15660776, MMCX-100, MMCY-100, MMCX+100, MMCY+100, 3);
    It will start its search from the middle of the minimap, and search in a box 100 by 100 surrounding it.

    Also, don't forget to use ACA to make accurate object finding procedures. You'll need hue and sat mods. This is explained in the Advanced Section of the tutorial forum.
    Last edited by DeSnob; 11-20-2011 at 04:23 PM.

  9. #9
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    I also had to do something like that. You are correct about FindColor function, although I use a different one. This is what I had to do to correctly find a chicken pen on the minimap using just colors.
    Simba Code:
    FindColorsSpiralTolerance(MMCX, MMCY, TPA, 15660776, MMCX-100, MMCY-100, MMCX+100, MMCY+100, 3);
    It will start its search from the middle of the minimap, and search in a box 100 by 100 surrounding it.

    Also, don't forget to use ACA to make accurate object finding procedures. You'll need hue and sat mods. This is explained in the Advanced Section of the tutorial forum.
    Hmm.. thats fairly interesting.. I'll see what I can do, thanks for that information btw

  10. #10
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by lolhahauad View Post
    Hmm.. thats fairly interesting.. I'll see what I can do, thanks for that information btw
    I gave you the wrong link, but fixed it. Just search for ACA2 or click the link in my post.

  11. #11
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindColorsSpiralTolerance(MMCX, MMCY, TPA, 15660776, MMCX-100, MMCY-100, MMCX+100, MMCY+100, 3);

    So that means, it'll be searching for a color, of 15660776 in a 100 by 100 box with a color tolerance of 3?

  12. #12
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by lolhahauad View Post
    FindColorsSpiralTolerance(MMCX, MMCY, TPA, 15660776, MMCX-100, MMCY-100, MMCX+100, MMCY+100, 3);

    So that means, it'll be searching for a color, of 15660776 in a 100 by 100 box with a color tolerance of 3?
    Yes, it'll search in a box surrounding the center of the minimap (MMCX, MMCY) in a 200 by 200 box (sorry, got that wrong before.) with that color and tolerance.

    E: You can also use MSCX/Y(mainscreen) and MICX/Y(inventory)

    Also, for something like this you'll need TPAs/ATPAs.
    Last edited by DeSnob; 11-20-2011 at 04:51 PM.

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
  •