Jump to content
BryceTheCoder

How to add Tolerance to a color for an NPC?

Recommended Posts

hey guys, i have a chicken fighting bot and some of the chicken colors change soooo can someone help me edit for EXAMPLE this CODE:

 


chickenColor1 = 4424087;

 if FindColor(x, y, chickenColor1, 0, 0, w - 1, h - 1) then
   WriteLn('Found Chicken NPC: ' + IntToStr(x) + ', ' + IntToStr(y));
       MMouse(x, y, 1, 1);
       Wait(100 + Random(300));

 

TO: Something with the color 4424087 with some tolerance to colors very CLOSE to that color please? I need this becuase the chicken's colors change alittle soo i was wondering if i can add a tolerance so it will always detect the chickens color.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...