The says it all is there a way of counting how many DTMs you can see
I need this to see when a ore is in the inv or is there a easyer way of counting that i just need a way of seeing how many items are in the inv and if there is a new one
The says it all is there a way of counting how many DTMs you can see
I need this to see when a ore is in the inv or is there a easyer way of counting that i just need a way of seeing how many items are in the inv and if there is a new one
I see Now, says the blind man
SRL/SRL/Core/Inventory.scar
function InvCount: Integer;
function InvFull: Boolean;
{************************************************* ******************************
function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray): Integer;
By: WT-Fakawi / Sumilion
Description: Counts Items in the inventory.
ItemType - 'dtm', 'bitmap', 'bitmap mask', 'color'
Item - name/value of your dtm/bmp/color/bmpmask.
Tol - 'dtm' - [] (dtm's can't have tolerance).
'bmp' - [BMPTol].
'color' - [COLOUR Tol, Colour Count].
'bmpmask' - [BMPTol, ContourTol].
************************************************** *****************************}
SCAR Code:Begin
Repeat
DoStuff;
Until Invcount=7
End;
will until you have 7 items
SCAR Code:Begin
Repeat
DoStuff;
Until Invfull
End;
Will until you inventory is full
SCAR Code:Begin
Repeat
DoStuff;
Until CountItems('dtm',MyDTM,[]=6)
End;
Will until you have 6 of whatever item DTM in your inventory.
If your just mining/chopping for example amount doesn't matter.
Just
SCAR Code:repeat
stuff
until (invful)
DropItems;
SCAR Code:var
startCount: Integer;
begin
startCount := CountItems(...);
DoSomething;
while (CountItems(...) = startCount) do
begin
antibanetc;
moarAntiban;
end;
end;
Writing an SRL Member Application | [Updated] Pascal Scripting Statements
My GitHub
Progress Report:13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you have serious physchological problems 13:46 <@BenLand100> HE GETS IT! 13:46 <@BenLand100> HE FINALLY GETS IT!!!!1
Would this work?
SCAR Code:Procedure AreWeStillMining;
Begin
InvC := CountItems;
While (InvC := CountItems) do
Wait(600+random(600));
End;
I see Now, says the blind man
That would make X:=y
and then while x=y do wait.
So it would just wait forever.
It "works", but its useless.
While (InvC := CountItems) do
needs to be
While (InvC= CountItems) do
Yeah it would work, but it would be useless.
That would make X:=y
and then while x=y do wait.
So it would just wait forever.
But if im right altho im not normly when it comes to scar
The X is Inv count at start
The Y Is Real time Inv count
And im calling this right after i clicked a rock so does it not wait until its mined the ore and the Y would be up one so it would end the procedure
Or am i just making no sence atall
I see Now, says the blind man
There are currently 1 users browsing this thread. (0 members and 1 guests)