Results 1 to 3 of 3

Thread: If not FindColorTolerance not working?

  1. #1
    Join Date
    May 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default If not FindColorTolerance not working?

    So im trying to make a bot for this flash game to get some more experience with simba for runescape bots, and this bot chucks the enemies in the air but the screen saying finished the level, go to next level pops up randomly and if the certain color for the men isent there it would go and move the mouse to go to the next level.

    Heres my code at the moment
    This certain line isent working though (the if not FindColorTolerance)
    Error code is: [Error] (22:27): Unknown identifier 'x' at line 21
    Compiling failed.


    if not FindColorTolerance(x, y, 13421772 , 20) then
    begin
    MoveMouse(356, 371);
    ClickMouse(356, 371, 1);
    Wait(350);
    MoveMouse(510, 337);
    ClickMouse(510, 337, 1);
    end;
    end;

    The whole code is here:




    program new;

    procedure StartGame;
    begin
    MoveMouse(329, 259);
    ClickMouse(329, 259, 1);
    end;
    procedure KillThem;
    var
    x, y:Integer;
    begin
    if FindColorSpiralTolerance(x, y, 13421772 , 14, 213, 169, 368, 20) then
    MoveMouse(x, y);
    begin
    HoldMouse(x, y, 1);
    MoveMouse(249, 2);
    ReleaseMouse(249, 2, 1);
    end;
    end;
    begin
    if not FindColorTolerance(x, y, 13421772 , 20) then
    begin
    MoveMouse(356, 371);
    ClickMouse(356, 371, 1);
    Wait(350);
    MoveMouse(510, 337);
    ClickMouse(510, 337, 1);
    end;
    end;


    begin
    StartGame;
    repeat
    KillThem;
    until(False)
    end.

  2. #2
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    MoveMouse(249, 2);
    ReleaseMouse(249, 2, 1);
    end;
    end; <- delete this
    begin <- delete this

    also your second findcolortolerance() doesnt have enough parameters

  3. #3
    Join Date
    May 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ahhhh, thanks your awesome!


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
  •