Before I comment on anything else; YOU NEED TO SPLIT UP YOUR PROCEDURES! DX
I think I've told you that before. :p
For instance, like this:
function DeclareWhatDo: Boolean;
var
Material: Integer;
I: Byte;
begin
for I := 0 to 2 do
begin
case (I) of
0: Material := DTMFromString('78DA63E46661601067624005103E2394C7C80' +
'8542345400D33116AF8816A6409A81106AA9127A0461CA8469480' +
'1A56A01A41026A3889F03BC83D12F8D5000017FA01A0');
1: Material := DTMFromString('78DA63E466616048636440054C601226CAC80' +
'954934A849A64026AB8806A1209A8E105AA8925A0861FA8268A80' +
'1A4122D4F001D52411E19E14026A406198805F0D007AF9049B');
2: Material := DTMFromString('78DA633465616008636440054C601226CAA80' +
'554E347408D2E508D270135464035EE04D480DCE346408D0D1176' +
'D901D57811506341D83D009F610442');
end;
if FindDTM(Material, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
case (I) of
0: WhatDo := 'Bolts';
1: WhatDo := 'Darts';
2: WhatDo := 'Headless Arrows';
end;
Result := True;
end;
FreeDTM(Material);
if (Result) then exit;
end;
Misc_ProgressReport;
end;
And, you need more failsafes: the runtime error I was getting, was because it didn't find any of the DTMs it was looking for, and continued on without loading any. I know it can be a true pain, but having failsafe checks for such situation makes a script really stable and trustworthy; you won't be wondering why something totally unrelated doesn't work when you have an error in some place you didn't know you had an error.
So, debugging is key. Make your script have a debugging mode and debug every single thinkable thing. Even things that seem unworthy.
But, yes, regarding your actual error .. (:p) .. if you're sure that you're running RuneScape on '
Safe Mode' (found in options screen), then a solution might be to reinstall Simba + SRL opendev.