SCAR Code:
Program DFCF;//Dragon Fable Christmas Fighter.
{.Include SRL/SRL.Scar}
{ S U G G E S T I O N S }
{-------------------------------------------------------------------------------
Any suggestions to add to the script are very appreciated and would be given
credits for them.
-------------------------------------------------------------------------------}
{ S U G G E S T I O N S }
////////////////////////////////////////////////////////////////////////////////
{CREDITS}
//Freddy1990 For Scar.
//All People Who Made Any Procedures That Iam Using In My Script.
//People Who Posted On The Thread.
{CREDITS}
////////////////////////////////////////////////////////////////////////////////
//1.Start at frostvale town, wear the best weapon and armour you have.
//2.Set up const, drag the cross-hair onto the dragon fable window.
//3.Click the run button, sit down and enjoy.
////////////////////////////////////////////////////////////////////////////////
//THE REQUIPMENTS, READ THIS!
//1. You Need To Have Finished The Legend Of Frostvale, Chapter 2, Act 3!
//2. A Good Weapon Against Ice/Undead Is Very Recommended, I Suggest Fire/Light.
//3. You Need Some Brains! What? Everyone Needs Some...
//THE REQUIPMENTS, READ THIS!
////////////////////////////////////////////////////////////////////////////////
//1.Walking.
//2.Color Finding.
//3.Clicking.
//4.Health Checking/Healing.
//5.Stun Using/Not Using.
//6.Options.
//7.Vars.
//8.Consts.
//9.Instructions.
//10.Loops.
//11.Fail-Safes.
//12.Procedures.
//13.Report Procedure.
//14.Always Tells Where It Is At, And What Its Doing.
//15.Currently No Bugs.
//16.Accurate Coding - No Standards.
////////////////////////////////////////////////////////////////////////////////
//ToKill = #;//Put how many monsters you want the script to kill for you, here.
//Stun = True/False;//Do you want to use stun on the monster often, True/False.
////////////////////////////////////////////////////////////////////////////////
Const
ToKill = 1000000;//How many monsters to kill.
Stun = True;//True if you want to use stun on the monster, False if you dont.
{ DO NOT TOUCH BELOW THIS LINE }
Var
Killed, Healed, Stuned, Quests, Leveled : Integer;//Combat Vars.
x, y : Integer;//Coordinates Vars.
Const
VersionNumber = '1.5';//DO NOT TOUCH THIS, DO NOT TOUCH BELOW.
Procedure WaitUntilFindColorTolerance(Color, XX1, YY1, XX2, YY2, TheTolerance: Integer);
Begin
Repeat
Wait(10);
Until(FindColorTolerance(x, y, Color, XX1, YY1, XX2, YY2, TheTolerance));
End;
Procedure WaitUntilFindTwoColorTolerance(ColorA, ColorB, X1, Y1, X2, Y2, XA, YA, XA1, YA1, TTolerance : Integer);
Begin
Repeat
Wait(10);
Until(FindColorTolerance(x, y, ColorA, X1, Y1, X2, Y2, TTolerance))Or(FindColorTolerance(x, y, ColorB, XA, YA, XA1, YA1, TTolerance));
End;
Procedure GetSomeHeal;
Begin
If(Not(FindColor(x, y, 127, 209, 479, 210, 480)))Or(Not(FindColor(x, y, 4987136, 287, 479, 288, 480)))Then
Begin
Mouse(540, 132, 1, 1, True);
Wait(2500);
Mouse(390, 322, 1, 1, True);
Wait(500+random(500));
Mouse(389, 381, 1, 1, True);
Wait(1500);
Healed:=Healed+1;
WriteLn('We Just Healed');
End;
End;
Procedure GoToWar;
Begin
Mouse(540, 128, 1, 1, True);
Wait(1000);
Mouse(386, 212, 1, 1, True);
Begin
WaitUntilFindColorTolerance(10931946, 696, 185, 697, 186, 5);
Mouse(397, 376, 1, 1, True);
WaitUntilFindColorTolerance(10931946, 696, 185, 697, 186, 5);
Mouse(397, 423, 1, 1, True);
WaitUntilFindColorTolerance(10931946, 712, 497, 713, 498, 5);
Mouse(586, 272, 1, 1, True);
Wait(2000);
Mouse(586, 272, 1, 1, True);
WriteLn('We Are At War');
End;
End;
Procedure GoBackHome;
Begin
Mouse(7, 423, 1, 1, True);
Wait(2000);
Mouse(331, 284, 1, 1, True);
Begin
Wait(3000);
Mouse(431, 421, 1, 1, True);
Wait(3000);
WriteLn('We Are At The Town');
End;
End;
Function SolveQuest : Boolean;
Begin
If(FindColorTolerance(x, y, 10831946, 383, 229, 384, 230, 5))And(FindColorTolerance(x, y, 2045101, 413, 414, 414, 415, 5))Then
Begin
Mouse(413, 414, 1, 1, True);
Wait(1000);
Mouse(388, 416, 1, 1, True);
WaitUntilFindColorTolerance(2045101, 445, 376, 446, 377, 5);
Mouse(406, 422, 1, 1, True);
WaitUntilFindColorTolerance(3423767, 658, 371, 659, 372, 5);
Quests:=Quests+1;
WriteLn('We Had Solved The Whole Quest!');
Result:=True;
End Else
Result:=False;
End;
Function SolveLevelUp : Boolean;
Begin
If(FindColorTolerance(x, y, 0, 398, 135, 399, 136, 5))And(FindColorTolerance(x, y, 5992673, 393, 413, 394, 414, 5))Then
Begin
Mouse(385, 421, 1, 1, True);
Wait(2000);
GoBackHome;
Leveled:=Leveled+1;
WriteLn('We Had Leveled Up');
Result:=True;
End Else
Result:=False;
End;
Procedure RandomlyUseStun;
Begin
Case Random(3)Of
0:Begin
WaitUntilFindTwoColorTolerance(2368646, 2045101, 382, 394, 383, 395, 410, 335, 411, 336, 5);
Mouse(234, 409, 1, 1, True);
If(SolveQuest)Then Exit;
Wait(100);
If(SolveLevelUp)Then Exit;
WaitUntilFindTwoColorTolerance(2368646, 2045101, 382, 394, 383, 395, 410, 335, 411, 336, 5);
If(SolveQuest)Then Exit;
Wait(100);
If(SolveLevelUp)Then Exit;
WriteLn('Used Stun');
Stuned:=Stuned+1;
End;
1:Begin
WaitUntilFindTwoColorTolerance(2368646, 2045101, 382, 394, 383, 395, 410, 335, 411, 336, 5);
Mouse(235, 409, 1, 1, True);
If(SolveQuest)Then Exit;
Wait(100);
If(SolveLevelUp)Then Exit;
WaitUntilFindTwoColorTolerance(2368646, 2045101, 382, 394, 383, 395, 410, 335, 411, 336, 5);
If(SolveQuest)Then Exit;
Wait(100);
If(SolveLevelUp)Then Exit;
WriteLn('Used Stun');
Stuned:=Stuned+1;
End;
2:Begin
Wait(1000);
WriteLn('Didnt Use Stun This Time');
End;
End;
End;
Procedure UseStun;
Begin
RandomlyUseStun;
End;
Function SolveVictory : Boolean;
Begin
If(FindColorTolerance(x, y, 0, 394, 533, 395, 534, 5))And(FindColorTolerance(x, y, 2045101, 407, 332, 408, 333, 5))Then
Begin
Mouse(385, 334, 1, 1, True);
WaitUntilFindColorTolerance(10931946, 278, 516, 279, 517, 5);
Killed:=Killed+1;
WriteLn('We Had Killed A Monster');
Result:=True;
End Else
Result:=False;
End;
Procedure Attack;
Begin
WriteLn('We Are Fighting A Monster');
UseStun;
Begin
Repeat
If(FindColorTolerance(x, y, 2368646, 381, 394, 382, 395, 5))Then
Mouse(x, y, 1, 1, True);
If(SolveVictory)Then Exit;
Wait(100);
If(SolveQuest)Then Exit;
Wait(100);
If(SolveLevelUp)Then Exit;
Wait(500);
Until(FindColorTolerance(x, y, 0, 394, 533, 395, 534, 5))And(FindColorTolerance(x, y, 2045101, 407, 332, 408, 333, 5))Or(FindColorTolerance(x, y, 10931946, 374, 234, 375, 235, 5));
If(FindColorTolerance(x, y, 0, 394, 533, 395, 534, 5))And(FindColorTolerance(x, y, 2045101, 407, 332, 408, 333, 5))Or(FindColorTolerance(x, y, 10931946, 374, 234, 375, 235, 5))Then
Begin
SolveVictory;
SolveLevelUp;
SolveQuest;
SolveLevelUp;
SolveQuest;
End;
End;
End;
Procedure Report;
Begin
ClearDebug;
Begin
WriteLn('--------------------------------------------------------------------');
WriteLn('DFCF - Dragon Fable Christmas Fighter.');
WriteLn('Version ' + VersionNumber + '.');
WriteLn('Made By U L T R A.');
WriteLn('--------------------------------------------------------------------');
WriteLn('Ran For ' + (TimeRunning) + '.');
WriteLn('Killed ' + IntToStr(Killed) + ' Monster(s).');
WriteLn('Stunned ' + IntToStr(Stuned) + ' Monster(s).');
WriteLn('Healed ' + IntToStr(Healed) + ' Time(s).');
WriteLn('Quests ' + IntToStr(Quests) + ' Finished.');
WriteLn('Leveled ' + IntToStr(Leveled) + ' Times.');
WriteLn('--------------------------------------------------------------------');
End;
End;
Begin
SetUpSRL;
MouseSpeed:=25;
Begin
Repeat
GetSomeHeal;
GoToWar;
Attack;
GoBackHome;
Report;
Until(Killed = ToKill)Or(Killed > ToKill);
If(Killed = ToKill)Or(Killed > ToKill)Then
Begin
Report;
TerminateScript;
End;
End;
End.