Log in

View Full Version : Counting items?



Mat
04-12-2012, 06:14 PM
That aren't in a stack I know there GetItem does this work with single items?
Mat

Abu
04-12-2012, 06:18 PM
You mean CountItemsIn?

(*
CountItemsIn
~~~~~~~~~~~~

.. code-block:: pascal

function CountItemsIn(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer;

Counts the number of items found within the Area (does not count stacks).
Parameters are exactly the same as ItemCoordinates.

.. note::

Author: masquerader
Last Modified: Unknown by ZephyrsFury

Example:

.. code-block:: pascal

var
itemsFound: integer;
begin
itemsFound := CountItemsIn('inv', 'dtm', dtm_Ore, []);
writeln('Ore found: ' + toStr(itemsFound));
end;
*)

Mat
04-12-2012, 06:21 PM
Edit:Not a clue how it works.
E::Got it! ty