alloc
Allocates a new NPC avatar, or re-uses an older cached one if possible.
Npc direction table:
| Id | Client Angle | Direction |
|:--:|:------------:|:----------:|
| 0 | 768 | North-West |
| 1 | 1024 | North |
| 2 | 1280 | North-East |
| 3 | 512 | West |
| 4 | 1536 | East |
| 5 | 256 | South-West |
| 6 | 0 | South |
| 7 | 1792 | South-East |Return
a npc avatar with the above provided details.
Parameters
the index of the npc in the world
the id of the npc in the world, limited to range of 0..16383
the height level of the npc
the absolute x coordinate of the npc
the absolute z coordinate of the npc
the game cycle on which the npc spawned into the world; for static NPCs, this would always be zero. This is only used by the C++ clients.
the direction that the npc will face on spawn (see table above)
the priority group a NPC belongs into. See NpcInfo.setPriorityCaps for greater documentation.
if true, the NPC will only render to players that have explicitly marked this NPC's index as specific-visible, anyone else will be unable to see it. If it's false, anyone can see the NPC regardless.