DaviDemon
07-16-2007, 04:39 AM
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!
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.
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!
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.