SCAR Code:
{.Script Info:
# ScriptName = AutoFight and Walker
# Author = Ziphlon
# Description = Fights Goblins for now.
# Version = V1.2
# Date = 2/14/08
# DateVersion = 2/14/08 = V1.0 2/15/08 = V1.2
# Comments = The fighter now has SRL codeing!
/Script Info}
// ******************INSTRUCTIONS*******************
// All you need to do is drag the selection tool to
// the runescape applet and it will do the rest for
// you! You must sign on to a **LOW DETAIL** world
// in order for this to work properly.
// **NOTE**
// You may have to change the goblin color in order
// for this to work and if you dont you will just be
// standing there doing nothing.
program AutoFighter;
{.include SRl/SRL.scar}
var
x,y: Integer;
const
Monster = 1658212; //input the goblin color here
LumbridgeColor = 10116152; //input the color of the blue shield on the wall in lumbridge
// ************ANYTHING BELOW THIS LINE DO NOT TOUCH!****************
procedure FindMonster; //This block to the left
begin //searches for the monster
if(findcolor(x,y,Monster,0,0,700,700)) then //and then it will target
begin //it.
Writeln('Monster found!'); // **NOTE**
MMouse(x,y,3,3); // This has only been
Wait(50+random(100)); // tested on goblins north
Mouse(x,y,0,0,true); // of lumbridge any other
end else // monster MAY work but I
Writeln('Monster not found...Searching again'); // do not gurrentee results.
end;
//*******************Setup Block********************
procedure Setup;
begin
cleardebug;
Writeln('You will now have 5 seconds to get to the runscape applet');
Wait(5000);
if(findcolor(x,y,LumbridgeColor,0,0,700,700)) then
begin
Writeln('Setting to run.');
MMouse(674,484,2,2);
Wait(100+random(500));
Mouse(674,484,0,0,true); // Clicks the screw icon
Wait(500+random(1000));
MMouse(642,427,3,3);
Wait(100+random(500));
Mouse(642,427,0,0,true); // Clicks the run icon
Wait(500+random(1000));
MMouse(648,186,2,2);
Wait(100+random(500));
Mouse(648,186,0,0,true); // Clicks the Backpack icon
Wait(500+random(1000));
end else
Writeln('Not in lumbridge or colors are wrong.'); //This will just skip the whole test above
end;
//*******************Walking Block********************
procedure Walking;
begin
MMouse(676,45,0,0); //Everything to the left
Mouse(676,45,0,0,true); //is the way to the goblin
Wait(7000+random(2500)); //field.
MMouse(582,42,0,0); //
Mouse(582,42,0,0,true); //
Wait(4700+random(1900)); //
MMouse(572,84,0,0); //
Mouse(572,84,0,0,true); //
Wait(4500+random(1430)); //
MMouse(560,59,0,0); //
Mouse(560,59,0,0,true);
Wait(5000+random(1532));
end;
//*******************StopRun Block*********************
procedure StopRun;
begin
Writeln('Stoping run.');
MMouse(671,477,2,2);
Wait(100+random(500));
Mouse(671,477,0,0,true); //Clicks tool icon
Wait(500+random(1000));
MMouse(654,436,3,3);
Wait(100+random(500));
Mouse(654,436,0,0,true); // Clicks run icon
Wait(500+random(1000));
MMouse(653,194,3,3);
Wait(100+random(500));
Mouse(653,194,0,0,true); // Clicks the backpack icon
Wait(4500+random(4000));
end;
begin
SetupSRL;
Setup
Walking
StopRun
repeat
FindMonster
Wait(7000+random(6000));
until(false);
end.