SRL Archive - Research & Development Lounge

DropTheLogs;


Camaro'

2008-03-24 22:10:48

Well, I was using FrÕzÑ_§ÕµL's Forest FrostBite or w/e and i decided to make this off of his procedure.


{Procedure DropTheLogs*********************}
{Author:1st made by FrÕzÑ_§ÕµL edited alot by Cnr Sport:}
{Description: Drops all logs like a normal human would, EX: Clicking use, going very fast and leaving some Logs behind..***********}
{How to use: Woodcutyews;}
{ DropTheLogs;}



Procedure DropTheLogs;
var y,x,i:integer;
Begin
Mousespeed:=28;
if Not(LoggedIn) then exit;
GameTab(4);
for i := 1 to 28 do
Begin
Case random (9) of
0: begin
MouseItem(i, true);
wait(100+random(100))
MouseItem(i, true);
wait(40+random(100))
MouseItem(i, false);
ChooseOption('rop');
wait(40+random(100))
end;

1: begin
MouseItem(i, false);
ChooseOption('se');
MouseItem(i, true);
wait(100+random(100))
MouseItem(i, false);
wait(40+random(100))
ChooseOption('rop');
wait(40+random(100))
end;

2,3,
4,5,6,
7,8: begin
MouseItem(i, false);
ChooseOption('rop');
wait(40+random(100))
end;
end;
if (i = 10) or (i = 20) then
FindNormalRandoms;
end;
if (i = 28) then
begin
MouseItem(i, false);
ChooseOption('rop');
wait(40+random(100))
FindNormalrandoms;
end;
end;



What it does is Drops all of the inventory except first spot just like a normal person would..Please dont post about how "funky" my standards are.

Thanks to mixster05 for helping me out.

Harry

2008-03-24 22:15:26

0: begin
MouseItem(i, true);
MouseItem(i + 1, true);
end;

1: begin
MouseItem(i, false);
ChooseOption('se');
MouseItem(i, true);
end;


Why would you want to 'Use' the log? :S It will make it so you can't actually drop it …

Camaro'

2008-03-24 22:17:29

From: Hy71194
Why would you want to 'Use' the log? :S It will make it so you can't actually drop it …


Try dropping a load of logs very quickly.. When i drop my logs i go very quickly and i click use alot. I never ever not once finished dropping logs without messing up once.

mixster

2008-03-25 03:41:50


function DropItems(s: string): Integer;
var
i:integer;
begin
GameTab(4);
while i < 28 do
begin
case Random(5) of
0,1,2,3: begin
MMouseItem(i);
if IsUpText(s) then
begin
MouseItem(i, False);
ChooseOption('rop');
Inc(Result);
end;
end;
4: begin
MouseItem(i, False);
ChooseOption('se');
MouseItem(i, True);
Dec(i);
end;
end;
Wait(RandomRange(250,750));
Inc(i);
end;
end;

That's what I use when my DTM's fail and it also includes a built in count feature so I can give more accurate reports. Your version will actually only drop the logs 1 out of 8 times, as Random(8) = 0,1,2,3,4,5,6 or 7 (which is 8 numbers). Also, when it uses a log instead of dropping it, that log will remain there as you don't tell it to then go back and drop it. Also, if it uses the last time, you will try to use item 28 with item 29 and last time I checked, only 28 items in a RS bag, so it may be quite difficult. Lastly, not much use checking for Randoms while dropping and it would make more sense to check afterwards outside of the procedure/function.

Camaro'

2008-03-25 17:00:46

From: mixster05

function DropItems(s: string): Integer;
var
i:integer;
begin
GameTab(4);
while i < 28 do
begin
case Random(5) of
0,1,2,3: begin
MMouseItem(i);
if IsUpText(s) then
begin
MouseItem(i, False);
ChooseOption('rop');
Inc(Result);
end;
end;
4: begin
MouseItem(i, False);
ChooseOption('se');
MouseItem(i, True);
Dec(i);
end;
end;
Wait(RandomRange(250,750));
Inc(i);
end;
end;

That's what I use when my DTM's fail and it also includes a built in count feature so I can give more accurate reports. Your version will actually only drop the logs 1 out of 8 times, as Random(8) = 0,1,2,3,4,5,6 or 7 (which is 8 numbers). Also, when it uses a log instead of dropping it, that log will remain there as you don't tell it to then go back and drop it. Also, if it uses the last time, you will try to use item 28 with item 29 and last time I checked, only 28 items in a RS bag, so it may be quite difficult. Lastly, not much use checking for Randoms while dropping and it would make more sense to check afterwards outside of the procedure/function.



Well

It drops the logs 6 out of 8 times my procedure. For a power chopper whats the difference if it leaves 3-7 logs behind.. The findnormal randoms does not lag the script so why not have it? Only thing i should worry about is Using The 28th log, and i have to tell it to go back and finish dropping.

mixster

2008-03-25 17:07:43

I read through your script quickly, so did miss-read the dropping case, but I did get the Random(9) instead of 8 bit right ;) Also, it is 'inhuman' to leave a log behind when power-chopping or any other grinding, as you would notice it and go back and making scripts as human-like as possible is our aim :)

Camaro'

2008-03-25 17:30:22

From: mixster05
I read through your script quickly, so did miss-read the dropping case, but I did get the Random(9) instead of 8 bit right ;) Also, it is 'inhuman' to leave a log behind when power-chopping or any other grinding, as you would notice it and go back and making scripts as human-like as possible is our aim :)


But since the logs would be in diff spots in are inventory it would be hard.

Its best suggusted to make dtms of everylog which im way to lazy to do.

mixster

2008-03-26 03:08:11

Mine supports re-dropping mis-clicked logs :)

Camaro'

2008-03-26 15:27:24

From: mixster05
Mine supports re-dropping mis-clicked logs :)


Is this what goes back and redoes it?

while i < 28 do

???

mixster

2008-03-26 15:36:29

Kind of. Since I use a while loop, I can manually adjust i, so when it miss-clicks, I make it minus one from i - Dec(i); - so that when it adds 1, it re does the script for the same item again.

Camaro'

2008-03-26 16:23:38

From: mixster05
Kind of. Since I use a while loop, I can manually adjust i, so when it miss-clicks, I make it minus one from i - Dec(i); - so that when it adds 1, it re does the script for the same item again.


Oh ok thanks.

Completly redone.

KoKouKo

2008-03-30 02:59:22


Mousespeed:=28;
:confused: i would tone that done a little

Gu3st...

2008-03-31 09:47:13

Yea, Mouse speed (from now MS) should be around 10…

and what if the user had 10 in MS and uses ur dropping, after dropped 1st load, then the MS would be 28.

The "if not(LoggedIn) then Exit;" should be before the MS:=28;

Camaro'

2008-04-09 21:11:26

From: Zytex!
Yea, Mouse speed (from now MS) should be around 10…

and what if the user had 10 in MS and uses ur dropping, after dropped 1st load, then the MS would be 28.

The "if not(LoggedIn) then Exit;" should be before the MS:=28;


Ms works fine at 28 for me..

The person who is using this can edit the mouse speed for there needs ..

drizzt

2008-04-09 21:33:38

if you are gonna altar the MouseSpeed, make a seperate int var and save the current MS to it..then at the end set it back, like..
NewVar := MouseSpeed;
MouseSpeed := 28
//scriptscriptdrop
MouseSpeed := NewVar

Camaro'

2008-04-10 18:39:43

From: drizzt
if you are gonna altar the MouseSpeed, make a seperate int var and save the current MS to it..then at the end set it back, like..
NewVar := MouseSpeed;
MouseSpeed := 28
//scriptscriptdrop
MouseSpeed := NewVar


Im curious what that does?

n3ss3s

2008-04-11 15:18:20

Im curious what that does?


Asking the same about your title.

You have to know that, it first saves the current mousespeed to a variable, then sets a new mousespeed, "drops" and sets the old mousespeed back on.

HyperSecret

2008-04-11 20:32:00

here is my drop procedure right now…Axe DTM isnt being used at the current moment…


procedure DropItems(Items: TStringArray);
var
tx, ty, logs, i, R, R2, L, Axe: integer;
Pr: TPoint;
begin
if not(LoggedIn) then Exit;

logs := DTMFromString('78DA63FCC8C4C0D0C0C8800C9A536D19FE036' +
'990E87F20607C0E545385AA06220B2381F46FA09A72026AFE03D5' +
'B41350F306A8A68F809A1740355D04D43C06AA69C4AF0600FED91' +
'064');

Axe := DTMFromString('78DA633CC1C4C0F0870105B4A40832FC07D28' +
'C40FC1F08180F01D50832A22A6260442281F47E22D41C03AAF9C9' +
'805FCD15A09AFF04D45C06AAF94540CD45A01A26FCEE010086730' +
'FB3');

if FindDTM(logs, tx, ty, MIX1, MIY1, MIX2, MIY2) then
begin
repeat
if not(LoggedIn) then Exit;
if RMM then
MouseSpeed := (10 + random(7));
Status('Inv MouseSpeed := '+ IntToStr(MouseSpeed));
i := InvCount;
r := random(8);
r2 := random(2);
Mouse(tx, ty, 8, 8, false);
wait(100 + random(75));
case r of

0,1,2,3,4,5,6: begin
if not(LoggedIn) then Exit;
ChooseOption('rop');
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
LogsCut := LogsCut + 1;
while InvCount = i do wait(1);
end;

7: begin
if not(LoggedIn) then Exit;
ChooseOption('se');
wait(100 + random(75));


case r2 of

0: Mouse(tx, ty, 8, 8, true);

1: begin
if not(LoggedIn) then Exit;
Mouse(tx, ty, 10, 4, false);
wait(100 + random(75));
ChooseOption('ancel');
end;

end;
Continue;
end;

{8: begin
ChooseOption('xam');
Goto repeat;
end;}

end;
repeat
if not(LoggedIn) then Exit;
FindRand;
until(not(InvCount = i));
until not(FindDTM(logs, tx, ty, MIX1, MIY1, MIX2, MIY2));
end;
for L := 1 to 28 do
begin
if not(LoggedIn) then Exit;
if KeepExtraItems then Break;
if ExistsItem(L) then
begin
Pr := ItemCoords(L);
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;
end;
ArrangeInv;
FreeDTM(logs);
FreeDTM(Axe);
LoadsDone := LoadsDone + 1;
TotalLoads := TotalLoads + 1;
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
end;

Camaro'

2008-04-12 22:10:53

From: n3ss3s
Asking the same about your title.

You have to know that, it first saves the current mousespeed to a variable, then sets a new mousespeed, "drops" and sets the old mousespeed back on.


Okay, thanks -.-

Becks

2008-04-13 15:24:14

If you are dropping all (1 - 28)


program DropAll;
{.include SRL/SRL.scar}
Begin
DropAll;
WriteLn('Finished!');
end.

you might be able to add: If InvFull then… but im not sure

NosePicker

2008-04-17 09:43:22

I am confused here.
Does it really help to "accidently" click "Use"?
My DTM of logs seem to work for all types of logs.
Occasionally, based on tweaking the timing it may try to drop one too fast so I will let it try a few more than 28 times.
But this method seems to always drop all logs, no matter how scattered they are in the inventory.
What am I missing because it seems so simple?
And of course you could create a DTM of any inventory item and use this same method.

< dont know why this forum is removing all leading spaces in my code sample >

==========================================
procedure DropAllInvByDTM(DTMAsString: String) ;
var
i, x, y: Integer ;
DTM: Integer ;
begin
DTM := DTMFromString(DTMAsString) ;

// Open the inventory tab
if not GameTab(4) then begin
WriteLn('Inventory Tab not found.') ;
Exit ;
end ;

i := 0 ;

// Locate a DTM ( image ) within the inventory area.
while FindDtm(DTM, x, y, MIX1, MIY1, MIX2, MIY2) do begin
// Put in a "catch-all" so we will not get stuck in an infinate loop
Inc(i) ;
if ( i > 30 ) then
Break ;

Mouse(x, y, 5, 5, False) ;
Wait(200+Random(1000)) ;
ChooseOption('Drop') ;
Wait(300+Random(500)) ;
end ;

FreeDTM(DTM) ;
end ;

Da 0wner

2008-04-17 23:39:16

You can also do


procedure SpeedDrop(iFrom, iTo : integer);
var
i : integer;

begin
for i := iFrom to iTo do
begin
if ExistsItem(i) then
begin
mouseitem(i, false);
ChooseOption('rop');
end;
end;
end;

Sorry my standards suck :D. But you can make it drop ANY item from the specified spots (iFrom , iTo);

ex SpeedDrop(1, 28);

mixster

2008-04-18 07:24:58

NosePicker, please use Scar tags, makes it much more easy to read. Anyway, you are right about DTM's, but the problem is that when other items get into your inventory etc. then something like this is good as a backup to clear out all the remaining crap that's taking up precious log/ore/pineapple space.