Results 1 to 14 of 14

Thread: FindDTMInBank(DTM : integer; var xcx, ycy : integer) : integer;

  1. #1
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default FindDTMInBank(DTM : integer; var xcx, ycy : integer) : integer;

    SCAR Code:
    function GetScrollLvl : integer;
    var
      xxx : integer;
    begin
      FindColor( xxx, Result, 5531254, 468, 75, 468, 253);
    end;
    function FindDTMInBank(DTM : integer; var xcx, ycy, yOfScroll : integer) : boolean;
    var
      cx, cy : integer;
    begin
      if not(BankScreen) then EXIT;
      if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then
      begin
        yOfScroll:= GetSCrollLvl;
        Result := True;
        EXIT;
      end;
      if GetColor(475, 75) = 1777699 then
        Mouse(475, 79, 3, 3, True);
      MMouse(476, 280, 3, 3);
      GetMousePos(cx, cy);
      HoldMouse(cx + Random(1), cy + Random(1), True);
      repeat
        if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then BREAK;
        wait(1);
      until not(GetColor(477, 271) = 1777699) or not(LoggedIn);
      ReleaseMouse(cx, cy, True);
      yOfScroll:= GetSCrollLvl;
      Result := not(GetColor(477, 271) = 1777699);
    end;
    usage: FindDTMInBank(LogDTM, x, y, YOfScrollBar);

  2. #2
    Join Date
    Oct 2006
    Location
    I'm also from Michigan!
    Posts
    563
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    im confused at why it returns an integer and not a boolean?

  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    me eather, why would we have to know the amout on the bar up...?
    just result true or false if found dtm

  4. #4
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by munk View Post
    im confused at why it returns an integer and not a boolean?
    so in the future you don't have to search, you can just click da spot

  5. #5
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Me and him kinda made this together(Ideas and bugs fixed). What it does is makes it so it only has to search the bank once.

    Edit:Wouldn't this make major lag:
    SCAR Code:
    repeat
        if FindDTM(dtm, xcx, ycy, 21, 58, 467, 287) then BREAK;
        wait(1);
      until not(GetColor(477, 271) = 1777699) or not(LoggedIn);

  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    actually myles it won't hardly lag at all.

  7. #7
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I always thought calling a findanything every 1ms would lag. I learned something new today

  8. #8
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    find bitmap would lag the shit outa it... but as long as its not a HUGE dtm its fine.

  9. #9
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Bitmaps I had no doubt in my mind because their slow even once let alone 1 every ms.

  10. #10
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    @myles
    @everyone else, no comments? cmon!

  11. #11
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    so in the future you don't have to search, you can just click da spot
    I still don't get it. Why does it return GetScrollLvl?

  12. #12
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    ok, it figures out at what scroll lvl it is at.... so next time you open da bank you can have it click there.

  13. #13
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Oh ok. I still think it would be better to return a boolean then have a variable in the parameters to store the scroll level. So then your could do something like this:

    SCAR Code:
    if FindDTMInBank(..) then
      Mouse(...);

  14. #14
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    yeah, i was just getting it up, il add that
    changed it, anyone used it?

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
  •