
Originally Posted by
Herbs N Tea
No, after doing a load theres 14 items in my inventory. I could've made it check slot 15 but I gues with this line it will still look for supplies if you've allready made for example halve the inventory.
Thanks alot for taking a look tho
/edit, I just noticed checking item 27 is really stupid, since this slot will only be empty when the inv is almost done >.<
Ok without seeing the rest of your script I can't be sure, but I think I may know your problem.
Simba Code:
procedure Banking;
var
I : Integer;
begin // Ok let's say MakeObj failed to find the bank
MakeObj('bank', 5599869, 2, 0.22, 0.53, [ 'ank', 'ank', 'ooth'], ['ank']);
if (ExistsItem(27)) then //after you make pots inv slot 27 will be empty
begin
Writeln('Starting to make potions'); //therefore it will skip this
end else
begin // and begin this instead
SmartColors('bank');
wait(400 + random(100));
if (BankScreen = True) then //the bank screen wont be open as MakObj failed
begin //so it skips this
DepositAll;
wait(150 + random(63));
Withdraw(0, 0, 14);
wait(150 + random(67));
Withdraw(1, 0, 0);
wait(100 + random(95));
CloseBank;
end else
I := 1; // and starts down here
repeat
SmartColors('bank');
I := (I + 1);
wait(1000 + random(224));
until (I = 5);// not sure what this loop is. Just repeats a 1 sec wait?
end;
end; // and the Banking procedure has ended an all we did was wait 4 seconds :/
So, maybe you could do something like this:
Simba Code:
procedure Banking;
var
I, bankTime: Integer;
begin
if (InvCount > 0) then // if stuff in inv then look for the bank!
begin
markTime(bankTime);
repeat
SmartColors('bank'); // I assume this is a status painted on smart
MakeObj('bank', 5599869, 2, 0.22, 0.53, [ 'ank', 'ank', 'ooth'], ['ank']);
wait(400 + random(100));
until bankScreen or (timeFromMark(bankTime) > 20000);
//now it will repeat MakeObj until it finds the bank screen or times out.
if BankScreen then
begin
writeln('found bank')
DepositAll;
wait(150 + random(63));
Withdraw(0, 0, 14);
wait(150 + random(67));
Withdraw(1, 0, 0);
wait(100 + random(95));
CloseBank;
end else
writeLn('failed to find bank'); { If this displays in the debug box }
end; { Then you know MakeObj failed to find the bank }
end; { after 20 seconds }