Overview

SkunkWorks is a Decal-based scripting tool for Asheron's Call. It
allows you to automate aspects of your gameplay by writing macros in a variety
of popular languages, including VBScript and JScript. Such macros have access
to various elements of game state such as inventory and character stats and can
control gameplay by issuing keystrokes and mouse clicks. SkunkWorks macros are
event-driven and can receive notification of game events such as monster
spawns, melee attacks, chat messages and other interactions from NPCs or other
players, etc. For purposes of this document I'm going to assume you're
familiar with the concept of macroing and what it's good for; if that's not the
case, see the Links page.

Those of you familiar with ACScript should feel right at home
with SkunkWorks, which was designed from the ground up as a plug-compatible
ACScript replacement. It fully supports the complete ACScript API, and also
offers some features and capabilities that ACScript never had, such as:

An in-game control panel for starting and stopping
scripts.

A hotkey interface for sending commands directly to your
script without using tells.

The ability to output text directly to the in-game chat
window, without using tells.

Script-level access to the Decal UI. Your script can now
display a custom control panel in-game and receive events from it.

Direct access to skill and attribute information.

Direct access to information about clothing and equipment your
character is wearing or wielding, not just what's in your packs.

Built-in coordinate conversion so you can work with location
data in familiar latitude-and-longitude form. Full ACSUtil functionality is
built into SkunkWorks.

Built-in pixel-checking functions so your script can see
what's on screen.

Accurate equipment type and merchant category information for
every game item.

Additional parameters on many events to provide your script
with as much information as possible. No more guessing whether a given
merchant will buy a particular item; you can check the categories yourself and
find out for sure.

SkunkWorks consists of four components: a Decal plugin
(SWPlugin.dll), a Decal netfilter (SWFilter.dll), a COM component embodying the
scripting API (Skapi.dll), and a GUI interface for managing and launching
scripts (SWConsole.exe).

Though SkunkWorks is built on top of Decal, writing a
SkunkWorks macro is not like writing a Decal plugin. In Decal, your plugin
runs in the same process as the game itself, and is therefore tightly coupled
to game events. You receive an event, you react to it quickly, you get ready
for the next event. This is great for some purposes, such as warning you when
monsters or loot appear. It's less convenient for carrying out a complex
series of actions, such as a food or potion recipe, because the recipe
algorithm must be unnaturally chopped up to fit Decal's action-reaction
paradigm. Because you're running in process, you can't take time out for
lengthy computations without bringing gameplay to a halt. Also, bugs in your
plugin can crash the game.

A SkunkWorks macro, in contrast, runs in a separate process.
The SkunkWorks plugin contains just enough logic to queue game events for use
by your macro, and to receive keyboard and mouse commands from your macro and
carry them out in game; everything else happens out of process. Because
gameplay continues while your macro thinks, you might not always hear about an
event the instant it happens. On the other hand, you can take as much think
time as you need (within reason), and code your algorithms using whatever logic
seems most natural, including loops and recursion. And if your macro bombs or
hangs, it won't take the game down with it.

There are two ways to use SkunkWorks:

You can use the SkunkWorks console
to run scripts written in any Windows scripting language, including JScript,
VBScript, or even third-party languages such as Perl or Python. Since SkunkWorks fully supports the
ACScript API, macros written for ACScript should run without modification under
the SkunkWorks console.

Alternatively, you can access the SkunkWorks COM interface directly from any COM-capable programming
platform. Build your bot in C++, VB, or Delphi, or code it in script and embed
it in a web page.

In either mode—console-hosted script or COM-based
automation app—you have access to the full ACScript
API as well as the native SkunkWorks API.