PDA

View Full Version : FindDTMInBank(DTM : integer; var xcx, ycy : integer) : integer;



footballjds
01-31-2008, 10:54 PM
function GetScrollLvl : integer;
var
xxx : integer;
begin
FindColor( xxx, Result, 5531254, 468, 75, 468, 253);
end;
function FindDTMInBank(DTM : integer; var xcx, ycy, yOfScroll : integer) : boolean;
var
cx, cy : integer;
begin
if not(BankScreen) then EXIT;
if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then
begin
yOfScroll:= GetSCrollLvl;
Result := True;
EXIT;
end;
if GetColor(475, 75) = 1777699 then
Mouse(475, 79, 3, 3, True);
MMouse(476, 280, 3, 3);
GetMousePos(cx, cy);
HoldMouse(cx + Random(1), cy + Random(1), True);
repeat
if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then BREAK;
wait(1);
until not(GetColor(477, 271) = 1777699) or not(LoggedIn);
ReleaseMouse(cx, cy, True);
yOfScroll:= GetSCrollLvl;
Result := not(GetColor(477, 271) = 1777699);
end;
usage: FindDTMInBank(LogDTM, x, y, YOfScrollBar);

munk
01-31-2008, 11:05 PM
im confused at why it returns an integer and not a boolean?

Timer
01-31-2008, 11:08 PM
me eather, why would we have to know the amout on the bar up...?
just result true or false if found dtm

footballjds
01-31-2008, 11:30 PM
im confused at why it returns an integer and not a boolean?

so in the future you don't have to search, you can just click da spot :duh:

MylesMadness
01-31-2008, 11:37 PM
Me and him kinda made this together(Ideas and bugs fixed). What it does is makes it so it only has to search the bank once.

Edit:Wouldn't this make major lag: repeat
if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then BREAK;
wait(1);
until not(GetColor(477, 271) = 1777699) or not(LoggedIn);

footballjds
02-01-2008, 12:23 AM
actually myles it won't hardly lag at all.

MylesMadness
02-01-2008, 01:01 AM
I always thought calling a findanything every 1ms would lag. I learned something new today:p

footballjds
02-01-2008, 01:29 AM
find bitmap would lag the shit outa it... but as long as its not a HUGE dtm its fine.

MylesMadness
02-01-2008, 02:15 AM
Bitmaps I had no doubt in my mind because their slow even once let alone 1 every ms.

footballjds
02-01-2008, 05:06 AM
@myles :p
@everyone else, no comments? cmon!

ZephyrsFury
02-01-2008, 05:23 AM
so in the future you don't have to search, you can just click da spot :duh:

I still don't get it. Why does it return GetScrollLvl?

footballjds
02-01-2008, 05:31 AM
ok, it figures out at what scroll lvl it is at.... so next time you open da bank you can have it click there.

ZephyrsFury
02-01-2008, 07:39 AM
Oh ok. I still think it would be better to return a boolean then have a variable in the parameters to store the scroll level. So then your could do something like this:


if FindDTMInBank(..) then
Mouse(...);

footballjds
02-01-2008, 07:31 PM
yeah, i was just getting it up, il add that:D
changed it, anyone used it?