NPC – character functions¶
zDExt_Npc_GetRoutineFuncName¶
Gets the function name of the NPC's current routine (e.g. RTN_PRESTART_100).
npc– instance of the NPCreturn– function name of the NPC's current routine
zDExt_Npc_GetRoutineName¶
Gets the name of the NPC's current routine (e.g. PRESTART).
npc– instance of the NPCreturn– name of the NPC's current routine
zDExt_Npc_EquipItem¶
Equips or unequips the specified item on the NPC.
npc– instance of the NPCitemInstance– instance name of the item
zDExt_Npc_GetWalkMode¶
Gets the current walk mode of the NPC.
-1- invalid0/NPC_RUN- run1/NPC_WALK- walk2/NPC_SNEAK- sneak3- in water4- swim5- dive
npc– instance of the NPCreturn– walk mode
zDExt_Npc_IsStanding¶
Checks if the NPC is currently standing still.
npc– instance of the NPCreturn–TRUEif NPC is standing,FALSEotherwise
zDExt_Npc_IsWalking¶
Checks if the NPC is currently walking.
npc– instance of the NPCreturn–TRUEif NPC is walking,FALSEotherwise
zDExt_Npc_HasOverlayMds¶
Checks if the NPC has the specified animation overlay active.
npc– instance of the NPCreturn–TRUEif NPC has overlay with specified name,FALSEotherwise
zDExt_Npc_HasTimedOverlayMds¶
Checks if the NPC has the specified timed animation overlay active.
npc– instance of the NPCreturn–TRUEif NPC has overlay with specified name,FALSEotherwise
zDExt_Npc_OpenDeadNpcInventory¶
Opens NPC's plunder inventory.
npc– instance of the NPC
zDExt_Npc_CloseInventory¶
Closes NPC's main inventory.
npc– instance of the NPC
zDExt_Npc_CloseInventorySteal¶
Closes the steal inventory of npc's focus NPC.
npc– instance of the NPC
zDExt_Npc_CloseDeadNpcInventory¶
Closes NPC's plunder inventory.
npc– instance of the NPC
zDExt_Npc_GetDistToPos¶
Gets the distance between the NPC and a given position in the world (in cm).
npc– instance of the NPCposX– X coordinate in the game worldposY– Y coordinate in the game worldposZ– Z coordinate in the game worldreturn– distance betweennpcand the specified position (in cm)
zDExt_Npc_GetDistToVob¶
Gets the distance between the NPC and an vob (in cm).
npc– instance of the NPCvobName– name of vob in game worldreturn– distance between NPC and vob in cm
zDExt_Npc_GetVisualBody¶
Gets the name of the NPC's visual body.
npc– instance of the NPCreturn– name of the NPC's visual body (for example HUM_BODY_NAKED0)
var string body; body = zDExt_Npc_GetVisualBody(hero);
if (Hlp_StrCmp(body, "HUM_BODY_NAKED0"))
{
//...
};
zDExt_Npc_GetVisualHead¶
Gets the name of the NPC's visual head.
npc– instance of the NPCreturn– name of the NPC's visual head (for example HUM_HEAD_PONY)
var string head; head = zDExt_Npc_GetVisualHead(hero);
if (Hlp_StrCmp(head, "HUM_HEAD_PONY"))
{
//...
};
zDExt_Npc_GetPortalRoom¶
Gets the name of the portal room in which the NPC is currently located.
npc– instance of the NPCreturn– name of the portal room
var string room; room = zDExt_Npc_GetPortalRoom(hero);
if (Hlp_StrCmp(room, ""))
{
//...
};
zDExt_Npc_Teleport¶
Teleports the NPC to the specified location without an AI queue.
npc– instance of the NPCpoint– name of the waypoint, freepoint or any vob in the game world