Since GetWorldHeight is giving back the highest, not the lowest z coordinate you can stand at, as it should, I wanted to hook GetWorldHeight and calculate the correct coordinate using GetStandingLayers (x, y)[1].z
This is what I tried:
Code:
--- syshook.cfg ---------
SystemHookScript worldHeight.ecl
{
GetWorldHeight gwh
}
--- worldHeight.src ---------
program worldHeight()
return 1;
endprogram
exported function gwh(x, y, realm:= _DEFAULT_REALM)
return GetStandingLayers (x, y, MAPDATA_FLAG_ALL, realm)[1].z;
endfunction
But this gives only a "Unknown SystemHook GetWorldHeight"
I know, I could replace any ocurrance of "GetWorldHeight" in all scripts with "GetStandingLayers (x, y)[1].z" but if anyone could help me with creating that hook or telling me, what I - again - made wrong so that GetWorldHeight isn't working, I'd prefer that
Thanks in advance.
PS: Where can I find out, for what functions SytemHooks exist?