SRL Archive - Reflection Development

R_DepositAllByIDEX update


traveler

2010-11-28 14:05:56

i suggest an update to R_DepositAllButIDEx. I added a few lines of code to make it wait until the item its currently deposits goes non-existent, or times out. I believe it makes it look more human like.

procedure R_DepositAllButIDEx(IDs : TIntegerArray);
var
I, T : Integer;
Item : TInvItem;
begin
for I := 1 to 28 do
begin
Item := GetInvItemAt(I);
if(InIntArray(IDs, Item.ID))then Continue;
R_ClickItem(I, False, 'Deposit-All');
T := GetSystemTime;
while(R_ItemExists(I)) and (GetSystemTime-T<6000) do
wait(100);
end;
end;

Cstrike

2010-11-28 14:07:47

Nice job, committing after I give it a quick run :)

I'm going to change
wait (100) to wait(100+random(100)); just to be uber random.
Great job, this will help a lot of people

Gu3st...

2010-11-28 19:51:16

From: cstrike
Nice job, committing after I give it a quick run :)

I'm going to change
wait (100) to wait(100+random(100)); just to be uber random.
Great job, this will help a lot of people
It would be better to not change the wait and add a Wait(Random(100)) at the end of the function instead

Cstrike

2010-11-28 19:59:20

From: Zyt3x
It would be better to not change the wait and add a Wait(Random(100)) at the end of the function instead


What makes that better?
Not that I'm disagreeing with you ;)

lordsaturn

2010-11-28 20:01:51

Six seconds is a large timeout… how about 2?

Cstrike

2010-11-28 20:05:03

From: lordsaturn
Six seconds is a large timeout… how about 2?


I've rarely sometimes had lag that last 4-5 seconds, figured it would look more human around 5-6 seconds for being impatient ;)

traveler

2010-11-28 20:20:29

From: lordsaturn
Six seconds is a large timeout… how about 2?


I made it six because ive had major lag before, and still do. it can be shortened though if it needs to be.