Results 1 to 4 of 4

Thread: How to count DTMs in inventory?

  1. #1
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default How to count DTMs in inventory?

    First is it possible?

    second, i tried this

    Simba Code:
    Function FUrnAmount:boolean;
    var
    x,y,FiredUrn:integer;
      begin

      FiredUrn := DTMFromString('mQwAAAHicY2ZgYHBiYmDwBWJzIJZkZGAQB2IxILY102RIDdRl2D4liEEOqI4fihmRMBAAAKnMBHQ=');
    if FindDtm(FiredUrn,x,y,MIX1,MIY1,MIX2,MIY2) then
     begin
      if FiredUrn = 14 then
      result:=true;
      if FiredUrn < 14 then
      Result:=false;
      end;
      FreeDtm(FiredUrn);
      end;
    but it doesnt work, any suggestion?

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    CountItemsIn(.......);

    OR:

    FindDTMs(TPA, .........);
    Raastpa(TPA);

    Length(TPA) will now give the amount of DTM's found and the locations of each one.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Counting items via DTMs:
    Simba Code:
    Count := CountItems('dtm', YOUR_DTM, []);

    Your function, fixed:
    Simba Code:
    Function FUrnAmount:boolean;
    var
      FiredUrn,C: Integer;
    begin
      FiredUrn := DTMFromString('mQwAAAHicY2ZgYHBiYmDwBWJzIJZkZGAQB2IxILY102RIDdRl2D4liEEOqI4fihmRMBAAAKnMBHQ=');
      C := CountItems('dtm', FiredUrn, []);
      Result := (C >= 14);
      FreeDtm(FiredUrn);
    end;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #4
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Thank you flight
    Last edited by ogustuce; 12-08-2012 at 03:44 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •