SRL Archive - SRL Archives

DropItemName


666d3v1l666

2008-10-03 06:41:44

Hi,

I was wondering, if I create a function for SRL that drops items for you, such as if your making a powerminer, it would drop ores that you specifiy.
I would use somthing like:
function DropItemName(Item: String)
Then use DTM's and ChooseOption.
If I make this would you add it?

Thanks

turbobk

2008-10-03 06:51:42

There are thousands of items in RuneScape.

Even if you could make a DTM of them all, it would be way to big to add to SRL.
And what if one day they all broke? You would have to start again, It's not a very logical idea at all. :)


Just letting you know before you started making it.

Thanks,
TurboBk. :)

666d3v1l666

2008-10-03 06:55:20

Good point.
I had thought about there being soo many items, so I decided i would only add items that autos would use, such as logs or fish or bowls.

turbobk

2008-10-03 06:59:54

Another Idea you could do would be to use, Color and UpText.

Like maybe..
Function DropItem(Color: Integer; UpText: String): Boolean;

It wouldn't be as accurate, but it should still work ok.

lordsaturn

2008-10-03 07:28:02

From: turbobk
There are thousands of items in RuneScape.

Even if you could make a DTM of them all, it would be way to big to add to SRL.
And what if one day they all broke? You would have to start again, It's not a very logical idea at all. :)


Just letting you know before you started making it.

Thanks,
TurboBk. :)


DTM's dont just break randomly..?
Not unless jagax changes the sprite used.


procedure DropItemsDTM(DTM: integer; Option: string);
would work fine :)

666d3v1l666

2008-10-03 07:39:19

From: lordsaturn
DTM's dont just break randomly..?
Not unless jagax changes the sprite used.


procedure DropItemsDTM(DTM: integer; Option: string);
would work fine :)


Why would you have to have an Option in the procedure when the procedure is called DropItemsDTM??

turbobk

2008-10-03 08:11:53

From: lordsaturn
DTM's dont just break randomly..?
Not unless jagax changes the sprite used.


procedure DropItemsDTM(DTM: integer; Option: string);
would work fine :)



Yeah not that long ago jagex ruined most of my DTM's that I had premade, they worked one week then not the next.

Nava2

2008-10-03 08:19:19

Hmm, sorry… There is already a function which does that.

{*******************************************************************************
function ClickAllItems(identifier: Integer; identifiertype, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
By: WT-Fakawi / Sumilion
Description: Performs "option" popupmenu action on all items
with "identifier" and "tol[0]" as color tolerance and col[1]
as contour tolerance in case bmp masks are used in inventory. (e.g. 'store all')
Returns number of performed operations. Valid identifiertypes are :
bmp, mask, color, dtm.
*******************************************************************************}

function ClickAllItems(identifier: Integer; identifiertype, option: string; waitnum: Integer; tol: TIntegerArray):Integer;
var
i, x, y, coltol, contol: Integer;
TB: Tbox;
arr:array of Integer;
IDFound: Boolean;
begin
result := 0;
case LowerCase(identifiertype) of
'bmpmask', 'bitmapmask', 'bmp mask', 'bitmap mask', 'mask':
try
begin coltol := tol[0]; contol := tol[1] end;
except
srl_Warn('ClickAllItems', 'Tol was incorrect', warn_AllVersions);
Exit;
end;
'dtm': begin end;
'bmp', 'bitmap', 'color':
try
coltol := tol[0];
except
srl_Warn('ClickAllItems', 'Tol was incorrect', warn_AllVersions);
Exit;
end;
else begin
srl_Warn('ClickAllItems', 'Invalid identifier type: ' + identifiertype, warn_AllVersions);
Exit;
end;
end;

arr :=[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 i := 1 to 28 - 4 do
Swap(arr[RandomRange(i - 1, i + 4)], arr[RandomRange(i - 1, i + 4)] );


GameTab(4);
for i := 0 to 27 do
begin
TB := InvBox(arr[i]);
if ExistsItem(arr[i]) then
begin
try
case LowerCase(identifiertype) of
'bmp', 'bitmap':
IDFound := FindBitmapSpiralTolerance(identifier, x, y, TB.x1, TB.y1, TB.x2, TB.y2, coltol);
'bmpmask', 'bitmapmask', 'bmp mask', 'bitmap mask', 'mask':
IDFound := FindBitmapMaskTolerance(identifier, x, y, TB.x1, TB.y1, TB.x2, TB.y2, coltol, contol);
'color':
IDFound := FindColorTolerance(x, y, identifier, TB.x1, TB.y1, TB.x2, TB.y2, coltol);
'dtm':
IDFound := FindDtm(identifier, x, y, TB.x1, TB.y1, TB.x2, TB.y2);
end;
if IDFound then
begin
if option <> '' then
begin
MouseItem(arr[i], False);
Wait(waitnum);
ChooseOption(option);
Inc(Result);
end
else
MouseItem(arr[i], True);
Wait(waitnum);
end;
except end;
end;
end;
end;

Thanks for trying to contribute though!

Blender

2008-10-21 19:47:29

I made a script like this, but it was specifically for woodcutting. This post gave me an idea, and I just modded my other script so that it works for all items.

Here it is:

procedure DropItemScan(UpText: String);
var Drops: Integer;
begin
for a:= 1 to 28 do
begin
MMouseItem(a);

if (LowerCase(GetUpText) = LowerCase(UpText)) then
begin
DropItem(a);
WriteLn('Dropping item...');
Drops := Drops + 1;
end;
end;

Writeln('|---------------------|');
Writeln('| Log Dropping Proggy |');
Writeln('|---------------------|');
Writeln('| Total Drops: ' + IntToStr(Drops) + ' |');
Writeln('|---------------------|');
end;

It's kind of simple though…

Nava2

2008-10-21 21:25:51

if (LowerCase(GetUpText) = LowerCase(UpText)) then

Make this:

if IsUpText(UpText) then

OR

if LowerCase(RS_GetUpText) = LowerCase(UpText) then

Your current one doesn't work, as GetUpText is not a function afaik.

Naum

2008-10-23 11:28:07

No GetUpText is just this:

Function GetUpText : String;
Begin
Result := Rs_GetUpText;
end;

Also it would be very risky as the mouse would hover over each individual item before ruling it out.

Blender

2008-10-24 22:54:32

Never thought about that part of it…
Thanks!

Narcle

2008-10-24 23:33:22

I've done something similar and still use the concept, for this I'd do:
function DropItemName(UpText: String): Integer;
var
i: integer;
begin
for i := 1 to 28 do
begin
MMouseItem(i);
Wait(150+Random(100));
if IsUpText(UpText) then
if DropItem(i) then
Result := Result + 1;
end;
end;

Cazax

2008-10-25 10:55:32

This is too detectable, hovering every item in the inventory including empty spaces. It could be better using If ExistItem() Then to get what spaces are used.

Narcle

2008-10-25 16:54:28

From: Cazax
This is too detectable, hovering every item in the inventory including empty spaces. It could be better using If ExistItem() Then to get what spaces are used.


Actually yeah I forgot about the ExistsItem(), I use that as well. In any case this can be made faster with a custom ChooseOption in it etc. Instead of using DropItem() that waits again.

Also from my experiences (and I've used this a lot) I don't think they record mouse movements. This could be changed if your account is flagged though, idk.