Results 1 to 7 of 7

Thread: Count DTM

  1. #1
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Count DTM

    Hi I'm making a script and i need to count how many dtm's there are in my inventory.

    Does someone know a procedure or a function to count them???

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Isn't there a CountItemDTM in /misc/amount.scar?
    I made a new script, check it out!.

  3. #3
    Join Date
    Apr 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is no amount in Misc folder :s

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    SCAR Code:
    function CountItemDTM(DTM: Integer): Boolean;
    var
      x, y, i: Integer;
      TB: TBox;
    begin
      for i := 1 to 28 do
      begin
        TB := InvBox(i);
        if(ExistsItem(i)) then
          if(FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2)) then
            Inc(Result);
      end;
    end;

    That should work. I don't take any credit for it.
    :-)

  5. #5
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yep, that one works, i used it in my application script, cause the SRL one gave me problems, this is a BMP one adjust to DTM

  6. #6
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Psychor View Post
    Yep, that one works, i used it in my application script, cause the SRL one gave me problems, this is a BMP one adjust to DTM
    The one Metho D posted is a DTM one...and I don't see any function posted by you
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  7. #7
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Santa_Clause View Post
    The one Metho D posted is a DTM one...and I don't see any function posted by you
    Like i said, i used in my application script http://www.villavu.com/forum/showthread.php?t=21444

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. K Wtf!!!? POST COUNT
    By pinapple--> in forum SRL Site Discussion
    Replies: 13
    Last Post: 10-01-2008, 11:44 PM
  2. The Post Count
    By Torrent of Flame in forum SRL Site Discussion
    Replies: 59
    Last Post: 03-25-2008, 02:13 AM
  3. Count question.
    By Dangerous Garden Tools in forum OSR Help
    Replies: 1
    Last Post: 01-03-2008, 01:27 AM
  4. I cant count :o
    By Puffo in forum OSR Help
    Replies: 2
    Last Post: 11-25-2007, 03:14 PM

Posting Permissions

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