Results 1 to 10 of 10

Thread: Need Some Help!

  1. #1
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Need Some Help!

    SCAR Code:
    program Fighter;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\Fighting.scar}
    {.include SRL\SRL\misc\trade.scar}

    const
      Montol           = 9;  // tolerance
      settrips         = 5; // number of trips will do
      killnum          = 20; // number of monsters to kill per trip
      totalkill        = 100; // total monsters to kill
      waittime         = 5000; // Time to wait in between monsters (in ms)1000ms/sec.
      waitlogtime      = 720000; // Time to wait before it logs back in (in ms)
      TheMinCount      = 4;  // Leave this!
      Monster1         = 'Attack Chicken'; // Monster to fight put Attack in front
      Monster2         = 'Attack Chicken'; // Monster to fight put Attack in front
      Pickup           = True; // Pickup Items? (true or false)
      Pickup1          = 'Take Feather'; // item to pick up put take in front
      Pickup2          = 'Take Feather'; // item to pick up put take in front
      BoneColor        = 12764106; // DO NOT EDIT!
      Boneinvcolor     = 12895692; // DO NOT EDIT! (((((line with error))))
      Bones            = True; // pick up and bury bones? (true or false)
      Eat              = False; // Want it to eat??
      Hitpoints        = 8; // Below what hitpoint do you want it to eat?
      Food             = 1; // How many types of food are you using? up to 3 types
      Food1            = ''; // What type of food are you using?
      Food2            = ''; // What type of food are you using? If only using 1 type leave blank
      Food3            = ''; // What type of food are you using? If only using 1 or 2 types leave blank
      reset            = 0; // DO NOT EDIT!

    //==============DO NOT EDIT BELOW THIS POINT!!!===============//

    const
      Chicken1Color =8365499;
      Chicken2Color =2774388;
      Cow1Color     =9089479; //wrong for now change later
      Cow2Color     =9089479; //wrong for now change later
      FeatherColor  =12764106;
      ShrimpColor   =0; //wrong for now il change later
      TroutColor    =0; //wrong for now il change later


    var
      Mon1Color,Mon2Color,Food1Color,Food2Color,Food3Color,Pick1,Pick2,trips,Items,Buried,kills:Integer;



    //===========DO NOT TOUCH!!!===============//
    Procedure setup;

    Begin

      Case LowerCase(Monster1) Of
        'attack chicken' :  Mon1Color:=Chicken1Color;
        'attack cow'     :  Mon1Color:=Cow1Color;
    End;
      Case LowerCase(Monster2) Of
        'attack chicken' :  Mon2Color:=Chicken2Color;
        'attack cow'     :  Mon2Color:=Cow2Color;
    End;
      Case LowerCase(Pickup1) Of
        'take feather' :  Pick1:=FeatherColor;
    End;
      Case LowerCase(Pickup2) Of
        'take feather' :  Pick2:=FeatherColor;
    End;
      Case Lowercase(Food1) Of
        'Shrimp'  :  Food1Color:=ShrimpColor
        'Trout'   :  Food1Color:=TroutColor
    End;
      Case Lowercase(Food2) Of
        'Shrimp'  :  Food2Color:=ShrimpColor
        'Trout'   :  Food2Color:=TroutColor
    End;
      Case Lowercase(Food3) Of
        'Shrimp'  :  Food3Color:=ShrimpColor
        'Trout'   :  Food3Color:=TroutColor
    End;
    end;

    //==========================================================//

    Procedure DeclarePlayers;

      Begin
         NumberOfPlayers( 1 );
         CurrentPlayer :=( 0 );

         Players[0].Name :='user';
         Players[0].Pass :='pass';
      End;

    // Antirandoms //

    Function FindFastRandoms: Boolean;    // By WT-Fakawi.

    Var
      i: Integer;

    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;

           2:  If FindMod Then
                 Result := True;

           3:  If FindMime Then
                 Result := True;

           4:  If FindMaze Then
                 Result := True;

           5:  If FindQuiz Then
                 Result := True;

           6:  If FindDemon Then
                 Result := True;

           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;

           8: If RC Then
                 Result := True;

           9: If FindTalk Then
                 Result := True;

           10: If HandleTrade Then
                 Result := True;

           11: If FindFight Then
                  Begin
                    Result := True;
                  End;
        End;
        Wait(1);
      End;
    End;

    // Sets chats //

    Procedure DoChats;

    Begin
      SetChat('On', 1);
      SetChat('On', 1);
      SetChat('Friends', 2);
      SetChat('Friends', 2);
      SetChat('On', 3);
      SetChat('On', 3);
    End;

    //////////////
    procedure OutFightO;
    var
      i: integer;
    begin
      Flag;
      for i:= 1 to 5 do
     begin
        if(InFightAt(x,y))then
       begin
         repeat
           wait(50);
         until(not(InFightAt(x,y)));
        exit;
       end else
      wait(300);
     end;
    end;

    // Fighting //
    procedure Fight;

    Var
       Dx,Dy: Integer;

    Begin
    If (FindObj(Dx, Dy, Monster1, Mon1Color, MonTol)) or
       (FindObj(Dx, Dy, Monster2, Mon2Color, MonTol)) Then
       begin
         kills:= kills + 1; //You forgot "="
         Mouse(Dx,Dy,4,4,true)
       end else
       begin
         writeln('Could not find it')
       end;
     Flag;
     OutFightO;
     FindFastRandoms;
    end;

    // Pickup Items //
    procedure Pickupitem;     //I EDITED THIS PROCEDURE JUST LIKE THE ONE ABOVE.
    Var
       Dx,Dy: Integer;

    Begin
    If Pickup then
      begin
        If(FindObj(Dx, Dy, Pickup1, Pick1, MonTol))or
          (FindObj(Dx, Dy, Pickup2, Pick2, MonTol))Then
          begin
            Items:= Items + 1;
            Mouse(Dx,Dy,4,4,true);
            wait(waittime+random(2750))
          end else
          begin
            Writeln('Not found');
          end;
        Flag;
        FindFastRandoms;
      end;
    end;


    // Pickup and Bury Bones //
    procedure BuryBones;

    Var
       Dx,Dy: Integer;
    Begin

      If Bones then
      begin
        If (FindObj(Dx, Dy, 'ake Bones', Bonecolor, MonTol)) Then
        begin
          Mouse(Dx,Dy,4,4,true);
          wait(3000+random(250));
          Mouse(627,227,4,4,true);
          Writeln('Bones Found and buried')
          Buried:= Buried + 1;
        end else
        begin
          Writeln('Bones Not Found')
        end;

        {If (FindObj(785, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(829, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(702, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(744, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;}


      end else exit;
    end;

    // Eating //  NOT DONE YET I NEED SOMETHING THAT WILL DETECT HITPOINT COUNT
    procedure eatup;

    Begin
    end;

    // running //
    procedure setrunning;
    begin
    mouse(684,484,4,4,true);
    wait(250+random(100));
    mouse(650,428,4,4,true)
    wait(100+random(50));
    end;

    // Progress Report //
    procedure proggy;

    Begin
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
      Writeln('')
      Writeln('Thank you for using TFighter Created by Timothegreat.')
      Writeln('Version: 1.1')
      Writeln('')
      Writeln('Items picked up:'+IntToStr(items)+'(Will be more for feathers)')  //You must put in IntToStr
      Writeln('Bones picked up and buried:'+IntToStr(buried));
      Writeln('Monsters killed:'+IntToStr(Totalkill));
      Writeln('')
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
    end;

    // Main Loop //

    begin
    Setupsrl;
    setup;
    DeclarePlayers;

    Repeat
      repeat
      If Not LoggedIn Then
        Begin
          loginplayer;
          DoChats;
          HighestAngle;
          setrunning;
        end;
        If Not FindFight Then
          Begin
            Fight;
            Eatup;
            Pickupitem;
            BuryBones;
          end else     //Above is a begin so you need END else
          begin
            Writeln('Already in fight.')
          end;
       // If Foodnum < 1 then Begin Logout; Proggy; break; end;  //I DONT KNOW WHAT FOODNUM IS...
          until(kills = killnum);
    typesend('bye everyone');
    kills:= reset;
    trips:= trips + 1;
    wait(18500+random(750));
    Logout;
    wait(waitlogtime)
    until(trips = settrips)
    Proggy;
    end.

    Failed when compiling
    Line 20: [Error] (15881:1): Duplicate identifier '' in script C:\Program Files\SCAR 3.06\Scripts\TFighter1.1bury.scar
    Just need a little help on fixing that error thanks.
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    didnt u just post this?
    http://www.villavu.com/forum/showthread.php?t=11268

    not sure...but could it be cuz u commented where u used BoneInvColor out?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    yes i did but this is a different version of my script
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Change the bonecolor line to

    SCAR Code:
    TimBoneColor        = 12764106; // DO NOT EDIT!

    change line 170 to
    SCAR Code:
    if(InFight)then

    Change 174 to
    SCAR Code:
    until(not(InFight));

  5. #5
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default error

    SCAR Code:
    program Fighter;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\Fighting.scar}
    {.include SRL\SRL\misc\trade.scar}

    const
      Montol           = 9;  // tolerance
      settrips         = 5; // number of trips will do
      killnum          = 20; // number of monsters to kill per trip
      totalkill        = 100; // total monsters to kill
      waittime         = 5000; // Time to wait in between monsters (in ms)1000ms/sec.
      waitlogtime      = 720000; // Time to wait before it logs back in (in ms)
      TheMinCount      = 4;  // Leave this!
      Monster1         = 'Attack Chicken'; // Monster to fight put Attack in front
      Monster2         = 'Attack Chicken'; // Monster to fight put Attack in front
      Pickup           = True; // Pickup Items? (true or false)
      Pickup1          = 'Take Feather'; // item to pick up put take in front
      Pickup2          = 'Take Feather'; // item to pick up put take in front
      Bones            = True; // pick up and bury bones? (true or false)
      Eat              = False; // Want it to eat??
      eathp            = 8; // Below what hitpoint do you want it to eat?
      Food             = 1; // How many types of food are you using? up to 2 types
      Food1            = 'Trout'; // What type of food are you using?
      Food2            = 'Trout'; // What type of food are you using? If only using 1 type leave blank

    //==============DO NOT EDIT BELOW THIS POINT!!!===============//

    const
      reset         = 0; // DO NOT EDIT!
      TimBoneColor  = 12764106; // DO NOT EDIT!
      Chicken1Color =8365499;
      Chicken2Color =2774388;
      Cow1Color     =9089479; //wrong for now change later
      Cow2Color     =9089479; //wrong for now change later
      FeatherColor  =12764106;
      ShrimpColor   =0; //wrong for now il change later
      TroutColor    =0; //wrong for now il change later


    var
      Mon1Color,Mon2Color,Food1Color,Food2Color,Food3Color,Pick1,Pick2,trips,Items,Buried,kills:Integer;



    //===========DO NOT TOUCH!!!===============//
    Procedure setup;

    Begin

      Case LowerCase(Monster1) Of
        'attack chicken' :  Mon1Color:=Chicken1Color;
        'attack cow'     :  Mon1Color:=Cow1Color;
    End;
      Case LowerCase(Monster2) Of
        'attack chicken' :  Mon2Color:=Chicken2Color;
        'attack cow'     :  Mon2Color:=Cow2Color;
    End;
      Case LowerCase(Pickup1) Of
        'take feather' :  Pick1:=FeatherColor;
    End;
      Case LowerCase(Pickup2) Of
        'take feather' :  Pick2:=FeatherColor;
    End;
      Case Lowercase(Food1) Of
        'Shrimp'  :  Food1Color:=ShrimpColor
        'Trout'   :  Food1Color:=TroutColor
    End;
      Case Lowercase(Food2) Of
        'Shrimp'  :  Food2Color:=ShrimpColor
        'Trout'   :  Food2Color:=TroutColor
    End;
    end;

    //==========================================================//

    Procedure DeclarePlayers;

      Begin
         NumberOfPlayers( 1 );
         CurrentPlayer :=( 0 );

         Players[0].Name :='4v4 halo 2';
         Players[0].Pass :='vervaet';
      End;

    // Antirandoms //

    Function FindFastRandoms: Boolean;    // By WT-Fakawi.

    Var
      i: Integer;

    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;

           2:  If FindMod Then
                 Result := True;

           3:  If FindMime Then
                 Result := True;

           4:  If FindMaze Then
                 Result := True;

           5:  If FindQuiz Then
                 Result := True;

           6:  If FindDemon Then
                 Result := True;

           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;

           8: If RC Then
                 Result := True;

           9: If FindTalk Then
                 Result := True;

           10: If HandleTrade Then
                 Result := True;

           11: If FindFight Then
                  Begin
                    Result := True;
                  End;
        End;
        Wait(1);
      End;
    End;

    // Sets chats //

    Procedure DoChats;

    Begin
      SetChat('On', 1);
      SetChat('On', 1);
      SetChat('Friends', 2);
      SetChat('Friends', 2);
      SetChat('On', 3);
      SetChat('On', 3);
    End;

    //////////////
    procedure OutFightO;
    var
      i: integer;
    begin
      Flag;
      for i:= 1 to 5 do
     begin
        if(InFight)then
       begin
         repeat
           wait(50);
         until(not(InFight));
        exit;
       end else
      wait(300);
     end;
    end;

    // Fighting //
    procedure Fight;

    Var
       Dx,Dy: Integer;

    Begin
    If (FindObj(Dx, Dy, Monster1, Mon1Color, MonTol)) or
       (FindObj(Dx, Dy, Monster2, Mon2Color, MonTol)) Then
       begin
         kills:= kills + 1; //You forgot "="
         Mouse(Dx,Dy,4,4,true)
       end else
       begin
         writeln('Could not find it')
       end;
     Flag;
     OutFightO; //You forgot the second ")"
     FindFastRandoms;
    end;

    // Pickup Items //
    procedure Pickupitem;     //I EDITED THIS PROCEDURE JUST LIKE THE ONE ABOVE.
    Var
       Dx,Dy: Integer;

    Begin
    If Pickup then
      begin
        If(FindObj(Dx, Dy, Pickup1, Pick1, MonTol))or
          (FindObj(Dx, Dy, Pickup2, Pick2, MonTol))Then
          begin
            Items:= Items + 1;
            Mouse(Dx,Dy,4,4,true);
            wait(waittime+random(2750))
          end else
          begin
            Writeln('Not found');
          end;
        Flag;
        FindFastRandoms;
      end;
    end;


    // Pickup and Bury Bones //
    procedure BuryBones;

    Var
       Dx,Dy: Integer;
    Begin

      If Bones then
      begin
        If (FindObj(Dx, Dy, 'ake Bones', TimBonecolor, MonTol)) Then
        begin
          Mouse(Dx,Dy,4,4,true);
          wait(3000+random(250));
          Mouse(627,227,4,4,true);
          Writeln('Bones Found and buried')
          Buried:= Buried + 1;
        end else
        begin
          Writeln('Bones Not Found')
        end;

        {If (FindObj(785, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(829, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(702, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(744, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;}


      end else exit;
    end;

    // Eating //  NOT DONE YET
    procedure eatup;
    begin
      if eat then
      begin
      if (GetHp <= EatHp) and (Food1Color >= 0) then
      begin
        GameTab(4);
        Wait(10 + Random(20));
        if (FindColorSpiralTolerance(x, y, food1color, 560, 210, 730, 460, 2))or
          (FindColorSpiralTolerance(x, y, food2color, 560, 210, 730, 460, 2))then
        begin
          MMouse(x + 2, y - 2, 6, 5)
            if (IsUpText('Eat')) then
          begin
            GetMousePos(x, y);
            Mouse(x, y, 3, 2, True);
          end;
        end;
      end;

    // running //
    procedure setrunning;
    begin // ((((((((LINE WITH ERROR!!!!!!!!!!!!!!!!!!!!!!)))
    mouse(684,484,4,4,true);
    wait(250+random(100));
    mouse(650,428,4,4,true);
    wait(100+random(50));
    end;

    // Progress Report //
    procedure proggy;

    Begin
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
      Writeln('')
      Writeln('Thank you for using TFighter Created by Timothegreat.')
      Writeln('Version: 1.1')
      Writeln('')
      Writeln('Items picked up:'+IntToStr(items)+'(Will be more for feathers)')  //You must put in IntToStr
      Writeln('Bones picked up and buried:'+IntToStr(buried));
      Writeln('Monsters killed:'+IntToStr(Totalkill));
      Writeln('')
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
    end;

    // Main Loop //

    begin
    Setupsrl;
    setup;
    DeclarePlayers;

    Repeat
      repeat
      If Not LoggedIn Then
        Begin
          loginplayer;
          DoChats;
          HighestAngle;
          setrunning;
        end;
        If Not FindFight Then
          Begin
            Fight;
            Eatup;
            Pickupitem;
            BuryBones;
          end else     //Above is a begin so you need END else
          begin
            Writeln('Already in fight.')
          end;
       // If Foodnum < 1 then Begin Logout; Proggy; break; end;  //I DONT KNOW WHAT FOODNUM IS...
          until(kills = killnum);
    typesend('bye everyone');
    kills:= reset;
    trips:= trips + 1;
    wait(18500+random(750));
    Logout;
    wait(waitlogtime)
    until(trips = settrips)
    Proggy;
    end.

    Failed when compiling
    Line 292: [Error] (16153:1): Identifier expected in script C:\Program Files\SCAR 3.06\Scripts\TFighter1.1bury.scar
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    it doesnt solve the problem nessiarily...but u can just use SetRune(true); in a different procedure
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I suggest you count you're 'begin's and 'end's in the previous procedure (eatup) just to make sure they are all matched up

    Just a side note, the line scar gives you as the error line isn't necessarily the line you should be looking at, as you will see once you follow my suggestion.

  8. #8
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    New error!

    SCAR Code:
    program Fighter;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\Fighting.scar}
    {.include SRL\SRL\misc\trade.scar}

    const
      Montol           = 9;  // tolerance
      settrips         = 5; // number of trips will do
      killnum          = 20; // number of monsters to kill per trip
      totalkill        = 100; // total monsters to kill
      waittime         = 5000; // Time to wait in between monsters (in ms)1000ms/sec.
      waitlogtime      = 720000; // Time to wait before it logs back in (in ms)
      TheMinCount      = 4;  // Leave this!
      Monster1         = 'Attack Chicken'; // Monster to fight put Attack in front
      Monster2         = 'Attack Chicken'; // Monster to fight put Attack in front
      Pickup           = True; // Pickup Items? (true or false)
      Pickup1          = 'Take Feather'; // item to pick up put take in front
      Pickup2          = 'Take Feather'; // item to pick up put take in front
      Bones            = True; // pick up and bury bones? (true or false)
      Eat              = False; // Want it to eat??
      eathp            = 8; // Below what hitpoint do you want it to eat?
      Food             = 1; // How many types of food are you using? up to 2 types
      Food1            = 'Trout'; // What type of food are you using?
      Food2            = 'Trout'; // What type of food are you using? If only using 1 type leave blank

    //==============DO NOT EDIT BELOW THIS POINT!!!===============//

    const
      reset         =0; // DO NOT EDIT!
      TimBoneColor  =12764106; // DO NOT EDIT!
      Chicken1Color =8365499;
      Chicken2Color =2774388;
      Cow1Color     =9089479; //wrong for now change later
      Cow2Color     =9089479; //wrong for now change later
      FeatherColor  =12764106;
      ShrimpColor   =0; //wrong for now il change later
      TroutColor    =0; //wrong for now il change later


    var
      Mon1Color,Mon2Color,Food1Color,Food2Color,Food3Color,Pick1,Pick2,trips,Items,Buried,kills:Integer;



    //===========DO NOT TOUCH!!!===============//
    Procedure setup;

    Begin

      Case LowerCase(Monster1) Of
        'attack chicken' :  Mon1Color:=Chicken1Color;
        'attack cow'     :  Mon1Color:=Cow1Color;
    End;
      Case LowerCase(Monster2) Of
        'attack chicken' :  Mon2Color:=Chicken2Color;
        'attack cow'     :  Mon2Color:=Cow2Color;
    End;
      Case LowerCase(Pickup1) Of
        'take feather' :  Pick1:=FeatherColor;
    End;
      Case LowerCase(Pickup2) Of
        'take feather' :  Pick2:=FeatherColor;
    End;
      Case Lowercase(Food1) Of
        'Shrimp'  :  Food1Color:=ShrimpColor
        'Trout'   :  Food1Color:=TroutColor
    End;
      Case Lowercase(Food2) Of
        'Shrimp'  :  Food2Color:=ShrimpColor
        'Trout'   :  Food2Color:=TroutColor
    End;
    end;

    //==========================================================//

    Procedure DeclarePlayers;

      Begin
         NumberOfPlayers( 1 );
         CurrentPlayer :=( 0 );

         Players[0].Name :='user';
         Players[0].Pass :='pass';
      End;

    // Antirandoms //

    Function FindFastRandoms: Boolean;    // By WT-Fakawi.

    Var
      i: Integer;

    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;

           2:  If FindMod Then
                 Result := True;

           3:  If FindMime Then
                 Result := True;

           4:  If FindMaze Then
                 Result := True;

           5:  If FindQuiz Then
                 Result := True;

           6:  If FindDemon Then
                 Result := True;

           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;

           8: If RC Then
                 Result := True;

           9: If FindTalk Then
                 Result := True;

           10: If HandleTrade Then
                 Result := True;

           11: If FindFight Then
                  Begin
                    Result := True;
                  End;
        End;
        Wait(1);
      End;
    End;

    // Sets chats //

    Procedure DoChats;

    Begin
      SetChat('On', 1);
      SetChat('On', 1);
      SetChat('Friends', 2);
      SetChat('Friends', 2);
      SetChat('On', 3);
      SetChat('On', 3);
    End;

    //////////////
    procedure OutFightO;
    var
      i: integer;
    begin
      Flag;
      for i:= 1 to 5 do
     begin
        if(InFight)then
       begin
         repeat
           wait(50);
         until(not(InFight));
        exit;
       end else
      wait(300);
     end;
    end;

    // Fighting //
    procedure Fight;

    Var
       Dx,Dy: Integer;

    Begin
    If (FindObj(Dx, Dy, Monster1, Mon1Color, MonTol)) or
       (FindObj(Dx, Dy, Monster2, Mon2Color, MonTol)) Then
       begin
         kills:= kills + 1; //You forgot "="
         Mouse(Dx,Dy,4,4,true)
       end else
       begin
         writeln('Could not find it')
       end;
     Flag;
     OutFightO; //You forgot the second ")"
     FindFastRandoms;
    end;

    // Pickup Items //
    procedure Pickupitem;     //I EDITED THIS PROCEDURE JUST LIKE THE ONE ABOVE.
    Var
       Dx,Dy: Integer;

    Begin
    If Pickup then
      begin
        If(FindObj(Dx, Dy, Pickup1, Pick1, MonTol))or
          (FindObj(Dx, Dy, Pickup2, Pick2, MonTol))Then
          begin
            Items:= Items + 1;
            Mouse(Dx,Dy,4,4,true);
            wait(waittime+random(2750))
          end else
          begin
            Writeln('Not found');
          end;
        Flag;
        FindFastRandoms;
      end;
    end;


    // Pickup and Bury Bones //
    procedure BuryBones;

    Var
       Dx,Dy: Integer;
    Begin

      If Bones then
      begin
        If (FindObj(Dx, Dy, 'ake Bones', TimBonecolor, MonTol)) Then
        begin
          Mouse(Dx,Dy,4,4,true);
          wait(3000+random(250));
          Mouse(627,227,4,4,true);
          Writeln('Bones Found and buried')
          Buried:= Buried + 1;
        end else
        begin
          Writeln('Bones Not Found')
        end;

        {If (FindObj(785, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(829, 437, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(702, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;
        If (FindObj(744, 475, 'ury', Boneinvcolor, MonTol)) Then
        Begin
          Mouse(Dx,Dy,4,4,true);
          wait(500+random(250);
          Buried:= Buried + 1;
        end;}


      end else exit;
    end;

    // Eating //  NOT DONE YET
    procedure eatup;
    begin
    if eat then
      begin
      if (GetHp <= EatHp) and (Food1Color >= 0) then
      begin
        GameTab(4);
        Wait(10 + Random(20));
        if (FindColorSpiralTolerance(x, y, food1color, 560, 210, 730, 460, 2))or
           (FindColorSpiralTolerance(x, y, food2color, 560, 210, 730, 460, 2))then
        begin
          MMouse(x + 2, y - 2, 6, 5)
            if (IsUpText('Eat')) then
          begin
            GetMousePos(x, y);
            Mouse(x, y, 3, 2, True);
          end;
        end;
      end;
    end;

    // Progress Report //
    procedure proggy;

    Begin // LINE WITH THE ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
      Writeln('')
      Writeln('Thank you for using TFighter Created by Timothegreat.')
      Writeln('Version: 1.1')
      Writeln('')
      Writeln('Items picked up:'+IntToStr(items)+'(Will be more for feathers)')  //You must put in IntToStr
      Writeln('Bones picked up and buried:'+IntToStr(buried));
      Writeln('Monsters killed:'+IntToStr(Totalkill));
      Writeln('')
      Writeln('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=')
    end;

    // Main Loop //

    begin
    Setupsrl;
    setup;
    DeclarePlayers;

    Repeat
      repeat
      If Not LoggedIn Then
        Begin
          loginplayer;
          DoChats;
          HighestAngle;
          setrun(true);
        end;
        If Not FindFight Then
          Begin
            Fight;
            Eatup;
            Pickupitem;
            BuryBones;
          end else     //Above is a begin so you need END else
          begin
            Writeln('Already in fight.')
          end;
       // If Foodnum < 1 then Begin Logout; Proggy; break; end;  //I DONT KNOW WHAT FOODNUM IS...
          until(kills = killnum);
    typesend('bye everyone');
    kills:= reset;
    trips:= trips + 1;
    wait(18500+random(750));
    Logout;
    wait(waitlogtime)
    until(trips = settrips)
    Proggy;
    end.

    Failed when compiling
    Line 293: [Error] (16154:1): Identifier expected in script C:\Program Files\SCAR 3.06\Scripts\TFighter1.1bury.scar
    error is in or near the proggy procedure
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

  9. #9
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    SCAR Code:
    // Eating //  NOT DONE YET
    procedure eatup;
    begin
    if eat then
      begin
      {if (GetHp <= EatHp) and (Food1Color >= 0) then}//4got to add 2 spaces
      begin
        GameTab(4);
        Wait(10 + Random(20));
        if (FindColorSpiralTolerance(x, y, food1color, 560, 210, 730, 460, 2))or
           (FindColorSpiralTolerance(x, y, food2color, 560, 210, 730, 460, 2))then
        begin
          MMouse(x + 2, y - 2, 6, 5)
            if (IsUpText('Eat')) then
          begin
            GetMousePos(x, y);
            Mouse(x, y, 3, 2, True);
          end;//need another end
          end;
        end;
      end;
    end;

  10. #10
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    Yes when you get that error it usually means ur missing an end. make sure you count all ur begins and make sure u have the same amount of ends in each procedure
    Sleeping...

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
  •