Results 1 to 6 of 6

Thread: Detecting Combat Help

  1. #1
    Join Date
    Feb 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default Detecting Combat Help

    I have this for detecting combat: (Just a snippet, not a procedure) It constantly says In Combat: False, even though the color is on the screen.
    Simba Code:
    begin
      Combat1 := 1;
      begin
        if (FindColor(X, Y, 65280, 220, 110, 330, 220)) then
          begin
            Writeln('-*         In Combat: True');
            end
            else Combat1 := 0;
            if (FindColor(X, Y, 65280, 220, 110, 330, 220)) = false then
            Writeln('-*         In Combat: False');
              wait(randomrange(100, 200));
              ClickMouse2(mouse_right);
              wait(randomrange(800, 1000));
              P07_ChooseOptionMulti(['ttack']);

    end;
    end;

  2. #2
    Join Date
    Feb 2013
    Posts
    465
    Mentioned
    6 Post(s)
    Quoted
    221 Post(s)

    Default

    You could just use this for working out whether you're in combat
    Code:
    function incombat:boolean;
    var x,y:integer;
    begin
    result:=findcolortolerance(x,y,65280,240,70,275,170,5);
    end;
    then amend your code to something like this; the mouse is already over the monster right?

    Code:
    begin
        if inCombat then
            Writeln('-*         In Combat: True');
        else 
        Begin
              wait(randomrange(100, 200));
              ClickMouse2(mouse_right);
              wait(randomrange(800, 1000));
              P07_ChooseOptionMulti(['ttack']);
        end;
    end;

  3. #3
    Join Date
    Feb 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    I tried what you gave me, but it still says In Combat: False in the debug constantly. Perhaps it's not checking for the color frequently enough throughout the entire script?
    Last edited by Im fkn rare; 03-07-2013 at 10:40 PM.

  4. #4
    Join Date
    Feb 2013
    Posts
    465
    Mentioned
    6 Post(s)
    Quoted
    221 Post(s)

    Default

    Ahh, i just typed it in there, remove the semicolon from the line above.

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Try using a combination of pixelshift and what your currently using

  6. #6
    Join Date
    Feb 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    It's working, but not efficient enough. It rarely ever detects the color, I need it to detect the color constantly.
    Last edited by Im fkn rare; 03-08-2013 at 01:01 AM.

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
  •