Page 8 of 9 FirstFirst ... 6789 LastLast
Results 176 to 200 of 207

Thread: Yohojo's DTM Tut 1(Item finding with DTMs)

  1. #176
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Great questions!

    To differentiate between different items of same outline, use tolerance of 20,30,40 (experiment) on the parent point instread of 255.
    Good way to check would be ex: have one of each log on screen, adjust tolerance until only the one you want is found.

    Never load DTM in loop, load it, use it, free it. And if your script is using same DTM often/quickly then load it once and just never free it.

    Goof luck, glad to help!
    Thanks for the response.

    I've been looking at a few other tutorials and between the tutorials I've read I've now got a pretty good understanding of DTMs.

    It's interesting how different people approach DTMs, you decide to go for the outline, some people decide to go for the bottom-right quadrant of the item etc.

    I guess the only way I'll find out what is best for me is by experimentation.

  2. #177
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    They both works fine, but as of recently people have been using bottom right quadrant only because graphical glitches and items looking deformed etc
    The bottom right always stays looking the same but other parts look messed up so it's usually best to use bottom right right now.

  3. #178
    Join Date
    Jun 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Very much appreciated! I understand DTMs so much more now!

  4. #179
    Join Date
    Jan 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Is there a way I can count the number of DTM (Example blue robe in your case)in my inventories instead of just locating its presence and clicking on it??

  5. #180
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Look in inventory.simba (C:\Simba\Includes\SRL\srl\core) for:
    Simba Code:
    Function CountItems(ItemType: string; Identifier: Integer; tol: TIntegerArray):
    And other similar functions to it. They work well.

  6. #181
    Join Date
    Dec 2011
    Posts
    257
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I watched it and now I understand It's very beginner friendly. I am yet to move onto RuneScape bots

  7. #182
    Join Date
    Feb 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hi guys! I'm new to Simba scripting, but I know some java and i'm very(VERY) eager to learn

    I have something that i'm not sure of for DTMs, and this is very stupid D: but, heres a DTM that I have taken using your tutorial! (Btw, GREAT tutorial hahas!):

    VialDTM := DTMFromString('78DA63946266606061624006616151609A1 1C' +
    'A671407AAF9C8C8800A9850D54813A14619A8869309BF1A19 A01A' +
    '3E026AC48850230454C34B400D3F500D070135C24035FF09F 84B8' +
    'E192E864B0D000339056E');

    if WithdrawItem(Vial, 'dtm', 27, 'ia', [3]) then;
    CloseBank;

    I am trying to run a basic program that locates and left clicks the Lunars spell Humidify, however, Simba could not locate the vials in the bank, stating: unable to locate 'dtm'.
    I noticed that other Simba scripts from pro writers have DTMs that do not have the '+' in them, such as:
    barDTM := DTMFromString('mlwAAAHicY2dgYDAAYlUgVgFiIyC2AWJLID YB4mlAvACIpwJxHxBPBuKZQDwPiM8ukgGSTFjxfwbcgBEPhgIA P/cIHA==');

    Although im sure that its an error on my part, but I'm learning and I wanna ask how do solve this small problem :/

  8. #183
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Hey madyman! Its great that your'e looking to help out around here.

    Why don't you try this:
    Simba Code:
    procedure FindVial;
    var
     Vial, x, y: Integer;
    begin
      Vial := DTMFromString('78DA63946266606061624006616151609A11C' + 'A671407AAF9C8C8800A9850D54813A14619A8869309BF1A19A01A' + '3E026AC48850230454C34B400D3F500D070135C24035FF09F84B8' + 'E192E864B0D000339056E');
      if FindDTM(Vial, x, y, MSX1, MSY1, MSX2, MSY2) then
       begin
        Writeln('Found Vial!')
        MMouse(x, y, 2, 2);
        Mouse(x, y, 0, 0, True);
        FreeDTM(Vial);
       end;
    end;
    Make sure you've read the beginners guides on Simba.
    Make sure you SetUpSRL in your main loop.
    For this procedure to work, you must have the bank tab open and it will find it and click on it.



    If you want to Withdraw all the Vials, then you can use a much simpler procedure:
    Simba Code:
    DepositAll;
    Withdraw(0,0,0);
    This procedure Deposits your inventory and then Withdraws a full inventory of the first item in your bank - which you should make Vials. If you want it to withdraw a different amount, simple change the last '0' into the number of Vials you want to withdraw.

    Hope that helps!
    Last edited by Abu; 03-14-2012 at 05:16 PM.

  9. #184
    Join Date
    Feb 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for this!
    Fixed teleporting problem with the help of this

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

    Default

    Great Tutorial! But, how can I make a dtm for an item that is on the ground????

  11. #186
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by bobbyc View Post
    Great Tutorial! But, how can I make a dtm for an item that is on the ground????
    Exactly the same my friend, exactly the same...

  12. #187
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by bobbyc View Post
    Great Tutorial! But, how can I make a dtm for an item that is on the ground????
    I don't suggest doing that, Watch my ACA video (Auto Color Aid) it will help with main screen stuff.

    I only like DTMs for flat/static things, not ever for the main screen.

  13. #188
    Join Date
    May 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, thanks for the great TUT!

    But when I try to use it I get an error message and the script is executed:
    Successfully executed.
    The following DTMs were not freed: [2]

    This is my procedure:

    Simba Code:
    Procedure WalkToBank;

    var
      AreaOne,x,y : Integer;

    begin
      FindNormalRandoms
      If (InvFull) then
        begin
        AreaOne := DTMFromString('mggAAAHicY2NgYNjAysCwGIh3AfEeVgh/IRAbMDIwaACxGhAbArElEFsAcUC0JoNPuDqDV7gsg1KUCENArDyDo7cSw38G7IARB4YAALWuCtA=');
        if FindDTM(AreaOne,x, y, 100, 100, 200, 200) then
          begin
            writeln('Currently: Walking To Bank - Phase 1!');
            Mouse(x, y, 1, 1, true);
          end;
        end;
    end;
    BOT TILL YOU DROP!

  14. #189
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    When you're done using the DTM call
    FreeDTM(AreaOne);

    It's not a big deal it's freed when script stops anywyas.

  15. #190
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Thanks. Is there a place where standard DTMs are saved? because it takes a lot of time to make all DTMs yourself... Would be nice if DTMs of often used items were stored somewhere online, so, is there such a place?

  16. #191
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Much better to do your own better practice.

  17. #192
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by MasterCrimez View Post
    Thanks. Is there a place where standard DTMs are saved? because it takes a lot of time to make all DTMs yourself... Would be nice if DTMs of often used items were stored somewhere online, so, is there such a place?
    Good idea and I think such a database was thought about/started before with DTMs/Bitmaps.
    In the end they often get broken/outdated etc Nd it really just takes a minute or less to make a DTM or bitmap for something, practice will make you faster.

    Also there was something made called blacklists/black lists I forgot 100% what their purpose was but it made DTM like things to find items fast/during runtime.

  18. #193
    Join Date
    Jan 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, I'm also somewhat new to scripting and stuff, I'm trying to make a DTM to click just one trout in my bank, ive looked at your video Tut to see if I could learn anymore from it, but i got this far, basically what happens it it doesnt writea line in the debug box, doesnt move the mouse to the spot and doesnt click. This could be problems on my behalf but I'm not sure, I'm using a two monitor setup if that changes anything?
    Code:
    program new;
      {$i SRL\SRL.simba}
    Var
      Trout, X, Y: Integer;
    begin
      SetupSRL;
      Trout := DTMFromString('m1gAAAHic42JgYOAHYhkglgdiZSCWAmIRIOZggABWqBo+KJ8JKsYDxGJQ9RJQNSDx0oRYBnNdHQZ+Hl4GdTUlBkMNdQZlJZDpjGAsLyPFICokxEAsYCQSIwAAnr8FFg==');
     If FindDTM(Trout, X, Y, MSX1, MSY1, MSX2, MSY2) Then
    begin
     Writeln('Found DTM');
     MMouse(x, y, 5, 5);
     Mouse(x, y, 0, 0, True);
    end;
    FreeDTM(Trout);
    end.
    Last edited by edgee awaits; 06-12-2012 at 10:15 PM.

  19. #194
    Join Date
    May 2012
    Location
    Pennsylvania, USA
    Posts
    412
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Im sorry if this is a stupid question.. but i cant seem to find the answer anywhere, where do i download scar?

    Signature by: Vinyl Scratch

  20. #195
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    MSX1, MSY1, MSX2, MSY2

    where can I find what these variables mean and what the others are?

  21. #196
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by xTheWayOfTheWarriorx View Post
    Im sorry if this is a stupid question.. but i cant seem to find the answer anywhere, where do i download scar?
    SCAR isn't used here, Simba is.
    http://villavu.com/forum/showthread.php?t=47714

    Quote Originally Posted by MasterCrimez View Post
    MSX1, MSY1, MSX2, MSY2

    where can I find what these variables mean and what the others are?
    Those are coordinates for the main screen.
    Inventory is MIX1, MIY1, MIX2, MIY2
    Minimap is MMX1,MMY1,MMX2,MMY2

    They are hard coded into SRL, I think they can be found in globals.simba.

  22. #197
    Join Date
    May 2012
    Location
    Pennsylvania, USA
    Posts
    412
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Ahh i understand now, i got confused and thought that you still used scar and simba, my bad. Thanks for clearing this up

    Signature by: Vinyl Scratch

  23. #198
    Join Date
    Jun 2012
    Location
    THE Students-City of Holland
    Posts
    332
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    thanks sir! Read this and watched your video and It was clear for me and I can use it myself now very easily

  24. #199
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    How come you cant test dtm anymore?







    Also do I have to put load dtms in?

    Heres my script with them in, think I put in wrong place tho







    Simba Code:
    {$I SRL-OSR/SRL.Simba}



     //------------------------------------------------------------------\\
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := ;  //Username goes here
      Players[0].Pass := '';  //Password goes here
      Players[0].Nick := 'ake';  //Character name (excluding first letter)
      Players[0].Active := True;
    end;
    //--------------------------------------------------------------------\\








    procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(60) of  //antiban  change (20) to higher number for less antiban
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms;
       end;
      end;
    end;




    Function FindNPC:Boolean;
    var
    Cts,a, y, Tries:Integer;
    NPCTPA:Tpointarray;
    NPCATPA:T2DPointarray;
    begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.13, 1.05);
      marktime(y);
      repeat
      if FindColorsSpiralTolerance(MSCX, MSCY, NPCTPA, 5667735, msx1, msy1, msx2, msy2, 14) then
      begin

        NPCATPA := SplitTPAEx(NPCTPA, 5, 5);
        SortATPAFromMidPoint(NPCATPA, Point(262, 224-50))
      end;
        for a :=0 to high(NPCATPA) do
        begin
         MouseSpeed:=(Randomrange(9, 15));
          MMouse(NPCTPA[a].x, NPCTPA[a].y, 3, 3);
          wait(300+Random(100));
          Inc(Tries);
          if isUptext('ring') then // name of npc
          begin
          Result := True;
          GetMousePos(a, y);
          mouse(a,y,3,3,false);
          wait(100 + random(200));
          ChooseOption('rade');// choose option trade
          wait(5000 + random(1000));
            Break;
          Exit;
         end else
           Result := False;
         end;
         Until(TimeFromMark(y) > 20000);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.02, 0.02);
    end;









    procedure FindIron;
    var
     Iron, x, y: Integer;


      procedure LoadDTMs;
    begin
       Iron := DTMFromString('mlwAAAHicY2dgYNgPxOuAeDcQnwXig0C8BYiPA3EwEEcBcRIQBwCxBxD7AXEMEHvqKgBJRqz4P5DEhbHrgGAoAABUTA8m');
    end;

    begin
     Iron := DTMFromString('mlwAAAHicY2dgYNgPxOuAeDcQnwXig0C8BYiPA3EwEEcBcRIQBwCxBxD7AXEMEHvqKgBJRqz4P5DEhbHrgGAoAABUTA8m');
      if FindDTM(Iron, x, y, MSX1, MSY1, MSX2, MSY2) then
       begin
        Writeln('Found Iron!')
        Mouse(x,y,2,2,False)
        FreeDTM(Iron);
       end;
    end;











    begin

    DeclarePlayers;
      SetupSRL;
        ActivateClient;
      LoadDTMs;
      FindNPC;
      findIron;

    End.






    I then get a

    [Error] C:\Simba\Scripts\bars.simba(113:3): 'BEGIN' expected at line 112 ---- which is this line
    Simba Code:
    procedure LoadDTMs;
    Last edited by randy marsh; 04-29-2013 at 08:40 PM.
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  25. #200
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    They both works fine, but as of recently people have been using bottom right quadrant only because graphical glitches and items looking deformed etc
    The bottom right always stays looking the same but other parts look messed up so it's usually best to use bottom right right now.
    im going crazyyyy
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

Page 8 of 9 FirstFirst ... 6789 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help finding GE Item Text
    By Bad Processor in forum OSR Help
    Replies: 9
    Last Post: 10-30-2008, 12:04 PM
  2. finding DTMs
    By TheChineseMan in forum OSR Help
    Replies: 2
    Last Post: 08-30-2008, 01:03 PM
  3. Cooking Item DTMs or BMPs
    By travo in forum OSR Help
    Replies: 5
    Last Post: 12-07-2007, 11:46 PM

Posting Permissions

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