Results 1 to 4 of 4

Thread: Dtm Finding but not clicking

  1. #1
    Join Date
    Mar 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Dtm Finding but not clicking

    I am trying to make it so when i reach X amount of health it will click and at a trout. but instead it just goes over it and continues fighting.
    Simba Code:
    [CODE]Procedure eatFood;
    begin
    If FindDTM(Trout, X, Y, MIX1, MIY1, MIX2, MIY2) Then
    WriteLn( 'Eat food');
    MMouse(x, y, 7, 7);
    if isUpText('rout') Then
    Mouse(x, y, 0, 0, true);
    end;       [/CODE]

    The debug is showing up.

  2. #2
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Simba Code:
    Procedure eatFood;
    begin
    If FindDTM(Trout, X, Y, MIX1, MIY1, MIX2, MIY2) Then
    begin// use this for multiple steps after a then statement
    WriteLn( 'Eat food');
    MMouse(x, y, 7, 7);
    if isUpText('rout') Then
    ClickMouse(true);//Mouse will move the mouse as well, we dont want to move it twice
    end
    else
      begin
        Writeln('Could not find trout, exiting for safety'); //In case we dont find the trout we tell it what to
        TerminateScript;                                     //to do, this case, logout because we have no food.
      end;
    end;

  3. #3
    Join Date
    Mar 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ClickMouse(true) INVALID NUMBER OF parameters. Not sure whats wrong with it

  4. #4
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,164
    Mentioned
    26 Post(s)
    Quoted
    433 Post(s)

    Default

    Try writing it like this:

    Simba Code:
    Procedure eatFood;
    begin
    Trout := DTMFromString('');
    writeln('DTM');
    If FindDTM(Trout, X, Y, MIX1, MIY1, MIX2, MIY2) Then
    WriteLn( 'Eat food');
    MMouse(x, y, 7, 7);
    writeln('Moved Mouse');
    if isUpText('rout') Then
    writeln('Clicking.');
    Mouse(x, y, 0, 0, true);
    end;


    If you do it like this, it should locate the place where the error is by the text in the debug.

    And just in case, You could also just use my DTM for trout, which seems to work 100% of the time for me.. Which is:
    Simba Code:
    Trout := DTMFromString('mrAAAAHichcrBCkBAFIXhf2SkeWimZCGzk9eUNRt/yRK3vtPpdFvgiJAaqHXad23x7rhNAQZ1yipatWjWmHsfq1fJ/BJ+PHcBzDoLSw==');

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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