SCAR Code:
Orginal-
procedure AntiRandoms;
var
i : Integer;
begin
if not LoggedIn then Exit;
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
BarInFight;
FindNonInventoryRandoms;
Wait(1);
end;
Changed.
procedure AntiRandoms;
var
i : Integer;
begin
if not LoggedIn then Exit;
Status('Doing AntiRandoms');
for i := 0 to 3 do
FindNormalRandoms;
If BarInFight then // BarInFight only results True, It doesnt runaway.
RunAway(Parameters);
// FindNonInventoryRandoms; FindNormalRandoms does the same.
Wait(1);
end;
SCAR Code:
Shorten it out.
Also you forgot to add the tiles.
Procedure CheckTiles;
var
TP:TPoint;
TheNPC: TNPC;
begin
if not LoggedIn then Exit;
Tp:=Getme.Tile;
if InRange(Tp.x, 33554430, 33554430) and InRange(Tp.y, 33554431, 33554431)then //NEED TO ADD RIGHT TILES, DONT FORGET
Writeln('At Ogres, Good to know you can read')else
begin
Writeln('Hmm, not at Ogre tiles, looking for Ogres');
if FindNPC('gre', TheNPC) then
begin
Writeln('Found the Ogres, but not at Tiles. Error. Please post this on thread');
Exit;
end else
begin
Writeln('Cannot Find Ogres. Something is wrong, logging out for your safety.');
Logout;
Players[CurrentPlayer].Active := False;
NextPlayer(False);
Exit;
end;
end;
end;
SCAR Code:
Shorted down.
Procedure FightRandoms;
var
Me: TMe;
begin
if not LoggedIn then Exit;
if Me.InFight then
Status('Fight Found');
Writeln('We are under attack!');
repeat
Wait(700);
until(Not Me.InFight) or (HpPercent < 25);
if HpPercent < 25 then
begin
Status('Dying...Running Away');
Writeln('Shit...He is bigger than us! Running away');
RunAway('S', True, 0{idk}, 6000+random(2000));
end;
end;
SCAR Code:
Added some minor standarts.
begin
SetupSRL;
ScriptID := '1053'; // Do Not Touch
SRLID:= YourSRLID;
SRLPassword:= YourSRLPW;
ClearDebug;
Status('Loading Smart');
Writeln('Cogres');
Writeln(' By Pixelate');
SetupSmart;
DeclarePlayers;
LoginPlayer;
Wait(3000);
SetAngle(true);
Disguise(+IntToStr(OgresAttacked)+ ' Ogres Killed');
wait(2000);
repeat
CheckTiles;
AttackOgre;
WaitFight;
until (PlayersActive < 1);
if (PlayersActive < 1) then
ProgressReport;
end.
You got 2 infight functions?
I also noticed you like to use extra begins/ends after If/then etc...
SCAR Code:
If FindFight then
begin
Status('InFight');
end;
Can instead be
If FindFight Then
Status('InFight');
Other then that, Nice work