Command-line usage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 35: | Line 35: | ||
VCMP-Non Player Characters v1.5 | VCMP-Non Player Characters v1.5 | ||
</source> | </source> | ||
The -l flag's string can be empty or it contain one or more of the sub-flags 'x, y, z, s, w, c'. It is not mandatory to specify all these. Default class is 0. Default skin is skin of that class. Default spawning position is that of the class. Default weapon is weapon3. | The -l flag's string can be empty or it contain one or more of the sub-flags 'x, y, z, s, w, c'. It is not mandatory to specify all these. Default class is 0. Default skin is skin of that class. Default spawning position is that of the class. Default weapon is weapon3. | ||
To pass an array {"one", "two", "three"} to the script function [[onNPCScriptLoad]]( params ) use | |||
npcclient -n "npc" -w "one" -w "two" -w "three" | To pass an array <source>{"one", "two", "three"}</source> to the script function [[onNPCScriptLoad]]( params ), use | ||
<source> npcclient -n "npc" -w "one" -w "two" -w "three" </source> So params[i], where i is 0, 1 and 2 will be respectively "one", "two" and "three" in the event onNPCScriptLoad. |
Latest revision as of 05:34, 5 December 2022
The command-line usage of npcclient is as follows:
USAGE: npcclient [-] [-h <string>] [-l <string>] [-m <string>] [-p <integer>] [-w <string> ...] [-z <string>] -n <string> Where: -h <string>, --hostname <string> IP address of host -p <integer>, --port <integer> Port to connect to -n <string>, --name <string> (required) Name of the NPC -m <string>, --scriptfile <string> Squirrel Script file to be used -z <string>, --password <string> Password of the server to connect -l <string>, --location <string> The location, skin, weapon and class to spawn eg. "x__ y__ z__ s_ w_ c_" -w <string>, --params <string> (accepted multiple times) The params to be passed to script --, --ignore_rest Ignores the rest of the labeled arguments following this flag. VCMP-Non Player Characters v1.5
The -l flag's string can be empty or it contain one or more of the sub-flags 'x, y, z, s, w, c'. It is not mandatory to specify all these. Default class is 0. Default skin is skin of that class. Default spawning position is that of the class. Default weapon is weapon3.
To pass an array
{"one", "two", "three"}
to the script function onNPCScriptLoad( params ), use
npcclient -n "npc" -w "one" -w "two" -w "three"
So params[i], where i is 0, 1 and 2 will be respectively "one", "two" and "three" in the event onNPCScriptLoad.