Beautiful script! The only thing you should fix is the fighting detection because between certain attacks GetAnimation will result in -1. It is not a problem with the function, but after I used Rsbot to check the animations, I noticed that in between the defending and attacking animations, there was always an idle one (-1). I do not know a way around this except by using color to detect a fight.
E: You could use this as it works well as far as i know (when used with the reflection function). It's just a modified version of IsFightAt.
Simba Code:
function IsFightAt2(x, y: Integer): Boolean;
var
xx, yy: Integer;
begin
Result := FindColor(xx, yy, 458916, x - 30, y - 20, x + 20, y + 20) or FindColor(xx, yy, 52354, x - 40, y - 20, x + 20, y + 20);
end;
And this is the modified and working Fighting detection:
Simba Code:
function Fight: boolean;
var
TimeM: Integer;
begin
if(not(LoggedIn))then
if(not(LoggedInBB))then
Exit;
if(DetectDeath)then
Exit;
Randoms;
RunEnergy(70 + Random(30));
if(MonstersOnMS)then
if(((Players[CurrentPlayer].Strings[1] = 'Goblin') and (FightGoblin))
or ((Players[CurrentPlayer].Strings[1] = 'Giant rat') and (FightRat)))then
begin
Inc(Players[CurrentPlayer].Integers[0]);
Inc(Stats_CustomVars[2]);
MarkTime(TimeM);
repeat
Flag;
AntiBan;
Randoms;
Writeln('Fighting for ' + IntToStr(TimeFromMark(TimeM)));
if(not(Fighting) and not(IsFightAt2(289,144)))then
Break;
until(false)
Result := True;
end;
end;