Results 1 to 13 of 13

Thread: CountItemDTM(DTM:Integer):Integer

  1. #1
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default CountItemDTM(DTM:Integer):Integer

    Yeah, I looked for this in srl and all I found was one for bitmaps so I switched some stuff around a bit and got this:
    SCAR Code:
    function CountItemDTM(DTM: Integer): Integer;//Based off of the
    var                                             //one in srl for bmps
      i, x, y: Integer;
      TB: Tbox;
    begin
      GameTab(4);
      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// Thanks 4 the input
            Inc(Result);
      end;
    end;
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  2. #2
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This used to be in xInventory.scar but that isnt in SRL4, this is a very handy procedure
    The truth finally came out...


  3. #3
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lmfao i made the EXACT same thing yesterday. it was for private use but...wow...lol

  4. #4
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I made a little different one, it uses TPoints and Color instead of DTM, A bit faster i guess.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

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

    Default

    Looks nice, but why the DTMRotated?
    As items never rotate, FindDTM would be sufficient and way faster.
    I made a new script, check it out!.

  6. #6
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, i made one for my fisher also.. Just like mine, i just switched a few things and.. presto. worked.

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Lol. I made the exact same thing and posted it somewhere, but I think in the members.


    Are you ROFLMAOing me?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Mar 2007
    Posts
    674
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Nice, I alwaus used the find bmp one...

  9. #9
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whoa. I also made the same exact thing a few days ago for private/member app use. This is getting a little bit creepy...

    btw, this is a very good function for counting a certain number of items in your inventory. Very useful.
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

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

    Default

    I thought there was one already in SRL...?
    [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]

  11. #11
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its in xinventory
    The truth finally came out...


  12. #12
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But not anymore XD I'll use FindDTM instead of rotated... It works faster, you're right!
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  13. #13
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm getting bad errors while trying to use it..
    [Runtime Error] : Exception: Access violation at address 006FFBEA in module 'scar.exe'.
    aoaklogs:=CountItemDTM(oaklogdtm);

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. function SendKeyboard(FKey:Integer; Text:String): Integer;
    By Daniel in forum Research & Development Lounge
    Replies: 4
    Last Post: 07-18-2007, 04:28 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
  •