SRL Archive - RS3 Outdated / Broken Scripts

procedure DropToFast(StartSlot, EndSlot: Integer); - Quite useful for a power script!


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!


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! :)

pini3000

2007-06-22 14:06:27

cheers matey, since all exams are now over and I have a ton of free time, im learning to script properly this would be very much of help. Dont worry will definately give all creds to you.

JAD

2007-06-22 14:57:53

From: pini3000
cheers matey, since all exams are now over and I have a ton of free time, im learning to script properly this would be very much of help. Dont worry will definately give all creds to you.


Awesome! Glad to hear someone is using it! :D

BobboHobbo

2007-06-25 03:12:46

Nice, looks good. When i make a Powerchopper or something ill use it

:D

Bookmarked the Page :D

JAD

2007-06-25 11:30:46

Awesome! Glad to hear! :D

I'm making the same thing but making it DropDTMFast so you can drop all DTM's in your inventory fast like this :p

Once I start it should only take like 2 mins :)

BobboHobbo

2007-06-28 04:03:06

K good. Im using it it now im wcing the willows and i play and drops for me 10/10!! wonderfull!!!

thanks

JAD

2007-06-28 11:47:09

From: bobbohobbo
K good. Im using it it now im wcing the willows and i play and drops for me 10/10!! wonderfull!!!

thanks


np :) Glad to hear it's dropping well. I'm going to make that now though for the DTM :p

BobboHobbo

2007-06-28 23:18:10

Kk make it sexy good :D

Giga

2007-06-30 17:35:50

Hey, I tried your DropToFast function and it works wonderfully! I'm planning to possibly script a Power Woodcutter soon. If I do so, can I please use this function for yours in my script JAD? Thanks in advance, Giga. :)

Edit: Ffs… while writting this, I wasnt looking at runescape, was cutting oaks… big surprise, I come back to see the dwarf throwing stones at me… -.- Had 4hp, ran as fast as I could and got away :) then I was stopped for abit, and from nowhere the dwarf "teleports" next to me, (dunno how he got there!!! :S) throws stones rapidly and kills me! There goes my mith stuff :(

JAD

2007-06-30 17:56:07

From: Giga
Hey, I tried your DropToFast function and it works wonderfully! I'm planning to possibly script a Power Woodcutter soon. If I do so, can I please use this function for yours in my script JAD? Thanks in advance, Giga. :)

Edit: Ffs… while writting this, I wasnt looking at runescape, was cutting oaks… big surprise, I come back to see the dwarf throwing stones at me… -.- Had 4hp, ran as fast as I could and got away :) then I was stopped for abit, and from nowhere the dwarf "teleports" next to me, (dunno how he got there!!! :S) throws stones rapidly and kills me! There goes my mith stuff :(


I'd love it if you did! Awesome :)

And that sucks.. :p

RudeBoiAlex

2007-06-30 17:58:32

how sexy JAD we need a function section for non srl members

JAD

2007-06-30 17:59:15

From: rudeboialex
how sexy JAD we need a function section for non srl members


Thanks :) And yes… it is needed very badly.

Harry

2007-06-30 18:20:30

I like it, but it is still kinda slow.. MouseSpeen=1 Somewhere.??

JAD

2007-06-30 18:29:57

From: hy71194
I like it, but it is still kinda slow.. MouseSpeen=1 Somewhere.??


Why don't you just make the mouse speed = 1?? I didn't know if people would want it, so they don't have to have it. Instead, they can put a little code in to do this..:


procedure Whatever;
var TempSpeed: Integer;
begin
TempSpeed := MouseSpeed;
MouseSpeed := 1;
DropToFast(1, 28);
MouseSpeed := TempSpeed;
end;

See? Not so hard is it.. ;)

And if you use the same mouse speed on this, and the same one on SRL's DropTo, you'll see that this is MUCH faster ;) You can mark time it to tell the difference..

Harry

2007-06-30 18:32:26

I know about that, jw why you didn't do it in the first place ;) Yeah, this is so much faster than SRL's ;) +rep

JAD

2007-06-30 18:45:31

From: hy71194
I know about that, jw why you didn't do it in the first place ;) Yeah, this is so much faster than SRL's ;) +rep


:p And thanks :) My new DropAllDTMsFast is out NOW! :)