Results 1 to 16 of 16

Thread: using a dtm

  1. #1
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default using a dtm

    I want to select make all on the uptext for smithing. heres the code I have :
    Code:
     procedure Smelt;
     var
     pX,pY:integer;
    begin
    InvMouse(2, 1);
     wait(1000);
     MMouse(x,y,5,5);
     wait(1000);
       ClickMouse2(mouse_left);
       Wait(1200+Random(100));
        if FindObjCustom(x,y, ['urnace','melt'],[1715865], 35) then
            begin
       MMouse(x, y, 3, 3);
               wait(567);
          MMouse(1040, 469, 2, 35);
          wait(200 + random(50));
          begin
            clickMouse2(mouse_right);
            if ChooseOptionMulti(['1']) then
              writeln('WithDrawing');
            wait(800 + random(800));
            wait(800 + random(800));
          end;
    
    
    end;
    end;
    Last edited by mafia miles; 04-06-2013 at 06:36 AM.

  2. #2
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    So long as you made the DTM yourself for the object you're looking for, and it's made correctly, you will want to change your code to move the mouse to the bar as well like this:
    Simba Code:
    FindDTM(DTMBar,x,y,MSX1,MSY1,MSX2,MSY2)
    MMouse(x,y,5,5);
    ClickMouse2(mouse_right);
    ChooseOption('se');

  3. #3
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    heres my updated procedure:
    Code:
    Procedure craft;
    var
    x,y,attempts: Integer;
    begin
      wait(100)
     FindDTM(DTMBar,x,y,MSX1,MSY1,MSX2,MSY2)
      MMouse(x,y,5,5);
      ClickMouse2(mouse_right);
      ChooseOption('se');
      Wait(RandomRange(1000,1700));
      Wait(RandomRange(1000,1201));
    
    end;
    Now it takes hold of my actual mouse >.< and doesn't click on the bar. Any Ideas? I tried freeing the dtms in a proper way as seen on http://villavu.com/forum/showthread.php?t=78418
    Now remaking the DTM to see if it fixes my issues

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Seems like the DTM is way too short.

    Use Findobject for the furnace. use color, why DTM

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    How long should it be? here it is now :
    Code:
    SteelBar := DTMFromString('mWAAAAHicY2FgYGBhgAAeIGYDYnYgFgFiPqh4WV4ukGREwqiAEYssAFZOAZw=');
    Can I select a certain invy spot and click on a color(furnace)?

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by mafia miles View Post
    How long should it be? here it is now :
    Code:
    SteelBar := DTMFromString('mWAAAAHicY2FgYGBhgAAeIGYDYnYgFgFiPqh4WV4ukGREwqiAEYssAFZOAZw=');
    Can I select a certain invy spot and click on a color(furnace)?
    http://docs.villavu.com/srl-5/inventory.html#invmouse will click on an invslot, for example
    Simba Code:
    InvMouse(1, LeftClick);
    will left click on the first inventory slot.

    A DTM's length just depends on the number of sub-points it has, for example here is the DTM for an ingot in my Artisans Workshop script:
    Simba Code:
    IngotDTM := DTMFromString('mAAEAAHiclc2xCkBQHIXx87+jrlKSkoVnMDAoUUqK3eJdvDhfWYzuV7862/GSJict2LBjxYwBHRq0GNEjNSlCbO/OUaJGhQIZPBJc58GL++1WWBbo2wPm/Qap');

  7. #7
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    @BMWxi thanks! I tried to pm you but your inv box is full. Im having trouble finishing the procedure, care to look at it? its up top.

  8. #8
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    ^ also if you still need help with DTMs, feel free to check out my tut (in my sig). it might be able to help

  9. #9
    Join Date
    Feb 2013
    Posts
    342
    Mentioned
    8 Post(s)
    Quoted
    110 Post(s)

    Default

    Thanks Nivec, I was also trying to find this.

  10. #10
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by mafia miles View Post
    @BMWxi thanks! I tried to pm you but your inv box is full. Im having trouble finishing the procedure, care to look at it? its up top.
    Sorry about that

    What happens when you use your current procedure?

  11. #11
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    @BMWxi It now hovers over the bar and clicks it. Then clicks the furnace. Now it has the uptext of make all and I cant get it to right click make all. Ive updated the code in my first post of this thread if you care to look. Any ideas why it might not click make all?
    Last edited by mafia miles; 04-05-2013 at 01:08 AM.

  12. #12
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    @Sjoekeloe Can you take a look at the updated procedure?

  13. #13
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Anyone have a idea on how to click all? It should do to the MMouse(1030, 469), 2, 35).

  14. #14
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by mafia miles View Post
    Anyone have a idea on how to click all? It should do to the MMouse(1030, 469), 2, 35).
    Try
    Simba Code:
    WaitOption('all', 300);

  15. #15
    Join Date
    Jan 2013
    Posts
    294
    Mentioned
    1 Post(s)
    Quoted
    121 Post(s)

    Default

    Quote Originally Posted by mafia miles View Post
    Anyone have a idea on how to click all? It should do to the MMouse(1030, 469), 2, 35).
    your mouse coordinates are wrong. select SMART screen as client first before choosing any coordinates

  16. #16
    Join Date
    Dec 2011
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Thanks. Now it clicks it once and loops. Ill experiment around some more

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
  •