SCAR Code:
Program AQ;
{.Include SRL/SRL.Scar}
//The Instructions.
//1.Log In, And Start In The Town of Battle-On.
//2.Set Up Const.
//3.Click Run And Make Sure The Script Kills At Least One Monster.
//The Instructions.
Var
Killed, Died, CuteMoglins, Chests: Integer;
x, y: Integer;
Const
ToFight = 1000;//How many monsters to try and kill.
MoglinHeal = True;//True if you want twilly the moglin to heal you after each fight.
{---------------------------- END OF SETUP ------------------------------------}
////////////////////////////////////////////////////////////////////////////////
VersionNumber = '0.1';{DO NOT TOUCH}////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Procedure GoToFight;
Begin
If(FindColor(x, y, 2835929, 657, 459, 659, 461))Or(FindColor(x, y, 2045101, 577, 446, 579, 449))Then
Mouse(x, y, 1, 1, True);
Begin
Repeat
Wait(500+random(500));
Until(FindColor(x, y, 5013375, 384, 221, 388, 225));
End;
Procedure Heal;
Begin
If(Heal = True)Then
Begin
If(FindColor(x, y, 16862, 383, 389, 385, 391))Then
Mouse(x, y, 1, 1, True);
Wait(500+random(500));
Mouse(582, 229, 1, 1, True);
Wait(5000);
Mouse(696, 546, 1, 1, True);
End;
End;
Procedure SolveCuteMoglin;
Begin
If(FindColor(x, y, 8224255, 654, 336, 658, 340))Then
Begin
Mouse(587, 250, 1, 1, True);
End;
End;
Procedure SolveChest;
Begin
If(GetColor(407, 90)=12510454)And(GetColor(424, 285) = 13434879)Then
Mouse(416, 286, 1, 1, True);
Repeat
Wait(100);
Until(FindColor(x, y, 10931946, 395, 322, 399, 326));
If(FindColor(x, y, 10931946, 395, 322, 399, 326))Then
Begin
If(FindColor(x, y, 16777215, 396, 371, 400, 375))Then
Begin
Mouse(x, y, 1, 1, True);
Begin
Repeat
Wait(100);
Until(FindColor(x, y, 2835929, 657, 459, 659, 461))Or(FindColor(x, y, 2045101, 577, 446, 579, 449));
If(FindColor(x, y, 2835929, 657, 459, 659, 461))Or(FindColor(x, y, 2045101, 577, 446, 579, 449))Then
Chests:=Chests+1;
End;
End;
End;
End;
Procedure SolveTokens;
Begin
If(FindColor(x, y, 4242146, 401, 326, 403, 327))Then
Begin
Mouse(402, 404, 1, 1,True);
End;
End;
Procedure SolveWin;
Begin
Repeat
If(FindColor(x, y, 10931946, 395, 322, 399, 326))Then
Wait(500+random(500));
Until(FindColor(x, y, 16777215, 396, 371, 400, 375));
If(FindColor(x, y, 16777215, 396, 371, 400, 375))Then
Begin
Mouse(x, y, 1, 1, True);
Wait(5000+random(1000));
Killed:=Killed+1;
End;
End;
Procedure SolveDeath;
Begin
If(FindColor(x, y, 16777215, 403, 321, 407, 325))Then
Mouse(x, y, 1, 1, True);
Begin
Repeat
Wait(1000);
Until(FindColor(x, y, 1315860, 461, 193, 465, 197));
If(FindColor(x, y, 1315860, 461, 193,465, 197))Then
Begin
Mouse(311, 273, 2, 2, True);
Wait(500+random(500));
Mouse(311, 273, 2, 2, True);
Wait(2000+random(3000));
Mouse(656, 448, 2, 2, True);
Died:=Died+1;
End;
End;
End;
Procedure Attack;
Begin
Repeat
If(FindColor(x, y, 5013375, 384, 221, 388, 225))Then
Mouse(x, y, 2, 2, True);
Wait(500);
Until(FindColor(x, y, 16777215, 403, 321, 407, 325))Or(FindColor(x, y, 10931946, 395, 322, 399, 326))Or(FindColor(x, y, 16777215, 396, 371, 400, 375));
If(FindColor(x, y, 16777215, 403, 321, 407, 325))Or(FindColor(x, y, 10931946, 395, 322, 399, 326))Or(FindColor(x, y, 16777215, 396, 371, 400, 375))Then
Begin
SolveDeath;
SolveWin;
SolveTokens;
End;
End;
Procedure Report;
Begin
ClearDebug;
WriteLn('AQ Version ' + VersionNumber + '.');
WriteLn('Made By U L T R A.');
WriteLn('--------------------------------------------------------------------');
WriteLn('Fought ' + IntToStr(Killed) + ' Monsters.');
WriteLn('Died ' + IntToStr(Died) + ' Times.');
WriteLn('Solved ' + IntToStr(CuteMoglins) + ' Cute Moglins.');
WriteLn('Solved ' + IntToStr(Chests) + ' Chests');
WriteLn('--------------------------------------------------------------------');
End;
Begin
SetUpSRL;
Begin
Repeat
Heal;
GoToFight;
SolveCuteMoglin;
SolveChest;
Attack;
Report;
Until(Killed = ToFight);
If(Killed = ToFight)Then
Begin
TerminateScript;
End;
End;
End.