Results 1 to 3 of 3

Thread: Multi DTM Tester

  1. #1
    Join Date
    Sep 2008
    Location
    Adelaide, South Aust
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Multi DTM Tester

    Don't know how useful this will be for others but it has helped me heaps when making scripts. Just edit the case list or make it larger and run it. It can look in your bank or inventory. Its up to you . Any comments welcomed.

    SCAR Code:
    //  This script will let u check for multiple DTMs at once
    //  and put the results into the file you specify at ProgFile
    //  Just make sure you have the file in the same location
    //  as you run this script from. You can change where it looks
    //  by modifying line 179-FindDTM(MyDTM, x, y, MSX1, MSY1, MSX2, MSY2)
    //  and changing the MSX1, MSY1 etc to MIX1, MIY1 etc for inventory
    //  searching.   ENJOY!!

    program DTMTester;
    {.include SRL\SRL.scar}

    const
      ProgFile = 'MyDTMFile.txt';

    Var
      MyDTM, ToLoadDTM, x, y: Integer;
      NoneLeft: Integer;
      MyProggy, ProggyLength: Integer;
      OldProggyText, DebugText: string;

    procedure LoadMyDTMs;
    begin
      case ToLoadDTM of
        1:  begin
            MyDTM := DTMFromString('78DA63CC63666068656440061B972E65F80FA' +
            '441A2FF81803111A86622AA1A882C8C04D22073A6105053095453' +
            '4D404D2E504D250135A9986EC650530A54D349404D01504D1F11E' +
            '634E157030022330FD3'); //thread
            end;
        2:  begin
            MyDTM := DTMFromString('78DA63F4626260F8C08002CC0D6419B880342' +
            '310FF0702C620A09ABF0C6880118904D20E40353F08A8B103AA79' +
            '47404D2850CD73026AC231DD8CA1C61DA8E60F01357E40354F08A' +
            '8B105AAF948408D2F50CD3FFC6A0056DD111A');  //HardLeather
            end;
        3:  begin
            MyDTM := DTMFromString('78DA638C666460F8C1800296CD9AC5F01F480' +
            '36518FE0301632890F587010D302291403A02C8FA47404D3C90F5' +
            '05B71A26109D0E643D22A02603C87A4C404D2290F58A801A907BD' +
            'E12501381193E186AC281AC9F04D480C2F92F01357140D677FC6A' +
            '0022B416DC');  //needle
            end;
        4:  begin
            MyDTM := DTMFromString('78DA63CC636260D065644006F7EACC19FE036' +
           '990E87F20602C01AA5142550391859140BA02A8C698809A78A01A' +
           '53026AE2806AB408A8C904AAB1C2AF06009ACB0A4D');  //copperore
            end;
        5:  begin
            MyDTM := DTMFromString('78DA635464646078C980022CD4D8197480C24' +
           '0C4F01F08181580ACA70C6880118904D2EA40D62B026A7481AC8F' +
           '04D4C801595F08A81103398E11BF1A2920EB3301732481ACD704D' +
           '4480059CFF1AB0100450F0D2A'); //pick
            end;
        6:  begin
            MyDTM := DTMFromString('78DA635464606010674001EEF69C0C3C409A1' +
           '188FF0301A3309021CC8006189148202D0624E408A801D9A54240' +
           '8D26905020A0461B4888125003B2879B801A6920C1875F0D00B90' +
           '20667'); //tinderbox
            end;
        7:  begin
            MyDTM := DTMFromString('78DA63E463606010644001338A8419B880342' +
            '310FF07024611208399010D302291405A820835D240828D801A29' +
            '20C141408D2890E026A0860748881250C309242409A801B9578E0' +
            '83584CCE122EC1E0085C5069D'); //Lavastaff
            end;
        8:  begin
            MyDTM := DTMFromString('78DA637462606090604001029DA20C5C409A1' +
            '188FF0301A30B90C1C58006189148206D0D247809A83103124244' +
            'A8914655E1E5EA82AAC60A4828A1AA71B1B7475503F2972A01BB7' +
            'C30CDC150130824A408A8F127C25F5E40821BBF1A0031FB0A43'); //Naturerune
            end;
        9:  begin
            MyDTM := DTMFromString('78DA63F46062606867644006C1765C0CFF813' +
           '448F43F1030BA01D5D4A3AA81C8C24820ED0D543381801A73A09A' +
           '4E026A8231DD83AE0600F23D09BD'); //logs
            end;
        10: begin
            MyDTM := DTMFromString('78DA63E4656060006124B06BE346062E20CD0' +
            '8C4FF81809119C8606740038C48249006A91121A0860F48481150' +
            '2301249809A891041202F8D50000C82E06DB'); //Cowhide
            end;
        11: begin
            MyDTM := DTMFromString('78DA639460606090624001CB954418B880342' +
            '310FF070246901A2E0634C0884402694120C143400DC80C4122D4' +
            'C81050C30F249409A89105122A04D4A8106117488D300135F284F' +
            'D0E009C9406C8'); //Firerune
            end;
        12: begin
            MyDTM := DTMFromString('78DA6394666260F8C880027C3C3819B880342' +
            '310FF0702460D4C3510591809A465816AFE1150C30F54F38D801A' +
            '41A09A3704D42803D53C23A04613A8E6250135AA4035BF09A8112' +
            '1428D1450CD63FC6A00167F0F5E'); //Softleather
            end;
        13: begin
            MyDTM := DTMFromString('78DA63E467606010624001D30B85184480342' +
            '310FF07024656204316554D943317986684F219D981841CAA9ACE' +
            '34015435D240820355CD4B031954359240821555CD6F133954356' +
            '240820555CD1225114C356876A5C5C7A1AA1107129CA86A267776' +
            'A0A8010039400E05'); //FireBstaff
            end;
        14: begin
            MyDTM := DTMFromString('78DA634C676260F0656440058C482490CE00A' +
           'A0921A02605A82686809A4422D42401D54410615730116EF626A0' +
           '260FA8C69D809A2CA01A0FDC6AD8417436508D1B0135394035AE4' +
           '498E347400DC83D0144A80924A02613A82608BF1A007DFD0B4F'); //axehandle
            end;
        15: begin
            MyDTM := DTMFromString('78DA63DCCDCCC0708A9101194CC877627808A' +
            '441A2FF8180710B50CD61543510591809A4F711A1E638116A4E62' +
            'BA0743CD19A09A0B04D41C02AAB94240CD56A09A6B04D4AC03AAB' +
            '94440CD26A09A93F8D50000C00C15B6'); //Oaklogs
            end;
        16: begin
            MyDTM := DTMFromString('78DA637CC6CCC0708A91011984F9CA333C04D' +
            '220D1FF40C0780FA8E630AA1A882C8C04D22F8850F311A8E62001' +
            '35DF806ACE1350F31AA8E62A01354F806AAE13507317A8E60A013' +
            '537816A4EE357030026DF1521'); //willowlogs
            end;
        17: begin
            MyDTM := DTMFromString('78DA6394606060E06040018F0C64189481342' +
            '394CF0852C3CC80061851D54803094E026A4480043B013552408215B' +
            'F1A003AFE0285'); //staffoffire
            end;
        18: begin
            MyDTM := DTMFromString('78DA630C60646078C680020C95D8187480C24' +
           '0C4F01F08188381ACC70C6880118904D23140D64B026AE280AC57' +
           '04D4440059AF09A8F103B2DE1150E30664FD25A0C607C87A41408' +
           'D2B90F504BF1A00E7310FBE'); //brokenpick
            end;
        19: begin
            MyDTM := DTMFromString('78DA6314616060E0664001A962BC0CFC409 A1' +
            '188FF0301231790C1C58006189148202D03243809A8110612 4204' +
            'D430010919FC6A00E8B5053D'); //Dragonaxe
            end;
        20: begin
            MyDTM := DTMFromString('78DA639CCEC4C0F09401051485F13188006 94' +
            '620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035 F751' +
            'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03'); //Runeaxe
            end;
        21: begin
            MyDTM := DTMFromString('78DA63CC636260D8C3C8800C5A53F818528 03' +
            '448F43F10305602D5EC4055939B9ACAC0055503028CD54035 1B51' +
            'D594E5E5A2AA29C154D3545989A20600C3BC0E32'); //steelaxe
            end;
        22: begin
            MyDTM := DTMFromString('78DA6314666060E06740017ED65C6021462 0F' +
            'E0F048C9C40061B031A60442281B434906026A04611D32E0C 3562' +
            '404282801A907BC4F1AB0100B63D057D'); //Yewtree
            end;
        23: begin
            MyDTM := DTMFromString('78DA6314646060E0614001FE11DC0CFC409 A1' +
            '188FF0301232790C1CA8006189148202D0C245808A891C1B4 0B43' +
            '8D08901025A006E41E61FC6A00BFF8057E'); //seedinnest
            end;
        24: begin
            MyDTM := DTMFromString('78DA63E4636060E06240013B168A33F0036 94' +
            '620FE0F048CEC40062B031A60442281B430906021A0461A48 F011' +
            '5003B25884801A2620C18B5F0D00489B0623'); //ringinnest
            end;
      end;
    end;

    procedure LookingForAll;
    begin
      if FindDTM(MyDTM, x, y, MSX1, MSY1, MSX2, MSY2) then  //Searches Bank Screen
        begin
          ClearDebug;
          WriteLn(' ');
          WriteLn('This Numbered DTM Found ' + IntToStr(ToLoadDTM));
          WriteLn(' ');
          FreeDTM(MyDTM);
        end else
        begin
          ClearDebug;
          WriteLn(' ');
          WriteLn('This Numbered DTM Not Found ' + IntToStr(ToLoadDTM));
          WriteLn(' ');
          FreeDTM(MyDTM);
        end;
      ToLoadDTM := ToLoadDTM + 1;
      NoneLeft := NoneLeft - 1;
    end;

    procedure FileReading;
    begin
      if (FileExists(ScriptPath + ProgFile)) then
        begin
          MyProggy := OpenFile(ScriptPath + ProgFile, False);
          if (MyProggy < 0) then
            begin
              WriteLn('Cannot Open File.');
            end else
            begin
              ProggyLength := FileSize(MyProggy);
              ReadFileString(MyProggy, OldProggyText, ProggyLength);
            end;
        end else
        begin
          WriteLn('No Such File Exists');
        end;
      CloseFile(MyProggy);
    end;

    procedure FileWriting;
    begin
      if (FileExists(ScriptPath + ProgFile)) then
        begin
          MyProggy := RewriteFile(ScriptPath + ProgFile, False);
          if (MyProggy < 0) then
            begin
              WriteLn('Cannot Open File.');
            end else
            begin
              DebugText := GetDebugText;       //gets the debug window text
              Insert(DebugText, OldProggyText, ProggyLength); //adds new proggy to old proggy
              WriteFileString(MyProggy, OldProggyText);  //writes all to file
            end;
        end else
        begin
          WriteLn('No Such File Exists');
        end;
      CloseFile(MyProggy);
    end;

    //MainLoop//
    begin
      SetupSRL;
      ClearDebug;
      ActivateClient;
      ToLoadDTM := 1;
      NoneLeft := 24;
      repeat
        FileReading;
        LoadMyDTMs;
        wait(120 + Random(500));
        LookingForAll;
        wait(160 + Random(200));
        FileWriting;
      until (NoneLeft = 0)
    end.

  2. #2
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You could put all of the DTMs in an integer array and call them using a for loop so that you wouldn't have to have an extra couple variables matching the number of DTM's you have.

  3. #3
    Join Date
    Sep 2008
    Location
    Adelaide, South Aust
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lordsaturn View Post
    You could put all of the DTMs in an integer array and call them using a for loop so that you wouldn't have to have an extra couple variables matching the number of DTM's you have.
    Thanks for that. I will give it a go and post an updated version within the next few days.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multi-User, Multi-Log, Multi-Bow Pro Fletcher
    By Foss in forum First Scripts
    Replies: 13
    Last Post: 07-16-2008, 08:54 AM
  2. Tester and Reviewer needed
    By Rora in forum OSR Help
    Replies: 0
    Last Post: 12-02-2007, 09:28 PM
  3. [Yanix] {Tester}
    By yanix in forum News and General
    Replies: 2
    Last Post: 11-16-2007, 06:48 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
  •