zluo
2012-06-01 04:44:19
so basically, i want to find a specific amount of the same dtm before doing something, how can i do this? thanks
2012-06-01 04:44:19
2012-06-01 04:46:36
2012-06-01 05:32:44
2012-06-01 05:56:59
function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray): Integer;
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].
.. note::
by WT-Fakawi / Sumilion
Example:
.. code-block:: pascal
numbOfItems := CountItems('dtm', TheDTM, []); 2012-06-01 06:25:31
procedure asdf;
var
CountItems:Integer;
begin
RandomDTM:= DTMFromString('445335434');
if 15 := CountItems('dtm', RandomDTM, x, y, 10, 20, 30, 40) then
begin
3sadfgasg;
end;
end;2012-06-01 06:39:12
if CountItems('dtm', RandomDTM, x, y, 10, 20, 30, 40) = 15 thenCountItems('dtm', RandomDTM, []) = 15 Then2012-06-01 06:47:54
2012-06-01 07:02:14
2012-06-01 07:08:27
2012-06-01 07:13:06
2012-06-01 17:27:13
2012-06-01 17:51:48
(*
CountItems
~~~~~~~~~~
.. code-block:: pascal
function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray): Integer;
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].
.. note::
by WT-Fakawi / Sumilion
Example:
.. code-block:: pascal
numbOfItems := CountItems('dtm', TheDTM, []);
*)
function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray): Integer;
begin
GameTab(tab_Inv);
Result := CountItemsIn('inv', ItemType, Identifier, Tol)
end;
// CountItems('DTM', Identifier: Integer; tol: TIntegerArray): Integer;
//'DTM' means we are searching for a DTM.
//OurDTM means we are referencing the DTM we actually created/made/found/are using.
//[] for our tolerance, since we probably already used a good tol upon making our DTM
// --- Now our Script ---
Procedure InventoryCheckingStuffs;
Var
OurDTM: Integer;
Begin
OurDTM:= DTMFromString('...The DTM code goes here...');
If (CountItems('DTM', OurDTM, []) = 20) Then
Begin
InvMouse(20, Mouse_Right);
WaitOption('rop', 500);
End;
FreeDTM(OurDTM);
End;
2012-06-01 18:48:01
2012-06-01 18:58:27
2012-06-01 19:37:01
2012-06-02 12:01:45