Welcome to PenUltima Online. Click to login or register.

Functions:

CreateNpcFromTemplate( template, x, y, z, override_properties := 0, realm := _DEFAULT_REALM)
Parameters:
Name Type
template String
x,y,z Integer world coordinates
realm String - case-sensitive name of the realm
override_properties A Struct with keys as String members and values as appropriate (see notes)
Explanation
Creates an NPC from a template (found in NPCDESC.CFG).
Notes: override_properties: a structure containing members to override values in the NPC template. This can be used only to override built-in properties (facing, color, gender etc), but not custom properties. To override custom properties, use SetObjProperty after the NPC has been created.
Return values
Character Reference on success
Errors
"Invalid parameter type"
"Parameter 4 must be a Struct or Integer(0)"
"Realm not found"
"Invalid Coordinates for Realm"
"NPC template 'X' not found"
"Not a valid location for an NPC!"
"Exception detected trying to create npc from template 'X'"
Related
NPC
Related Configs
npcdesc.cfg