Results 1 to 5 of 5

Thread: Help With Yew Cutter

  1. #1
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help With Yew Cutter

    Well, I've been working on a new script for cutting yews and I've been getting this error:

    Line 46: [Error] (17100:5): Semicolon (';') expected in script C:\Program Files\SCAR 3.20\Scripts\yewcutterproto.scar

    I know this usually means there needs to be a semicolon in the previous lines, but I can't see any lines that require one. If anyone else could point it out thanks, and also any other general help is appreciated

    Also, line 46 is:
    Code:
    end else
    Code:
    program YewCutter;
    {.include SRL\SRL\misc\SMART.scar}
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\WoodCutting.scar}
    
    const
      YewColor1 = 2184522;
      YewColor2 = 3039575;
      
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
        case Random(150) of
          1:RandomRClick;
          2:HoverSkill('WoodCutting', False);
          3:BoredHuman;
        end;
    end;
    
    procedure DoAntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      if FindFight then
      RunAway('W', True, 1, 5000 + Random(2500));
    end;
        
    
      
    function FindYew: boolean;
    var
      x, y: Integer;
      begin
        if not LoggedIn then
      Exit;
        begin
          if FindColor(x, y, YewColor1, 0, 0, 700, 700) then
            Mouse(x, y, 4, 4, True);
            repeat
              if IsUpText('hop') then
              Wait(100);
              AntiBan;
              DoAntiRandoms;
            until(IsUpText('alk'));
          end;
        end else
          begin
            if FindColor(x, y, YewColor2, 0, 0, 700, 700) then
              Mouse(x, y, 4, 4, True);
              repeat
                if IsUpText('hop') then
                Wait(100);
                AntiBan;
                DoAntiRandoms;
              until(IsUpText('alk'));
          end;
      end;
    end;
    
    begin
    end.

  2. #2
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here you go:
    SCAR Code:
    function FindYew: boolean;
    var
      x, y: Integer;
    begin
      if not LoggedIn then
        Exit;
      if FindColor(x, y, YewColor1, 0, 0, 700, 700) then
      begin
        Mouse(x, y, 4, 4, True);
        repeat
          if IsUpText('hop') then
          Wait(100);
          AntiBan;
          DoAntiRandoms;
        until(IsUpText('alk'));
      end else
      begin
        if FindColor(x, y, YewColor2, 0, 0, 700, 700) then
        Mouse(x, y, 4, 4, True);
        repeat
          if IsUpText('hop') then
          Wait(100);
          AntiBan;
          DoAntiRandoms;
        until(IsUpText('alk'));
      end;
    end;

    I just fixes your FindYew since that's where the error was. You had a lot of unneeded begin-ends that I removed

  3. #3
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks lol those begins and ends were screwing with my mind

    EDIT: Now I got a new Error
    Line 97: [Error] (17151:1): Identifier expected in script
    Line 97 is: procedure AntiBan;
    Here is new code btw...

    Code:
    program YewCutter;
    {.include SRL\SRL\misc\SMART.scar}
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\WoodCutting.scar}
    
    const
      YewColor1 = 2184522;
      YewColor2 = 3039575;
      LoadsPerPlayer = 5;
      SmartWorld = 85;
      
    var
     x, y, Loads, AntiBans, Responds: Integer;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name := ''; //Name of Player
      Players[0].Pass := ''; //Password of Player
      Players[0].Nick := ''; //3-4 letters from Player's name
      Players[0].Active := True;
      Players[0].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
    
      Players[1].Name := ''; //Name of Player
      Players[1].Pass := ''; //Password of Player
      Players[1].Nick := ''; //3-4 letters from Player's name
      Players[1].Active := True;
      Players[1].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
      
      Players[2].Name := ''; //Name of Player
      Players[2].Pass := ''; //Password of Player
      Players[2].Nick := ''; //3-4 letters from Player's name
      Players[2].Active := True;
      Players[2].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
      
      Players[3].Name := ''; //Name of Player
      Players[3].Pass := ''; //Password of Player
      Players[3].Nick := ''; //3-4 letters from Player's name
      Players[3].Active := True;
      Players[3].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
      
    end;
    
    procedure AutoResp;
     var
       Question, Comment, Greeting: TStringArray;
       i: Integer;
    
    begin
      Comment := ['nice', 'sick', 'sweet', 'awesome', 'wow'];
      begin
        for i := 0 to High(Comment) do
          begin
            Inc(Responds);
            case Random(5) of
              0: TypeSend('ty');
              1: TypeSend('Thanks!');
              2: TypeSend('tyvm');
              3: TypeSend('thanks dude');
              4: TypeSend(':D');
            end;
          end;
      Question := ['wc', 'wc lvl', 'dcut', 'lvls'];
      begin
        for i := 0 to High(Question) do
          begin
            i := GetSkillInfo('WoodCutting', False);
            Inc(Responds);
            case Random(5) of
              0: TypeSend(IntToStr(i));
              1: TypeSend(IntToStr(i) + ' for me');
              2: TypeSend(IntToStr(i) + ' here');
              3: TypeSend(IntToStr(i) + ' :/');
              4: TypeSend(IntToStr(i) + ' lol');
            end;
          end;
        Greeting := ['hi', 'ello', 'hey', 'sup', 'hello', 'wassup', 'hola', 'bonjour']
        begin
          for i := 0 to High(Greeting) do
            begin
            Inc(Responds);
            case Random(5) of
              0: TypeSend('hi');
              1: TypeSend('hola amigo');
              2: TypeSend('hey');
              3: TypeSend('welcome to our clan of wcers');
              4: TypeSend('hi there');
            end;
          end;
        end;
    
    
    
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
        case Random(150) of
          1:begin
          RandomRClick;
          Inc(AntiBans);
          end;
          2:begin
          HoverSkill('WoodCutting', False);
          Inc(AntiBans);
          end;
          3:begin
          BoredHuman;
          Inc(AntiBans);
          end;
        end;
    end;
    
    procedure DoAntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      if FindFight then
      RunAway('W', True, 1, 5000 + Random(2500));
    end;
        
    
      
    function FindYew: boolean;
    var
      x, y: Integer;
    begin
      if not LoggedIn then
        Exit;
      if FindColorTolerance(x, y, YewColor1, 0, 0, 700, 700, 10) then
      begin
        Mouse(x, y, 4, 4, True);
        repeat
          if IsUpText('hop') then
          Wait(100);
          AntiBan;
          DoAntiRandoms;
          AutoResp;
          MMouse(x, y, 5, 5);
          Status('Chopping.');
        until(IsUpText('alk'));
      end else
      begin
        if FindColorTolerance(x, y, YewColor2, 0, 0, 700, 700, 10) then
        Mouse(x, y, 4, 4, True);
        repeat
          if IsUpText('hop') then
          Wait(100);
          AntiBan;
          DoAntiRandoms;
          AutoResp;
          MMouse(x, y, 5, 5);
          Status('Chopping.');
        until(IsUpText('alk'));
      end;
    end;
    
    function NewTree: Boolean;
    var
      x, y: Integer;
    begin
      if not LoggedIn then
        Exit;
      begin
      if not FindColorTolerance(x, y, YewColor1, 0, 0, 700, 700, 10) then
      SymbolAccuracy := 0.5;
      if FindSymbol(x, y, 'Tree') then
        Mouse(x+61, y-2, 4, 4, True);
          if FindColorTolerance(x, y, YewColor1, 0, 0, 700, 700, 10) then
            begin
              FindYew;
                repeat
                  if IsUpText('hop') then
                    Wait(100);
                  until(IsUpText('alk'));
            end else
              SymbolAccuracy := 0.5;
              if FindSymbol(x, y, 'Tree') then
              Mouse(x, y, 4, 4, True);
    
      end;
    end;
    
    procedure Proggy;
    begin
      ClearDebug;
      WriteLn('************************************');
      WriteLn('            Yew Cutter            ');
      WriteLn('   by banditmeow aka CowFish      ');
      WriteLn('                                  ');
      WriteLn('Worked for ' + TimeRunning + '!');
      WriteLn('Did ' + IntToStr(Loads) + ' loads! ');
      WriteLn('Performed ' + IntToStr(AntiBans) + ' antibans!');
      WriteLn('Gained ' + IntToStr(Loads * 175) + ' experience!');
      WriteLn('Responded ' + IntToStr(Responds) + ' times!');
      WriteLn('************************************');
    end;
    
    function StartUp: Boolean;
    begin
      Disguise('Buy Live Cowfish @ Cowfish-Are-Cool.com - Mozilla Firefox');
      ClearDebug;
      WriteLn('_____.___.               _________         __    __                ');
      WriteLn('\__  |   | ______  _  __ \_   ___ \ __ ___/  |__/  |_  ___________ ');
      WriteLn(' /   |   |/ __ \ \/ \/ / /    \  \/|  |  \   __\   __\/ __ \_  __ \');
      WriteLn(' \____   \  ___/\     /  \     \___|  |  /|  |  |  | \  ___/|  | \/');
      WriteLn(' / ______|\___  >\/\_/    \______  /____/ |__|  |__|  \___  >__|   ');
      WriteLn(' \/           \/                 \/                       \/       ');
      Wait(10000);
    end;
    
    procedure SetUpSmart;
    begin
      SmartSetupEx(SmartWorld, False, True, False);
      Wait(100);
      SetTargetDC(SmartGetDC);
    end;
    
    
    begin
      StartUp;
      Proggy;
    end.

  4. #4
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Your AutoResp is missing 3(!) ends.

  5. #5
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Posting Permissions

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