Results 1 to 10 of 10

Thread: Help For My First Auto Fighter

  1. #1
    Join Date
    Jul 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Help For My First Auto Fighter

    This is my first auto fighter I made recently and I need someone to fix it for me.

    It keeps saying:

    Failed when compiling
    Line 50: [Error] (15205:1): Identifier expected in script C:\Documents & Settings ...

    When you're done fixing with it can you PM it back to me?

    Thanks (h)

    Oh and BTW I just started to use Scar so I'm very new to macroing and botting.


    Here's the script!

    SCAR Code:
    Program UltimateFighter;
    {.Script Info:
    # ScriptName  = The Ultimate Auto Fighter
    # Author      = DaviDemon
    # Description = A Runescape Auto Fighter
    # Version     = 1.0
    # Date        = 07/07/07
    # Comments    = The Best Auto Fighter Yet!
    /Script Info}


    {.Include SRL/SRL.Scar}
    {.Includes/SRL/SRL/Core/Antiban.Scar}
    {.Include SRL/SRL/Skill/Fighting.Scar}

    Var
    I, A: Integer;
    Killed: Integer;
    DidRandomHappen: Boolean;

    //                    ~ CONSTANTS ~                   //

    Const
    Colours1     = 1813715;           // One colour of the monster
    Colours2     = 11256008;          // Another colour of the monster
    Colours3     = 549375;            // Last colour of the monster
    MName        = 'Man';             // The name of the monster you are fighting
    MName2       = 'Man';             // Put the same name here
    Time         = 100;               // How many monsters you want to kill
    DirToRun     = 'W';               // Which way to run if in a fight
    AttackLvl    = 30;                // Put your attack level here

    //                    ~ DECLARING PLAYERS ~                   //

    Procedure DeclarePlayers;
    Begin
    HowManyPlayers     := 1;              // Number of players you want to bot with
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer      := 0;

    Players[0].Name    := ' '; // Username goes here
    Players[0].Pass    := ' ';    // Password goes here
    Players[0].Nick    := ' ';         // A nickname for your character goes here
    Players[0].Active  := False;          // True - Currently on that account, False - Not on the account
    Players[0].Skill   := 'Strength';     // What fight style you want to attack with

    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);

    //                    ~ RANDOM EVENTS ~                   //

    Function FindFastRandoms: Boolean;
    Var
    I: Integer;
    Begin
    For I := 1 To 8 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;
    7: Begin
    If InBlack Then
    Begin
    Result := True;
    Players[CurrentPlayer].Loc := 'InBlack';
    Logout;
    Exit;
    End;
    End;
    8: RC;
    End;
    Wait(1);
    End;
    If (Result = True) Then
    DidRandomHappen := True;

    //                    ~ ANTI RANDOMS ~                    //

    Procedure DoAntiRandoms;
    Begin
    FindTalk;
    FindFastRandoms;
    FindNormalRandoms;
    PopUp('Continue')
    If (FindFight = True) Then
    Begin
    RunAwayDirection('N');
    Wait(10000 + Random(2000));
    RunBack;
    If Not LoggedIn Then NextPlayer(False);
    End;
    End;

    //                    ~ ANTI BANS ~                   //

    Procedure AntiBans;
    Begin
    Case Random(10) of
    2: MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
    4: HoverSkill('Fishing', False);
    5: HoverSkill('Attack', False);
    6: MouseBox(MIx1, MIY1, MIX2, MIY2, 3);
    7: HoverSkill('Strength', False);
    9: BoredHuman;
    End;
    End;

    //                    ~ FIGHT STYLE ~                   //

    Procedure SetsFightMode;
    Begin
    GameTab(1);
    If Players[CurrentPlayer].Skill = 'Attack'  Then SetFightMode(2);
    If Players[CurrentPlayer].Skill = 'Strength'Then SetFightMode(2);
    If Players[CurrentPlayer].Skill = 'Defence' Then SetFightMode(2);
    FindTalk;
    End;

    //                    ~ ATTACK MONSTER ~                    //
    Procedure Attack Monster;
    Begin
    Killed:= Killed + 1;
    SetsFightMode;
    Repeat
    If FindObj(X,Y,MName,Colours1,5) Or
    FindObj(X,Y,MName,Colours2,5) Or
    FindObj(X,Y,MName,Colours3,5) Then
    DoAntiRandoms;
    AutoTalker;
    MMouse(X,Y,0+Random(2),0+Random(3));
    Mouse(X,Y,0,0+Random(3),True);
    DoAntiRandoms;
    If (Not(Loggedin)) Then NextPlayer(False);
    DoAntiRandoms;
    Wait(1000+random(300));
    If (Not(LoggedIn)) Then NextPlayer(False);
    Until(InFight= False);
    End;

    //                    ~ PROGRESS REPORT ~                   //

    Procedure ProgressReport;
    Begin
    Writeln('Worked For : ' + ScriptTime2(2))
    Writeln('Killed '+ IntToStr(Killed) + MName2);

    //                    ~ MAIN LOOP ~                   //

    Begin
    Repeat
    A := A + 1;
    ClearDebug;
    ActivateClient;
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
    HighestAngle;
    MakeCompass('N');
    DoAntiRandoms;
    AttackMonster;
    DoAntiRandoms;
    AntiBans;
    ProgressReport;
    If (Not(LoggedIn)) Then NextPlayer(False);
    If (Time=A)Then
    Begin
    NextPlayer(True);
    HighestAngle;
    MakeCompass('N');
    Writeln('Switched players successfully :)');
    End;
    Until(False);
    End.

  2. #2
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by DaviDemon View Post
    This is my first auto fighter I made recently and I need someone to fix it for me.

    It keeps saying:

    Failed when compiling
    Line 50: [Error] (15205:1): Identifier expected in script C:\Documents & Settings ...

    When you're done fixing with it can you PM it back to me?

    Thanks (h)

    Oh and BTW I just started to use Scar so I'm very new to macroing and botting.
    Yeah, so I know how to fix that error... and I would love to. But you need kinda post the script so I can :P

    Also, im not going to fix your script for you, no one will unless you pay them.(and this froum doesn't sell or buy anything...so ure guna have to live with help that is going to make you think) All I will do is teach you and help you understand what you did wrong.

    Oh, and none of this PM ing stuff, put it here so every one else can learn too.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  3. #3
    Join Date
    Jul 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There I posted the script...

    Now can you fix it?

  4. #4
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ask me if you have any questions. It is VERY important you understand what I fixed. You can save alot of trouble by compiling your script as you go, and unles you are copying, thats not a problem.


    You never ended your declare plars procedure. put a "end" after it

    You never ended your find fast randomes procedure

    remeber, you start everry procedure wiht a begin, and you must also end it with a "end;"

    You cannot have a method name "attack monster" spaces are not allows. You cannot have a method "attackMonster" either because it has already been made in srl

    You call an "autoTalker" procedure that doesnt exist

    You never ended your progress report procedure.

    You forgot a semi Colon "PopUp('Continue')" here
    and here "Writeln('Worked For : ' + ScriptTime2(2));"


    Is this script yours? how do you have errors all over the place like this?



    SCAR Code:
    PROGRAM UltimateFighter;

    {.Script Info:
    # ScriptName  = The Ultimate Auto Fighter
    # Author      = DaviDemon
    # Description = A Runescape Auto Fighter
    # Version     = 1.0
    # Date        = 07/07/07
    # Comments    = The Best Auto Fighter Yet!
    /Script Info}


      {.Include SRL/SRL.Scar}
      {.Includes/SRL/SRL/Core/Antiban.Scar}
      {.Include SRL/SRL/Skill/Fighting.Scar}

    VAR
      I, A:   INTEGER;
      Killed: INTEGER;
      DidRandomHappen: BOOLEAN;

      //                    ~ CONSTANTS ~                   //

    CONST
      Colours1  = 1813715;
      // One colour of the monster
      Colours2  = 11256008;
      // Another colour of the monster
      Colours3  = 549375;
      // Last colour of the monster
      MName     = 'Man';
      // The name of the monster you are fighting
      MName2    = 'Man';             // Put the same name here
      Time      = 100;
      // How many monsters you want to kill
      DirToRun  = 'W';
      // Which way to run if in a fight
      AttackLvl = 30;
      // Put your attack level here

      //                    ~ DECLARING PLAYERS ~                   //

      PROCEDURE DeclarePlayers;
      BEGIN
        HowManyPlayers := 1;
        // Number of players you want to bot with
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;

        Players[0].Name   := ' ';    // Username goes here
        Players[0].Pass   := ' ';    // Password goes here
        Players[0].Nick   := ' ';
        // A nickname for your character goes here
        Players[0].Active := False;
        // True - Currently on that account, False - Not on the account
        Players[0].Skill  := 'Strength';
        // What fight style you want to attack with

        NickNameBMP := CreateBitmapMaskFromText(
          Players[CurrentPlayer].Nick, UpChars);
      END;
      //                    ~ RANDOM EVENTS ~                   //

      FUNCTION FindFastRandoms: BOOLEAN;
      VAR
        I: INTEGER;
      BEGIN
        FOR I := 1 TO 8 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;
            7:
            BEGIN
              IF InBlack THEN
              BEGIN
                Result := True;
                Players[CurrentPlayer].Loc := 'InBlack';
                Logout;
                Exit;
              END;
            END;
            8:
              RC;
          END;
          Wait(1);
        END;
        IF (Result = True) THEN
          DidRandomHappen := True;
      END;

      //                    ~ ANTI RANDOMS ~                    //

      PROCEDURE DoAntiRandoms;
      BEGIN
        FindTalk;
        FindFastRandoms;
        FindNormalRandoms;
        PopUp('Continue');
        IF (FindFight = True) THEN
        BEGIN
          RunAwayDirection('N');
          Wait(10000 + Random(2000));
          RunBack;
          IF NOT LoggedIn THEN
            NextPlayer(False);
        END;
      END;

      //                    ~ ANTI BANS ~                   //

      PROCEDURE AntiBans;
      BEGIN
        CASE Random(10) OF
          2:
            MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
          4:
            HoverSkill('Fishing', False);
          5:
            HoverSkill('Attack', False);
          6:
            MouseBox(MIx1, MIY1, MIX2, MIY2, 3);
          7:
            HoverSkill('Strength', False);
          9:
            BoredHuman;
        END;
      END;

      //                    ~ FIGHT STYLE ~                   //

      PROCEDURE SetsFightMode;
      BEGIN
        GameTab(1);
        IF Players[CurrentPlayer].Skill = 'Attack' THEN
          SetFightMode(2);
        IF Players[CurrentPlayer].Skill = 'Strength' THEN
          SetFightMode(2);
        IF Players[CurrentPlayer].Skill = 'Defence' THEN
          SetFightMode(2);
        FindTalk;
      END;

      //                    ~ ATTACK MONSTER ~                    //
      PROCEDURE AttackAMonster;
      BEGIN
        Killed := Killed + 1;
        SetsFightMode;
        REPEAT
          IF FindObj(X, Y, MName, Colours1, 5) OR FindObj(
            X, Y, MName, Colours2, 5) OR FindObj(X, Y, MName, Colours3, 5) THEN
            DoAntiRandoms;
          //AutoTalker;
          MMouse(X, Y, 0 + Random(2), 0 + Random(3));
          Mouse(X, Y, 0, 0 + Random(3), True);
          DoAntiRandoms;
          IF (NOT (Loggedin)) THEN
            NextPlayer(False);
          DoAntiRandoms;
          Wait(1000 + random(300));
          IF (NOT (LoggedIn)) THEN
            NextPlayer(False);
        UNTIL (InFight = False);
      END;

      //                    ~ PROGRESS REPORT ~                   //

      PROCEDURE ProgressReport;
      BEGIN
        Writeln('Worked For : ' + ScriptTime2(2));
        Writeln('Killed ' + IntToStr(Killed) + MName2);
      END;

      //                    ~ MAIN LOOP ~                   //

    BEGIN
      REPEAT
        A := A + 1;
        ClearDebug;
        ActivateClient;
        SetupSRL;
        DeclarePlayers;
        LoginPlayer;
        HighestAngle;
        MakeCompass('N');
        DoAntiRandoms;
        AttackAMonster;
        DoAntiRandoms;
        AntiBans;
        ProgressReport;
        IF (NOT (LoggedIn)) THEN
          NextPlayer(False);
        IF (Time = A) THEN
        BEGIN
          NextPlayer(True);
          HighestAngle;
          MakeCompass('N');
          Writeln('Switched players successfully :)');
        END;
      UNTIL (False);
    END.


    Ask me if you have any questions. It is VERY important you understand what I fixed. You can save alot of trouble by compiling your script as you go, and unles you are copying, thats not a problem.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  5. #5
    Join Date
    Jul 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow gee thnx... i probably need to learn a lot more about making scripts...

    Thanks for the great help you gave me and i'll also rep+ you.

    yeah the script is mine but i used methods from other peoples scripts.

    My bad, didnt realise the 'end' was missing. thank you lorgreggreg soooo much..

    have you tested it btw? o_O

    anyways yeah ok

    cya

  6. #6
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yw, make sure you understand everything i changed

    naw, soz , didnt have time to test it, i dont really play rs anymore anyhows. When it compiled, i was happy enough.

    Good luck.
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  7. #7
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Make sure you get your standards right. Standards are a way to keep your script neat and tidy. Every thing which appears in bold has to be in lower case and also you start each line underneath a line which is bold with two spaces.

    Example:

    This:
    SCAR Code:
    PROCEDURE DeclarePlayers;
      BEGIN
        HowManyPlayers := 1;
        // Number of players you want to bot with
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
     
        Players[0].Name   := ' ';    // Username goes here
        Players[0].Pass   := ' ';    // Password goes here
        Players[0].Nick   := ' ';
        // A nickname for your character goes here
        Players[0].Active := False;
        // True - Currently on that account, False - Not on the account
        Players[0].Skill  := 'Strength';
        // What fight style you want to attack with
     
        NickNameBMP := CreateBitmapMaskFromText(
          Players[CurrentPlayer].Nick, UpChars);
      END;

    Should be this:

    SCAR Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; // Number of players you want to bot with
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name   := ' '; // Username goes here
      Players[0].Pass   := ' '; // Password goes here
      Players[0].Nick   := ' '; // A nickname for your character goes here
      Players[0].Active := False; // True - Currently on that account, False - Not on the account
      Players[0].Skill  := 'Strength'; // What fight style you want to attack with

      NickNameBMP := CreateBitmapMaskFromText(
      Players[CurrentPlayer].Nick, UpChars);
    end;

    One more thing. Is this :
    SCAR Code:
    NickNameBMP := CreateBitmapMaskFromText(
    Players[CurrentPlayer].Nick, UpChars);
    needed in declare players? Someone confirm that please.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  8. #8
    Join Date
    Apr 2007
    Location
    Texas
    Posts
    1,668
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wait... no one ever told me they had to be in lower case... and i like them in upper case..

    mabey im wrong, got a link to prove it to me?
    [IMG]http://farm3.static.flickr.com/2120/2052732965_348f3629d0_o.jpg[/IMG]

  9. #9
    Join Date
    Jul 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no but i made my first power cutter it is way worse than urs but i learned from whocares547 or sumthing like that

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

    Default

    Quote Originally Posted by jahuro View Post
    Make sure you get your standards right.

    One more thing. Is this :
    SCAR Code:
    NickNameBMP := CreateBitmapMaskFromText(
    Players[CurrentPlayer].Nick, UpChars);
    needed in declare players? Someone confirm that please.
    yeah make your you understand about standards they make it alot easier to fix mistakes and easier to read

    SCAR]NickNameBMP := CreateBitmapMaskFromText(
    Players[CurrentPlayer].Nick, UpChars);[/SCAR]
    is used to make a mask of the users nick for randoms and stuff like that



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 12-20-2007, 09:46 PM
  2. Need auto fighter
    By deivas in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 06-30-2007, 03:51 PM
  3. my auto fighter
    By scarscaper4life in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 09-02-2006, 02:39 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
  •