Smoking Pipe for Neverwinter Nights
By Jason Robinson

Certain archetypal wizards were known to puff on a pipe now and again, and one of my characters took it up. At the urging of a comrade on Neverwinter Connections (blefuscu--thanks), I whipped one up.

When used, the pipe 1) has the activating PC say one of three random emotes, 2) emits a brief red glow, and then 3) blows a puff of smoke out by the PC's mouth. To use the pipe, either right-click it and select "Use", or add it to your quickbar. A small example module is included as a demo (the pipe is given to you upon entry).

To add the pipe to your module,

1) Import the "jhr_bp_pipe" file (via the "File->Import" menu item)

2) Import the "jhr_pipe" file

If you do not currently have any code in your OnActivateItem script, you can merely assign "jhr_onactivitem" to it:

3) Go to the "Edit->Module Properties" menu item

4) Click on the "Events" tab

5) Click on the drop-down next to "OnActivateItem" and select "jhr_onactivitem"; click "OK"

You're done! If all went well, you will have a new item under "Items->Custom->Special 1" called "Smoking Pipe".

If you have customized your module's OnActivateItem() script, you will need to do the following instead:

3) Open your OnActivateItem script 

4) Copy the following single line above the "main" function:

#include "jhr_i0_pipe"

5) Paste the following four lines into the "main" function:

if (GetTag(oActivatedItem) == "jhr_it_pipe")
{
    SmokePipe(oActivator);
}

6) Replace "oActivatedItem" with the variable name you assigned with GetItemActivated(). Replace "oActivator" with the variable name you assigned with GetItemActivator()

Finally, if you make changes to the "jhr_i0_pipe" file, you must rebuild your module for the changes to take effect. This is due to the fact that it is an include file, and thus won't compile using the normal means.