JAD
2007-06-19 14:25:27
Well, if you're making any type of power script, (Power chopper/Power fisher/Power miner….etc.) then this may be the function you need!
First of all, get a full inventory of items and just try this out. You will see how much faster it drops and how it does it from just that.
Credits: ChooseOptionFast is exactly the same as ChooseOption except I just added to the x to click over to the right more so the mouse is closer to the next item, and dropping faster.
I made this because this is how I always dropped when playing legit, so it's much faster, and it's how the smart real person does it :)
So test it, and test it without just dropping the full inventory to see if there's any errors! I did some testing with random numbers and it worked perfectly. Just remember how the slots are numbered!
Enjoy! :)
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.
First of all, get a full inventory of items and just try this out. You will see how much faster it drops and how it does it from just that.
Credits: ChooseOptionFast is exactly the same as ChooseOption except I just added to the x to click over to the right more so the mouse is closer to the next item, and dropping faster.
I made this because this is how I always dropped when playing legit, so it's much faster, and it's how the smart real person does it :)
So test it, and test it without just dropping the full inventory to see if there's any errors! I did some testing with random numbers and it worked perfectly. Just remember how the slots are numbered!
Enjoy! :)