Results 1 to 7 of 7

Thread: Help with DTMs...

  1. #1
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with DTMs...

    Well I made a dtm (actually 2) for a universal ore, but I can't get it to work in my powermining script.

    Here is the part with the DTM

    SCAR Code:
    procedure Drop;
      var FailedDrop,DropTries, Dropping, x1, x2, y1, y2:Integer;
      begin

        Ore := DTMFromString('78DA63CC66626078C28002E6476B30E830323' +
           '00011C37F20602C07AA79CE8006189148205D0854F39A809A34A0' +
           '9A8F04D4E401D5BC27A0A606A8E60101352540353709A84900AA7' +
           '94B404D2C50CD0BFC6A007EB41170');

        {Ore := DTMFromString('78DA63FCC8C4C030919101199C2A3262F80FA' +
           '441A2FF8180F12D50CD7C543510591809A47F01D5CC24A0E63F50' +
           '4D0F0135CF8830E72150CD0C026A7E03D54C25A0E62B504D2B7E3' +
           '500380212C7'); Another DTM, just in case the other one not working...}

        MarkTime(Dropping)
        repeat
          if FindDTM(Ore, x,y, x1, y1, x2, y2) then
            begin
              Mouse(x,y,0,0,true);
              ChooseOption('rop');
              DropTries:=DropTries+1
            end
          else
            begin
              FailedDrop:=FailedDrop+1;
            end;
          if (FailedDrop=30) then
            begin
              Writeln('Tried dropping the ore 30 times but failed, report this bug to Runescapian, terminating script...')
              TerminateScript;
            end;
           
        until(DropTries = 35) or (TimeFromMark(Dropping)>300000)

        Inventories:=Inventories+1;
        AmountLoads:=AmountLoads+1;
      end;

    Am I trying to find it a wrong way or is the way I'm doing it not efficient enough?

    If I'm doing everything right with the DTM (which I doubt), then something else must be wrong with my powerminer, heres the script

    SCAR Code:
    //This is my first script, a powerminer. Fill in the info in lines 10-13 and 18-26 and you
    //should be ready to go!


    //Big thanks to Derek, Method, Santa_Clause, and JackLKrawl for helping me fix errors and and suggesting what functions I should use

    program PowerMinerByScapian;
    {.include SRL/SRL.scar}

      var
       Ore, AmountLoads, inventories, x, y:integer;

      const

        YourSRLId = '';  //Enter your SRL Stats ID number, if you don't have one go here - [url]http://www.stats.srl-forums.com/[/url]
        YourSRLPassword =''; //Your SRL Stats password

        RockColor1 = 3890561; //put the color of the rock (using the color picker) before the ; but after the =
        RockColor2 = 3463635; //same as above, just a slightly different color
        RockColor3 = 3624564; //same as above, just a slightly different color
        RockTolerance = 10; //10 should be fine, but if it's not finding the rock then increase it and/or change the above colors
        WaitTime = 2500; //Time you want it to wait in between clicking rocks (multiply by 1000,
                             //1 second = 1000, 2 seconds = 2000, etc)
                             //NOTE: because of a bit of antiban this will automatically include an
                             //extra 5 sec or so
        Loads = 1; //How many loads do you want each character to do before logging out?
        MineRockLength = 600000; ////Time you want it to mine an inventory of rocks before giving up (multiply by 1000,
                             //1 second = 1000, 2 seconds = 2000, etc)

    Procedure DeclarePlayers;
    begin
        HowManyPlayers := 4;   //Ignore this line, just be sure to set the players you won't be using False
        NumberOfPlayers(HowManyPlayers);  //Ignore this line
        CurrentPlayer := 0; //Which player do you want to start with? (0 is the first player)

        Players[0].Name := '';  //Put the name of your rs character here
        Players[0].Pass := '';  //Put the password of your rs character here
        Players[0].Nick := '';  //Put 3-4 letters of your rs name in here(Not the first letter
                                 //and no spaces or _'s.
        Players[0].Active := True; //Are you using this player? True is Yes, False is no.
       
        Players[1].Name := '';
        Players[1].Pass := '';             //to set the rest of these up just refer to the above instructions
        Players[1].Nick := '';
        Players[1].Active := False;

        Players[2].Name := '';
        Players[2].Pass := '';
        Players[2].Nick := '';
        Players[2].Active := False;
       
        Players[3].Name := '';
        Players[3].Pass := '';
        Players[3].Nick := '';
        Players[3].Active := False;
       



        NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;




    procedure Mining;
      var TimeMining,Tries:integer;
      begin
        MarkTime(TimeMining);
        Tries:=0
        repeat
           if(not(LoggedIn))then
              begin
                Exit;
              end;
           if (FindObjCustom(x, y, ['Mine','ine O','ne Or','e Ore','Ore'], [RockColor1, RockColor2, RockColor3], RockTolerance)) then
               Mouse(x, y, 0, 0, True)
           else
             begin
               Tries:=Tries+1
                 if (Tries = 25) then
                   begin
                     Writeln('Couldnt find the color 25 times, terminating script');
                     TerminateScript;
                   end;
             end;
           if FindNPCChatText('inventory is too full to hold any more') then
             begin
               exit;
             end;
           wait(WaitTime + random(20));
           FindNormalRandoms;
           RandomRClick;
           RandomRClick;
           PickUpMouse;
        until(InvFull) or (TimeFromMark(TimeMining) > MineRockLength+random(20000))

       
      end;

    procedure Drop;
      var FailedDrop,DropTries, Dropping, x1, x2, y1, y2:Integer;
      begin

        Ore := DTMFromString('78DA63CC66626078C28002E6476B30E830323' +
           '00011C37F20602C07AA79CE8006189148205D0854F39A809A34A0' +
           '9A8F04D4E401D5BC27A0A606A8E60101352540353709A84900AA7' +
           '94B404D2C50CD0BFC6A007EB41170');

        {Ore := DTMFromString('78DA63FCC8C4C030919101199C2A3262F80FA' +
           '441A2FF8180F12D50CD7C543510591809A47F01D5CC24A0E63F50' +
           '4D0F0135CF8830E72150CD0C026A7E03D54C25A0E62B504D2B7E3' +
           '500380212C7'); Another DTM, just in case the other one not working...}

        MarkTime(Dropping)
        repeat
          if FindDTM(Ore, x,y, x1, y1, x2, y2) then
            begin
              Mouse(x,y,0,0,true);
              ChooseOption('rop');
              DropTries:=DropTries+1
            end
          else
            begin
              FailedDrop:=FailedDrop+1;
            end;
          if (FailedDrop=30) then
            begin
              Writeln('Tried dropping the ore 30 times but failed, report this bug to Runescapian, terminating script...')
              TerminateScript;
            end;
           
        until(DropTries = 35) or (TimeFromMark(Dropping)>300000)

        Inventories:=Inventories+1;
        AmountLoads:=AmountLoads+1;
      end;
     
    procedure Randoms;
      begin
        FindNormalRandoms;
      end;

     
    procedure AntiBan;    //by SRL Devs
      var Ban: Integer;
        begin
        Ban:= random(5);
          case Ban of
            0: RandomRClick;
            1: HoverSkill('mining', False);
            2: PickUpMouse;
            3: AlmostLogout;
            4: Wait2(3 + random(9), true);
            5: BoredHuman;
          end;
        end;
       
    procedure CheckSrlId;
      begin
       if (YourSRLId = '') then
         begin
           Writeln('You need an SRL Stats account to use this script :)')
           Writeln('If you dont have one, go here - http://www.stats.srl-forums.com')
           Writeln('Signing up takes 1 minute, dont be lazy')
           Writeln('Srl stats are awesome, you can show off how long you have been running scripts!')
           TerminateScript;
         end
       else
         begin
           exit;
         end;
       if (YourSRLPassword = '') then
         begin
           Writeln('You need an SRL Stats account to use this script :)')
           Writeln('If you dont have one, go here - http://www.stats.srl-forums.com')
           Writeln('Signing up takes 1 minute, dont be lazy')
           Writeln('Srl stats are awesome, you can show off how long you have been running scripts!')
           TerminateScript;
         end
       else
         begin
           exit;
         end;
      end;
       
    procedure proggy;
      begin
        Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
        Writeln('|\/\/\/\/\/\/ Power Miner by Scapian /\/\/\/\/\/\/\|');
        Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
        Writeln('|\/\ We have done' + intToStr(inventories) + ' inventories of ores so far! /\/\|');
        Writeln('|\/\ We worked ' + TimeRunning + '/\/\/\/\/\/\/\/\/\//\/\/\|');
        Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|');
        Writeln('|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\//\/\/\/\|');
      end;
     
    procedure siggy;
      begin
        Writeln('I hope you had a great experience with the Scapian Power Miner!')
        Writeln('                   Hope to see you again!                      ')
        Writeln('                                   -Scapian')
      end;
     
    procedure login;
      begin
        if (not(loggedin)) then
          begin
            loginplayer;
            findnormalrandoms;
            wait(1000);
            setBar('brightness',4);
          end
        else
          begin
            findnormalrandoms;
            wait(1000);
            setBar('brightness',4);
          end;
      end;
     
    procedure EnoughLoads;
      begin
        if(AmountLoads=Loads)then
        begin
          NextPlayer(True);
          AmountLoads:=0;
          HighestAngle;
          MakeCompass('N');
        end;
      end;




    begin
     SetupSRL;
     ScriptID := '532';
     SRLId := YourSRLId;
     SRLPassword:= YourSRLPassword;
     CheckSrlId;
     FindRS;
     ActivateClient;
     DeclarePlayers;
     login;
     Mining;
     Drop;
     Randoms;
     AntiBan;
     repeat
       if(not(LoggedIn))then
         begin
           Exit;
         end;
       Mining;
       Drop;
       Randoms;
       AntiBan;
       proggy;
       EnoughLoads;
     until(false)
       Siggy;
    end.

    It mines the rocks, then just stops and ends the script saying (like I told it to) that it tried 30 times to find the ore to drop and failed every time...

    Thanks in advance

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Instead of x1, y1, etc. use MIX1, MIY1, MIX2, MIY2. Those coordinates make up the inventory box. Also, instead of Mouse(x, y, 0, 0, true), do Mouse(x, y, 5, 5, false). False will right click the ore and allow you to use ChooseOption.
    :-)

  3. #3
    Join Date
    Sep 2007
    Location
    Pennsylvania
    Posts
    3,396
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so
    SCAR Code:
    if FindDTM(Ore, x,y, MIX1, MIY1, MIX2, MIY2) then
            begin
              Mouse(x,y,5,5,false);

    //etc

    ?

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Yes, that should work fine.
    :-)

  5. #5
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    if you cant find the DTM it might be because jagex fucks up there ore, happend to me when i was getting DTM for Yew longbow and Bow String... i ended up takeing the color and auto color.. then using find custom obj, if you need help with the syntax for find custom obj pm me...

  6. #6
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Hmmm,

    Colors in runescape change so if you aren't using the black outline for the whole DTM it will be problematic. You should look into DDTMs. Those help too much because you can use tolerance.

    Hope this helps,
    Cut em2 it
    Formerly known as Cut em2 it

  7. #7
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Come on guys, stop making useless posts. If you actually looked through his drop procedure, you'd see the two errors I mentioned already. This isn't a post count++ forum.
    :-)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dtms?
    By HempLord in forum OSR Help
    Replies: 4
    Last Post: 02-24-2008, 02:35 AM
  2. Help with DTMs
    By Richard in forum OSR Help
    Replies: 2
    Last Post: 01-27-2008, 02:46 PM
  3. DTMs
    By Jackrawl in forum OSR Help
    Replies: 6
    Last Post: 11-25-2007, 09:00 PM
  4. DTMs
    By HarryJames in forum OSR Help
    Replies: 12
    Last Post: 03-21-2007, 09:19 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
  •