
Originally Posted by
Coh3n
rs_GetCompassAngleDegrees works fine. Click
here for my explanation. Changing line 227 in Simba/Includes/SPS/SPS.simba to this should resolve the issue.
Simba Code:
if (inRange(round(rs_GetCompassAngleDegrees), 10, 350)) then
The final solution ^^
-----------------------------------------------------------------------------------------------------------
Fix I posted earlier had a flaw, a huge flaw, in it and it took some measures that weren't really needed.
This one appears to work just fine for me. Please test and report back if you find it to not work as supposed.
It uses the blue and red colors on the compass to tell if its north.
Simba Code:
function SPS_GetMyPos: TPoint;
var
Minimap: T3DIntegerArray;
t, map: integer;
begin
Result := Point(-1, -1);
if not LoggedIn then
Exit;
if not SPS_Loaded then
SPS_Load;
// we should just rotate the minimap according to the minimap angle.
if not(GetColor(544, 17)= 7699891) and not (GetColor(543, 29)= 3227717) then
ClickNorth(True);
t := getSystemTime;
Minimap := SPS_GatherMinimap;
if (High(Minimap) < 0) then
begin
if (SPS_Debug) then
WriteLn('[SPS] Did not gather Minimap.');
Exit;
end;
try
map := SPS_FindMapInMapEx(
Result.X, Result.Y, SPS_Worldmap, Minimap, SPS_Surface.Tolerance
);
if ((Result.X > 0) and (Result.Y > 0)) then
begin
Result := SPS_LocalToGlobal(SPS_Areas[map], Result.X, Result.Y);
end;
if (SPS_Debug) then
writeln(format('[SPS] GetMyPos: Finished in %d ms. Location = %s',
[getSystemTime - t, toStr(result)]));
except
Writeln('[SPS] ERROR in SPS_GetMyPos: ' + ExceptionToString(ExceptionType, ExceptionParam));
SPS_WarnUser('SPS_GetMyPos', ExceptionToString(ExceptionType, ExceptionParam));
end;
end;
Edit: Navigate to Includes/SPS/ and open sps.simba, find function called sps_getMyPos, replace it with ^^ and save it to apply this fix.