pwnaz0r
2007-09-09 18:03:44
Well I made this because it was useful for dropping procedures and Rs_GetinvSlot doesnt work. Here is the procedure and an example.
Example:
function GetInvSlot(x, y: integer): integer;
var
I: integer;
begin
result:= - 1;
for I:= 1 to 28 do
begin
if IntInBox(x, y, invBox(I)) then
begin
result:= I;
exit;
end;
end;
end;
Example:
function DropLogs: boolean;
var
LogMask, lx, ly, failsafemark, CurrentLog: Integer;
begin
LogMask := BitmapFromString(19, 14, 'z78DA3330A00E704302067407' +
'F4B777D4C6A16EE3F0F09D1B5E400B9369E7F2E114D7230100008' +
'F6836A8');
Gametab(4);
while FindBitMapMaskTolerance(LogMask, lx, ly, 554, 207, 727, 464, 3, 3) do
begin
CurrentLog:= GetInvSlot(lx, ly);
Mouse(lx, ly, 4, 4, false);
if ChooseOption('rop')then
begin
logs:= logs + 1;
strLogs:= IntToStr(logs);
MarkTime(FailsafeMark);
repeat
wait(1);
If TimeFromMark(FailSafeMark) >= 2300 then
begin
Logs:= Logs - 1;
StrLogs:= IntToStr(Logs);
break;
end;
until not ExistsItem(CurrentLog);
end;
end;
result:= true;
FreeBitmap(LogMask);
end;