NPC – character functions
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
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
Npc_EquipItem
Equips or unequips the specified item on the NPC.
npc– instance of the NPCitemInstance– instance name of the item
| Example usage | |
|---|---|
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
Npc_IsStanding
Checks if the NPC is currently standing still.
npc– instance of the NPCreturn–TRUEif NPC is standing,FALSEotherwise
Npc_IsWalking
Checks if the NPC is currently walking.
npc– instance of the NPCreturn–TRUEif NPC is walking,FALSEotherwise
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
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
Npc_OpenDeadNpcInventory
Opens NPC's plunder inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
Npc_CloseInventory
Closes NPC's main inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
Npc_CloseInventorySteal
Closes the steal inventory of npc's focus NPC.
npc– instance of the NPC
| Example usage | |
|---|---|
Npc_CloseDeadNpcInventory
Closes NPC's plunder inventory.
npc– instance of the NPC
| Example usage | |
|---|---|
Npc_GetDistToPos
Gets the distance between the NPC and a given position in the world (in cm).
npc– instance of the NPCposition– coordinates (X, Y, Z) in the game worldreturn– distance between NPC and position in cm
| Example usage | |
|---|---|
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
Npc_GetVisualBody
Gets the name of the NPC's visual body.
npc– instance of the NPCreturn– name of the portal room
| Example usage | |
|---|---|
Npc_GetVisualHead
Gets the name of the NPC's visual head.
npc– instance of the NPCreturn– name of the portal room
| Example usage | |
|---|---|
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
| Example usage | |
|---|---|
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
| Example usage | |
|---|---|