Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33

Thread: Willow Multiple Chop - Made ONLY for SRL Juniors

  1. #26
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    its outdated, need to remove and add some stuff...

  2. #27
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    So, I gravedug... Oops...

    Here are some suggestions, I'm bored and I've seen you around helping others. Just thought I would see if I could do the same.

    Btw, instead of doing Integer := Integer + 1; do Inc(Integer). Its delphi, and there by faster. Also, Use IncEx(var Integer, Integer) to increase by more than one. Also, cleans up your code.

    SCAR Code:
    function AvoidTrees : Boolean;
    var
      tx, ty, Tries : Integer;
    begin
      if (IsUpText('Tree')) then
      begin
        if (FindSymbol(tx, ty, 'Fish')) then
        begin
          Mouse(tx, ty, 2, 2, True);
          FFlag(0);
          Wait(900 + Random(235));
          Result := True;
        end;
        if (not (FindSymbol(tx, ty, 'Fish'))) then
        begin
          Result := False;
          Tries := Tries + 1;
          if (Tries = 10) then LogOut;
        end;
        Tries := Tries - Tries;
      end;
    end;

    This can be Shortened by doing:

    SCAR Code:
    function AvoidTrees : Boolean;
    var
      tx, ty, Tries : Integer;
    begin
      if (IsUpText('Tree')) then
        if FindSymbol(tx, ty, 'Fish') then
        begin
          Mouse(tx, ty, 2, 2, True);
          FFlag(0);
          Wait(900 + Random(235));
          Result := True;
        end {else
        begin
          //Result := False;    //Uneeded because scar automatically sets them to false.
          Tries := Tries + 1; //You have no loop, whats the point of this?
          if (Tries = 10) then LogOut;
        end;
        //Tries := Tries - Tries; // Wtf?}

    end;

    Read the comments, then you can delete the commented section.

    SCAR Code:
    function FindBrokenAxe(bx, by : Integer) : Boolean;
    begin
      if (not (LoggedIn)) then Exit;
      BrokenAxe := BitmapFromString(8, 9, 'beNpjYGRgwI5cY9OByDkqB' +
                   'RkBRRwjEiEM9/gsiBogKhDntQ2KhovDpYDmGDl7W/qEAnUBBX3Ti2' +
                   'DmM8Atsg+NA0r5Z5bCxCGAEaLLMyk3IKccTcraPwJoV4kEH9BeBhT' +
                   'ACHRGsigPAwBqASe1');
      Result := FindBitmapToleranceIn(BrokenAxe, bx, by, MIX1, MIY1, MIX2, MIY2, 20);
      if (Players[CurrentPlayer].Booleans[0] = True) then GameTab(5);
      if (Players[CurrentPlayer].Booleans[0] = False) then GameTab(4);
      if (Result) then
      begin
        Writeln('Found Broken Axe!');
      end;
      GameTab(4);
      FreeBitMap(BrokenAxe);
      AmountOfBrokenAxe := AmountOfBrokenAxe + 1;
    end;

    SCAR Code:
    function FindBrokenAxe : Boolean; // why do you want the x, y? Also, if you want them.
                                                            // you must have them as variables. Otherwise, they
                                                            // are just useless. I looked in your script, it's useless.
    var                                                     // Removed a global var cuz of fixing this :)
      x, y, GT : Integer;

    begin
      if (not (LoggedIn)) then Exit;
      GT := GetCurrentTab;                                  // this will fix errors becuase your script changes tabs.
      BrokenAxe := BitmapFromString(8, 9, 'beNpjYGRgwI5cY9OByDkqB' +
                   'RkBRRwjEiEM9/gsiBogKhDntQ2KhovDpYDmGDl7W/qEAnUBBX3Ti2' +
                   'DmM8Atsg+NA0r5Z5bCxCGAEaLLMyk3IKccTcraPwJoV4kEH9BeBhT' +
                   'ACHRGsigPAwBqASe1');
      if Players[CurrentPlayer].Booleans[0] then
        GameTab(5)
      else
        GameTab(4);
      if FindBitmapToleranceIn(BrokenAxe, x, y, MIX1, MIY1, MIX2, MIY2, 20) then
      begin
        Writeln('Found Broken Axe!');
        Result := true;
      end;
      GameTab(GT);
      FreeBitMap(BrokenAxe);
      Inc(AmountOfBrokenAxe);
    end;

    SCAR Code:
    function ReplaceAxe : Boolean;
    var
      x, y, nx, ny, nbx, nby, WillowDTM, AxeDTM, BrokenAxe : Integer;
    begin
      if FindBrokenAxe then
      begin
        Wait(310 + Random(115));
        OpenBankQuiet('db');
        Wait(210 + Random(220));
        FFlag(0);
        if BankScreen then
        begin
          WillowDTM := DTMFromString('78DA63FCC4C4C0D0C9C8800A1819FE8349068' +
                       '6FF40C0C8C08C550D8204D2AC40355308A86104AA994940CD37A0' +
                       '7BE61050F31AA8A68F0835B3F0AB010040990CF0');
          AxeDTM    := DTMFromString('78DA639CCFC4C0708701056489F3313C04D28' +
                       'C40FC1F0818A701D55C6740038C4824905E0854738F809AD94035' +
                       'F709A8E905AAF948404D1F50CD73FC6A0034810E5E');
          BrokenAxe := BitmapFromString(8, 9, 'beNpjYGRgwI5cY9OByDkqB' +
                       'RkBRRwjEiEM9/gsiBogKhDntQ2KhovDpYDmGDl7W/qEAnUBBX3Ti2' +
                       'DmM8Atsg+NA0r5Z5bCxCGAEaLLMyk3IKccTcraPwJoV4kEH9BeBhT' +
                       'ACHRGsigPAwBqASe1');
          if (PinScreen) then InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
          Wait(545 + Random(920));
          FixBank;
          if (FindDTM(WillowDTM, x, y, MIX1,MIY1,MIX2,MIY2)) then
          begin
            Deposit(1, 28, True);
            Wait(1000 + Random(840));
            FreeDTM(WillowDTM);
            CloseBank;
          end;
          FindBitmapToleranceIn(BrokenAxe, nbx, nby, MIX1, MIY1, MIX2, MIY2, 10);
          Wait(310 + Random(115));
          MMouse(nbx, nby, 2, 2);
          if (IsUpText('roken')) then
          begin
            Wait(350 + Random(210));
            Mouse(nbx, nby, 0, 0, True);
            Writeln('Banked Broken Axe!');
            FreeBitMap(BrokenAxe);
          end;
          if (FindDTM(AxeDTM, nx, ny, MSX1, MSY1, MSX2, MSY2)) then
          begin
            MMouse(nx, ny, 2, 2);
            if (IsUpText('xe')) then
            begin
              Wait(315 + Random(220));
              Mouse(nx, ny, 0, 0, True);
              Writeln('Withdrawed a New Axe');
            end;
          end;
        end;
        CloseBank;
        Wait(1215 + Random(550));
        if (Players[CurrentPlayer].Booleans[0] = True) then
        begin
          Writeln('Weilding the New Axe...');
          MMouse(nx, ny, 2, 2);
          if (IsUpText('xe')) then
          begin
            Wait(330 + Random(115));
            Mouse(nx, ny, 0, 0, True);
            Writeln('Succesfully Weilded the New Axe.');
          end;
        end;
        Result := True;
        FreeDTM(AxeDTM);
        ReplacedAxe := ReplacedAxe + 1;
      end;
    end;

    SCAR Code:
    function ReplaceAxe : Boolean;

    var
      x, y, WillowDTM, AxeDTM, BrokenAxe : Integer;

    begin
      try
      if FindBrokenAxe then
      begin
        Wait(310 + Random(115));
        if OpenBankQuiet('db') then  // this results true if it finds the pinscreen or bank screen.
        begin
          if (PinScreen) then InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
          WillowDTM := DTMFromString('78DA63FCC4C4C0D0C9C8800A1819FE8349068' +
                       '6FF40C0C8C08C550D8204D2AC40355308A86104AA994940CD37A0' +
                       '7BE61050F31AA8A68F0835B3F0AB010040990CF0');
          AxeDTM    := DTMFromString('78DA639CCFC4C0708701056489F3313C04D28' +
                       'C40FC1F0818A701D55C6740038C4824905E0854738F809AD94035' +
                       'F709A8E905AAF948404D1F50CD73FC6A0034810E5E');
          BrokenAxe := BitmapFromString(8, 9, 'beNpjYGRgwI5cY9OByDkqB' +
                       'RkBRRwjEiEM9/gsiBogKhDntQ2KhovDpYDmGDl7W/qEAnUBBX3Ti2' +
                       'DmM8Atsg+NA0r5Z5bCxCGAEaLLMyk3IKccTcraPwJoV4kEH9BeBhT' +
                       'ACHRGsigPAwBqASe1');
          Wait(300 + Random(200));   // wait was too big.
          FixBank;
          if (FindDTM(WillowDTM, x, y, MIX1,MIY1,MIX2,MIY2)) then
          begin
            x := CoordsToItem(x, y);
            MouseItem(x, false);
            Wait(100 + random(50));
            ChooseOption('ll');
            //Deposit(1, 28, True); // if you do this, then you are going to bank the broken axe! :(
            //Wait(500 + Random(300));  // too long. P.S. Why?
            //CloseBank;    // DONT CLOSE THE BANK TILL THE END OF A PROCEDURE.
          end;
          if FindBitmapToleranceIn(BrokenAxe, x, y, MIX1, MIY1, MIX2, MIY2, 10) then  //what if it dosnt find it?
          begin
            //Wait(310 + Random(115));
            MMouse(x, y, 2, 2);
            Wait(75 + Random(50));    // must wait at LEAST ~75 ms.
            if (IsUpText('roken')) then
            begin
              GetMousePos(x, y);      // this will remove the gittery mouse.
              //Wait(350 + Random(210));  // would a human wait THAT long after finding the object? Not so much.
              Mouse(x, y, 0, 0, True);
              Writeln('Banked Broken Axe!');
            end;
          end;
          if (FindDTM(AxeDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
          begin
            MMouse(nx, ny, 2, 2);
            Wait(75 + Random(50));    //blah you know why by now.
            if (IsUpText('xe')) then
            begin
              //Wait(315 + Random(220));
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              Writeln('Withdrawed a New Axe');
            end;
          end;
        end;
        CloseBank;
        //Wait(1215 + Random(550));  // ...?
        if Players[CurrentPlayer].Booleans[0] then
          if FindDTM(AxeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
          begin
            Writeln('Weilding the New Axe...');
            MMouse(x, y, 2, 2);
            Wait(75 + random(50); // you MUST wait before checking uptext as rs client is slow.
            if (IsUpText('xe')) then
            begin
              //Wait(330 + Random(115));  // uneeded
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              Writeln('Succesfully Weilded the New Axe.');
            end;
          end;
        Result := True;
        ReplacedAxe := ReplacedAxe + 1;
        finally      // just in case of a runtime error some how :)
          FreeBitmap(BrokenAxe); //capital M was bugging me :P
          FreeDTM(AxeDTM);
          FreeDTM(WillowDTM);
        end;
      end;
    end;

    ^ wow that was a big one.

    SCAR Code:
    function ReturnToBank : Boolean;
    var
      x, y : Integer;
    begin
      Result := FindBrokenAxe;
      if (Result) then
      begin
        FindSymbol(x, y, 'Bank');
        Wait(210 + Random(115));
        Mouse(x, y, 2, 2, True);
        Wait(115 + Random(45));
        FFlag(0);
        ReplaceAxe;
        Wait(400 + Random(180));
      end;
    end;

    SCAR Code:
    procedure WalkToWillows;
    var
      x, y, SearchSymbol, SearchMMColor :Integer;
      Arrived : Boolean;
    begin
      if (InvFull) or (not (LoggedIn)) then Exit;
      repeat
        if (FindSymbol(x, y, 'Fish')) then
        begin
          Mouse(x, y, 2, 2, True);
          FFlag(0);
          Arrived := True;
          Writeln('Found the Fish Icon to the Willow Tree Site.');
          Wait(910 + Random(445));
        end;
        if (not (FindSymbol(x, y, 'Fish'))) then
        begin
          Wait(45 + Random(155));
          SearchSymbol := SearchSymbol + 1;
          if (SearchSymbol = 20) then
          begin
            Writeln('Failed to find the Willow Tree Site, using a Fail Safe!');
            Arrived := False;
            if (FindColorTolerance(x, y, MMGrassColor, MSX1, MSY1, MSX2, MSY2, 10)) then
            begin
              MakeCompass('N');
              RadialRoadWalk(MMGrassColor, 180, 250, 55, 1, 1);
              Wait(750 + Random(495));
              FFlag(0);
              Arrived := True;
              Writeln('Found Willow Tree Site, currently running there.');
              Wait(1000 + Random(2000));
            end;
            if (not (FindColorTolerance(x, y, MMGrassColor, MSX1, MSY1, MSX2, MSY2, 10))) then
            begin
              Wait(555 + Random(400));
              SearchMMColor := SearchMMColor + 1;
              if (SearchMMColor = 5) then
              begin
                Writeln('Failed to find the Willow Tree Site. Logging Out.');
                Arrived := False;
                LogOut;
              end;
            end;
          end;
        end;
      until (Arrived = True);
      SearchMMColor := SearchMMColor - SearchMMColor;
      SearchSymbol := SearchSymbol - SearchSymbol;
    end;

    SCAR Code:
    procedure WalkToWillows;
    var
      x, y, SearchSymbol, SearchMMColor :Integer;
      Arrived, B : Boolean;
    begin
      if (InvFull) or (not (LoggedIn)) then Exit;
      Arrived := False;
      repeat
        if (FindSymbol(x, y, 'Fish')) then
        begin
          Mouse(x, y, 4, 4, True);    //increase randomness
          FFlag(Random(2)); //at least make it change :)
          Arrived := True;
          Writeln('Found the Fish Icon to the Willow Tree Site.');
          //Wait(910 + Random(445)); //why?
        end else                // USE ELSE, makes it so you don't repeat the search.
        //if (not (FindSymbol(x, y, 'Fish'))) then
        begin
          Wait(45 + Random(155));
          Inc(SearchSymbol);
          if (SearchSymbol = 20) then
          begin
            Writeln('Failed to find the Willow Tree Site, using a Fail Safe!');
            //Arrived := False; Set False at the beginning then you don't need to do it otherwise.
            if (FindColorTolerance(x, y, MMGrassColor, MSX1, MSY1, MSX2, MSY2, 10)) then
            begin
              MakeCompass('N');
              RadialRoadWalk(MMGrassColor, 180, 250, 55, 1, 1);
              //Wait(750 + Random(495));    unneeded with fflag
              FFlag(0);
              Arrived := True;
              Writeln('Found Willow Tree Site, currently running there.');
              //Wait(1000 + Random(2000));  ??
            end else // USE THESEEEEE
            begin
              //Wait(555 + Random(400));
              Inc(SearchMMColor);
              if (SearchMMColor = 5) then
              begin
                Writeln('Failed to find the Willow Tree Site. Logging Out.');
                Arrived := False;
                LogOut;
                Exit; //You forgot to break out of your procedure.
              end;
            end;
          end;
        end;
      until (Arrived = True);
      //SearchMMColor := SearchMMColor - SearchMMColor; // Why?   Faster todo SearchMMColor := 0;
      //SearchSymbol := SearchSymbol - SearchSymbol;    // ..?
    end;

    SCAR Code:
    procedure ChopWillows;
    var
      Tries, x, y : Integer;
    begin
      if (InvFull) or (not (LoggedIn)) then Exit;
      repeat
        if (FindBrokenAxe) then
        begin
          ReturnToBank;
          Exit;
        end;
        if (FindObjTPA(x, y, WillowTree, 10, -1, 15, 15, 3, ['Willow','illow', 'hop'])) then
        begin
          if AvoidTrees then
          begin
            Writeln('That was no Willow Tree, that was just a Regular Tree!');
          end;
          Wait(335 + Random(115));
          Writeln('Found Willow Tree');
          MMouse(x, y, 1, 1);
          Wait(450 + Random(235));
          if IsUpText('illow') and (not (TextEntFinder)) then
          begin
            Wait(900 + Random(445));
            if EntFinder then
            begin
              EntSpotted := EntSpotted + 1;
              Exit;
            end;
            Mouse(x, y, 1, 1, True);
            FFlag(0);
            Wait(750 + Random(225));
            if EntFinder then
            begin
              Exit;
            end;
            MMouse(x, y, 2, 2);
            if (not (IsUpText('illow'))) then
            begin
              Wait(100 + Random(200));
              FindColorSpiralTolerance(x, y, WillowTree, MSX1, MSY1, MSX2, MSY2, 10)
              Mouse(x, y, 1, 1, True);
              if (IsUpText('illow')) then
                case (Random(5)) of
                  1: MMouse(x-2, y-2, 1, 1);
                  2: MMouse(x+1, y+3, 1, 1);
                  4: MMouse(x-1, y+2, 1, 1);
                end;
            end;
            repeat
              AntiRandoms;
              Wait(900 + Random(450));
              AntiBan;
              Wait(505 + Random(225));
              MMouse(x, y, 2, 2);
            until (InvFull) or (not (IsUpText('illow')));
          end;
        end else
        begin
          Wait(550 + Random(450));
          Tries := Tries + 1;
          if (Tries = 5) then
          begin
            Writeln('Failed to find the Willow Tree, Logging Out.');
            Exit;
            LogOut;
          end;
          Tries := Tries - Tries;
        end;
      until (InvFull);
    end;

    SCAR Code:
    procedure ChopWillows;
    var
      Tries, x, y : Integer;
    begin
      if (InvFull) or (not (LoggedIn)) then Exit;
      repeat
        if (FindBrokenAxe) then
        begin
          ReturnToBank;
          Exit;
        end;
        if (FindObjTPA(x, y, WillowTree, 10, -1, 15, 15, 3, ['Willow','illow', 'hop'])) then
        begin
          if AvoidTrees then
          //begin                  // dont need begins and ends for one line of code after an if statement.
            Writeln('That was no Willow Tree, that was just a Regular Tree!');
          //end;
          //Wait(335 + Random(115));   ... Random
          Writeln('Found Willow Tree');
          MMouse(x, y, 5, 5); //increased randomness
          Wait(75 + Random(50));      //smaller.
          if IsUpText('illow') and (not (TextEntFinder)) then           // You need to rewrite this.
          begin                                                         // it shoudl wait for the ent to go away, not just exit out.
            //Wait(900 + Random(445));  //would never wait that long    // in your main loop it makes it just bank, doesn't actually avoid
            if EntFinder then                                           // it.
            begin
              Inc(EntSpotted);
              //Exit;
              {while EntFound do
               begin                      // something LIKE that.
                 Wait(100 + random(50));
                 AntiRandoms;
               end;}

            end;
            Mouse(x, y, 5, 5, True);  //increased randomness
            FFlag(0);
            Wait(750 + Random(225));
            if EntFinder then
            begin
              Exit;
            end;
            //MMouse(x, y, 2, 2);  would just gitter the mouse.
            if (not (IsUpText('illow'))) then  // your tree down procedure? maybe use colors... :)
            begin
              Wait(100 + Random(200));
              FindColorSpiralTolerance(x, y, WillowTree, MSX1, MSY1, MSX2, MSY2, 10)
              Mouse(x, y, 1, 1, True);
              if (IsUpText('illow')) then
                case (Random(5)) of                   // so confused.
                  1: MMouse(x-2, y-2, 1, 1);
                  2: MMouse(x+1, y+3, 1, 1);
                  4: MMouse(x-1, y+2, 1, 1);
                end;
            end;
            repeat
              AntiRandoms;
              Wait(100 + Random(450));
              AntiBan;
              Wait(100 + Random(225));
              //MMouse(x, y, 2, 2); gitter mouse.
            until (InvFull) or (not (IsUpText('illow')));
          end;
        end else       // WOOT BRAVO!
        begin
          Wait(550 + Random(450));
          Inc(Tries); //
          if (Tries = 5) then
          begin
            Writeln('Failed to find the Willow Tree, Logging Out.');
            LogOut; //switched these two lines around. :) IF the procedure exits, then it won't log out eh?
            Exit;   // BTW, you should just calibrate the players, and make them walk back the willows rather then log out.
          end;
          //Tries := Tries - Tries;   if its a local variable, it doesnt free up memory doing that... :)
        end;
      until (InvFull);
    end;

    Just remove this procedure, and replace it with a regular dtm. There is NOTHING dynamic about the dtm here:

    SCAR Code:
    function BankDDTM: Integer;           // nothing dynamic about this. Change it to a regular dtm.

    var
      BankMainPoint: TDTMPointDef;
      BankSubPoints: Array [0..4] of TDTMPointDef;
      BankTDTM: TDTM;

    begin

      BankMainPoint.x := 632;
      BankMainPoint.y := 70;
      BankMainPoint.AreaSize := 0;
      BankMainPoint.AreaShape := 0;
      BankMainPoint.Color := 5087402;
      BankMainPoint.Tolerance := 40;

      BankSubPoints[0].x := 632;
      BankSubPoints[0].y := 70;
      BankSubPoints[0].AreaSize := 1;
      BankSubPoints[0].AreaShape := 0;
      BankSubPoints[0].Color := 5087402;
      BankSubPoints[0].Tolerance := 40;

      BankSubPoints[1].x := 632;
      BankSubPoints[1].y := 77;
      BankSubPoints[1].AreaSize := 1;
      BankSubPoints[1].AreaShape := 0;
      BankSubPoints[1].Color := 5087402;
      BankSubPoints[1].Tolerance := 40;

      BankSubPoints[2].x := 638;
      BankSubPoints[2].y := 77;
      BankSubPoints[2].AreaSize := 1;
      BankSubPoints[2].AreaShape := 0;
      BankSubPoints[2].Color := 1462373;
      BankSubPoints[2].Tolerance := 40;

      BankSubPoints[3].x := 638;
      BankSubPoints[3].y := 71;
      BankSubPoints[3].AreaSize := 1;
      BankSubPoints[3].AreaShape := 0;
      BankSubPoints[3].Color := 1462373;
      BankSubPoints[3].Tolerance := 40;

      BankSubPoints[4].x := 635;
      BankSubPoints[4].y := 76;
      BankSubPoints[4].AreaSize := 1;
      BankSubPoints[4].AreaShape := 0;
      BankSubPoints[4].Color := 1758693;
      BankSubPoints[4].Tolerance := 40;

      BankTDTM.MainPoint := BankMainPoint;
      BankTDTM.SubPoints := BankSubPoints;
      Result := AddDTM(BankTDTM);
    end;

    SCAR Code:
    procedure WalkToBank;
    var
      x, y, SearchBankSymbol, BankDTM1 : Integer;
      BankNotFound : Boolean;
    begin
      if not (LoggedIn) then Exit;
      if (InvFull) then
      begin
        repeat
          if (FindSymbol(x, y, 'Bank')) then
          begin
            MakeCompass('N');
            Mouse(x, y, 2, 2, True);
            FFlag(0);
            Wait(585 + Random(315));
            BankNotFound := False;
            Writeln('Able to find Bank Icon! Walking to Bank.');
            Wait(855 + Random(520));
          end;
          if (not (FindSymbol(x, y, 'Bank'))) or (not(FlagPresent)) then
          begin
            SearchBankSymbol := SearchBankSymbol + 1;
            if (SearchBankSymbol = 10) then
            begin
              Writeln('Could not find the Bank Icon, using other methods.');
              BankNotFound := True;
              BankDTM1 := BankDDTM;
              if DTMRotated(BankDTM1, X, Y, MMX1, MMY1, MMX2, MMY2) then
              begin
                WriteLn('Found BankDTM1');
                Mouse(x, y, 2, 2, true);
                Wait(450 + Random(115));
                FFlag(0);
                FreeDTM(BankDTM1);
                BankNotFound := False;
              end;
              if (not (DTMRotated(BankDTM1, X, Y, MMX1, MMY1, MMX2, MMY2))) then
              begin
                Writeln('Failed to find the Bank Icon!');
                LogOut;
              end;
            end;
          end;
        until (BankNotFound = False);
      end;
      SearchBankSymbol := SearchBankSymbol - SearchBankSymbol;
    end;

    SCAR Code:
    procedure WalkToBank;
    var
      x, y, SearchBankSymbol, BankDTM1 : Integer;
      BankFound : Boolean;
    begin
      if not (LoggedIn) then Exit;
      BankFound := false;
      //if (InvFull) then    // it SHOULD just go regardless.. :)
      //begin
        repeat
          if (FindSymbol(x, y, 'Bank')) then
          begin
            //MakeCompass('N');   will screw up symbol walking.
            Mouse(x, y, 2, 2, True);
            FFlag(0);
            Wait(585 + Random(315));
            BankFound := True; // made your logic easier. :D
            Writeln('Able to find Bank Icon! Walking to Bank.');
            Wait(855 + Random(520));
          end else
          //if (not (FindSymbol(x, y, 'Bank'))) {or (not(FlagPresent)) ?? }  then
          begin
            Inc(SearchBankSymbol);
            if (SearchBankSymbol = 10) then
            begin
              Writeln('Could not find the Bank Icon, using other methods.');
              //BankFound := false;    set at the beginning
              BankDTM1 := BankDDTM; //fix this remember
              if DTMRotated(BankDTM1, X, Y, MMX1, MMY1, MMX2, MMY2) then
              begin
                WriteLn('Found BankDTM1');
                Mouse(x, y, 3, 3, true);
                //Wait(450 + Random(115));  flagging.
                FFlag(0);
                // Moved this down so that it is ALWAYS freed
                //BankFound := False;
              end else
              //if (not (DTMRotated(BankDTM1, X, Y, MMX1, MMY1, MMX2, MMY2))) then
              begin
                Writeln('Failed to find the Bank Icon!');
                LogOut;
                Exit;
              end;
            end;
          end;
        until (BankFound);   // failsafe this more.
      //end;
      FreeDTM(BankDTM1);
      //SearchBankSymbol := SearchBankSymbol - SearchBankSymbol;
    end;

    SCAR Code:
    procedure BankItems;
    var
      WillowDTM, x, y : Integer;
      BankedItems : Boolean;
    begin
      if not (LoggedIn) or (not (InvFull)) then Exit;
      if (InvFull) then
      begin
        WillowDTM := DTMFromString('78DA63FCC4C4C0D0C9C8800A1819FE8349068' +
                     '6FF40C0C8C08C550D8204D2AC40355308A86104AA994940CD37A0' +
                     '7BE61050F31AA8A68F0835B3F0AB010040990CF0');
        Wait(452 + Random(532));
        if (OpenBankQuiet('db')) then
        begin
          FFlag(0);
          Wait(435 + Random(325));
          if (PinScreen) then
          InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
          Wait(545 + Random(920));
          FixBank;
          if (FindDTM(WillowDTM, x, y, MIX1,MIY1,MIX2,MIY2)) then
          begin
            Deposit(1, 28, True);
            Wait(1000 + Random(1840));
            FreeDTM(WillowDTM);
            LoadsToDo := LoadsToDo + 1;
            LoadsCompleted := LoadsCompleted + 1;
            BankedItems := True;
            CloseBank;
          end;
          if (not (BankScreen)) then
          begin
            Writeln('Logging Out, can not find the Bank Screen');
            LogOut;
          end;
        end;
      end;
    end;

    SCAR Code:
    procedure BankItems;
    var
      WillowDTM, x, y : Integer;
      //BankedItems : Boolean;
    begin
      if not (LoggedIn) or (not (InvFull)) then Exit;
      if (OpenBankQuiet('db'))then
      begin
        WillowDTM := DTMFromString('78DA63FCC4C4C0D0C9C8800A1819FE8349068' +
                     '6FF40C0C8C08C550D8204D2AC40355308A86104AA994940CD37A0' +
                     '7BE61050F31AA8A68F0835B3F0AB010040990CF0');
        //Wait(452 + Random(532));
        {if  then
        begin}

          //FFlag(0);  openbankquiet results true when the bank is open.
          //Wait(435 + Random(325));
          if (PinScreen) then
            InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
          Wait(200 + Random(100));
          FixBank;
          if (FindDTM(WillowDTM, x, y, MIX1,MIY1,MIX2,MIY2)) then
          begin
            MouseItem(CoordsToItem(x, y), false);
            Wait(100 + random(50));
            ChooseOption('ll');
            //Deposit(1, 28, True); what i wrote is safer. what if the axe is in the invy?
            //Wait(1000 + Random(1840));  why bother?
            // moved.
            Inc(LoadsToDo);
            Inc(LoadsCompleted);
            //BankedItems := True;   useless variable
            CloseBank;
          end;
          {if (not (BankScreen)) then                    You close the bank the line before.. It will LogOut each time. :(
          begin
            Writeln('Logging Out, can not find the Bank Screen');
            LogOut;
          end; }

        end;
      end;
      FreeDTM(WillowDTM);
    end;

    SCAR Code:
    procedure CheckLoads;
    begin
      if (Players[CurrentPlayer].Integers[0] = LoadsToDo) then
      begin
        Writeln('Character has finished '+IntToStr(Players[CurrentPlayer].Integers[0])+'. Now switching players');
        LogOut;
        NextPlayer(False);
        LoadsToDo := LoadsToDo - LoadsToDo;
      end;
      Writeln('Character has to finish '+ IntToStr(Players[CurrentPlayer].Integers[0] - LoadsToDo) + ' more loads.');
    end;

    Removed that procedure, placed it elsewhere.

    And this one:

    SCAR Code:
    procedure CreditsAndSetUp;
    begin
      SetupSRL;
      Signature;
    end;

    SCAR Code:
    begin
      SetupSRL;
      Signature;
      ActivateClient;
      repeat
        FindWoodcuttingLevel;
        WalkToWillows;
        ChopWillows;
        WalkToBank;
        BankItems;
        ProgressReport;
        if (Players[CurrentPlayer].Integers[0] = LoadsToDo) then
        begin
          Writeln('Character has finished '+IntToStr(Players[CurrentPlayer].Integers[0])+' Loads. Now switching players'); //fixed english
          LogOut;
          NextPlayer(False);
          Setup;
          //LoadsToDo := LoadsToDo - LoadsToDo;  useless...
        end;
        Writeln('Character has to finish '+ IntToStr(LoadsToDo - Players[CurrentPlayer].Integers[0]) + ' more loads.'); // fixed math..
      until (HowManyPlayers = CurrentPlayer)
    end.

    Thats teh final procedure fixed.

    Wow, you need to work on this script a LOT. I don't think this even works actually.

    I will post my version of the script which compiles.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #28
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Some1 has been really bored , but to the script maker , it is really positive , i know from my own experience ,
    I was about to do the same thing , but i was in a hurry . -.-
    GJ,
    ~Eerik~

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

    Default

    Erm what you mean?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  5. #30
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by djcheater View Post
    Erm what you mean?
    Edited , sorry , my head is gray , too much working on a script .
    ~Eerik~

  6. #31
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    0.o Nava2, you do realize that this script was my very first script XD I'm a big kid now, i just coded a guild miner.

    Otherwise, thanks Nava2! Bet you put lots of effort to it... But not realizing that i already knew these stuff XD

  7. #32
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Deathscytex View Post
    0.o Nava2, you do realize that this script was my very first script XD I'm a big kid now, i just coded a guild miner.

    Otherwise, thanks Nava2! Bet you put lots of effort to it... But not realizing that i already knew these stuff XD
    Waste of an hour. I realized it after I finished. Tbh, I was unsure how you got members with that... :S

    That script is non-functioning haha.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #33
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    No, i posted my Maple Cut Burn and Bank. I got a score of 12 yes 1 no. XD

    I was happy that day, good times!

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. GrettleNet SMART CHOP CHOP!!!
    By Fosscape in forum First Scripts
    Replies: 3
    Last Post: 01-19-2009, 03:59 PM
  2. Ocean's 1 Scripts [Willow Chop 'N' Bank] V0.1A
    By Claymore in forum First Scripts
    Replies: 28
    Last Post: 10-18-2008, 08:42 PM
  3. Willow chop & bank
    By Rsnerdx in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 07-11-2008, 06:30 PM
  4. [REQ] Varrock Willow Chop and Bank
    By BabeMagnet in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 12-17-2007, 05:48 PM
  5. lumbridge willow chop + general sell
    By Pj_wood in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 02-02-2007, 04: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
  •