Advertisement
TheBat

Untitled

Feb 23rd, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /**
  2. * Returns whether the given point is a certain color.
  3. * Accounts for the variable colors that runescape produces whenever you log in.
  4. * @param col
  5. * - Color to check for.
  6. * @param p
  7. * - Point to check at.
  8. * @return
  9. */
  10. private boolean checkColor(Color col, Point p, int tol){
  11. if(Math.abs(col.getRed() - Game.getColorAt(p).getRed()) < tol)
  12. if(Math.abs(col.getGreen() - Game.getColorAt(p).getGreen()) < tol)
  13. if(Math.abs(col.getBlue() - Game.getColorAt(p).getBlue()) < tol)
  14. return true;
  15. return false;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement