SRL Archive - OSR Help

How to count inventory


CephaXz

2012-04-24 10:21:58

Solved, I used if Invfull instead of counting inventory.

footballjds

2012-04-24 10:25:14

if you want help post the whole script along with the error message

Sin

2012-04-24 10:25:16


function WaitInvCountInc(Time:Integer):Boolean;
var
Inv1,Inv2,t:Integer;
begin
MarkTime(t);
Inv1 := InvCount;
repeat
wait(10);
Inv2 := InvCount;
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(Inv2 > Inv1);
Result := True;
end;

DAMN got ninja'd by Football -.-
You can learn how to do it from my script ^^

Abu

2012-04-24 10:54:34

At the last line of your script or the last line of this little snippet you gave us?

CephaXz

2012-04-24 10:54:56

From: footballjds
if you want help post the whole script along with the error message


Well, I just wanted to know if there's a function that does what I want, doesn't matter what I wrote in my script. And I would be embarrassed to post my script here, because I only use VERY VERY basic codes.

From: Sin

function WaitInvCountInc(Time:Integer):Boolean;
var
Inv1,Inv2,t:Integer;
begin
MarkTime(t);
Inv1 := InvCount;
repeat
wait(10);
Inv2 := InvCount;
if TimeFromMark(t) > Time then
begin
Result := False;
Exit;
end;
until(Inv2 > Inv1);
Result := True;
end;

DAMN got ninja'd by Football -.-
You can learn how to do it from my script ^^


Thanks. I actually got a lot of your scripts for referring on how you use functions, statements, and all those. But most of them are still too hard for me to understand. The function you gave me looks like its for waiting for the timemark to end and see if there is an increase in item.

What I actually want to do is for repairing runecrafting pouch.

if (IsChatBoxTextAnyLine('decayed', clBlack)) or (FindDTM(decay, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
if Inventory is more than 25 then
begin
Find pure essence DTM
Right click and deposit 5 pure essence
end else
begin
Withdraw runes to repair my pouch along until pouch is repaired
end;
end;

Is there something I can do for a case like this?





From: abu_jwka
At the last line of your script or the last line of this little snippet you gave us?


It is the very last line of every script, End. (With fullstop)

footballjds

2012-04-24 10:55:58

From: abu_jwka
At the last line of your script or the last line of this little snippet you gave us?


he said script but who knows, that's why i asked for him to post the whole thing…


and s1n, idk wtf you posted your little function for. Doesn't even do what he partially described he wants…