Seems like a handy function when working in the wilderness. Might I suggest using InRange just to make it look a bit cleaner?
Simba Code:
function GetWildernessLevel : Integer;
begin
result := StrToInt(GetNumbers(GetTextAtExWrap(490, 85-50, 508, 102-50, 0, 10, 1, 1939681, 20, XPChars)));
if not InRange(result, 1, 60) then
result := -1;
end;
E: Sorry- I originally just changed it to have InRange instead of that nasty "or" thing. But then I noticed one thing that could be changed and another and another so I guess I kind of ruined it for you.
E2: I appologize for this but
Simba Code:
function GetWildernessLevel : Integer;
begin
result := StrToIntDef(GetNumbers(GetTextAtExWrap(490, 85-50, 508, 102-50, 0, 10, 1, 1939681, 20, XPChars)), -1);
end;