SRL Archive - Outdated / Broken

[SRL] Fighter


Pwnd

2006-04-16 22:12:13


//Help from neon.
program AutoFighter;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Fighting.scar}

const
MCol1 = 0;
MCol2 = 0;
MCol3 = 0;
Times = 0;
EatB = False;
FoodCol = 0;
Direction = '';
NickName = ''; //4 letters.

var
Kills: integer;

procedure FindRandoms;
begin
FindNormalRandoms;
CloseWindow;
ClickToContinue;
FindLamp('mining');
FindMod;
FindMime;
FindMaze;
FindQuiz;
FindCerter;
FindDoctor;
FindDemon;
if(FindNewBox)then
Logout;
end;

procedure Eat(FoodCol: integer; Dir: string);
var
Sex, Sey: integer;
begin
Sex:= 594;
Sey:= 149;
if(FindColorSpiral(Sex, Sey, FoodCol, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(Sex, Sey, 0, 0, True);
end else
begin
WriteLn('No food!');
SetRun(True);
RunAwayDirection(Dir);
LogOut;
end;
end;

procedure RWait(Base, Rand: integer);
begin
if((Base > 100) and (Rand > 100))then
begin
Wait(Base + Random(Rand));
end else
Wait(Base * 100 + Random(Rand * 100));
end;

procedure Fight(Color1, Color2, Color3, FoodColor: integer; Dir: string);
var
Sex, Sey: integer;
begin
Sex:= 259;
Sey:= 196;
if((FindColorSpiral2(Sex, Sey, Color1, MSX1, MSY1, MSX2, MSY2)) or
(FindColorSpiral2(Sex, Sey, Color2, MSX1, MSY1, MSX2, MSY2)) or
(FindColorSpiral2(Sex, Sey, Color3, MSX1, MSY1, MSX2, MSY2)))then
begin
MMouse(Sex, Sey, 0, 0);
RWait(1, 2);
if(GetHP < 10)then
begin
if(EatB)then
begin
Eat(FoodColor, Dir);
end else
begin
SetRun(True);
RunAwayDirection(Dir);
RWait(50, 50);
LogOut;
end;
end else
if(IsUpText('Attack'))then
begin
Mouse(Sex, Sey, 1, 1, True);
RWait(1, 2);
Flag;
while(InFight and (GetHP > 10))do
begin
RWait(5, 5);
FindTalk;
end;
Kills := Kills + 1;
end else
begin
Mouse(Sex, Sey, 1, 1, False);
if(ClickOption('Attack', 1))then
begin
Flag;
while(InFight and (GetHP > 10))do
begin
RWait(5, 5);
FindTalk;
end;
Kills:= Kills + 1;
end else
RWait(1, 1);
end;
end else
RWait(1, 1);
end;

procedure ProgressReport;
var
Counter: integer;
begin
ClearDebug;
Counter:= 0;
repeat
WriteLn('');
Counter:= Counter + 1;
until(Counter = 3)
WriteLn('///////////////////////////');
WriteLn('//// Progress Report ////');
WriteLn('///////////////////////////');
WriteLn('//// Killed: ' + IntToStr(Kills) + ' ////');
WriteLn('//// ' + ScriptTime2(2) + ' ////');
WriteLn('////////////////////////////');
if(talks>0)then
WriteLn(' Talked to ' + IntToStr(talks) + ' Random event[s].');
if(lamps>0)then
WriteLn(' Used lamps ' + IntToStr(lamps) + ' Time[s].');
if(doctors>0)then
WriteLn(' Solved ' + IntToStr(doctors) + ' Fords[s].');
if(frogs>0)then
WriteLn(' Solved ' + IntToStr(frogs) + ' Frog[s].');
if(newboxes>0)then
WriteLn(' Solved ' + IntToStr(newboxes) + ' Box[es].');
if(demons>0)then
WriteLn(' Solved ' + IntToStr(demons) + ' Demon[s].');
if(logs>0)then
WriteLn(' Logged in ' + IntToStr(logs) + ' Time[s].');
WriteLn('<=====================================================>');
end;

procedure Setup;
begin
SetupSRL;
NickNameBMP:= CreateBitmapMaskFromText(NickName, UpChars);
SetChat('Off', 1);
SetChat('Off', 2);
SetChat('Off', 3);
Kills:= 0;
end;

begin
Setup;
repeat
Fight(MCol1, MCol2, MCol3, FoodCol, Direction);
if(Kills mod 5 = 0)Then
FindRandoms;
if(Kills mod 10 = 0)then
ProgressReport;
until((Times = Kills) or WeAreDead)
end.
Should work.
Eatb is if you want to eat.. or if you just want to run away.

Thanks <3

Mutant Squirrle

2006-04-16 22:19:06

why do you turn chats off?

Pwnd

2006-04-16 22:41:27

From: Mutant Squirrle
why do you turn chats off?
Lol, why didn't I finish it?

And I turned the chats off for randoms purposes and if you're fighting with other people.

That's better. It actually compiles now.. I'm so tired, lol.

WhiteShadow

2006-04-16 22:42:09

Suggestion
1. // Comment your constants. Took me a minute to figure "Times" out.
2. SexSey are unnessacary constants.. -.-
—-

Great job. I think I see the cat. * :p

Mutant Squirrle

2006-04-16 22:42:35

mmkay looks pretty good pwnd nice work (love that someone here knows what standards are XD)

Pwnd

2006-04-16 22:55:40

From: Mutant Squirrle
mmkay looks pretty good pwnd nice work (love that someone here knows what standards are XD)

I created standards.

Also, White, noobs need comments.

Neonknight77

2006-04-16 22:59:16

Who really cares what kind of variables you use(Sex,Sey)
Also, nice fighting procedure

Pwnd

2006-04-16 23:01:03

From: Neonknight77
Who really cares what kind of variables you use(Sex,Sey)
Also, nice fighting procedure

I did make an extension include to SRL called iSexSey.

Sounds like Secksi.

Neonknight77

2006-04-16 23:05:14

Talking about that thing you sent me once? Your own include that includes SRL?

JiveTonto@Gmail.com

2006-04-16 23:07:22

all the ram killers are comming out now

Pwnd

2006-04-16 23:14:00

From: JiveTonto@Gmail.com
all the ram killers are comming out now

This is an anything killer… but go ahead xD

ReFLeX

2006-04-16 23:24:01

rofl sex, sey

Pwnd

2006-04-16 23:24:42

From: ReFLeX
rofl sex, sey

I'll kill you if you take it :)

XxKanexX

2006-04-16 23:42:25

Nice job Pwnd ;) I could really go for the SexSey variable :rolleyes:

WhiteShadow

2006-04-16 23:49:39

I would rather perfer:

program New;
var
Dimmu, Borgir : Integer;
begin
Dimmu:= 45;
Borgir:= 67;
ClickMouse(Dimmu, Borgir, true);
end.

Wouldn't you Pwnd? xD

Lmao, a pt. in history for scripting, everyone starts having personal variables, in place of their x's and y's.

Pwnd

2006-04-16 23:50:36

White Shadow, you're my new pal.

JiveTonto@Gmail.com

2006-04-17 00:09:12

lol how rude of you renaming it and quoting me……

WhiteShadow

2006-04-17 00:12:04

From: JiveTonto@Gmail.com
lol how rude of you renaming it and quoting me……


Who are you referring too?

The Prince of Randomness?

2006-04-17 05:49:49

From: JiveTonto@Gmail.com
lol how rude of you renaming it and quoting me……


I think you clicked the wrong link =):p

Ejjman

2006-04-22 14:28:57

Its kinda a noob script

Pwnd

2006-04-22 15:35:39

From: ejjman1
Its kinda a noob script

Hence why it is in the Leecher section, leech.

The Un-Named

2006-04-23 09:48:37

From: ejjman1
Its kinda a noob script


How is it a noob script? It works, dosen't it? Geesh, my fighter is called NOOBFighter, yet no one said it was a noob script! *cough*

All scripts can teach us.