 |
 |
 |
 |
| Author |
Message |
Bytehawk
Joined: 03 Feb 2006 Posts: 56 Location: Germany, Franconia
|
Posted: Wed Sep 27, 2006 8:07 am Post subject: hooking GetWorldHeight |
|
|
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? |
|
 |
|
|
 |
 |
| Author |
Message |
Marilla
Joined: 02 Feb 2006 Posts: 329
|
Posted: Wed Sep 27, 2006 1:16 pm Post subject: |
|
|
Unless something happened of which I am not aware, there is no such system hook.
The valid system hooks can be found in the documentation. Specifically, in the config file reference under the syshook.cfg entry. The valid entries for 096 are: CheckSkill, OpenSpellbook, GetBookPage, CombatAdvancement, ParryAdvancement, Attack, Pushthrough, SpeechMul. 095 is the same, but without SpeechMul. |
|
 |
|
|