SRL Archive - RS3 Outdated / Broken Scripts

Simple Autofighter


Smartzkid

2007-03-02 11:44:56

Simple Autofighter v3

Just a simple autofighter script. I may add more features later; I just whipped this up so I could level up my noobs while I did other stuff.

I'm releasing this mainly for anyone who wants an autofighter base to build upon, or for anyone who wants to study a simple, efficient script

If anyone's interested in this script, I may add in some extra features like antiban, auto eating, etc

NOW WITH ANTIRANDOMS, FINDTALK, AND ANTIBAN :p

WARNING: THIS SCRIPT IS NOT MEANT TO BE RUN OVERNIGHT. IT IS MADE TO LVL YOUR NOOBS WHILE YOU DO SOMETHING ELSE NEARBY.

Smartzkid

2007-03-02 12:43:27

~~reserved post~~

Sp0rky

2007-03-02 14:21:11

lol! That really is simple :P

Ty for release, nicely indently, what i like to see :D

Could you not add a find normal randoms? so there's some kind of protection :P

julle13

2007-03-02 14:25:02

Nice:p Shortest autofighter ever?:D

Smartzkid

2007-03-03 00:24:00

From: julle13
Nice:p Shortest autofighter ever?:D


Quite possibly :p

Adding findnormalrandoms in a min…

EDIT:

Added antirandoms! Yay!

Jason2gs

2007-03-03 00:32:58

Nice, lol :)

Smartzkid

2007-03-03 00:34:51

As far as I know…its the only 20 line autofighter EVER!

Jason2gs

2007-03-03 00:44:52

Make that 22!

Jason2gs

2007-03-03 01:30:13


program New;
{.include SRL/SRL.scar}
begin
SetupSRL;
repeat
if(FindObj(x, y, 'hicken', 15264235, 5))then
FTWait(30)
Mouse(x, y, 2, 2, True);
FTWait(10);
FindNormalRandoms;
Wait(10000 + Random(3000));
until(False);
end.

13 LINE CHICKEN FIGHTER!!!

Smartzkid

2007-03-03 01:34:57

Heh…due to a *slight* rework, I have been able to pack antiban and findtalks into 20 lines, where it took you 22 =D

Jason2gs

2007-03-03 01:36:09

Heh. This is fun :)

Post your 5 liner

Smartzkid

2007-03-03 01:39:33

*cough cough* four liner…

program Fighter;
{.include SRL\SRL.scar}
const color = 1648937;
begin SetupSRL repeat if (FindColorTolerance(x, y, color, MSXX1, MSY1, MSX2, MSY2, 5)) then if (not (x = 1)) and (not (y = 1)) then MMouse(x, y, 1, 1) if (IsUpText('Attack')) then begin Mouse(x, y, 5, 5, true) wait(10000 + random(5000)) end wait(50 + random(25)) FindNormalRandoms AntiBan FindTalk until(isfkeydown(12)) end.

julle13

2007-03-03 03:52:15

Lol, nice. That must be against scripting standards :p

Jason2gs

2007-03-03 07:09:49

Soooo against scripting standards :D

m0u53m4t

2007-03-03 07:31:40

OWNED.

It may be 45 lines, but methinks it would run for hours…
program Fighter;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\fighting.scar}
const MonsterColor = 2907004;

Var
Kills: integer;

Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, 16728128, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, 192, x - 20, y - 10, x + 20, y + 10) ) then
Result:=True;
end;

Procedure Randoms;
Begin
FindNormalRandoms;
FindTalk;
If isfkeydown(12) then TerminateScript
End;

begin
SetupSRL;
repeat
SendArrowSilentWait(1,200+random(500))
if InFight then Kills := Kills + 1
if (FindObj3(x, y, 'Attack', MonsterColor, 5) and (InFight = false)) then
if (not InFightAt(x,y)) then
Begin
Mouse(x, y, 5, 5, true);
Flag
Wait(1000)
End
While Infight do Randoms
Randoms
AntiBan;
ClearDebug
Writeln('You have killed ' + inttostr(kills) + ' monsters!')
until (False)
end.

GoF

2007-03-03 08:22:52

Owned ? :D

program SeagullKiller; {.include SRL/SRL.scar} {.include SRL/SRL/Skill/Fighting.scar} {.include SRL/SRL/Skill/Ranging.scar} const GullsToOwn = 125; FightWay = 2; ReportTime = 60;  RandomTimeOut = 5; WaitTime = 3; FastKilling = True;  ArrowPicking = False; AntiB = true; AntiR = True; var GullCol : array[0..5]of integer; KillsDone,WaitGull,Attacks,FastWaiting,MMWater :integer; WAN :boolean; procedure DeclarePlayers; begin HowManyPlayers:= 1; NumberOfPlayers(HowManyPlayers); Players[0].Name :=''; Players[0].Pass :=''; Players[0].Nick :=''; Players[0].Active :=True; end; procedure SetUpPlayer; begin if(not(LoggedIn))then begin LogInPlayer; end; if(LoggedIn)then begin SetFightMode(FightWay); Wait(345+random(800)); SetRun(True); Wait(450+random(300)); PerfectNorth; end; end; procedure Getposition; var GFC :integer; WA :integer; BL :integer; ToF :boolean; begin GFC:=0; BL:=0; WAN:=False; if(FindBitmapToleranceIn(MMWater,x,y,MMx1,MMy1,MMx2,MMy2,50))then begin Writeln('Found water'); WAN:=True; Exit; end; if(not(FindBitmapToleranceIn(MMWater,x,y,MMx1,MMy1,MMx2,MMy2,50)))then Writeln('Cant find water... We maybe lost..'); repeat BL:=BL+1; WA:=random(5); if(FindObj(x,y,'eag',GullCol[WA],15))then begin Writeln('Still found the seagull..'); Players[CurrentPlayer].loc := 'Not clear.'; ToF:=True; end; until(ToF=True)or(BL=10); if(BL=10)then begin Writeln('Cant find water or seagulls! We must be lost.'); LogOut; WAN:=False; TerminateScript; if(ToF=True)then begin Writeln('We will try to survive...'); WAN:=True; Exit; end; end; end; Procedure AntiBanzZ; var RaBC : Integer; begin if(AntiB)then begin if(not(LoggedIn))then begin Exit; end; RaBC:=Random(35) case RaBC of 1: BoredEvery(2 + Random(10)); 2: MakeCompass('N'); 3: HoverSkill('Strenght',false); 4: LeaveScreenEvery(10 + Random(5)); 5: BoredEvery(9 + Random (21)); 6: DoEmote(1 + Random(20)); 7: RotateEvery(20 + Random(5)); 8: MMouse(Random(300),Random(400),10,10) end; end; end; procedure CheckLogin; begin if(not(LoggedIn))then begin Writeln('Not logged in...'); LogInPlayer; Writeln('Logged in.'); end; end; procedure LoadStuff; begin GullCol[0]:= 6596828; GullCol[1]:= 6399189; GullCol[2]:= 15395821; GullCol[3]:= 9737375; GullCol[4]:= 14869733; GullCol[5]:= 5673663; MMWater:=BitmapFromString(2,2,'6277A56277A56277A56277A5'); WaitGull:=WaitTime*1000; end; procedure LoadWaiting; begin if(FastKilling=true)then begin FastWaiting:=12*10000; end; if(FastKilling=true)then begin FastWaiting:=20*10000; end; end; procedure QuickRands; begin if(not(AntiR))then begin exit; end; if(AntiR)then begin CloseWindow; Wait(10); FindTalk; Wait(10); FindDead; Wait(10); FindMime; Wait(10); FindMaze; Wait(10); FindQuiz; Wait(10); FindScapeRune; Wait(10); ClickToContinue; Wait(10); FindTalk; Wait(10+Random(50)); end; end; procedure CheckFightStatus; var ReleaseLoop :integer; begin ReleaseLoop:=0; if(not(InFight))then begin Exit; end; if(InFight)then begin repeat ReleaseLoop:=ReleaseLoop+1; Wait(WaitGull+random(2000)); QuickRands; until(not(InFight))or(ReleaseLoop=5) KillsDone:=KillsDone+1; end; end; procedure KillTheBitches; var RAG :integer; DBL :integer; WA :integer; MarkT :integer; begin MarkTime(MarkT); DBL:=0; RAG:=RandomTimeOut+random(5); Writeln('Killing seagulls..'); repeat CheckLogin; DBL:=DBL+1; CheckFightStatus; WA:=random(5); if(FindObj(x,y,'eag',GullCol[WA],15))then begin MMouse(x+random(3),y+random(3),2,2); Mouse(x,y,2,2,true); Flag; Attacks:=Attacks+1; QuickRands; end; until(DBL=RAG)or(TimeFromMark(MarkT)=FastWaiting+random(12000)); end; procedure ProgressReport; begin Writeln('****----Seagull Slasher by GoF ProgressReport----****'); Writeln(''); Writeln('Killed '+inttostr(KillsDone)+' out of '+inttostr(GullsToOwn)+' Seagulls.'); Writeln('Total time used: '+TimeRunning); Writeln('Times Attacked Seagulls:'+IntToStr(Attacks)+''); Writeln(''); Writeln('****----------------End Of Report----------------****'); end; procedure MainLoop; begin if (not(LoggedIn)) then begin LoginPlayer; end; SetUpPlayer; repeat if(not(LoggedIn)) then begin LoginPlayer; end; KillTheBitches; AntiBanzz; Getposition; FindNormalRandoms; ProgressReport; until (KillsDone=GullsToOwn) end; begin SetUpSRL; LoadStuff; LoadWaiting; DeclarePlayers; MainLoop; end.

Smartzkid

2007-03-03 08:57:57

What scripting standards? :p

m0u53m4t

2007-03-03 10:21:07

Teehee.

I've developed a propper fighter from this now:
program SimpleFighter;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\fighting.scar}

/////////////////////////////////////////////////////////////
///////////////////////Instructions//////////////////////////
/////////////////////////////////////////////////////////////
////////////////////Setup MonsterColor///////////////////////
//////////////////////Hold f12 to stop///////////////////////
/////////////////////////////////////////////////////////////

const MonsterColor = 2510699;
Const Tolerance = 5;
const MultiFight = False; //Can you attack a monster already fighting
Const RunDir = 'N';

Const StartPlayer = 0; // Determines who will play first

Procedure DeclarePlayers;
begin
HowManyPlayers :=1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=StartPlayer; // CurrentPlayer = Array Index

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Loc1';
Players[0].Skill:='Mining';
Players[0].Active:=True;

writeln('You have currently ' +inttostr(HowManyPlayers)+' Players set to run. The starting player is '+ players[currentplayer].name);

End;


Var
Kills,RanMark,HpMark: integer;

Procedure Spin(Time: integer);
Var a : integer;
Begin
A := Random(3)
if (a = 0) then a := 1
if (a = 2) then a := 3
SendArrowSilentWait(a, Time);
end;

Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, 16728128, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, 192, x - 20, y - 10, x + 20, y + 10) ) then
Result:=True;
end;

Procedure WaitForHp;
Begin
Repeat
If Random(3) = 0 then Spin(200+random(500))
Wait(5000)
FindTalk
FindNormalRandoms
If Random(3) = 0 then RandomRClick
Until ((HpPercent > 50) or (TimeFromMark(HpMark) > 240000))
End;

Procedure Randoms;
Begin
Status(IntToStr(TimeFromMark(RanMark)) + 'ms since last randoms check')
FindNormalRandoms;
FindTalk;
If isfkeydown(12) then TerminateScript
If random(30) = 0 then
if(HpPercent < 30)then
Begin; MarkTime(HpMark); RunTo(RunDir,true); WaitForHp; End;
MarkTime(RanMark)
If Random(9) = 0 then Spin(200+random(500))
End;

begin
SetupSRL;
DeclarePlayers
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
SetRun(True)
repeat
Spin(200+random(500))
if InFight then Kills := Kills + 1
if (FindObj3(x, y, 'Attack', MonsterColor, Tolerance) and (InFight = false)) then
if ((not InFightAt(x,y)) or (MultiFight = true)) then
Begin
Mouse(x, y, 5, 5, true);
Wait(500)
Flag
Wait(500)
End
While Infight do Randoms
Randoms
AntiBan;
ClearDebug
Writeln('You have worked for ' + TimeRunning + '!')
Writeln('You have killed ' + inttostr(kills) + ' monsters!')
SRLRandomsReport
until (False)
end.

I'll release it after a 2 hour test.

Smartzkid

2007-03-03 13:43:52

Nice! Wow…did I really start this?

bilbobaggins

2007-03-03 15:38:33

well this auto fighter wont even attack… it just keeps lookin at the monster

m0u53m4t

2007-03-05 11:01:25

Meh. Worked for me :p