why are you setting x/y/z/h into local variables? They already exist globally for any npc. They are the value of the NPC's /loc at the moment that portion of the script is called.
In this case you are doing a bunch of work for nothing.
Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.