Results 1 to 9 of 9

Thread: Little probblem...

  1. #1
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Little probblem...

    I'm haveing a little problem with the script im making. It isn't finding the bitmaps I made for the empty jug.
    (It would be a lot easier if there where Crafting bitmaps...)
    If you could help that would be great
    SCAR Code:
    function FillJug : boolean;
    var
      jx,jy,sx,sy, FJTM : integer;
    begin
      if FindMSColor(sx,sy,9601144) then
        begin
          if FindBitMapToleranceIn(JugInv, jx, jy, MCX1, MCY1, MCX2, MCY2, 25) then
            begin
              UseItem(CoordsToInvSpot(jx,jy));
              Wait(500);
              Mouse(sx,sy,2,3,true);
              MarkTime(FJTM);
              repeat
                if not LoggedIn then Exit;
                if TimeFromMark(FJTM) > 15000 then Exit;
                FindNormalRandoms;
                FindFastRandoms;
                Wait(1000);
              until(FindBitMapToleranceIn(JugWater, x, y, MCX1, MCY1, MCX2, MCY2, 25))
              if FindBitMapToleranceIn(JugWater, x, y, MCX1, MCY1, MCX2, MCY2, 25) then
                begin
                  Writeln('Filled a jug.');
                  FreeBitmap(JugInv);
                  FreeBitmap(JugWater);
                  Result := True;
                end else
                begin
                  Writeln('Didn''t fill a jug.');
                end;
            end else
            begin
              Writeln('Couldn''t find the empty jug.');
              Result := False;
              NextPlayer(false)
            end;
        end else
        begin
          Writeln('Couldn''t find the sink.');
          Result := False;
          NextPlayer(false);
        end;
    end;

    Once agin its not finding the Empty Jug! Thanks for the help
    ~Stupedspam

    Note this is pretty much the only thing in the way of the release...
    Edit: Yes I know its *Problem...

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    wheres ur bitmap?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Didn't think they where needed but ok here thery are...
    SCAR Code:
    procedure LoadBitmaps;
    begin
       JugInv  := BitmapFromString(22, 6, 'z78DA8592498E45210845B' +
           '764035C1CDA3CF7BFA4E28B032BD6AB0F093106E17881896A6E2C' +
           '3428B19F8F9BF0B18828D57C8A8AFA19228F0C5424443C60B0261' +
           '4146534342D9878B46BD65DE1AC6C75292BDF7D2F067F2B433ED6' +
           '249BAFF32B0330D0CFEE25A999677AB5571EEF7EF16C8622D11C1' +
           '278BE316C05AA460DFA28299560824921BBAB457518D3CAF1BF78' +
           '65EFFEC6E039FE2F49DCB86D06E7B9490E1D76778F4B070D30F33' +
           '97AE51C92B9C72F0CEB473CB97011E287FB1F0C8A20F3D73EF844' +
           'D62C3CBA565C99984E862FFB70CCC249F63E9C9AFCBF1B070F48B' +
           'AF45B81B3D70F780AAABF');

       JugWater := BitmapFromString(22, 6, 'z78DA7D924B8EC430084' +
           '4AF643B40C1D2BFDCFF484D42168CBA332021842D7894CD428B1A' +
           '4724EAC7F08C0E8DBC5C5651A5BB9FA2A2914364CB424743C5068' +
           '3B5C160CA18186A38B175EAA12D3AE4FE9C277EC7B893A6CB92CB' +
           '861CEE77FECA002CCC3CDD9ABAC5CDE8F687E76D7AAA3C0C26D51' +
           'D52F87C637814E85AB5E85652B2E2828991D7BAA92E67BAEFC42E' +
           '3F48D2EE5981D84B1A0F1E0F43F07C93241D9EE9116F1DB4C02DD' +
           'E313A1FA5B947FCA14066B837E2938D4D8837CF1F0C8A22270AEA' +
           '2410644EAFD86AF11611432BEE4C4C99E1F515D29FCC24CF7FC89' +
           'A14A95DBD26FDD2A70F07903DB6FF8E3625784219909FCCFF15F8' +
           '00FB24AABB');

      Clay:= BitmapFromString(18, 5, 'z78DA9D513912C4200CFB12870' +
           'FB93421FCFF499BC52E48B1CD861915429164C342931A1F58BE5F' +
           'FD0F7B69CF090CC63B06DF0E2C299942E47DC4AD4E1904149964E' +
           '8B2C8215AE98269A789A1C2C58A3AB7D0C8E2D5175F74770E875F' +
           'CD4F267C30155CC3CD586F66031E5DA2A3B3261F895B1FFFAA0B4' +
           '85EFE7B8A98F4CC4A9F89C7C616948757185F897B1BC1A726F4D1' +
           'A1E9C594E9D179EFE14C3CB362AB896E556AE2B4262D79C6E4757' +
           '678E5EE797FBDE007CEFC71E6');
    end;

  4. #4
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Bump...This always happens, I ask for help and don't get any

    I tryed Masks and Srl made masks but they don't work either...(also tryed diffrent tolerances, 100-5)

    If some one could fix this up it would save the heart ack of throwing the script away on the headack of trying to fix it...

    Please help!!

  5. #5
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could try setting the tolerance higher or use DTM's.

  6. #6
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What should I set the tol for the DTM's ? and how many pionts ?

  7. #7
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    make smaller bitmaps as well as higher tolerance

  8. #8
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by stupedspam View Post
    What should I set the tol for the DTM's ? and how many pionts ?
    Check this: http://www.villavu.com/forum/showthr...t=9453?t=10664

  9. #9
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Use a dtm, and do a repeat until not(findJugDTM). Five points will surfice and remember to take it from where a jug would display its full so it can define between them both

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
  •