SRL Archive - Research & Development Lounge

Easiest Drop procedure lol


destroyface

2007-07-20 18:34:20

procedure Drop;
begin
DropTo(2,28);
end;

lol

Here

2007-07-20 18:54:33

This isn't a procedure that people would use. Sorry, there's just no point.

stupedspam

2007-07-20 19:24:49

Ah that one has no fail safes and it will drop everything except the first inventory slot…

I made one that drops DTM items…

//Just change out the DTM = )
Procedure Drop;
begin
repeat
wait(100+Random(500))
if FindDTM(JugInv,x,y, MIX1, MIY1, MIX2, MIY2)then
MMouse(x,y,2,2)
wait(500)
if (IsUpText('Jug'))then
Mouse(x,y,3,2,false)
ChooseOption(x,y,'Drop')
until(CountItemDTM(JugInv) < 1) or (CountItemDTM(JugInv) = 0)
end;

~Stupedspam

Oh, Sorry I missed that… Thanks Santa :D Edited

Santa_Clause

2007-07-20 19:31:05

(CountItemDTM(JugInv) > 1)

Erm…that would stop repeating when there's more than one DTM of the Jug left…which is basically how it is before it drops anything.

I think you meant:

(CountItemDTM(JugInv) < 1)

which basically means 0…

syphon

2007-08-08 01:35:23

excsuse my noob question but what does DTM stand for. And is there an easy list of runescape functions anywhere… Like makecompas(N) or whatever… I've been reading scripts but not really understanding them. I've made a few myself using only SCAR functions like clickmousebox, movmousebox, FindColorTolerance, wait, and stuff like that. Ive made a function to burn all my willow logs ininvantory if nothing is in the way stopping me saying I can't light a fire there.

I know I'm a noob to scar programs… but I graduated college with a computer science major. Could someone tell me where all the functions are defined? I jsut hate how people don't comment their code.

The Claw

2007-08-08 02:43:41

DTM means Deformable Template Model. And yeh for a whole thing of SRL Functions, check out scar/includes/srl/srl. in core is where all the main functions are, skill is skill related and misc is for stuff that doesnt fit anywhere else. extended is just old stuff i think. :)

ektran

2007-08-08 04:27:17

I good drop procedure in my opinion would be one that has all the common drop items (logs, ores, shrimp) inbuild as DTM's and all you would have to do is something like this:


if (InvFull) then
DropItem('log');

It would be pretty simple but useful to most powerminers, chopppers, fishers, etc.

TheSantaMan

2007-08-27 02:47:03

your an idiot. Sorry to be harsh but what a waste of time

WT-Fakawi

2007-08-27 02:51:20

function Drop:boolean;
var
i:Integer
begin
for i := 1 to 28 do
begin
TB := InvBox(i);
if FindColor(65536, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
begin
MouseItem(i, False);
ChooseOption('Drop');
Wait((250) + Random(150));
end;
end;
end;

hbryan1991

2007-08-27 04:02:31

From: WT-Fakawi
function Drop:boolean;
var
i:Integer
begin
for i := 1 to 28 do
begin
TB := InvBox(i);
if FindColor(65536, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
begin
MouseItem(i, False);
ChooseOption('Drop');
Wait((250) + Random(150));
end;
end;
end;


that doesnt work you get an error

Santa_Clause

2007-08-27 04:18:25

What's the error?

WT-Fakawi

2007-08-27 05:22:48

From: hbryan1991
that doesnt work you get an error


Yeah could be. I just typed it inside the reply box. Didnt test it :) . Just to show you how easy it is to make your own custom dropper.

Santa_Clause

2007-08-27 05:43:15

What exactly is MouseItem?

WT-Fakawi

2007-08-27 05:55:35

From: SantaClause
What exactly is MouseItem?
Clicks Mouse on Item in inventory.

I see the error now. You need to declare x and y inside the function…

var
x, y:Integer; :)

yanix

2007-08-30 09:27:06

From: Here
This isn't a procedure that people would use. Sorry, there's just no point.


Umh sorry to say this but members would use this… like for fletching u chop a tree and u make it to a bow and then use a auto dropper wich i need now but none here works…:D

ShowerThoughts

2007-08-30 09:31:37

yanix lol none works lol maybe your srl or your scar doesnt work…

WT-Fakawi

2007-08-30 09:32:55

From: Here
This isn't a procedure that people would use. Sorry, there's just no point.

All Power…….. scripts use Dropto, or DropAll, lol. So basically all scripts that dont bank drop. Very usefull.

Infantry001

2007-08-30 15:53:24

haha Here got owned :P

Yeah, that is the easiest DropProcedure, but very basic.

And stupidspam, that code will drop from column 1 down, then move on to column 2, etc…

shaunthasheep

2007-08-30 17:34:27

Here didn't get owned. Shes right. It's useless. Instead of calling Drop; just call the DropTo(2, 28); instead. Only retards have procedures with 1 line of code and no parameters or return results.

SKy Scripter

2007-08-30 17:40:56

Me Droper :)

// Drops All My Rocks And Uncuts...
procedure DropAllOre;
var
i, Count, Slot, Row, Ix, Iy : Integer;
Drop : Boolean;
begin
if Players[CurrentPlayer].Active then
for i := 0 to 27 do
begin
if (not(LoggedIn)) then Break;
Slot := I mod 4;
Row := I / 4;
IX := 560 + (Slot * 42);
IY := 210 + (Row * 36);
Count := CountColor(65536, IX, IY, IX + 41, IY + 35);
if (Count = 171) or (Count = 66) then
begin
MMouse(Ix + 15, Iy + 15, 7, 7);
Wait(80 + Random(20));
Drop := IsUpText('ncut') or IsUpText('ore');
end;
if (Drop) then
begin
GetMousePos(Ix, Iy);
Mouse(Ix, Iy, 0, 0, False);
if (not(ChooseOption('rop'))) then ChooseOption('ancle');
Drop := False;
end;
end;
end;

shaunthasheep

2007-08-30 17:50:04

Sky, you spelt cancel wrong.

SKy Scripter

2007-08-30 20:16:25

From: The_Rs_Monkey
Sky, you spelt cancel wrong.


Lol, yeah.. thanks :)

didnt notice that =/

Santa_Clause

2007-08-31 05:50:46

What the heck is wrong with SKy's dropper?! Why would you make it so complicated?

SKy Scripter

2007-08-31 09:17:57

From: SantaClause
What the heck is wrong with SKy's dropper?! Why would you make it so complicated?


well all it does it get the count of the black around the item and then drop's it depending on the count…
i didnt make complicated on purpose lol?

The Claw

2007-08-31 09:45:35

begin
SetArrayLength(FishToDrop, 10);

FishToDrop[0] := ShrimpBmp; //shripm
FishToDrop[1] := SardineBmp; //sardine
FishToDrop[2] := HerringBmp; //herring
FishToDrop[3] := AnchoviesBmp; //anchovy
FishToDrop[4] := TroutBmp; //trout
FishToDrop[5] := PikeBmp; //pike
FishToDrop[6] := SalmonBmp; //salmon
FishToDrop[7] := TunaBmp; //tuna
FishToDrop[8] := LobsterBmp; //lobster
FishToDrop[9] := SwordfishBmp; //swordfish

for F:= 0 to 9 do
begin
MarkTime(DroppingSingleFish);
Writeln('Dropping: ' + IntToStr(F));
repeat
if not LoggedIn then Break;
FindRandoms;
ClickAllItemsBmpTolWait(FishToDrop[F], 'rop', 30, (300 + Random(300)));
until (TimeFromMark(DroppingSingleFish) > 60000) or (not FindBitmapToleranceIn(FishToDrop[F], Rx, Ry, MIX1, MIY1, MIX2, MIY2, 40));
end;
end;

Declare the bitmaps elsewhere in your script, and this will drop every bitmap in the array FishToDrop.

begin
SetArrayLength(PlzDontDropMe, 7);

PlzDontDropMe[0] := SmallNetBmp; //small net
PlzDontDropMe[1] := FishingRodBmp; //fishing rod
PlzDontDropMe[2] := FlyFishingRodBmp; //fly fishing rod
PlzDontDropMe[3] := HarpoonBmp; //harpoon
PlzDontDropMe[4] := CageBmp; //cage
PlzDontDropMe[5] := BaitBmp; //bait
PlzDontDropMe[6] := FeatherBmp; //feathers

for I := 1 to 28 do
if ExistsItem(I) then
begin
P := InvBox(I);
DropIt := True;
for C := 0 to 6 do
begin
if FindBitmapToleranceIn(PlzDontDropMe[C], Rx, Ry, P.X1, P.Y1, P.X2, P.Y2, 40) then
begin
DropIt := False;
Break;
end;
end;
if DropIt then
begin
Mouse((P.X1 + P.X2) div 2, (P.Y1 + P.Y2) div 2, 5, 5, False);
Wait(100 +Random(100));
ChooseOption('rop');
end;
end;
Wait(50 +Random(75));
end;

This will drop everything in your inventory apart from the bitmaps in the array PlzDontDropMe.

Sorry about the fishing related bitmaps and names, I pulled this straight out of my fisher. :p

Special Ed

2007-08-31 17:20:27

Lol yea I would say use my dropping procedure from my fisher, it is flawless (mostly?), except for one thing I missed, lol, but SB pointed that out. I mean dropping procedures are quite useful and extremely easy to make you just need to think of how you drop items and what steps you go through when dropping if your making a totally new dropping procedure. Like mine for example doesn't use Drop(); because *for what ever reason* I couldn't get it to work for me, and so I made one using a DTM of the Optionmenu. You just need to think it through.

Basically a Dropping procedure is just a little Mouse movement to a DTM followed by and uptext check and a ChooseOption('Drop');