SRL Archive - OSR Help

Private Server Rs- Dropping Help( Best Method)


azza123

2013-01-15 05:50:47

Edit: Figured it out although now I need to know how do I make it Drop all of the logs that it finds in my inventory. At the moment what it does is Click tree, wait 10 seconds, Finds log in my invent, Right clicks log, Selects drop. Then Repeats. I need to know how to make it drop all the logs in my inventory then repeat? Help Please

program New;
{$i srl/srl.simba}
var
Drop, logs: Integer;
procedure ClickTree;
var
X, Y, logs: Integer;
begin
if FindColorTolerance (X, Y, 3240032, 244, 61, 293, 110, 5) then
begin;
mmouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Left)
wait(10000);
if FindDTM(logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
mmouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Right)
wait(2000);
Begin if FindBitmapToleranceIn(Drop, X, Y, 495, 201, 734, 462, 100) then
begin
writeLn('It is actually running dropshitlog');
mmouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Left)
end;
end;
end;
end;
end;

Begin
cleardebug;
logs := DTMFromString('m6wAAAHic42ZgYOAHYi4gZmGAABAtCMRSQCwHxJJALA7EAkDMA8TMQMwO1ScKxGJALAzEvEDMATWDCYjzU22BJCNR+D8D8YA4EyEYCQAA5QcDVQ==');

Drop := BitmapFromString(95, 7, 'meJzNVEkOwCAI9Gm9+QGv/qk/to0' +
'mZMJWtyYSDnQyFhjBmHKpFkKIKe/16y6qz+VqZ4fI602hOAWMERjo' +
'4LJCGUj1LFURD9V8jirOaCJCVHGoDPxEHSzcqrAxEaGYcHZKxSUHF' +
'VNTzyVi7bOWrbnyY3+2nQuVvXTGn2s18UNncjDpf+LIiztHnDbqJ4' +
'izpZft4sg9UtvEh5cxJb6+Vj3rxji+OIyMpTqJXn8A081Suw==');
MouseSpeed :=15

repeat
ClickTree;
until(false)
FreeDTM(logs);
FreeBitmap(Drop);
end.

Wardancer

2013-01-15 21:15:43

I'm personally a huge fan of the function GridBox. If set correctly, you could have a function splitting your inventory into 28 slots (each slot would be numbered). Once that is done, all you'd have to do is search for the DTM in each of these slots with a "for…to" loop. Also, instead of a static 10 seconds waiting time, you might like to change to a WaitFunc(@FoundLog, 10, 10000) type of thing that would turn true when DTM is found in a particular inventory slot.

If anything doesn't make sense, post again and I'll show you an actual example.

xtrapsp

2013-01-17 08:14:12

From: Wardancer
I'm personally a huge fan of the function GridBox. If set correctly, you could have a function splitting your inventory into 28 slots (each slot would be numbered). Once that is done, all you'd have to do is search for the DTM in each of these slots with a "for…to" loop. Also, instead of a static 10 seconds waiting time, you might like to change to a WaitFunc(@FoundLog, 10, 10000) type of thing that would turn true when DTM is found in a particular inventory slot.

If anything doesn't make sense, post again and I'll show you an actual example.


Bad drawing by me, hopefully it helps back yhis point up:


rj

2013-01-17 20:36:21

From: xtrapsp
Bad drawing by me, hopefully it helps back yhis point up:



This is extremly sophisticated for a beginner no offense to the op. the best way to do it is check for a log in the last inventory slot and repeat the drop log procedure until it an log longer find the log n the last slot. Impost snippet when I get n the computer