View Full Version : Waiting
Deadly Serious
01-21-2012, 06:30 AM
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
01-21-2012, 06:40 AM
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
01-21-2012, 06:47 AM
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.
this?
WaitFunc(@InvFull,10,100000);
Harry
01-21-2012, 06:54 AM
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
01-21-2012, 06:54 AM
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
01-21-2012, 06:54 AM
while (Not InvFull) do
wait(1);
Deadly Serious
01-21-2012, 07:03 AM
Thanks for all the responses, I'll test them out soon.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.