Okay, no problem. I guess you can install nwnx_funcs, if not already done. The instructions are included in the package, but basically installing a nwnx plugin is pretty much always the same, you copy the .dll files to your NWN folder, then you integrate the scripts in your mod. For the latter operation, open your mod in the toolset, then back to your OS, while the mod is still opened in the toolset, navigate to your modules folder and open the temp0 folder, then copy the plugin scripts, wherever they are, and paste them in that temp0 folder. Back to the toolset, save your mod. You'll probably need to make a small change and revert to be allowed to save. Close all windows, restart the toolset, make sure that the scripts are present in your mod, build it and save again, and there you are, your plugin is ready to work.
Once that formality is over, post your OnClientEnter script here, using the code formatting option(to make the posted code easier to read) and I'll update it for you.
Kato
Ok I installed the nwnx functions (at least I think I did... I hope I did...)
Here's the on-enter script for the mod (forgive the messiness of it please!):
//NC:EDIT
//
// added emote wands at PC creation
// added appearance change by subrace
//
//NC:EDIT
#include "wow_polyinclude"
#include "dante_db"
// Wanye begin
#include "ar_inc_wow"
#include "spelltrack"
//#include "wow_inc_scouting"
// Wayne end
//BEG:NC
//#include "ar_inc_appearnce"
//END:NC
#include "sha_subr_methds"
#include "ar_db_main"
void ARSetCustomRace(object oPC);
void ARCleanVars(object oPC);
void ApplyExitPenalty(object oPlayer);
int DetermineDeath(object oPlayer);
void DetermineExitPenalty(object oPlayer, string sPlayerName);
void GreetArenaChampion(string sPlayerName);
void MessageOfTheDay(object oPlayer, string sPlayerName);
void SetStats(object oPlayer);
void StripNewChars(object oPlayer);
void StartCutscene(object oPlayer);
void GivePCWands(object oPlayer);
void main()
{
object oPC = GetEnteringObject();
ARSX_OnClientEnter(oPC);
// Spell tracking
string sID = GetPCPlayerName(oPC)+GetName(oPC);
SetLocalString(oPC, "sID", sID);
if(AVGetIsSpellCaster(oPC)) AVRestoreSpells(oPC);
//NC:EDIT
//SubraceOnClientEnter();
string sSubRace = GetSubRace(oPC);
if(sSubRace == "")
{
ARSetCustomRace(oPC);
}
object oPlayer = GetEnteringObject();
if (GetIsPC(oPlayer))
{
string sPlayerName = GetName(oPlayer);
MessageOfTheDay(oPlayer, sPlayerName);
if (!GetIsDM(oPlayer))
{
SetStats(oPlayer);
//NC:EDIT
ARCleanVars(oPlayer);
ScanItems(oPlayer,TRUE);
if (GetXP(oPlayer) == 0)
{
StripNewChars(oPlayer);
}
else
{
GreetArenaChampion(sPlayerName);
//Kinda hard to read - Determine whether the player is marked
//for death; if true don't check for the exit penalty
if (!DetermineDeath(oPlayer))
DetermineExitPenalty(oPlayer, sPlayerName);
SetLocalInt(oPlayer, "nEnter", TRUE);
}
AdjustReputation(oPlayer, GetObjectByTag("kank"), 50);
}
}
if (!GetIsDM(oPC))
{
if (GetHasFeat(5024, oPC))
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
if (GetStringLowerCase(GetName(oPC)) == "tallik the blade")
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
if (GetStringLowerCase(GetName(oPC)) == "evanti")
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
if (GetStringLowerCase(GetName(oPC)) == "actavia the aggressive")
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
if (GetStringLowerCase(GetName(oPC)) == "myrkhan")
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
if (GetStringLowerCase(GetName(oPC)) == "raphale")
{
DelayCommand(4.0, FloatingTextStringOnCreature("Setting Faction: Urikite", oPC));
DelayCommand(4.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_TYR"), -100));
DelayCommand(5.0, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_VEILEDALLIANCE"), -100));
DelayCommand(5.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_URIK"), 90));
DelayCommand(6.0, SetLocalInt(oPC, "IsUrikite", 1));
DelayCommand(6.5, FloatingTextStringOnCreature("Finished Setting Faction", oPC));
}
}
SetPlotFlag(oPC, FALSE);
SubraceOnClientEnter();
ExecuteScript("restore_addict",OBJECT_SELF);
//ExecuteScript("ds_factions", oPC);
//End VOID MAIN
}
void ApplyExitPenalty(object oPlayer)
{
int nXP = GetXP(oPlayer);
int nPenalty = 10 * GetHitDice(oPlayer);
int nHD = GetHitDice(oPlayer);
// * You can not lose a level with this respawning
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
int nNewXP = nXP - nPenalty;
if ((nNewXP < nMin))
nNewXP = nMin;
SetXP(oPlayer, nNewXP);
int nGoldToTake = FloatToInt(0.05 * GetGold(oPlayer));
// * a cap of 1000gp taken from you
if (nGoldToTake > 1000)
{
nGoldToTake = 1000;
}
AssignCommand(oPlayer, TakeGoldFromCreature(nGoldToTake, oPlayer, TRUE));
}
int DetermineDeath(object oPlayer)
{
int bDead = FALSE;
if (GetLocalInt(oPlayer, "bDeath"))
{
bDead = TRUE;
SetLocalInt(oPlayer, "bDeath", FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(FALSE, FALSE), oPlayer, 0.0f);
}
return bDead;
}
void DetermineExitPenalty(object oPlayer, string sPlayerName)
{
if (GetLocalInt(oPlayer, "bExitPenalty") == TRUE)
{
ApplyExitPenalty(oPlayer);
string sRobbedText = sPlayerName + " has been beaten and robbed by bandits! Next time log out while resting.";
FloatingTextStringOnCreature(sRobbedText, oPlayer, FALSE);
}
else
SetLocalInt(oPlayer, "bExitPenalty", TRUE);
}
void GreetArenaChampion(string sPlayerName)
{
string sArenaChampion = GetLocalString(GetModule(), "sArenaKills1");
if (sPlayerName == sArenaChampion)
{
object oPlayer = GetFirstPC();
while(GetIsObjectValid(oPlayer))
{
string sMsg = "The champion of the arena has arrived in Tyr. All hail " + sPlayerName + "!";
SendMessageToPC(oPlayer, sMsg);
oPlayer = GetNextPC();
}
}
}
void MessageOfTheDay(object oPlayer, string sPlayerName)
{
string sWelcome = "<cþ>Welcome to Athas Reborn!, </c><cþ>";
sWelcome += sPlayerName;
sWelcome += "</c><cþ>!</c>";
SendMessageToPC(oPlayer, sWelcome);
string sMessageOfTheDay = "<cþ>MESSAGES OF THE DAY: This server is in solo mode.</c><cþ> New players should talk to the Guard Captain.</c>";
sMessageOfTheDay += "\n<cþþ>Report all bugs to </c><cþ>myself</c><cþþ>.</c>";
SendMessageToPC(oPlayer, sMessageOfTheDay);
}
void SetStats(object oPlayer)
{
string sVarName = GetCampaignVariableName(oPlayer);
SetLocalInt(oPlayer, "Arena", GetPersistentInt(oPlayer, "Arena" + sVarName, "ar_dsostats"));
SetLocalInt(oPlayer, "Player", GetPersistentInt(oPlayer, "Player" + sVarName, "ar_dsostats"));
SetLocalInt(oPlayer, "Bounty", GetPersistentInt(oPlayer, "Bounty" + sVarName, "ar_dsostats"));
}
void StripNewChars(object oPlayer)
{
AssignCommand(oPlayer, TakeGoldFromCreature(GetGold(oPlayer), oPlayer, TRUE));
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPlayer);
if (GetIsObjectValid(oItem))
DestroyObject(oItem);
oItem = GetFirstItemInInventory(oPlayer);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oPlayer);
}
oItem = CreateItemOnObject("cloth024", oPlayer);
AssignCommand(oPlayer, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
GivePCWands(oPlayer);
}
//NC:EDIT
void GivePCWands(object oPlayer)
{
//to change the wands change the resrefs
//here
string sWndPCFollow = "dmfi_pc_follow";//PC Autofollow Widget
string sWndPCDice = "dmfi_pc_dicebag";//PC Dicebag
string sWndPCEmote = "dmfi_pc_emote";//PC Emote Wand
CreateItemOnObject(sWndPCFollow, oPlayer);
CreateItemOnObject(sWndPCDice, oPlayer);
CreateItemOnObject(sWndPCEmote, oPlayer);
}
void ARCleanVars(object oPC)
{
ExecuteScript("lib_psionrest", oPC);
ExecuteScript("ar_inc_clearvar", oPC);
}
void ARSetCustomRace(object oPC)
{
/*
Elf = Elf 1
Dwarf = Dwarf 0
Orc = Half-Giant 5
Halfling = Hafling 3
Gnome = Tari 2
Half-Elf = Half-Elf 4
*/
string sElf = "Elf";
string sDwarf = "Dwarf";
string sHalfOrc = "Half-Giant";
string sHalfling = "Halfling";
string sGnome = "Tari";
string sHalfElf="Half-Elf";
int nRace = GetRacialType(oPC);
string sSubrace;
SendMessageToPC(oPC, "Your Base Race Is: " + IntToString(nRace));
if(nRace==RACIAL_TYPE_GNOME)sSubrace=sGnome;
if(nRace==RACIAL_TYPE_HALFELF)sSubrace=sHalfElf;
if(nRace==RACIAL_TYPE_HALFLING)sSubrace=sHalfling;
if(nRace==RACIAL_TYPE_HALFORC)sSubrace=sHalfOrc;
if(nRace==RACIAL_TYPE_DWARF)sSubrace=sDwarf;
if(nRace==RACIAL_TYPE_ELF)sSubrace=sElf;
if(sSubrace != "" )
{
SetSubRace(oPC,sSubrace);
}
}
All my scripts compile and the subrace system works except for two subraces (and I have no idea why they dont work but I'm not too concerned about them that's for another day). I eagerly await your brilliance to shine down upon me!