View Full Version : Bitmap Finding
TheGodfather
02-13-2007, 07:18 AM
Okay, well I've been investigating scripts and all, and there are many procedures for FindBitmap, (e.g FindColorTolerance, FindColorSpiralTolerance etc.) Same exists for Bitmaps.. And DTM's if I'm correct. Now I'd like to kno how these work, (mostly for the Bitmaps), meaning I'd like to find out all the different types of Functions.
If you people of this LOVELY community ;) can post some that would help alot. (and explain how to work them)
YoHoJo
02-13-2007, 07:38 AM
Well bascaily to find a bitmap you would do something like this:
Save a picture as a bitmap (.bmp) preferable with 32bit color.
Then in scar, go to Script> Picture to string
And click open and navigate to your picture.
After you click ok, i should generate some code like this:
Take:= BitmapFromString(17, 1, 'z78DA7373C30E4C5D4C4' +
'D4CCC914964590330205E3D0029471957');
Notice the bitmap is small (17 X 1). The smaller it is, the less it will lag and faster it will be.
To view that bitmap go to
Script> String to Picture>
For Width but 17 and Height put 1.
And copy/paste
z78DA7373C30E4C5D4C4' +
'D4CCC914964590330205E3D0029471957
into the large box.
(Just to see the pic)
This happens to be a small slice of the "Take" option when you right click on runescape.
To use this in a script you could so soemthing like:
var
x,y,take:Integer;
Procedure LoadBitmaps;
Begin
Take := BitmapFromString(17, 1, 'z78DA7373C30E4C5D4C4' +
'D4CCC914964590330205E3D0029471957');
end;
Function FindTake:Boolean;
Begin
If FindBitmap(Take,x,y) Then
Begin
Result:=True;
Writeln('Yay we found it!');
end else
Begin
Writeln('Boo, cant find bitma');
Result:=False;
end;
end;
begin
ActivateClient;
LoadBitmaps
FindTake
end.
If you open scar and press F1, it links to a site with most of the SCAR functions,
Just Pres Crrl+F
and type "Bitmap"
and look though some of the other bitmap procedures.
Also if you want to learn about DTMs read my WONDERFUL Tut :p
Link:
http://www.srl-forums.com/forum/showthread.php?t=663&highlight=yohojo
TheGodfather
02-13-2007, 07:54 AM
No, I know that, im not that new to scar. I mean like
Function FindBitmapMask(blablaba) and other shit like that
EDIT: thanks for the DTM tut
YoHoJo
02-13-2007, 08:05 AM
Ah, i see. Sorry =)
Well i don't use bitmaps much.
A bitmap mask is like a white outline of an item which makes it universal (work for any item that shape bronze,iron, steel anything)
You'll have to look around the Tut section for ore info about that.
Use the search button =).
TheGodfather
02-13-2007, 08:21 AM
Well thanks anyways dude, you just happend to answer my question I was looking for to get answered anyways ;)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.