Results 1 to 7 of 7

Thread: A Mixture of Errors.

  1. #1
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default A Mixture of Errors.

    Perfectly compiled, poorly run.

    I added several DDTM's to make my scripting a little more complex, and at the moment, it just loggs out before it even finds the RockDDTM. I dont know why.

    I havent actually got it to the RockDDTM yet, so I cant test DDTMWillowTree at the moment.

    I did this to overcome the whole "FindObjCustom" even though it works perfect, apparently its extremely botty now.

    Heres the script:

    SCAR Code:
    Program WillowCrusher;
    {.include SRL/SRL/Misc/SMART.scar}
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}


    const
    //-->Loads<--\\

    Loads = 1; //How many loads per player before switching

    //--->SRL ID<---\\
    YourSRLId = '';
    YourSRLPassword ='';

    //--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
    YourPin = '1993';

    //SMART World\\
    SMARTWorld = 152;


    {-------------------------------------------------------
                           Player Setup
    --------------------------------------------------------}


    procedure DeclarePlayers;
    begin

       HowManyPlayers := 1; //How many Players
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer :=0; //Starting Player

       Players[0].Name := '';
       Players[0].Pass := '';
       Players[0].Nick := '';
       Players[0].Active := True;

    {   Players[1].Name := '';
       Players[1].Pass := '';
       Players[1].Nick := '';
       Players[1].Active := False;  }


    {  Players[2].Name := '';
       Players[2].Pass := '';
       Players[2].Nick := '';
       Players[2].Active := True;

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

       Players[4].Name := '';
       Players[4].Pass := '';
       Players[4].Nick := '';
       Players[4].Active := True;

       Players[5].Name := '';
       Players[5].Pass := '';
       Players[5].Nick := '';
       Players[5].Active := True;   }




    end;

    {----------------------------Do Not Edit Below This----------------------------}
    var x, y: integer;
        LoadsNum: integer;
        LoadsNum2: integer;
        MMTree: integer;
        BrokenAxe: integer;
        BrokenAxes: integer;
        NormalAxe: integer;
        Banker: integer;


    //Load DTM's\\

    procedure LoadDTMs;
    begin

           MMTree := DTMFromString('78DA6364636060E0604001497EA20CFF81342' +
                   '310FF07024626208305558D7E9210986684F21939895003B28B19' +
                   '558D7D8104A61A26026A5830D560D8C50A24D850D5B8997162DAC' +
                   '58EE9771435EC84DD0C00E5D90BB5');

           BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
                      'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
                      '5C04D4D400D5A8E05703008C0604B4');

           NormalAxe := DTMFromString('78DA63E4626060E067400175F17C609A11CA6' +
                      '7640312720C688011550D0B909025A0860748B01050230E245809' +
                      'A81105127C04D480E439F1AB01004CBC01C4');

           Banker := DTMFromString('78DA6364636060E0604001B3CAC2C0342394C' +
                   'FC80C24B850D538DAD8A0AAE10412CCA86A4A737350D57061DA55' +
                   '575A82AA861B48B0A2AA3936231F530D0FAA9ACAC20254356C986' +
                   'A7CDCDD51D5300109365435FE5E9E7035202900DBBD0A48');


    end;

    //Signature\\

    procedure Signature;
     begin
       ClearDebug;
       wait(250 + random(30));
       writeln('   Torrents Willow Crusher&Banker V1.7    ');
       wait(250 + random(30));
       writeln(' _____                                _   ');
       wait(250 + random(30));
       writeln('(_   _)                              ( )_ ');
       wait(250 + random(30));
       writeln('  | |   _    _ __  _ __   __    ___  | ,_)');
       wait(250 + random(30));
       writeln('  | | / _`\ ( "__)( "__)/"__`\/" _ `\| |  ');
       wait(250 + random(30));
       writeln('  | |( (_) )| |   | |  (  ___/| ( ) || |_ ');
       wait(250 + random(30));
       writeln('  (_)`\___/ (_)   (_)  `\____)(_) (_) \__)');
       wait(500 + random(30));
     end;

    //Torrent Proggy\\

    procedure ToFProggy;
    begin
      ClearDebug;
      Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
      Writeln('/\Please Post Progress Reports & Any problems /\ ');
      Writeln('/\      From Wherever you got the script      /\ ');
      Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
      Writeln('//\\Worked For: '        + TimeRunning + '                   //\\');
      Writeln('//\\Did: '        + IntToStr(LoadsNum)+ ' Loads                            //\\');
      Writeln('//\\Broke: '        + IntToStr(BrokenAxes)+ ' Axes                         //\\');
      Writeln('//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ ');
      Writeln('//\\      Thanks for Using my Script :D     //\\ ');
      Writeln('```````````````````````````````````````````````');
    end;

    //--------------------------------Anti-Ban!!------------------------------------\\
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10: TypeSend('Bored, notice how bored I am..');
        11: RandomRClick;
        12: HoverSkill('Woodcutting', False);
        13: RandomMovement;
        14: BoredHuman;
        15: PickUpMouse;
        16: AlmostLogout;
        17: DoEmote(400 +Random(90));
        18: begin
             GameTab(1 +Random(12));
             wait(2000 +Random(1000));
             GameTab(4);
           end;
      end;
    end;

    //------------------------------Anti-Randoms!!------------------------------\\

    procedure FindRandoms;
    begin
      FindTalk;
      FindNormalRandoms;
      FindLamp('Woodcutting');
      SolvePinball;
      FindEnt(x, y, true);
    end;

    //EntFinder\\

    procedure EntFinder; //By Yohojo - Modded by BobboHobbo
    var
      EX, EY: integer;
      FX, FY: integer;
      SafeEntWait: LongInt;
    begin
      if (not (LoggedIn)) then
      Exit;
      begin
        Status('Ent Checking')
          if
          (FindObjCustom(EX, EY, ['Willow'], [4690821], 7)) then
        begin
          MMouse(EX, EY, 0, 0)
            if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
          begin
            Status('Found Ent');
            MarkTime(SafeEntWait)
              repeat
              FTWait(5)
                FindNormalRandoms;
              if not (LoggedIn) then
                NextPlayer(False);
            until TimeFromMark(SafeEntWait) > 20000 + Random(5000);
          end;
        end;
      end;
    end;

    //---------------------------------IsAxeBroken?--------------------------------\\

    Procedure IsAxeBroke;
    begin
    if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
      begin
      if FindDTM(BrokenAxe, x, y, 547, 206, 734, 464) then
        begin
          ChooseOption('rop');
          BrokenAxes := BrokenAxes +1;
        end;

        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          Flag;
          Writeln('Banking for new axe..');
          OpenBankQuiet('db');
          if (FindDTM(NormalAxe, x, y, 151, 210, 595, 281)) then
          begin
            ChooseOption('1')
            CloseBank;
          end;
        end;
      end;
    end;
    //---------------------------------WillowTreeDDTM-----------------------------\\

    function DDTMWillowTree: integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..9] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 332;
      dtmMainPoint.y := 79;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 1399886;
      dtmMainPoint.Tolerance := 50;

      dtmSubPoints[0].x := 332;
      dtmSubPoints[0].y := 79;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 1399886;
      dtmSubPoints[0].Tolerance := 50;

      dtmSubPoints[1].x := 402;
      dtmSubPoints[1].y := 38;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 1843232;
      dtmSubPoints[1].Tolerance := 50;

      dtmSubPoints[2].x := 230;
      dtmSubPoints[2].y := 29;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 2311230;
      dtmSubPoints[2].Tolerance := 50;

      dtmSubPoints[3].x := 22;
      dtmSubPoints[3].y := 86;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 998708;
      dtmSubPoints[3].Tolerance := 50;

      dtmSubPoints[4].x := 466;
      dtmSubPoints[4].y := 15;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 3558744;
      dtmSubPoints[4].Tolerance := 50;

      dtmSubPoints[5].x := 366;
      dtmSubPoints[5].y := 116;
      dtmSubPoints[5].AreaSize := 0;
      dtmSubPoints[5].AreaShape := 0;
      dtmSubPoints[5].Color := 995370;
      dtmSubPoints[5].Tolerance := 50;

      dtmSubPoints[6].x := 195;
      dtmSubPoints[6].y := 46;
      dtmSubPoints[6].AreaSize := 0;
      dtmSubPoints[6].AreaShape := 0;
      dtmSubPoints[6].Color := 1716011;
      dtmSubPoints[6].Tolerance := 50;

      dtmSubPoints[7].x := 33;
      dtmSubPoints[7].y := 29;
      dtmSubPoints[7].AreaSize := 0;
      dtmSubPoints[7].AreaShape := 0;
      dtmSubPoints[7].Color := 1066812;
      dtmSubPoints[7].Tolerance := 50;

      dtmSubPoints[8].x := 501;
      dtmSubPoints[8].y := 20;
      dtmSubPoints[8].AreaSize := 0;
      dtmSubPoints[8].AreaShape := 0;
      dtmSubPoints[8].Color := 1258541;
      dtmSubPoints[8].Tolerance := 50;

      dtmSubPoints[9].x := 322;
      dtmSubPoints[9].y := 125;
      dtmSubPoints[9].AreaSize := 0;
      dtmSubPoints[9].AreaShape := 0;
      dtmSubPoints[9].Color := 331790;
      dtmSubPoints[9].Tolerance := 50;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;

    //------------------------------------RockDDTM--------------------------------\\

    function RockDDTM: integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..9] of TDTMPointDef;
      TempTDTM: TDTM;
    begin
      dtmMainPoint.x := 74;
      dtmMainPoint.y := 39;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 5198163;
      dtmMainPoint.Tolerance := 0;

      dtmSubPoints[0].x := 74;
      dtmSubPoints[0].y := 39;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 5198163;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 155;
      dtmSubPoints[1].y := 10;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 2061931;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 132;
      dtmSubPoints[2].y := 37;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 1795933;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 136;
      dtmSubPoints[3].y := 66;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 1928798;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 64;
      dtmSubPoints[4].y := 73;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 1795921;
      dtmSubPoints[4].Tolerance := 0;

      dtmSubPoints[5].x := 16;
      dtmSubPoints[5].y := 68;
      dtmSubPoints[5].AreaSize := 0;
      dtmSubPoints[5].AreaShape := 0;
      dtmSubPoints[5].Color := 2261357;
      dtmSubPoints[5].Tolerance := 0;

      dtmSubPoints[6].x := 9;
      dtmSubPoints[6].y := 37;
      dtmSubPoints[6].AreaSize := 0;
      dtmSubPoints[6].AreaShape := 0;
      dtmSubPoints[6].Color := 2328435;
      dtmSubPoints[6].Tolerance := 0;

      dtmSubPoints[7].x := 20;
      dtmSubPoints[7].y := 10;
      dtmSubPoints[7].AreaSize := 0;
      dtmSubPoints[7].AreaShape := 0;
      dtmSubPoints[7].Color := 2261357;
      dtmSubPoints[7].Tolerance := 0;

      dtmSubPoints[8].x := 66;
      dtmSubPoints[8].y := 6;
      dtmSubPoints[8].AreaSize := 0;
      dtmSubPoints[8].AreaShape := 0;
      dtmSubPoints[8].Color := 2128231;
      dtmSubPoints[8].Tolerance := 0;

      dtmSubPoints[9].x := 106;
      dtmSubPoints[9].y := 10;
      dtmSubPoints[9].AreaSize := 0;
      dtmSubPoints[9].AreaShape := 0;
      dtmSubPoints[9].Color := 1862491;
      dtmSubPoints[9].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;


    //---------------------------------ChopTree-----------------------------------\\

    procedure ChopTree;
    var CuttingTime: integer;
        Tries: integer;
       
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      IsAxeBroke;
      repeat
        if (FindDTM(DDTMWillowTree, x, y, 137, 158, 630, 315)) then
        begin
          EntFinder;
          FindEnt(x, y, True);
          Mouse(x,y,0,0,false);
          if(IsUpText('Chop'))then
            Wait(5000 + (random(150)));
            ChooseOption('hop')
            AntiBan;
            if (FindDTM(BrokenAxe, x, y, 547, 206, 734, 464)) then
            begin
              IsAxeBroke;
            end;
          end else

        if (not(FindDTM(DDTMWillowTree, x, y, 137, 158, 630, 315))) then
              Wait(100+random(100));
              Tries := Tries + 1;
              if(Tries = 50)then
                Writeln ('Willow Tree not found. Switching Players..');
                Logout;
                NextPlayer(True);
      until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
    end;


    //----------------------Walking from Willows to Bank--------------------------\\

    procedure WalkToBank;
    begin
    if (not(LoggedIn)) then
      Exit;
      SymbolAccuracy:= 0.2;
      Makecompass('N');

      if (not(FindSymbol(x, y, 'bank'))) then
      begin
        if (FindDTM(MMTree, x, y, 743, 241, 752, 251)) then
        begin
          Mouse(x, y, 2, 2, true);
          MakeCompass('N');
          SetAngle(True);
          if (FindDTM(Banker, x, y, 521, 418, 600, 462)) then
          begin
            Mouse(x, y, 2, 2, true);
            Flag;
            Writeln('Got to bank');
          end;
        end;
      end else

        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          Flag;
          Writeln('Got to bank');
        end;
    end;
    //--------------------------------->Willow DDTM!<-----------------------------\\

    function LoadWillows: integer;
    var
      WillowMP: TDTMPointDef;
      WillowSP: array of TDTMPointDef;
      WillowDDTM: TDTM;
    begin
      SetArrayLength(WillowSP, 2);

      WillowMP.x := 743;
      WillowMP.y := 434;
      WillowMP.color := 1852749;
      WillowMP.tolerance := 9;

      WillowSP[0].x := 733;
      WillowSP[0].y := 430;
      WillowSP[0].color := 4352627;
      WillowSP[0].Tolerance := 5;

      WillowSP[1].x := 751;
      WillowSP[1].y := 441;
      WillowSP[1].color := 1720648;
      WillowSP[1].Tolerance := 5;

      WillowDDTM.MainPoint :=  WillowMP;
      WillowDDTM.SubPoints :=  WillowSP;
      result := AddDTM(WillowDDTM);
    end;

    //-----------------------------Banking the Willows----------------------------\\

    function Banking: Boolean;
    begin
      if (InvFull) then
      begin
        MakeCompass('N')
        Wait (300 + random(160));
        OpenBankQuiet('db');
        if (PinScreen) then
        InPin(YourPin);

        if(not(FindDTM(LoadWillows, x, y, 547, 206, 734, 464)))then
        begin
          if(FindColorSpiral(x, y, 1985878, 547, 206, 734, 464)) then
          begin
            Mouse(x, y, 4, 3, false);
            ChooseOption('All');
            Result := True;
            if Result = True then
            begin
              LoadsNum := LoadsNum + 1;
              LoadsNum2 := LoadsNum2 + 1;
              ReportVars[1] := ReportVars[1] + 1;
              SendSRLReport;
            end;
          end;
      end else

      if(FindDTM(LoadWillows, x, y, 547, 206, 734, 464))then
      begin
        Mouse(x, y, 4, 3, false);
        ChooseOption('All');
        Result := True;
        if Result = True then
          begin
            LoadsNum := LoadsNum + 1;
            LoadsNum2 := LoadsNum2 + 1;
            ReportVars[1] := ReportVars[1] + 1;
            SendSRLReport;
          end;
      end;
        CloseBank;
        Wait(150 + random (278));
        MakeCompass('S');
      end;
    end;


    //-----------------------Walking from Bank to Willows-------------------------\\

    procedure WalkToWillow;
    var WaterColor : integer;

    begin
      IsAxeBroke;
      MakeCompass('S');
     
      if (not(FindDTM(RockDDTM, x, y, 351, 163, 446, 198))) then
      begin
        MakeCompass('W');
        WaterColor := FindWaterColor;
        RadialWalk(WaterColor, 225, 351, 64, 2, 2);
        Flag;
        Writeln('At Willows Now');
      end else

      if (FindDTM(RockDDTM, x, y, 351, 163, 446, 198)) then
      begin
        Mouse(x, y, 2, 3, true)
        Writeln('Made it to Willow Searching spot');
        SetAngle(False);
      end;
    end;



    //--------------------------->>>Main Loop<<<----------------------------------\\

    procedure SetupScript;
    begin
      SmartSetupEx(SMARTWorld, false, true);
      SetTargetDC(SmartGetDC);
      while not SmartReady do Wait(2000);
      SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;
      SetupSRL;
      ScriptID:= '687';
      Signature;
      DeclarePlayers;
      LoginPlayer;
      LoadDTMs;
    end;

    begin
      SetupScript;
      Wait(10000+random(1200));
      repeat
       WalkToWillow;
        repeat
          ChopTree;
        until (InvFull) or (not LoggedIn)
        AntiBan;
        WalkToBank;
        Banking;
        if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')
        end;
       TofProggy;
       SRLRandomsReport;
      until (false)
    end.

    Any help appreciated greatly. I removed my CheckAxe procedure as this was logging my script out instantly(even with an axe equipped).
    Jus' Lurkin'

  2. #2
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For checkaxe: Are you sure your DTMS are working properly? try remaking them.

  3. #3
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Meh, I didnt reall care about checkaxe that much.

    More the DDTM situation.
    Jus' Lurkin'

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    - Add more tol/decrease the tol.
    - use DTMRotated instead of FindDTM

    Thats all.


  5. #5
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Ok Ill have a look =]
    Jus' Lurkin'

  6. #6
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    In your DDTM's you have 0 tolerance, so goodluck finding anything with 0 tolerance

  7. #7
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    I editied it now
    Jus' Lurkin'

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Errors.....
    By MrDeeds in forum OSR Help
    Replies: 3
    Last Post: 06-04-2007, 07:44 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
  •