Results 1 to 6 of 6

Thread: AutoColor help

  1. #1
    Join Date
    Nov 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default AutoColor help

    Heres what I have and when I testfind the DTM it finds it. but when it comes time to move the click ont he DTM it just goes to the edge of the screen. Heres a sample of how i have it setup.
    SCAR Code:
    Procedure ClickDTM;
    var
    Knife: integer;
    KnifeColor: integer;
    begin
       Knife := DTMFromString('78DA638C66626078C600066240CC08C4E579B' +
           '90C29503608309600D5DC67400120350C486A00F15C05BC');
       If(FindDTM(Knife,x,y,823,408,100,650))Then
      KnifeColor := GetColor(x,y);
      Mouse(x,y,8,8,True);
      wait(550+random(50));
      end
    end;

  2. #2
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var
    Knife: integer;
    KnifeColor: integer;

    LoadDTM;
    Begin
      Knife := DTMFromString('78DA638C66626078C600066240CC08C4E579B' +
           '90C29503608309600D5DC67400120350C486A00F15C05BC');
    End;
    //----------------------------
    Procedure ClickDTM;
    Begin
     LoadDTM;
       If(FindDTM(Knife,x,y,MIX1,MIY1,MIX2,MIY1))Then
                                                //MIX1,MIY1,MIX2,MIY1 = inventory cords
         MMouse(x,y,3,3)  //forgot this, will move mouse to DTM.
      If(IsUpTextMulti('nif','Kni','ife')Then
        Begin // if you have 2 or more procedures after a then, you will need a begin
          GetMousePos(x,y)
          KnifeColor := GetColor(x,y);
          Mouse(x,y,1,1,True);
          wait(550+random(50));
          FreeBitmap(Knife);
       End Else
        Writeln('Knife was not found, s0z pl0x!');
      FreeBitmap(Knife); //will free the bitmap, saves up more space on SCAR
    End;

    Does that work?

  3. #3
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Code:
    //Oppposite of itemcoords
    function CoordsToInvSpot(gx,gy:integer):integer;
    var col,row:integer;
    begin
    if ((gx>569) and(gx<600)) then col:=1;
    if ((gx>611) and(gx<642)) then col:=2;
    if ((gx>653) and(gx<684)) then col:=3;
    if ((gx>695) and(gx<723)) then col:=4;
    
    if ((gy>213) and(gy<244)) then row:=1;
    if ((gy>249) and(gy<280)) then row:=2;
    if ((gy>285) and(gy<316)) then row:=3;
    if ((gy>322) and(gy<352)) then row:=4;
    if ((gy>357) and(gy<387)) then row:=5;
    if ((gy>393) and(gy<424)) then row:=6;
    if ((gy>429) and(gy<459)) then row:=7;
    
    result:=((row-1)*4)+col;
    end;
    Code:
      finddtm(dtmofblackoutline,x,y,x1, y1,x2, y2);
      useitem(coordstoinvspot(x,y+10));
    Thats what I use for clicking items in inventory, where the dtm is the black outline with the parent dot being top of item.

  4. #4
    Join Date
    Nov 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Still doesnt work I am making my DTM wrong any suggestions on how to make it?

    like the points and area size

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    use the black outline. 65536, never changes

  6. #6
    Join Date
    Nov 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    use the black outline. 65536, never changes

    Works Like a Charm!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Doesn't AutoColor
    By BKNYKavkaz in forum OSR Help
    Replies: 5
    Last Post: 04-26-2008, 10:31 AM
  2. Help AUTOCOLOR???
    By papenco in forum OSR Help
    Replies: 0
    Last Post: 12-06-2007, 06:27 AM

Posting Permissions

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