Difference between revisions of "Server Admin Remote Scriptlet"

From ALFA
Jump to: navigation, search
(Created page with "'''Server Admin Remote Scripelets''' are tools to access [http://en.wikipedia.org/wiki/PowerShell PowerShell], NWScript, and other useful tools. Only those who have serve...")
(No difference)

Revision as of 05:14, 26 May 2014

Server Admin Remote Scripelets are tools to access PowerShell, NWScript, and other useful tools.

Only those who have server admin access, as defined in SQL, may use the following commands.

General Commands

Command Example Description
#sa rs [scriptlet] #sa rs $s.GetTag( $OBJECT_TARGET ); Run a PowerShell/NWScript scriptlet. The $s object can be used to access NWScript functions, like $s.SendMessageToPC($OBJECT_SELF, 'Message');. The $sql object (an ALFA.Database) can be used to make database accesses. The $CreatureAI object can be used to interface with the creature AI system. See Remote Scriptlets below.
#sa runscript [scriptname] #sa runscript 010_kill_all_pcs Run a script by name.
#sa getglobalint [var] #sa getglobalint ACR_IMPORTANT_VARIABLE Read a variable. getglobalint may be replaced by getglobalfloat, getglobalstring, getmoduleint, getmodulefloat, getmodulestring, or getmoduleobject.
#sa loadscript [C# Script DLL Path] Load a C# script assembly and call its main function.
#sa boot [accountname] #sa boot FoamBats4All Boot a PC by account name (insensitive).
#sa dumpvars [object] #sa dumpvars #module Dump variables on an object (by hex object id, tag, #module, #self, or #area).
#sa dumpareas #sa dumpareas Dump a list of areas in the module.
#sa dumpareaobjects [area] #sa dumpareaobjects #area Dump objects in an area (area specified by hex object id, tag, #module, #self, or #area).
#sa runupdater #sa runupdater Run the ACR_UpdaterScript.cmd batch file in the NWNX4 installation directory (if it exists).
#sa jump [object] #sa jump 010_wp_bg_docks_start Jump to an object (by hex object id or tag).
#sa compilerlog #sa compilerlog Show last module recompilation log file.


Remote Scriptlets

The #sa rs command is rather powerful, able to accomplishing anything on a server, with enough technical knowledge.

Useful Commands

Below are some commands used by HDMs, as well as a description of what they do.

Command Description
#sa rs $s.ApplyEffectToObject( $s.DURATION_TYPE_INSTANT, $s.EffectDamage( [DAMAGE], $s.DAMAGE_TYPE_MAGICAL, $s.DAMAGE_POWER_NORMAL, $s.TRUE ), $OBJECT_TARGET, 0.0 ); Deals [DAMAGE] damage to the currently selected object.
#sa rs $s.CreateItemOnObject( "[ITEM_RESREF]", $OBJECT_SELF, 1, "", 1 ); Creates a single item with ResRef [ITEM_RESREF] on the currently controlled character.
#sa rs $s.GetResRef( $OBJECT_TARGET ); Returns the ResRef [ITEM_RESREF] of the currently selected object.
#sa rs $s.NWNXSetString("OBJECTATTRIBUTES","SetWingVariation","",$s.ObjectToInt($OBJECT_TARGET), "16"); As an example, this would provide wings of ID 16 to the currently selected object. With tweaking, this command could set a hair style, or head variation.
#sa rs $s.SetCollision( $OBJECT_TARGET, 0 ); Turns collision off on the currently selected targets.