SRL Archive - Discussions and Debates

the include so far


huh26010

2006-03-05 21:13:39

(EDIT)stopped workin on it for now (EDIT)

Sdcit

2006-03-05 21:19:10

umm

1. use code tags

2. what did you do?

Mutant Squirrle

2006-03-05 21:51:29

basically he did what i did … in the "special place" but mine was about 900 times more efficient haha good job though its a nice first try

huh26010

2006-03-07 21:03:55

is there a way to search for a bitmap find it and look a certain distance from that bitmp and find a second bitmap

The Prince of Randomness?

2006-03-07 21:27:31

Yes it is.

huh26010

2006-03-10 22:40:21

is there a command to freeze the game screen like color finder does when you color pick?

XxKanexX

2006-03-10 23:24:46

Nope… ;(

BraK

2006-03-11 00:17:29

From: huh26010
is there a command to freeze the game screen like color finder does when you color pick?


that would be a sweet function though ;)

masquerader

2006-03-11 00:42:15

From: huh26010
is there a command to freeze the game screen like color finder does when you color pick?

er… theres a procedure pickcolor
and then you can also copy the client to a canvas, and set that as your handle for doing stuff, but i dont think you would understand it (i barely do right now)

XxKanexX

2006-03-11 07:16:45

From: masquerader
er… theres a procedure pickcolor
and then you can also copy the client to a canvas, and set that as your handle for doing stuff, but i dont think you would understand it (i barely do right now)

He means freeze the screen.

You could copy the whole screen into a canvas and then make a debug window that displays it..

Renax

2006-03-11 07:51:13

yah, just make a canvas/bmp of the screen and work on that.

BenLand100

2006-03-12 00:28:05

From: Renax
yah, just make a canvas/bmp of the screen and work on that.
He means take a screenshot and set it as the target for color/ bitmap / dtm searching procedures. Which in itself is a really good idea…
Give me a while and i'll do you guys up an example. for now look at my findcolorellipse functions as they use that basic principle (it is in srl btw)
function FindColorEllipse(var x, y: integer; Color, Tol, X1, Y1, X2, Y2: integer): boolean;
var
Temp: TCanvas;
Cx, Cy, H, W, ScreenBmp, TempBmp, Handle: Integer;
begin
W:= Max(X1, X2) - Min(X1, X2);
H:= Max(Y1, Y2) - Min(Y1, Y2);
Handle:= GetClientWindowHandle;
TempBmp:= BitmapFromString(W, H, '');
Temp:= GetBitmapCanvas(TempBmp);
ScreenBmp:= BitmapFromString(W, H, '');
FastDrawClear(TempBmp, -1);
CopyClientToBitmap(ScreenBmp, X1, Y1, X2, Y2);
CopyCanvas(GetBitmapCanvas(TempBmp), Temp, 0, 0, W, H, 0, 0, W, H);
Temp.Ellipse(0,0,W,H);
CopyCanvas(Temp, GetBitmapCanvas(TempBmp), 0, 0, W, H, 0, 0, W, H);
SetTransparentColor(TempBmp, 16777215);
FastDrawTransparent(0, 0, TempBmp, ScreenBmp);
SetTargetBitmap(ScreenBmp);
X:= -1;
Y:= -1;
Cx:= W div 2;
Cy:= H div 2;
if FindColorSpiralTolerance(Cx, Cy, Color, 0, 0, W, H, Tol) then
begin
X:= Cx;
Y:= Cy;
Result:= true;
end;
SetClientWindowHandle(Handle);
end;

huh26010

2006-03-20 18:22:26

Loaded new one; still needs work on findbitmap and clicking correct answer. Any suggestions and/or changes are welcomed along with critesism.if any one could explain that alittle. Also if anyone comes acroos a noob player they are autoing with the box i would appreciate if i could use it