Results 1 to 17 of 17

Thread: [HELP] FindDTM & Clicking Problem

  1. #1
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [HELP] FindDTM & Clicking Problem

    Hi guys! I'm new here, just joined actually.

    I came here figuring I'd probably just end up a generic leecher, but there wasn't a script for what I wanted (Grenwalls, for the sake of the economy) and so I thought I'd start to learn a bit. Not that I would even release this if I make one... (Not that I even CAN make one, hah. Newb here.) but if I learned more I guess I could contribute something less damaging to such a good money method. But anyways...

    I used this tut from YoHoJo, and its oldish but not THAT old so I figured it would work. (http://www.youtube.com/watch?v=SlS4q9MiFX4)

    I just figured out how to make a DTM, so I did that. It only detects what I want it to, which is good (I found that out in the DTM editor.) My problem is I was trying to make my mouse right click the DTM (in this case, a Fruitbat Pouch) and then I want it to click summon. Thats all I want right now. FindDTM, Move mouse, right click, summon. Thats it.

    I am using RS in my internet browser so I made sure I selected the screen as my client. My problem is that when I start the script, it looks like it isn't making it to this line :
    WriteLn('Bat Pouch found.');
    It doesn't print it in the debug area. The mouse does not move at all. All it says is this:

    [Hint] C:\Simba\Includes\SRL/SRL/core/animation.simba(257:3): Variable 'X' never used at line 256
    [Hint] C:\Simba\Includes\SRL/SRL/core/animation.simba(257:3): Variable 'Y' never used at line 256
    Compiled successfully in 514 ms.
    Successfully executed.

    Heres the script:

    program SumBat;


    {$i srl/srl.simba}

    var
    BatPouch, X, Y: Integer;


    begin

    SetupSRL;

    BatPouch := DTMFromString('mrAAAAHic42BgYOAHYmYGCOAEYnEglgFiaS DmA2JBIJYEYh6oGkaouBQQywLxlNP2QJIJJ5ZkwA8YCWAYAAA5 1gLJ');
    if FindDTM(BatPouch, X, Y, MIX1, MIY1, MIX2, MIY1) Then
    Begin
    WriteLn('Bat Pouch found.');
    MMouse(X, Y, 7, 7);
    If IsUpText('ruit') Then
    Mouse(X, Y , 0, 0, False);
    ChooseOption('ummon');
    End;

    FreeDTM(BatPouch);
    end.


    ALSO

    In YoHoJo's vid, he said

    Mouse(X, Y , 0, 0);

    should move the mouse AND click. Does that mean I could just omit the MMouse command and jump straight to this:

    Mouse(X, Y , 7, 7, False);

    ?


    Just wondering. SORRY FOR THE LONG POST!



    It's probably something really simple, but I am a newb so I don't really understand I guess. Its also really late, and I'm tired. Any help would be great. I wanna move on so I can understand more. Thanks, and please help me out if you can!
    Last edited by Enox; 05-13-2012 at 03:47 AM.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    In the code you posted you cannot omit anything there. One will move the mouse, the other will check for the uptext and finally the next mouse command will right click and choose the option.

    I personally would prefer:

    Simba Code:
    MMouse(X, Y, 7, 7);
    if (IsUptext....) then
    begin
              Clickmouse2(MOUSE_RIGHT);
              ChooseOption
    end;
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    622
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Well, The most obvious solution of them alll =P Your dtm is invalid. you most likley didnt copy the full dtm. Otherwise it should work

  4. #4
    Join Date
    Dec 2011
    Location
    Sydney
    Posts
    1,284
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default


  5. #5
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    622
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Dnt be a Moron dejavu

  6. #6
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mmm, okay. Thanks all. :P

    Also, I like that better too Brandon. Changed, but it's still not writing my line out in the debug area. Why not?

    EDIT: No, my DTM still printed the same. What do?
    Last edited by Enox; 05-13-2012 at 04:38 AM.

  7. #7
    Join Date
    Dec 2010
    Posts
    89
    Mentioned
    4 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by punkd View Post
    Well, The most obvious solution of them alll =P Your dtm is invalid. you most likley didnt copy the full dtm. Otherwise it should work
    It would have to be this, because if your DTM was valid then FindDTM(); would return true and then it would writeln();
    Right? :insecurity:

    But to help clarify your confusion between MMouse and Mouse...
    MMouse will ONLY move the mouse to the specified spot, while Mouse will move AND click. Write "mouse_right" to Right-Click, and "mouse_left" to Left-Click. It's just that easy.

    Otherwise, I would do what Brandon suggested.

    Also, look over some of YoHoJo's other video tutorials. They were a great help to me when I was first learning to script. Hope that helps.

  8. #8
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    622
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Enox, your doin something wrong with the dtm. Add my skype yeshayem2 I'll give u some help

  9. #9
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default





    Theres DTM found and what it prints.

  10. #10
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program SumBat;


    {$i srl/srl.simba}

    var
    BatPouch, X, Y: Integer;


    begin
    SetupSRL;

    BatPouch := DTMFromString('mrAAAAHic42BgYOAHYmYGCOAEYnEglgFiaS DmA2JBIJYEYh6oGkaouBQQywLxlNP2QJIJJ5ZkwA8YCWAYAAA5 1gLJ');
    writeln('Start finding DTM');

      if FindDTM(BatPouch, X, Y, MIX1, MIY1, MIX2, MIY1) Then
      Begin
        WriteLn('Found DTM');
        MMouse(X, Y, 7, 7);
        If IsUpText('ruit') Then
        begin
          writeln('Found pouch');
          Mouse(X, Y , 0, 0, False);
          ChooseOption('ummon');
        end else
        begin
          writeln('Cant find pouch');
          terminatescript;
        end;
      end else
      begin
        writeln('Cant find DTM');
        TerminateScript;
      end;

    FreeDTM(BatPouch);
    end.


    or use this procedure

    Simba Code:
    Procedure Checking;
    var
      x, y, BatPouch: Integer;

    begin
      BatPouch := DTMFromString('mrAAAAHic42BgYOAHYmYGCOAEYnEglgFiaS     DmA2JBIJYEYh6oGkaouBQQywLxlNP2QJIJJ5ZkwA8YCWAYAAA5 1gLJ');

      if FindDTM(BatPouch, x, y MIX1, MIY1, MIX2, MIY2) then
        writeln('Found DTM')
      else
        writeln('Not Found');

      FreeDTM(BatPouch);
    end;

  11. #11
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    CephaXz,

    I changed it and added the else. It appears that it cannot find the pouch. Punkd thinks it may be the client since its outside of Simba.

  12. #12
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    622
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    mistake was invalid dtm and

    if FindDTM(BatPouch, X, Y, MIX1, MIY1, MIX2, MIY1) Then


    simple change

  13. #13
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by punkd View Post
    mistake was invalid dtm and

    if FindDTM(BatPouch, X, Y, MIX1, MIY1, MIX2, MIY1) Then


    simple change
    Whops. Stupid mistake there. Sorry, I wrote this without checking inside the message box.


    Quote Originally Posted by Enox View Post
    CephaXz,

    I changed it and added the else. It appears that it cannot find the pouch. Punkd thinks it may be the client since its outside of Simba.
    So did you find it yet after changing the mistake I done?

  14. #14
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks punkd. Spent a lot of time to help me.

    Really appreciated.


    Resolved.

  15. #15
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    I see Punk'd solved it but Try using some waits in there..
    Simba Code:
    {$I SRL/SRL.Simba}

    Function UseFruitBat: Boolean;
    var
      BatPouch, X, Y, Tries: Integer;
    begin
      BatPouch := DTMFromString('mrAAAAHic42BgYOAHYmYGCOAEYnEglgFiaSDmA2JBIJYEYh6oGkaouBQQywLxlNP2QJIJJ5ZkwA8YCWAYAAA51gLJ');

      Tries:= 0;
      while (Tries < 3) do
      begin
        if (WaitFindDTM(X, Y, BatPouch, 600)) then
        begin
          MMouse(X, Y, 0, 0);
          if (WaitUptextMulti(['at', 'ouch', 'pouch', 'uch'], 600)) then
          begin
            ClickMouse2(MOUSE_RIGHT);
            Result:= WaitOptionMulti(['ummon', 'mmon', 'Summon'], 600);
            if Result then break;
          end;
        end;
        Inc(Tries);
      end;
      FreeDTM(BatPouch);
    end;

    Function ShutdownFruitBat(Reason: String): Boolean;
    begin
      if (Not UseFruitBat) then
      begin
        if (BankScreen) then
          CloseBank;
        CloseWindow;

        Result:= LogOut;
        WriteLn(Reason);
        TerminateScript;
      end;
    end;

    begin
      SetupSRL;
      ShutdownFruitBat('~UseFruitBat~  Failed At Line: 29');
    end.
    I am Ggzz..
    Hackintosher

  16. #16
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Since this is solved, you guys can go to my thread and help me now lol.

  17. #17
    Join Date
    May 2012
    Posts
    83
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by punkd View Post
    Dnt be a Moron dejavu

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
  •