In reflection, IDs are assigned to different things. For example, a monkfish will have a certain ID, where as a death rune will have a different ID. The same is true for objects and NPCs (objects being things like doors, ladders, the rock you mine pure/rune essence from, et cetera). IDs are specific to one type, but generic to all items of that type; that means that every monkfish has the same ID, but no other item will have the same ID as a monkfish. Again, the same holds true for objects and NPCs. Using item, NPC, and object IDs, reflection can be used to accurately click things with much ease. I recommend using reflection as a backup; here's an example of good usage of reflection:
Simba Code:
function ClickSomeItem: Boolean;
var
ItemBitmap, x, y, i: Integer;
begin
Itembitmap := BitmapFromString(10, 15, 'adsfasdf');
if FindBitmapToleranceIn(ItemBitmap, x, y, MIX1, MIY1, MIX2, MIY2, 5) then
begin
MMouse(x, y, 9, 14);
if WaitUptext('Item''s uptext', 800) then
begin
ClickMouse2(false);
Result := WaitOption('option text here', 800);
end else
begin
Result := False;
FreeBitmap(ItemBitmap);
end;
end else
begin
Writeln('couldnt find bitmap, attempting reflection');
Result := R_ClickItemID(12345, False, 'option text here');
end;
FreeBitmap(ItemBitmap);
end;