ConnectNPC: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=Connect an NPC to the server| params=<syntaxhighlight lang="lua">(name, script, host="127.0.0.1")</syntaxhighlight> <poem>::name : The name for the NPC to use....")
 
No edit summary
Line 1: Line 1:
{{Welcome|
{{Welcome|
desc=Connect an NPC to the server|
desc=Connect an NPC to the server|
params=<syntaxhighlight lang="lua">(name, script, host="127.0.0.1")</syntaxhighlight>
params=<syntaxhighlight lang="lua">(name, script="", host="127.0.0.1")</syntaxhighlight>
<poem>::name : The name for the NPC to use.
<poem>::name : The name for the NPC to use.
::script : The script NPC must use. This script must reside in npcscripts folder.(with the ".nut" extension)
::script : The script NPC must use. This script must reside in npcscripts folder.(with the ".nut" extension)

Revision as of 06:37, 5 December 2022


Description:
Connect an NPC to the server


Parameters:

(name, script="", host="127.0.0.1")

name : The name for the NPC to use.
script : The script NPC must use. This script must reside in npcscripts folder.(with the ".nut" extension)
host : This paramter is optional.


Return Values:
This function does not return any specific values.


Example

function onScriptLoad()
{
	ConnectNPC("[Bot]John", "test.nut");
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.