Results 1 to 17 of 17

Thread: Could not Find dtm in Bank

  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Could not Find dtm in Bank

    Hi

    I keep getting this error when doing a WithDrawItem from the bank using a dtm.

    When I test the dtm string it pics the dtm correctly. What am I dong wrong.

    Here is the code.

    Simba Code:
    procedure WithDrawItems;
    var
    Temp:Integer;
    Begin
      MakeCompass('N');
      SetAngle(SRL_ANGLE_HIGH);
      DTM_SoftClay := DTMFromString('mlwAAAHicY2dgYGgF4gogrgPibiCeAsRdQFwDxCyMDAwcQMwPxYxA/Aso/heIQ+14gCQTDowbMOLBUAAA/WYGgQ==');
      DTM_Clay := DTMFromString('mggAAAHicY2NgYGBnBBKMEJoXiIWAmAuIHYDYBYjdgdgZiG2A2AKIazJcgRqYsGDsgBEHhgAACIsDBQ==');
      OpenbankFast('db');
      Wait(500 + random(400));
    // Withdraw Soft Clay From Bank
      While (not(InvFull)) do
      Begin
      If WithDrawItem(DTM_SoftClay, 'dtm', 28, 'ft cl', []) then   // WithDraw item From Bank
      Begin
        WriteLn('Success');
    //    Wait(1500 + random(400));
        CloseBank;
        FreeDTM(DTM_SoftClay);
        FreeDTM(DTM_Clay);
      End;
      End;
    End;

    I know uptext is a issue at the moment but I bypassed it by using Wizzup`s suggestion made to me here and included this function at the top.

    Simba Code:
    function rs_GetUpText: String; {$IFDEF LAPE}override;{$ENDIF}
    begin
      result := rs_GetUpTextAtEx(7, 7, True);
      WriteLn(result);
    end;

    This allows me to get the correct uptext when the code is run, but the moment I try to use withdrawitem I receive the above mentioned error.

    Simba Code:
    ** Warning in WithdrawItem: Could not Find dtm in Bank. [Uptext: ft cl] **

    Any ideas or thoughts on what to do and why this is happening.

    Thanks

  2. #2
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    You have 0 tolerance on your main-point (the brown one). Increase the tolerance by a little bit to account for minor changes in colour on RS and you should be fine.

  3. #3
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok, I have added a tolerance of 4, if I go higher it starts to find the money also as a possible match, but when I run it with this dtm it still gives the same error.

    Here is the new dtm string:
    Simba Code:
    mlwAAAHicY2dgYOBlgAA2IBYGYhkgFgJiFiDmAmI+IBaFYnaoWmYgDrXjAZJMWDELVA02zIgHQwEAlCYBdA==

  4. #4
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Remove the tolerance of 3 from all of your black points, they can and should remain at 0tol. and make more points to get a really accurate DTM with a higher tolerance on your middle point. Maybe ~50 but you will need several points on your black outline to make sure you don't recieve false positives (i.e. on your gold)

  5. #5
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It says your uptext is ft cl. Ive never used withdrawDTM, but that looks like it could be an issue.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  6. #6
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    That UpText is perfectly fine as 'ft cl' is just the area between Soft clay. It contains no capitals and spaces are generally not an issue.

  7. #7
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    That UpText is perfectly fine as 'ft cl' is just the area between Soft clay. It contains no capitals and spaces are generally not an issue.
    It might just be the withdrawitem function try using something like:

    Simba Code:
    if FindDTMRotated(ClayDTM, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then
         begin
             MMouse(x, y, 3, 3);
             //if you want you can search for uptext here but honestly what other dtms match hopefully nothing ;)
             getmousepos(x,y);
             Mouse(x, y, 0, 0, false);
             WaitOptionMulti(['All'], 200);//or 27 if you only want 27 XD
             Freedtm(ClayDTM);
             Wait(600);
         end;

  8. #8
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hi

    I have tried increasing the dtm`s, also went with the code getdropped gave but then I get this Error

    Simba Code:
    [Error] C:\Simba\Scripts\TestBed.simba(187:85): Unknown identifier 'aFound' at line 186
    Compiling failed.

    Simba Code:
    if FindDTMRotated(DTM_SoftClay, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, aFound) then

    Code in question on line 186.

    Guys I would really like to know why this don`t work.

    Thanks a lot

  9. #9
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that means you didnt define afound.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  10. #10
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I know, but what does afound mean?

    There is no sample codes for this function to see what it looks for.

  11. #11
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ooh, i see what you mean now. I personly wouldnt use DTM rotated, theres no need in a banking procedure. Just load your DTM, use findDTM, then free it.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  12. #12
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Can Anyone Run this procedure and tell me why it is not finding the dtm for the softclay.

    I really need some help here as well as some advice.

    Simba Code:
    procedure WithDrawItems;
    var
    Temp, x, y:Integer;
    Begin
      MakeCompass('N');
      SetAngle(SRL_ANGLE_HIGH);
      DTM_SoftClay := DTMFromString('mAAEAAHic42FgYOABYhYg5gNiMSCWBmIJIBYFYmGoPBsQMzNAABdUPQgwQeVAaoSgemBYCGpmhAMvVCVx2IiBNMBIIkYGAI2tAj0=');
      DTM_Clay := DTMFromString('mFQEAAHicnc05CoBAEETRanFBcUm8jBMo7oGH8RLeW78wieFY8KiCDrqSlJl00xEdI0WBEg1a1Mj93TBixooNu+8FE3o4dH4PuM7j/RIkUXjsh08eBisGRg==');
      OpenbankFast('db');
      Wait(500 + random(400));
    // Withdraw Soft Clay From Bank
      While (not(InvFull)) do
      Begin
      If WithDrawItem(DTM_SoftClay, 'dtm', 28, 'oft', []) then   // WithDraw item From Bank
      Begin
        WriteLn('Success');
        Wait(400 + random(200));
        CloseBank;
        FreeDTM(DTM_SoftClay);
        FreeDTM(DTM_Clay);
      End;
      End;
    End;

    You can change OpenbankFast('db'); to any bank, all you will need is soft clay.

    I would really appreciate it.
    Thanks

  13. #13
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    While..do loop repeats if the argument is positive. Youve said repeat if not(invfull) is positive, that should be while invfull do instead. Try this out. Sorry, the standards arent great, I just threw it together.
    Simba Code:
    procedure WithDrawItems;
    var
    Temp, x, y:Integer;
    Begin
      MakeCompass('N');
      SetAngle(SRL_ANGLE_HIGH);
      DTM_SoftClay := DTMFromString('mAAEAAHic42FgYOABYhYg5gNiMSCWBmIJIBYFYmGoPBsQMzNAABdUPQgwQeVAaoSgemBYCGpmhAMvVCVx2IiBNMBIIkYGAI2tAj0=');
      DTM_Clay := DTMFromString('mFQEAAHicnc05CoBAEETRanFBcUm8jBMo7oGH8RLeW78wieFY8KiCDrqSlJl00xEdI0WBEg1a1Mj93TBixooNu+8FE3o4dH4PuM7j/RIkUXjsh08eBisGRg==');
      OpenbankFast('db');
      Wait(500 + random(400));
    // Withdraw Soft Clay From Bank
     if InvFull then
       Begin
         If FindDTM(DTM_SoftClay, x, y, MSX1, MSY1, MSX2, MSY2) then
           begin
             Mouse(x, y, 3, 3, mouse_right);
             WaitOption('ll', 600);
             wait(randomrange(300, 800));
             Closebank;
           end else
            begin
              writeln('We couldnt find the Soft clay! Check your DTM, or make sure the clay is visible');
              Terminatescript;
            end;
        End else
          begin
            writeln('The inventory isnt full yet.');
            Exit;
          end;
      End;
    Let me know how it works!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  14. #14
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by VastlySuperior View Post
    Can Anyone Run this procedure and tell me why it is not finding the dtm for the softclay.

    I really need some help here as well as some advice.

    Simba Code:
    procedure WithDrawItems;
    var
    Temp, x, y:Integer;
    Begin
      MakeCompass('N');
      SetAngle(SRL_ANGLE_HIGH);
      DTM_SoftClay := DTMFromString('mAAEAAHic42FgYOABYhYg5gNiMSCWBmIJIBYFYmGoPBsQMzNAABdUPQgwQeVAaoSgemBYCGpmhAMvVCVx2IiBNMBIIkYGAI2tAj0=');
      DTM_Clay := DTMFromString('mFQEAAHicnc05CoBAEETRanFBcUm8jBMo7oGH8RLeW78wieFY8KiCDrqSlJl00xEdI0WBEg1a1Mj93TBixooNu+8FE3o4dH4PuM7j/RIkUXjsh08eBisGRg==');
      OpenbankFast('db');
      Wait(500 + random(400));
    // Withdraw Soft Clay From Bank
      While (not(InvFull)) do
      Begin
      If WithDrawItem(DTM_SoftClay, 'dtm', 28, 'oft', []) then   // WithDraw item From Bank
      Begin
        WriteLn('Success');
        Wait(400 + random(200));
        CloseBank;
        FreeDTM(DTM_SoftClay);
        FreeDTM(DTM_Clay);
      End;
      End;
    End;

    You can change OpenbankFast('db'); to any bank, all you will need is soft clay.

    I would really appreciate it.
    Thanks
    So assuming your DTM is correct here is what I would do:


    Simba Code:
    procedure WithDrawItems;
    var
      x, y, DTM_SoftClay : Integer;
      aFound : Extended;
    begin
      repeat
        SetAngle(SRL_ANGLE_HIGH);
        MakeCompass('N');
        OpenBankNPC;//assuming it is a npc banker you can change to a chest if you want
      until BankScreen or PinScreen;

      {if PinScreen then //use this if you declare a pin
      begin
        repeat
          InPin(Players[0].Pin);
        until BankScreen or not (LoggedIn);
      end;}

      if not(InvFull) then
      begin
        DTM_SoftClay := DTMFromString('mAAEAAHic42FgYOABYhYg5gNiMSCWBmIJIBYFYmGoP'+
          'BsQMzNAABdUPQgwQeVAaoSgemBYCGpmhAMvVCVx2IiBNMBIIkYGAI2tAj0=');
        {DTM_Clay := DTMFromString('mFQEAAHicnc05CoBAEETRanFBcUm8jBMo7oGH8RLeW78wieFY'+
          '8KiCDrqSlJl00xEdI0WBEg1a1Mj93TBixooNu+8FE3o4dH4PuM7j/RIkUXjsh08eBisGRg==');}

        // you arnt using regualr clay...
        if FindDTMRotated(DTM_SoftClay, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4,
          Pi/60, aFound) then
        begin
          MMouse(x, y, 5, 5);
          if (IsUpText('oft')) then
          begin
            GetMousePos(x,y);
            Mouse(x, y, 0, 0, false);//right clicks dtm
            WaitOptionMulti(['All'], 200);
          end;
          Wait(600);
        end;
        Freedtm(DTM_SoftClay);
      end;
    end;

    Does that work for you?

  15. #15
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Bank dtms are weird... they change alot, try using a bitmap if its possible.

  16. #16
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Bank dtms are weird... they change alot, try using a bitmap if its possible.
    They are just the same as invy dtms... just sometimes they can deformon the upleft side... you just have to make smart dtms and you shouldnt have any troubles..... or atleast i don't

  17. #17
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Guys, thanks for the response, I was asleep during the time you responded, I won`t be able to look at it now as I have some rlf stuff to take care this morning, but I will let you know later on during the day what I have found.

    Thanks for everyone who has helped me.

    E.

    Ok, I have tested the Procedure getdropped69 has provided, with the same results as my own code. Also Your Procedure Footy, does not work.

    So there Only remains 3 scenarios why it should not work.

    1) The DTM is not correct. ( Checked it a lot and it always just display one possibility for the clay and it is correct.) Also used the default claydtm provided by getdropped69 and it also do not find the dtm.
    2) It does not find the uptext, in other words the fonts might not be correct. (But all the other functions and procedures read the uptext correct.
    3) WithDrawItems does not work correctly. There is something wrong with that function.

    Is the last one a possibility?

    Why do I want to use withdrawitem, because it does not matter in which slot in the bank your item is, it will find the dtm and withdraw it.

    Any other suggestions or feedback? Has anyone actually tried the code to see what it does?

    Second Edit.

    Also Footy, Your loop for the InFull is not correct. I don`t want to withdraw items when the inventory is full, I want to withdraw when the inventory is not full. Your loop will never get executed because it is never true. When Executed as (Not(InvFull)) it actually works and find the dtm and withdraws it. Thanks a bunch.

    So the conclusion is that withdrawitem is messed up, where do you report that?
    Last edited by VastlySuperior; 07-28-2012 at 07:22 AM.

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
  •