SCAR Code:
program New;
{.include SRL/SRL.scar}
function ChooseOptionFast(x, y, Over: Integer; txt: string): Boolean;
var
x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
begin
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
if (FindText(x, y, txt, upchars, x1, y1, x2, 502)) then
begin
Result := True;
Mouse(x + Length(txt) * 3 + (Over), y + 3, 2, 2, True);
end
else if (FindText(x, y, 'Cancel', upchars, x1, y1, x2, 502)) then
Mouse(x + 9, y + 3, 2, 2, True);
end;
FreeBitmap(LeftCorner);
FreeBitmap(RightCorner);
end;
{*********************************************************************
procedure DropToFast(StartSlot, EndSlot: Integer);
By: JAD
Description: A re-make of SRL's function DropTo. This drops items just
like DropTo does, but it does it much faster! It drops downward, and
when the mouse clicks drop, the mouse is ready to click on the next
item. The inventory numbers are numbered top left and down. So
Inventory slot 1 is 1, Inventory slot 5 is 2, Inventory slot 9 is 3...
etc.
*********************************************************************}
procedure DropToFast(StartSlot, EndSlot: Integer);
var FastSlot: array[1..28] of Integer;
DropSlot: array[1..28] of TPoint;
I, Q, T: Integer;
begin
T := 1;
for I := 1 to 28 do
begin
FastSlot[I] := T + Q;
Q := Q + 4;
if(Q > 24)then
begin
T := T + 1;
Q := 0;
end;
end;
GameTab(4);
Q := 0;
for I := StartSlot to EndSlot do
begin
if(ExistsItem(FastSlot[I]))then
begin
DropSlot[I] := ItemCoords(FastSlot[I]);
Mouse(DropSlot[I].x,DropSlot[I].y,3,3,false);
if(I > 7)then
ChooseOptionFast(x,y,30,'Drop') else
ChooseOptionFast(x,y,4,'Drop');
end;
end;
end;
begin
SetupSRL;
ActivateClient;
wait(2500+random(1000));
DropToFast(1, 28);
end.