
Originally Posted by
snsgold
there still somethings wrong with AntiRandoms.simba
Oh I'm sorry about that :3 here's the two functions you need to replace to fix your problem:
Simba Code:
function R_FindCombatRandom: boolean;
var
Names: TStringArray;
Temp: TNPCArray;
i: integer;
begin
Result := False;
if (not R_UnderAttack) then
exit;
if (R_PrayerRandoms) then
begin
Names := ['security guard', 'evil chicken', 'river troll', 'rock golem', 'shade', 'swarm', 'tree spirit', 'ent', 'zombie'];
end else
Names := ['security guard', 'evil chicken', 'river troll', 'rock golem', 'shade', 'swarm', 'tree spirit', 'ent'];
Temp := R_GetAllNpcs;
for i := 0 to high(Temp) do
if (ExactStrInArr(Lowercase(Temp[i].Name), Names)) then
begin
if (not R_NearTile(Temp[i].Tile, 10)) then
Continue;
Result := True;
Break;
end;
if Result then
writeln('[Reflection Anti-Randoms] ''' + (Temp[i].Name) + ''' Combat random detected! Running away...');
end;
function R_FindCombatRandomEx: boolean;
var
Names: TStringArray;
i: integer;
begin
Result := False;
if ((not R_UnderAttack) or (length(R_FoundNpcs) < 1)) then
exit;
if (R_PrayerRandoms) then
begin
Names := ['security guard', 'evil chicken', 'river troll', 'rock golem', 'shade', 'swarm', 'tree spirit', 'ent', 'zombie'];
end else
Names := ['security guard', 'evil chicken', 'river troll', 'rock golem', 'shade', 'swarm', 'tree spirit', 'ent'];
for i := 0 to high(R_FoundNpcs) do
if (ExactStrInArr(Lowercase(R_FoundNpcs[i].Name), Names)) then
begin
R_FoundNpcs[i]:= R_GetTNPC(R_FoundNpcs[i].Index);
if (not R_NearTile(R_FoundNpcs[i].Tile, 10)) then
continue;
Result := True;
Break;
end;
if Result then
writeln('[Reflection Anti-Randoms] ''' + (R_FoundNpcs[i].Name) + ''' Combat random detected! Running away...');
end;
Everyone else should be fine, the problem has been fixed, if you auto-update to #72 it will be ok. If you can't compile the include, remember you can always download a new copy from the GC and it should fix any broken files.