Libraries and sample scripts

The SkunkWorks distribution package installs the following script files in the SkunkWorks\Libraries folder:

Filename

Description

SkapiDefs.js
SkapiDefs.vbs

Constant definitions for use with the native SkunkWorks API.

CommandSample.swx
CommandSample.js

Sample script illustrating the use of the OnCommand event.

ControlSample.swx
ControlSample.js

Sample script illustrating the use of skapi.ShowControls and the OnControlEvent event.

ChoiceSample.swx
ChoiceSample.js

Similar to ControlSample, but using a dropdown Choice control in place of an Edit control.

ListSample.swx
ListSample.js

Another control sample focusing on notebook and list controls.

Pacifist.swx
Pacifist.vbs

A simple example of receiving events and issuing keyboard commands in response.

T.swx
T.js

Sample script contributed by therkyn, and patterned after the t.js that came with ACScript, demonstrating basic event handling. Includes a handler for every defined event.

SpellObj.js

Script contributed by Pax, implementing a table mapping spell names into numerical spellids.

SkunkNav.js

A library of navigation functions. For details, see the SkunkNav documentation as well as comments in the script itself. Although written in JScript, this library can be included in any project and called from any scripting language.

RouteMaker.swx
RouteMaker.vbs

Sample script that demonstrates SkunkNav functionality by implementing an interactive route file editor. For details, see the RouteMaker documentation as well as comments in the script itself. This script also includes a working VBScript example of skapi.ShowControls and OnControlEvent.

KeepAlive.vbs

A simple VBScript addon for foiling the client's inactivity timer and keeping your character logged in indefinitely.

COMSample.vbp

A "Hello World" COM application, written in Visual Basic, that accesses the SkunkWorks API directly without using the SkunkWorks console.

FileBrowser.vbs
FileBrowser.xml

Implements an in-game file browser similar to the standard Windows Open File dialog. Use this as is in your project or refer to it as a working example of Decal-side UI scripting.

Strings.vbs

Miscellaneous string-handling functions required by FileBrowser.

Use SkapiDefs and SkunkNav by including them in a SkunkWorks project along with your own script files. See any of the sample projects for examples of this.

At present there is no general-purpose SkunkLib analogous to ACScriptLib. Users migrating from ACScript can, however, continue to use ACScriptLib.js or .vbs as well as any other third-party script libraries such as Merchant.js or Navigate.js.