Results 1 to 20 of 20

Thread: Variables..

  1. #1
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Variables..

    Well, I have been getting pretty much the same error on each script. Here it is.

    SecretFighter:

    Line 30: [Error] (14883:1): Duplicate identifier 'x' in script C:\Documents and Settings\jake\Desktop\HyperSecret's SecretFighter v0.30.scar

    Woodcutter:

    Line 29: [Error] (14843:5): Duplicate identifier 'x' in script C:\Program Files\SCAR 3.11\Scripts\AutoWC2.scar


    Help anybody? Ive tried putting in the SRL4 on, and it diddnt work.

  2. #2
    Join Date
    Jun 2007
    Location
    Minnesota
    Posts
    773
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its because the scripts you are using aren't updated for SRL4 a quick fix is to put
    SCAR Code:
    var X. Y: integer;
    before the first procedure.

  3. #3
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by doritoz View Post
    Well, I have been getting pretty much the same error on each script. Here it is.

    SecretFighter:

    Line 30: [Error] (14883:1): Duplicate identifier 'x' in script C:\Documents and Settings\jake\Desktop\HyperSecret's SecretFighter v0.30.scar

    Woodcutter:

    Line 29: [Error] (14843:5): Duplicate identifier 'x' in script C:\Program Files\SCAR 3.11\Scripts\AutoWC2.scar


    Help anybody? Ive tried putting in the SRL4 on, and it diddnt work.
    it won't work most of the script needs to be tweaked =/

  4. #4
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool, thanks, i'm trying that now.

    EDIT: So, here is the script. what can I change to fix my problem?

    SCAR Code:
    {Thanks to Smartzkid for all the help and looking over of my script}
    {.Script Info:
    -=ScriptName=-  = SecretFighter
    -=Author=-      = HyperSecret
    -=Description=- = Kills Any Monster
    -=Version=-     = 0.10
    -=Comments=-    = SRL 4+

           (C) 2007 TeamSecret Productions

    /Script Info}

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
    // *
    // *           NAME        : SecretFighter
    // *           WRITER      : HyperSecret
    // *           CATEGORY    : Fighting
    // *           DESCRIPTION : Kills Any Monster
    //
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
    // Took script info setup from Fawaki\\

    program HSAutoFighter;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}

    var
      Killed, Killed2: integer;

    var
     x, y: integer;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\


    const  Color1         = 2638679;//1st color of monster
    const  Color2         = 3957891;//2nd color of monster
    const  Color3         = 8233913;//3rd color of monster
    const  MonsterName    = 'Chicken';//name of the monster (case sensative)
    const  ToKill         = 25;//how many monsters for each player to kill
    const  eatfood        = 'no';//yes or no, for if you want to eat food
    const  FoodName       = 'Salmon';//name of 1st food your eating (case sensative)
    const  foodcolor      = 7040901;//color of food your eating
    const  eathp          = 70;//Hp you want your guy to eat at
    const  runhp          = 65;//HP you want your guy to run at
    const  RunDirection   = 'e';//n,s,e,w which way you want to run when hp get to runhp
    const  MySRLID        = '';// Stats ID.
    const  MySRLPassword  = '';//<- Your SRL Password here if you want to have yout stats logged

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure DeclarePlayers;
    begin
      HowManyPlayers  := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

        SRLID         := doritoz;
        SRLPassword   := *******;

      Players[0].Name :='treeslayerr'; //Character name
      Players[0].Pass :='**********'; //Character PAss
      Players[0].Nick :='Tree'; //Nickname 3 Letter of char name
      Players[0].Active:=True; //True if you want this player to be ran in the script, false if not
      Players[0].Skill := 'defense'; //the skill you want to train, strength, attack, defense
      Players[0].Integers[0] := 0;

      WriteLn('Using '+ IntToStr(HowManyPlayers) +' Players');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HyperSecretTAG;
    begin
      ClearDebug;
      Writeln(' _   _                       _____                    _  ');
      Writeln('| | | |                     /  ___|                  | | ');
      Writeln('| |_| |_   _ _ __   ___ _ __\ `--.  ___  ___ _ __ ___| |_');
      Writeln('|  _  | | | | ''_ \ / _ \ ''__|`--. \/ _ \/ __| ''__/ _ \ __|');
      Writeln('| | | | |_| | |_) |  __/ |  /\__/ /  __/ (__| | |  __/ |_ ');
      Writeln('\_| |_/\__, | .__/ \___|_|  \____/ \___|\___|_|  \___|\__|');
      Writeln('        __/ | |                                           ');
      Writeln('       |___/|_|                                           ');
      Writeln('HyperSecret''s AutoFighter!');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=0 to 7 do
      begin
        case I of
         0: if SolveChatRandom then
              Result := True;
         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: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         7: RC;
        end;
        wait(1);
      end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSAntiBAN;
    begin
      if(not(LoggedIn))then
        Exit;
        case Random(20) of

          0: PickUpMouse;

          1: PickUpMouse;

          5: PickUpMouse;

          6: case Random(4) of
               0: TypeSend('Combat Lvl?');
               1: TypeSend('Str Lvl?');
               2: TypeSend('Att Level?');
               3: TypeSend('D Level?');
             end;
        end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFindRandoms: boolean;
    begin
      if FindFastRandoms or
      FindNormalRandoms then
      begin
        result := true;
      end else
      begin
        result := false;
      end;
      FindTalk
      HSAntiBan;
      SRLRandomsReport;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure AutoRetaliate(Retaliate:Boolean); //thx to fawaki for autoretaliate
    begin
      GameTab(1);
      if Retaliate then
      begin
        If not FindColor(x, y, 1777020, 624, 385, 719, 396) then
        begin
          Mouse(666, 381, 8, 8, True);
        end;
      end;
      if not Retaliate then
      begin
        If FindColor(x, y, 1777020, 624, 385, 719, 396) then
        begin
          Mouse(666, 381, 8, 8, True);
        end;
      end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSChooseSkill;
    begin
      if (not(LoggedIn)) then Exit;
      GameTab(1);
      begin
        if  Players[CurrentPlayer].Skill = 'attack'    then SetFightMode(1);
        if  Players[CurrentPlayer].Skill = 'strength'  then SetFightMode(2);
        if  Players[CurrentPlayer].Skill = 'defence'   then SetFightMode(4);
      end;
      if (HSFindRandoms = true) then
      begin
        nextplayer(true);
      end;
      AutoRetaliate(True);
      SetChat('off', 1);
      SetChat('off', 2);
      SetChat('off', 3);
      SetChat('off', 1);
      SetRun(True);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSHighestAngle;
    begin
      KeyDown(38);
      Wait(3000 + random(100));
      KeyUp(38);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure StatsDePlayer;

    var Active: string;
    var i: Integer;
    begin
      if Players[CurrentPlayer].Active=True then
        Active:='In Use'
       else
        Active:='Not In Use';
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      Writeln ('  Player Name         : '+ Players[CurrentPlayer].Name);
      Writeln ('  Player Number       : '+inttostr(CurrentPlayer));
      Writeln ('  Active       : '+ Active);
      if ( Players[CurrentPlayer].Worked > 0 ) then
        Writeln ('  Worked       : '+ inttostr(Players[CurrentPlayer].Worked) +' min.');
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      GetAllLevels;

      for i := 0 to HowManyPlayers - 1 do
      begin
        if Players[i].Active = True then Active:='T' else Active:='F';
        WriteLn ( ' ' + Inttostr (I) + ' : ' + Players[i].Name + ' = ' + Active
        +'. - Lvl : '
        +' '+inttostr(Players[i].level[1])+
        +' '+inttostr(Players[i].level[2])+
        +' '+inttostr(Players[i].level[3])+
        +' '+inttostr(Players[i].level[8])+'. '
        +'W : '+IntToStr(Players[i].Worked)+' min. '
        +'K : '+ IntToStr(Players[i].integers[0]) +' '+ MonsterName +'s. ');
      end
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    Procedure ReportDeProgress;

    begin
      writeln(' ');
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      WriteLn ('               -= AutoFighter v0.10 -Progress Report- By : HyperSecret =-');
      Writeln ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      Writeln('  Worked for '+ TimeRunning);
      Writeln('  Killed Total of '+inttostr(Killed2)+' '+ MonsterName +'s.');
      StatsDePlayer;
      SRLRandomsReport;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFindFood(Name: string; color, maxtol, maxtime: integer): boolean;
    var
      box: TBoxArray;
      tolerance, time: integer;
    begin
      result := false;
      MarkTime(time);
      repeat
        if(FindColorSkipBoxArrayTolerance(x, y, color, 548, 205, 734, 461, tolerance, box)) then
        begin
          MMouse(x, y, 0, 0);
          wait(50 + random(250));
          if(IsUpText('Eat'))then
          begin
            result := true;
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, false);
            ChooseOption('at');
            Exit;
          end else
          begin
            SetLength(box, Length(box) + 1);
            box[Length(box) - 1].X1 := x - 15;
            box[Length(box) - 1].Y1 := y - 15;
            box[Length(box) - 1].X2 := x + 15;
            box[Length(box) - 1].Y2 := y + 15;
          end;
        end else
          tolerance := tolerance + 1;

        wait(50);
      until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSHpCheck;
    var
      i, n: Integer;
      TimeToEat: integer;

    begin
      MarkTime(TimeToEat);
      repeat
        for i:= 0 to 2 do
        begin
          gethp;
          if (gethp <= eathp) then
          GameTab(4);
          begin
            if(HSFindFood(FoodName, FoodColor, 5, 2000)) then
            begin
              if (gethp < runhp) then
              begin
                Status('Running Because Low HP');
                RunAwayDirection(RunDirection);
                begin
                  nextplayer(false);
                end;
                if (HSFindRandoms = true) then
                begin
                  nextplayer(true);
                end;
              end;
            end;
          end;
        end;
      until (gethp > eathp) or (TimeFromMark(TimeToEat) > 300000+random(30000));
    end;



    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSOtherPlayerFighting(txt: string): Boolean;
    var
       x, y: integer;
    begin
      Result := FindText(x, y, txt, SmallChars, 9, 442, 182, 459);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFighting(Name: string; color, maxtol, maxtime: integer): boolean;
    var
      box: TBoxArray;
      tolerance, time: integer;
    begin
      result := false;
      MarkTime(time);
      repeat
        if(FindColorSkipBoxArrayTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance, box)) then
        begin
          MMouse(x, y, 0, 0);
          wait(50 + random(250));
          if(IsUpText(Name))then
          begin
            result := true;
            GetMousePos(x, y);
            case Random(2) of
              0: begin
                   Mouse(x, y, 0, 0, false);
                   ChooseOption('ttack');
                   Exit;
                 end;

              1: begin
                   Mouse(x, y, 0, 0, true);
                   Exit;
                 end;
            end;
          end else
          begin
            SetLength(box, Length(box) + 1);
            box[Length(box) - 1].X1 := x - 15;
            box[Length(box) - 1].Y1 := y - 15;
            box[Length(box) - 1].X2 := x + 15;
            box[Length(box) - 1].Y2 := y + 15;
            Exit;
          end;
        end else
          tolerance := tolerance + 1;

        wait(50);
      until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSAttack;
    var
      MonsterColors: array[0..2] of integer;
      i: Integer;
      TimeToKill: Integer;

    begin
      if (not (LoggedIn)) then
        Exit;
      MonsterColors[0] := color1;
      MonsterColors[1] := color2;
      MonsterColors[2] := color3;

      MarkTime(TimeToKill);
      Killed := 0;
      repeat
        for i := 0 to 2 do
        begin
          if(HSFighting(MonsterName, MonsterColors[i], 5, 2000))then
          begin
            if (HSOtherPlayerFighting('omeone else is fighting that')) then
            begin
            Killed := Killed - 1;
              case Random(5) of
                0: TypeSend('Ah');
                1: TypeSend('Bah');
                2: TypeSend('Shucks');
                3: TypeSend('Dangit');
                4: TypeSend('Blah');
              end;
              Exit;
            end;
            Wait(1000 + random(500));
            OutFight;
            Killed := Killed + 1;
            Killed2 := Killed2 + 1;
            ReportVars[0] := ReportVars[0] + 1;
            Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
          end;
        end;
        wait(10);
        if (HSFindRandoms = true) then
        begin
          nextplayer(true);
        end;
        if (eatfood = 'yes') then
        begin
          HSHpCheck;
        end;
      until (Killed >= ToKill) or (TimeFromMark(TimeToKill) > 300000+random(30000));
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure SetUp;
    begin
      SetupSRL;
      ScriptID := '269';
      HyperSecretTAG;
      DeclarePlayers;
      if(not(loggedin))then LoginPlayer;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure SetUp2;
    begin
      HSChooseSkill;
      HSHighestAngle;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    begin
      SetUp;
      Killed2 := 0;
      repeat
        if(not(loggedin))then LoginPlayer;
        SetUp2;
        HSAttack;
        If (Killed >= ToKill) then
        begin
          Wait(5000 + random(1000));
          nextplayer(true);
        end;
        ReportDeProgress;
      until(false);
    end.

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There ya go, its all fixed. SRLID and SRLPass ALWAYS need to be a string.

    SCAR Code:
    {Thanks to Smartzkid for all the help and looking over of my script}
    {.Script Info:
    -=ScriptName=-  = SecretFighter
    -=Author=-      = HyperSecret
    -=Description=- = Kills Any Monster
    -=Version=-     = 0.10
    -=Comments=-    = SRL 4+

           (C) 2007 TeamSecret Productions

    /Script Info}

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
    // *
    // *           NAME        : SecretFighter
    // *           WRITER      : HyperSecret
    // *           CATEGORY    : Fighting
    // *           DESCRIPTION : Kills Any Monster
    //
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
    // Took script info setup from Fawaki\\

    program HSAutoFighter;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}

    var
      Killed, Killed2: integer;

    var
     x, y: integer;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\


    const  Color1         = 2638679;//1st color of monster
    const  Color2         = 3957891;//2nd color of monster
    const  Color3         = 8233913;//3rd color of monster
    const  MonsterName    = 'Chicken';//name of the monster (case sensative)
    const  ToKill         = 25;//how many monsters for each player to kill
    const  eatfood        = 'no';//yes or no, for if you want to eat food
    const  FoodName       = 'Salmon';//name of 1st food your eating (case sensative)
    const  foodcolor      = 7040901;//color of food your eating
    const  eathp          = 70;//Hp you want your guy to eat at
    const  runhp          = 65;//HP you want your guy to run at
    const  RunDirection   = 'e';//n,s,e,w which way you want to run when hp get to runhp
    const  MySRLID        = '';// Stats ID.
    const  MySRLPassword  = '';//<- Your SRL Password here if you want to have yout stats logged

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure DeclarePlayers;
    begin
      HowManyPlayers  := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

        SRLID         := 'doritoz';
        SRLPassword   := '*******';

      Players[0].Name :='treeslayerr'; //Character name
      Players[0].Pass :='**********'; //Character PAss
      Players[0].Nick :='Tree'; //Nickname 3 Letter of char name
      Players[0].Active:=True; //True if you want this player to be ran in the script, false if not
      Players[0].Skill := 'defense'; //the skill you want to train, strength, attack, defense
      Players[0].Integers[0] := 0;

      WriteLn('Using '+ IntToStr(HowManyPlayers) +' Players');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HyperSecretTAG;
    begin
      ClearDebug;
      Writeln(' _   _                       _____                    _  ');
      Writeln('| | | |                     /  ___|                  | | ');
      Writeln('| |_| |_   _ _ __   ___ _ __\ `--.  ___  ___ _ __ ___| |_');
      Writeln('|  _  | | | | ''_ \ / _ \ ''__|`--. \/ _ \/ __| ''__/ _ \ __|');
      Writeln('| | | | |_| | |_) |  __/ |  /\__/ /  __/ (__| | |  __/ |_ ');
      Writeln('\_| |_/\__, | .__/ \___|_|  \____/ \___|\___|_|  \___|\__|');
      Writeln('        __/ | |                                           ');
      Writeln('       |___/|_|                                           ');
      Writeln('HyperSecret''s AutoFighter!');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=0 to 7 do
      begin
        case I of
         0: if SolveChatRandom then
              Result := True;
         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: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         7: RC;
        end;
        wait(1);
      end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSAntiBAN;
    begin
      if(not(LoggedIn))then
        Exit;
        case Random(20) of

          0: PickUpMouse;

          1: PickUpMouse;

          5: PickUpMouse;

          6: case Random(4) of
               0: TypeSend('Combat Lvl?');
               1: TypeSend('Str Lvl?');
               2: TypeSend('Att Level?');
               3: TypeSend('D Level?');
             end;
        end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFindRandoms: boolean;
    begin
      if FindFastRandoms or
      FindNormalRandoms then
      begin
        result := true;
      end else
      begin
        result := false;
      end;
      FindTalk
      HSAntiBan;
      SRLRandomsReport;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure AutoRetaliate(Retaliate:Boolean); //thx to fawaki for autoretaliate
    begin
      GameTab(1);
      if Retaliate then
      begin
        If not FindColor(x, y, 1777020, 624, 385, 719, 396) then
        begin
          Mouse(666, 381, 8, 8, True);
        end;
      end;
      if not Retaliate then
      begin
        If FindColor(x, y, 1777020, 624, 385, 719, 396) then
        begin
          Mouse(666, 381, 8, 8, True);
        end;
      end;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSChooseSkill;
    begin
      if (not(LoggedIn)) then Exit;
      GameTab(1);
      begin
        if  Players[CurrentPlayer].Skill = 'attack'    then SetFightMode(1);
        if  Players[CurrentPlayer].Skill = 'strength'  then SetFightMode(2);
        if  Players[CurrentPlayer].Skill = 'defence'   then SetFightMode(4);
      end;
      if (HSFindRandoms = true) then
      begin
        nextplayer(true);
      end;
      AutoRetaliate(True);
      SetChat('off', 1);
      SetChat('off', 2);
      SetChat('off', 3);
      SetChat('off', 1);
      SetRun(True);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSHighestAngle;
    begin
      KeyDown(38);
      Wait(3000 + random(100));
      KeyUp(38);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure StatsDePlayer;

    var Active: string;
    var i: Integer;
    begin
      if Players[CurrentPlayer].Active=True then
        Active:='In Use'
       else
        Active:='Not In Use';
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      Writeln ('  Player Name         : '+ Players[CurrentPlayer].Name);
      Writeln ('  Player Number       : '+inttostr(CurrentPlayer));
      Writeln ('  Active       : '+ Active);
      if ( Players[CurrentPlayer].Worked > 0 ) then
        Writeln ('  Worked       : '+ inttostr(Players[CurrentPlayer].Worked) +' min.');
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      GetAllLevels;

      for i := 0 to HowManyPlayers - 1 do
      begin
        if Players[i].Active = True then Active:='T' else Active:='F';
        WriteLn ( ' ' + Inttostr (I) + ' : ' + Players[i].Name + ' = ' + Active
        +'. - Lvl : '
        +' '+inttostr(Players[i].level[1])+
        +' '+inttostr(Players[i].level[2])+
        +' '+inttostr(Players[i].level[3])+
        +' '+inttostr(Players[i].level[8])+'. '
        +'W : '+IntToStr(Players[i].Worked)+' min. '
        +'K : '+ IntToStr(Players[i].integers[0]) +' '+ MonsterName +'s. ');
      end
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    Procedure ReportDeProgress;

    begin
      writeln(' ');
      WriteLn ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      WriteLn ('               -= AutoFighter v0.10 -Progress Report- By : HyperSecret =-');
      Writeln ('-=[]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[]=-');
      Writeln('  Worked for '+ TimeRunning);
      Writeln('  Killed Total of '+inttostr(Killed2)+' '+ MonsterName +'s.');
      StatsDePlayer;
      SRLRandomsReport;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFindFood(Name: string; color, maxtol, maxtime: integer): boolean;
    var
      box: TBoxArray;
      tolerance, time: integer;
    begin
      result := false;
      MarkTime(time);
      repeat
        if(FindColorSkipBoxArrayTolerance(x, y, color, 548, 205, 734, 461, tolerance, box)) then
        begin
          MMouse(x, y, 0, 0);
          wait(50 + random(250));
          if(IsUpText('Eat'))then
          begin
            result := true;
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, false);
            ChooseOption('at');
            Exit;
          end else
          begin
            SetLength(box, Length(box) + 1);
            box[Length(box) - 1].X1 := x - 15;
            box[Length(box) - 1].Y1 := y - 15;
            box[Length(box) - 1].X2 := x + 15;
            box[Length(box) - 1].Y2 := y + 15;
          end;
        end else
          tolerance := tolerance + 1;

        wait(50);
      until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSHpCheck;
    var
      i, n: Integer;
      TimeToEat: integer;

    begin
      MarkTime(TimeToEat);
      repeat
        for i:= 0 to 2 do
        begin
          gethp;
          if (gethp <= eathp) then
          GameTab(4);
          begin
            if(HSFindFood(FoodName, FoodColor, 5, 2000)) then
            begin
              if (gethp < runhp) then
              begin
                Status('Running Because Low HP');
                RunAwayDirection(RunDirection);
                begin
                  nextplayer(false);
                end;
                if (HSFindRandoms = true) then
                begin
                  nextplayer(true);
                end;
              end;
            end;
          end;
        end;
      until (gethp > eathp) or (TimeFromMark(TimeToEat) > 300000+random(30000));
    end;



    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSOtherPlayerFighting(txt: string): Boolean;
    var
       x, y: integer;
    begin
      Result := FindText(x, y, txt, SmallChars, 9, 442, 182, 459);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    function HSFighting(Name: string; color, maxtol, maxtime: integer): boolean;
    var
      box: TBoxArray;
      tolerance, time: integer;
    begin
      result := false;
      MarkTime(time);
      repeat
        if(FindColorSkipBoxArrayTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance, box)) then
        begin
          MMouse(x, y, 0, 0);
          wait(50 + random(250));
          if(IsUpText(Name))then
          begin
            result := true;
            GetMousePos(x, y);
            case Random(2) of
              0: begin
                   Mouse(x, y, 0, 0, false);
                   ChooseOption('ttack');
                   Exit;
                 end;

              1: begin
                   Mouse(x, y, 0, 0, true);
                   Exit;
                 end;
            end;
          end else
          begin
            SetLength(box, Length(box) + 1);
            box[Length(box) - 1].X1 := x - 15;
            box[Length(box) - 1].Y1 := y - 15;
            box[Length(box) - 1].X2 := x + 15;
            box[Length(box) - 1].Y2 := y + 15;
            Exit;
          end;
        end else
          tolerance := tolerance + 1;

        wait(50);
      until(tolerance > maxtol) or (TimeFromMark(time) > maxtime);
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure HSAttack;
    var
      MonsterColors: array[0..2] of integer;
      i: Integer;
      TimeToKill: Integer;

    begin
      if (not (LoggedIn)) then
        Exit;
      MonsterColors[0] := color1;
      MonsterColors[1] := color2;
      MonsterColors[2] := color3;

      MarkTime(TimeToKill);
      Killed := 0;
      repeat
        for i := 0 to 2 do
        begin
          if(HSFighting(MonsterName, MonsterColors[i], 5, 2000))then
          begin
            if (HSOtherPlayerFighting('omeone else is fighting that')) then
            begin
            Killed := Killed - 1;
              case Random(5) of
                0: TypeSend('Ah');
                1: TypeSend('Bah');
                2: TypeSend('Shucks');
                3: TypeSend('Dangit');
                4: TypeSend('Blah');
              end;
              Exit;
            end;
            Wait(1000 + random(500));
            OutFight;
            Killed := Killed + 1;
            Killed2 := Killed2 + 1;
            ReportVars[0] := ReportVars[0] + 1;
            Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
          end;
        end;
        wait(10);
        if (HSFindRandoms = true) then
        begin
          nextplayer(true);
        end;
        if (eatfood = 'yes') then
        begin
          HSHpCheck;
        end;
      until (Killed >= ToKill) or (TimeFromMark(TimeToKill) > 300000+random(30000));
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure SetUp;
    begin
      SetupSRL;
      ScriptID := '269';
      HyperSecretTAG;
      DeclarePlayers;
      if(not(loggedin))then LoginPlayer;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    procedure SetUp2;
    begin
      HSChooseSkill;
      HSHighestAngle;
    end;

    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\

    begin
      SetUp;
      Killed2 := 0;
      repeat
        if(not(loggedin))then LoginPlayer;
        SetUp2;
        HSAttack;
        If (Killed >= ToKill) then
        begin
          Wait(5000 + random(1000));
          nextplayer(true);
        end;
        ReportDeProgress;
      until(false);
    end.

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if it is dup id its not to put in x,y because its dup id dupcliate you got 1 too much so you need srl 4 then because you dont have to put in a srl 3.81 scrip x,y in a script if you use an srl 4 script you will get dup id because you got x,y declared as var..
    ~Hermen

  7. #7
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I re-tryed the script you typed. I'm still getting the same error. Duplicate identifier 'x'

  8. #8
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You're positive you're using SRL 4? Cause if you are using anything less than that, you would get that error. Re-download SRL 4, EVEN IF you are positive you have SRL 4.0

  9. #9
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Let me just make sure i'm understanding correctly about the install..

    You open the SRL folder in the RaR
    Copy the Seperate SRL folder within the main folder
    Paste to includes
    Take the plugin folder
    Put in plugin folder
    Done? RIght? Thanks so much for the help guys. Its tough trying to get to learn a new program. I really appreciate it.

  10. #10
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    move the rar file to your SCAR file, extract here, it'll say you already have those files, so you have to press "yes to all".
    After that copy-past all the plugins to the SCAR Plugins folder, exept the FreddyPlugin one.
    You have to use the old FreddyPlugin from the prev SRL (3.81).

    Hope i helped you,

    TSN.
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  11. #11
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I successfully installed SRL 4 and im now getting a new error: here it is!

    Line 67: [Error] (7051:1): Unknown identifier 'ChangeFPHandle' in script C:\Program Files\SCAR 3.11\includes\srl\srl\misc\SCSS.scar

    EDIT: also do I need the SCSS folder in the includes folder?

  12. #12
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    You got vista? If so run scar as administrator (right click on scar).
    If not, ensure you've installed the plugins correctly.
    I made a new script, check it out!.

  13. #13
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I do not have vista, however, what would be considered the correct way to install the plugins? Could you provide a step-by-step please?

  14. #14
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, I just got back from my lessons, and I guess i'll tell wxactly what I did. Tell me if I did something wrong. Please+Thanx.

    Opened SRL main folder
    Opened internal SRL folder
    Copied includes into includes folder
    Opened Plugins folder
    Placed all plugins in EXCEPT the freddy plugin.
    Opened SCAR
    Attempted to run scripts.
    New error: Missing certain includes or unidentified

    Did I miss anything?

    Thanks in advance.

  15. #15
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I get that same error about ChangeFPHandle, it has to do with SCSS. So, if the script you are using has an option for SCSS, just change it to false, and use the normal rs client.

  16. #16
    Join Date
    Sep 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quick reply, thanks. Ill try that now.

    EDIT: Okay, now something weird is goin on. I ran my autofighter script and got this.

    Line 106: [Error] (215:1): Unknown identifier 'MouseSpeed' in script C:\Program Files\SCAR 3.11\includes\srl\srl\core\Setup.scar

    Also this opened up the setup.scar in a new tab. Again notice how it is unknown.

    What is going on?

    EDIT 2: I re ran the script and found out the line 106 read to be Mousespeed. When I re ran it, it appeared as Filename. Does it want me to change it?

  17. #17
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  18. #18
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK Run this script and post what it tells you, it is a script that checks your SRL version and Scar Version... I wrote it myself =)

    SCAR Code:
    program SRLCorrect;
    {.include SRL/SRL.scar}

    var I, ScarVersionNumber:Integer;
    var SRLCurrent: String;

    procedure TypeWrite(Line: string; Between: integer);
     begin
       for I := 1 to length(Line) do
        begin
          cleardebug;
          WriteLn(copy(Line, 0, I));
          wait(Between);
        end;
     end;

    procedure WhatIsThis;
     Begin
       TypeWrite('This has been created to help you check your SCAR and SRL', 100);
       TypeWrite('Versions, After you Run this post this along with you problem', 100);
       TypeWrite('If you think it is SRL or SCAR internally related', 100);
     end;


    procedure PostSRLVer;
     begin
       ScarVersionNumber := GetSCARVersion;
       WriteLn('You have SRL : ' + (SRLVersionNumber));
       wait(1000);
       WriteLn('You have Scar : ' + IntToStr(ScarVersionNumber));
       wait(1000);
       WriteLn('');
       SRLCurrent := (SRLVersionNumber);
     end;

    procedure CorrectSRLVer;
     begin
       If Not (SRLCurrent = '4.00') Then
        Begin
          WriteLn('You do not have SRL 4.00. Copy the link into your address bar and');
          WriteLn('Follow instructions to download SRL 4.');
          WriteLn('http://www.villavu.com/forum/showthread.php?t=15536?t=17095');
          WriteLn('');
        end;
       If (SRLCurrent = '4.00') Then
        Begin
          WriteLn('You are up-to-date with SRL.');
          WriteLn('');
        end;
     end;

    procedure CorrectSCARVer;
     begin
       if not ScarVersionNumber = 311 then
        begin
          WriteLn('You need SCAR 3.11, look on the SRL Forums for a download Link.');
        end else
         begin
           WriteLn('You are up-to-date with SCAR');
        end;
    end;



    begin
     WhatIsThis;
     PostSRLVer;
     CorrectSRLVer;
     CorrectSCARVer;
    end.

  19. #19
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Ok, I think I get it. you must copy the RAR to the include etc, but you can't go into the file system. Just extract the RAR file, as is, without going into the directory.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  20. #20
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You have not put SRL in correctly, just run that script and post the what you have in the debug box, it will tell us if it is in the right place.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Uninitialized variables
    By NosePicker in forum OSR Help
    Replies: 2
    Last Post: 03-20-2008, 07:34 PM
  2. Variables
    By Jackrawl in forum OSR Help
    Replies: 4
    Last Post: 12-04-2007, 04:30 PM
  3. how to use variables in typebyte
    By zenma in forum OSR Help
    Replies: 8
    Last Post: 08-15-2007, 06:47 AM

Posting Permissions

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