So once you go through the steps to add the necessary .dll for that plugin and necessary lines to the NWNX.ini, The functions in the nwnx_funcs include script will work just like any other normal functions in NWScript. He did a really good job providing nice descriptions of them so they should be pretty self-explanatory (hopefully).
I provided the example above a little rushed, so it was missing a parenthesis. Here's a complete one with the nwns_funcs include at the top of it as well. This compiles - but remember that you need to have the external .dll/plugin setup first in order for this to work. And (of course) the server always needs to be launched via NWNX or this will not work either.
//mod_onlevelup
//Place this in the module OnLevelUp event, or merge it with your existing LevelUp script
#include "nwnx_funcs"
void main()
{
object oPC = GetPCLevellingUp();
if (GetHasFeat(FEAT_HIDE_IN_PLAIN_SIGHT, oPC)) {
NWNXFuncs_RemoveFeat(oPC, FEAT_HIDE_IN_PLAIN_SIGHT);
SendMessageToPC(oPC, "Your Hide In Plain Sight ability has been removed.");
}
}
Modifié par Thayan, 17 mars 2011 - 02:03 .