SRL Archive - Help

Waiting


Deadly Serious

2012-01-21 01:30:28

I'm trying to make my script wait until my inventory is full.
So I used:

WaitInvMaxCount(28, 100000);
I'm doing something wrong because it doesn't wait until the inventory count = 28. It just goes onto the next procedure.

kevin33

2012-01-21 01:40:00

Something like this maybe? You can add something like an if…then statement to move on so it would be like if Result…then (whatever you want to do next).

{*******************************************************************************
function InvFull: Boolean;
By: n3ss3s
Description: Returns True if inventory is full
*******************************************************************************}
function InvFull: Boolean;
begin
Result := (InvCount = 28);
end;

Deadly Serious

2012-01-21 01:47:08

From: kevin33
Something like this maybe? You can add something like an if…then statement to move on so it would be like if Result…then (whatever you want to do next).

{*******************************************************************************
function InvFull: Boolean;
By: n3ss3s
Description: Returns True if inventory is full
*******************************************************************************}
function InvFull: Boolean;
begin
Result := (InvCount = 28);
end;


Nah, I need it to wait until the inventory is full and do nothing until then.
If I make an "if invfull then" statement it'll most likely skip that procedure and go onto the next procedure.

bg5

2012-01-21 01:52:20

this?
WaitFunc(@InvFull,10,100000);

Harry

2012-01-21 01:54:01

MarkTime(youreallyshouldntdothis);
while (not InvFull) and (TimeFromMark(youreallyshouldntdothis) > 120000) do
Wait(1488);

I think there's also waitFunc() or some similar function that'd do similar. E:^ yeah that.

kevin33

2012-01-21 01:54:10

The function you have should work though. It is supposed to wait. Add a little more to it like another wait(Random…) or something if you have to. Only thing I can think of atm. Ahhh Harry's idea looks good. I would try that.

Brandon

2012-01-21 01:54:21


while (Not InvFull) do
wait(1);

Deadly Serious

2012-01-21 02:03:24

Thanks for all the responses, I'll test them out soon.