SRL Archive - SRL Archives

DropItemsBut(Items: TStringArray);


HyperSecret

2008-04-01 02:47:55

got this idea from iBot. it drops all the items in the invetory EXCEPT the ones specified by the items. mainly based off SRLs drop procedure but just alittle different and i thought would be useful. also nice re-arranges inv at the end with ArrangeInv; (great procedure IMO that is under-used).

procedure DropItemsBut(Items: TStringArray);
var L: integer;
var Pr: TPoint;
begin
for L := 1 to 28 do
begin
if ExistsItem(L) then
begin
Pr := ItemCoords(L);
MMouse(Pr.x, Pr.y, 8, 8);
wait(100 + randomrange(100, 250));
if not(IsUpTextMultiCustom(Items)) then
begin
Mouse(Pr.x, Pr.y, 8, 8, False);
Wait(170 + Random(50));
if (ChooseOption('rop')) then
begin
Wait(500 + Random(100));
end;
end;
end;
end;
ArrangeInv;
end;

usage:


DropItemsBut(['oin', 'uby', 'obster']);

will drop all items unless uptext is 'oin' (coins) , 'uby' (ruby), 'obster' (lobster). those items will be kept in the inv

FrÕzÑ_§ÕµL

2008-04-01 02:52:33

Slightly dangerous since it will move over every item? I guess not since you have random 8, but still not human-like ;) Much safer using bitmaps or dtms. Definitely not good to use this in banking lol, ok for dropping though.

Nice work still.

n3ss3s

2008-04-01 06:52:05

Aww come on -


procedure DropItemsBut(Items: TStringArray);
var L: integer;
var Pr: TPoint;
begin
for L := 1 to 28 do
if ExistsItem(L) then
begin
Pr := ItemCoords(L);
MMouse(Pr.x, Pr.y, 8, 8);
wait(100 + randomrange(100, 250));
if not(IsUpTextMultiCustom(Items)) then
begin
Mouse(Pr.x, Pr.y, 8, 8, False);
Wait(170 + Random(50));
if (ChooseOption('rop')) then
Wait(500 + Random(100));
end;
end;
ArrangeInv;
end;


It's a nice idea, though like Fr0zn said, slightly detectable.

To make it less detectable, I suggest getting all the item coords to a TPA, and then doing a random amount of random Swap(..), so it atleast doesn't always hover in the 'right' order.

P1nky

2008-04-01 09:36:32

dude this is really useful since drag item sometimes drags wrong spots and drops my rune axe i can use this :O or just take drag item out of my script heh

HyperSecret

2008-04-01 13:26:20

From: n3ss3s
Aww come on -

It's a nice idea, though like Fr0zn said, slightly detectable.

To make it less detectable, I suggest getting all the item coords to a TPA, and then doing a random amount of random Swap(..), so it atleast doesn't always hover in the 'right' order.


lol exactly what i am working on…i just needed some way real quick to be able to drop the extra items after i dropped logs…but im working on that with my logs to so that it doesnt go straight down the line when dropping logs and i will have it randomly move to an item instead of going across in the inventory..

Naum

2008-04-01 15:13:29

Very good.
Simple but a very good idea, Some people might need these.
Also i dont think that jagex can monitor the mouse movements.
I think they can only get the mouse clicks.
GJ anyways!

MylesMadness

2008-04-01 15:25:27

From: NaumanAkhlaQ
Also i dont think that jagex can monitor the mouse movements.
I think they can only get the mouse clicks.
GJ anyways!
But they can

Sir R. M8gic1an

2008-04-01 15:51:49

but actually you can use this after you do a dtm drop. you check if there any items left, and if it's not an item you want although it's not a log you use this to drop :) and it won't be obvious because all the items you don't want wont be in order.

~RM

P1nky

2008-04-01 16:36:31

From: Rasta Magician
but actually you can use this after you do a dtm drop. you check if there any items left, and if it's not an item you want although it's not a log you use this to drop :) and it won't be obvious because all the items you don't want wont be in order.

~RM


smart…. :P lol i like that idea thanks bro:rolleyes:

HyperSecret

2008-04-01 16:43:43

From: Rasta Magician
but actually you can use this after you do a dtm drop. you check if there any items left, and if it's not an item you want although it's not a log you use this to drop :) and it won't be obvious because all the items you don't want wont be in order.

~RM


that is how i use it…i use it just to keep the coins and an axe…and it drops everything else after all logs have been dropped

ShowerThoughts

2008-04-01 17:03:45

I Have An Idea you can also add the colors from what you don't want or the colors that you want ;)

Timothegreat

2008-04-01 17:26:30

From: Hermpie
I Have An Idea you can also add the colors from what you don't want or the colors that you want ;)


exactly what ive been thinkin… no botlike checking for uptext.

bullzeye95

2008-04-01 17:35:43

You could make the function accept a TVariantArray instead, and, using the VarType function, you could either make it skip a color or an uptext, depending on if the current element of the array is a string or integer :)

HyperSecret

2008-04-01 17:41:19


procedure DropItemsBut(Colors: TIntegerArray; Items: TStringArray; Tol: Integer);
var L, tx, ty: integer;
var Pr: TPoint;
begin
for L := 1 to 28 do
if ExistsItem(L) then
begin
Pr := ItemCoords(L);
if FindColorTolerance(tx, ty, Colors, MIX1, MIY1, MIX2, MIY2, Tol) then
begin
MMouse(Pr.x, Pr.y, 8, 8);
wait(100 + randomrange(100, 250));
if not(IsUpTextMultiCustom(Items)) then
begin
Mouse(Pr.x, Pr.y, 8, 8, False);
Wait(170 + Random(50));
if (ChooseOption('rop')) then
Wait(500 + Random(100));
end;
end;
end;
ArrangeInv;
end;

so like that? could do a double check, goes to the color and then makes sure that the uptext is also there…

Special Ed

2008-04-01 18:42:03


procedure DropItemsBut(Items: TStringArray);
var
x, y: Integer;
i, a, DtmC: Byte;
Pr: TPoint;
dtmMP: TDTMPointDef;
dtmSP: array[0..1] of TDTMPointDef;
TempTDTM: TDTM;
TempDtm: TIntegerArray;
DtmTest: Boolean;
begin
for i:= 1 to 28 do
if ExistsItem(i) then
begin
DtmTest:= False;
Pr:= ItemCoords(i);
for a:= 0 to DtmC do
if(not(FindDTM(TempDtm[a], x, y, Pr.x - 7, Pr.y - 7, Pr.x + 7, Pr.y + 7)))then DtmTest:= True;
if(DtmTest)then
begin
MMouse(Pr.x, Pr.y, 8, 8);
Wait(200 + Random(150));
if(not(IsUpTextMultiCustom(Items)))then
begin
Mouse(Pr.x, Pr.y, 8, 8, False);
Wait(170 + Random(50));
if(ChooseOption('rop'))then Wait(500 + Random(100));
end else
begin
DtmC:= DtmC + 1;

dtmMP.x:= Pr.x;
dtmMP.y:= Pr.y;
dtmMP.AreaSize:= 1;
dtmMP.AreaShape:= 0;
dtmMP.Color:= GetColor(Pr.x, Pr.y);
dtmMP.Tolerance:= 0;

dtmSP[0].x:= Pr.x - 3
dtmSP[0].y:= Pr.y - 3
dtmSP[0].AreaSize:= 1;
dtmSP[0].AreaShape:= 0;
dtmSP[0].Color:= GetColor(Pr.x - 3, Pr.y - 3);
dtmSP[0].Tolerance:= 0;

dtmSP[1].x:= Pr.x + 3
dtmSP[1].y:= Pr.y + 3
dtmSP[1].AreaSize:= 1;
dtmSP[1].AreaShape:= 0;
dtmSP[1].Color:= GetColor(Pr.x + 3, Pr.y + 3);
dtmSP[1].Tolerance:= 0;

TempTDTM.MainPoint:= dtmMP;
TempTDTM.SubPoints:= dtmSP;

TempDtm[DtmC]:= AddDTM(TempTDTM);
end;
end;
end;
for i:= 0 to DtmC do FreeDTM(TempDtm[i]);
ArrangeInv;
end;

I haven't scripted in quite a while so I'm not even sure this will work. The logic behind it is to create a DTM of each of the items you don't want to drop as you find them so if it sees it again it will skip the spot before moving the mouse. It solves the human issue, although I'm sure it could be improved.

Special Ed

2008-04-01 19:38:28

Do you mean that the odds of finding the DTM with 2 Subpoints and 1 Mainpoint are slim, or do you mean that the odds of the points being on the item are slim?

It was mostly an example but you're right 3-5 Subpoints would probably work better than just two.

EDIT: Also your points.. make like a rhombus, I think… not so much a square although it doesn't really matter :p

The Claw

2008-04-02 04:35:17

An idea to make this less detectable would be instead of "For i := 0 to 28 do", make it do it in a random order. You could do this by making a TStringArray with the numbers 0 to 27, just in a random order. Then do "For i := Low(TStringArray) to High(TStrighArray) do". I think that would work

n3ss3s

2008-04-02 07:53:43

An idea to make this less detectable would be instead of "For i := 0 to 28 do", make it do it in a random order. You could do this by making a TStringArray with the numbers 0 to 27, just in a random order. Then do "For i := Low(TStringArray) to High(TStrighArray) do". I think that would work


Which is exactly my idea about doing some Swap s around the TPA of the item coords =(

..


Procedure DropItemsBut(iFrom, iTo: Integer; But: TStringArray);

Var
TPA: TPointArray;
L, I: Integer;
Begin
SetArrayLength(TPA, iTo - iFrom);
For I := iFrom To iTo Do
TPA[i] := ItemCoords(i);
L := High(TPA);
For I := 2 To Random(20) Do
Swap(TPA[Random(L)], TPA[Random(L)]);
For I := 0 To L Do
If ExistsItem(i) Then
Begin
MMouse(TPA[i].x, TPA[i].y, 4, 4);
If Not IsUpTextMultiCustom([But]) Then
Begin
GetMousePos(TPA[i].x, TPA[i].y);
Mouse(TPA[i].x, TPA[i].y, 0, 0, False);
If ChooseOption('rop') Then
Wait(250 + Random(150));
End;
End;
End;


Lmao at Claw's Factorizer - "Wizzup can drink beer with a chopstick." :p


Ed, 500+ wait is shitslow.

Wizzup?

2008-04-02 09:55:52

From: n3ss3s
Aww come on -


procedure DropItemsBut(Items: TStringArray);
var L: integer;
var Pr: TPoint;
begin
for L := 1 to 28 do
if ExistsItem(L) then
begin
Pr := ItemCoords(L);
MMouse(Pr.x, Pr.y, 8, 8);
wait(100 + randomrange(100, 250));
if not(IsUpTextMultiCustom(Items)) then
begin
Mouse(Pr.x, Pr.y, 8, 8, False);
Wait(170 + Random(50));
if (ChooseOption('rop')) then
Wait(500 + Random(100));
end;
end;
ArrangeInv;
end;


It's a nice idea, though like Fr0zn said, slightly detectable.

To make it less detectable, I suggest getting all the item coords to a TPA, and then doing a random amount of random Swap(..), so it atleast doesn't always hover in the 'right' order.


Or just make an int array…
program New;

var
indices:tintegerarray;
c:integer;
begin
indices := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28];
for c := 0 to 100 do
swap(indices[randomrange(low(indices), high(indices) + 1)], indices[randomrange(low(indices), high(indices) + 1)]);
for c := low(indices) to high(indices) do
writeln(inttostr(indices[c]));
//dropitem here.
end.

mixster

2008-04-02 10:23:00

I swear going along row by row isn't as detectable as going over them all in a random position, e.g. going to the first item, then the 12th then the 3rd then the 5th etc. That in itself looks very inhuman as no one I know would ever drop like that unless they were dropping quickly and mis-clicked, not to mention if the mouse just hovers over random positions and doesn't drop, it makes it even less human-like. Making it randomly choose different drop patterns would be better, such as 3/4 = row by row else column by column and running the check while doing that. Well atleast that's my opinion, please don't eat me :)

Wizzup?

2008-04-02 11:09:14

From: mixster
I swear going along row by row isn't as detectable as going over them all in a random position, e.g. going to the first item, then the 12th then the 3rd then the 5th etc. That in itself looks very inhuman as no one I know would ever drop like that unless they were dropping quickly and mis-clicked, not to mention if the mouse just hovers over random positions and doesn't drop, it makes it even less human-like. Making it randomly choose different drop patterns would be better, such as 3/4 = row by row else column by column and running the check while doing that. Well atleast that's my opinion, please don't eat me :)


True, I just quickly wrote that to show a different approach… :)

HyperSecret

2008-04-02 17:01:24

From: mixster
I swear going along row by row isn't as detectable as going over them all in a random position, e.g. going to the first item, then the 12th then the 3rd then the 5th etc. That in itself looks very inhuman as no one I know would ever drop like that unless they were dropping quickly and mis-clicked, not to mention if the mouse just hovers over random positions and doesn't drop, it makes it even less human-like. Making it randomly choose different drop patterns would be better, such as 3/4 = row by row else column by column and running the check while doing that. Well atleast that's my opinion, please don't eat me :)


i agree 100% with that…i just have this added into my dropping procedure where it drops all the logs…then after goes and drops the non-log items without the uptext…but ed's way of doing it IMO is very good to where it will skip the dtm it makes and remembers not to go to that

Special Ed

2008-04-02 19:43:45

N3ss, I just picked some random number that looked good. IDK how long it needs to be :rolleyes: :p

Ya, having the procedure randomly deciding whether or not to drop by rows or columns would add some variety… although I'm fairly certain that most people drop row by row…

Maybe we should make a poll about it? :p

n3ss3s

2008-04-06 05:21:46

As it should be -


Function DropItemsBut(iFrom, iTo: Integer; But: TStringArray): Integer;

Var
z, c: Integer;
TP: TPoint;
B: TBox;
Begin
c := Random(2);
For z := iFrom To iTo Do
Begin
If C = 0 Then
Begin
TP := Point(z div 7, z mod 7);
If TP.y = 0 Then TP.y := 7;
If z mod 7 <> 0 Then TP.x := TP.x + 1;
B.x1 := 518 + (TP.x * 42);
B.y1 := 172 + (TP.y * 36);
B.x2 := 560 + (TP.x * 42);
B.y2 := 210 + (TP.y * 36);
TP.x := (B.X1 + B.X2) Shr 1;
TP.y := (B.Y1 + B.Y2) Shr 1;
End Else
TP := ItemCoords(z);
MMouse(TP.x, TP.y, 3, 3);
If IsUpTextMultiCustom(But) Then
Begin
Result := Result + 1;
Continue;
End;
GetMousePos(TP.x, TP.y);
Mouse(TP.x, TP.y, 0, 0, False);
ChooseOption('rop');
Wait(250 + Random(150));
End;
End;

50% chance for by colums, 50% chance for rows.

Nava2

2008-05-17 13:51:55

When I used to do manual power mining I did:

1-2-3-4
8-7-6-5
9-0-1-2
6-5-4-3
7-8-9-0
4-3-2-1
5-6-7-8

Thats the most efficient pattern, not sure how todo that :(

Nava2

Nava2

2008-05-17 13:53:37

Sorry, I totally just grave dug.

Nava2