Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MapPos(var map_pt: TPoint): Boolean;
- var
- old_client, minimap, map: Integer;
- begin
- old_client := GetImageTarget;
- minimap := CreateBitmap(155, 115);
- CopyClientToBitmap(minimap, 353, 72, 508, 187);
- FastReplaceColor(minimap, 255, 0);
- FastReplaceColor(minimap, 16711422, 0);
- FastReplaceColor(minimap, 65535, 0);
- FastReplaceColor(minimap, 16776960, 18183);
- FastReplaceColor(minimap, 16776960, 40960);
- SetTransparentColor(minimap, 0);
- map := LoadBitmap(IncludePath + '\RSCS\map.bmp');
- SetTargetBitmap(map);
- Result := FindBitmap(minimap, map_pt.X, map_pt.Y);
- if not Result then
- begin
- Result.X := -1;
- Result.Y := -1;
- end;
- SetImageTarget(old_client);
- FreeBitmap(map);
- FreeBitmap(minimap);
- end;
Advertisement
Add Comment
Please, Sign In to add comment