Files
Anphillia_PRC8/_module/nss/_migrate_pc.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

65 lines
2.0 KiB
Plaintext

#include "faction_inc"
#include "subrace_inc"
#include "nwnx_creature"
#include "dev_inc"
void main()
{
object oPC = OBJECT_SELF;
object oPCItem = chr_GetPCItem(oPC);
// Add missing feats for characters for whatever reason.
NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_10); // Unstuck tool
NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_09); // Rename tool
//NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_01); // Class 1 special ability
//NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_02); // Class 2 special ability
//NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_03); // Class 3 special ability
if (dev_IsTeamMember(oPC))
{
NWNX_Creature_AddFeat(oPC, FEAT_PLAYER_TOOL_08); // Speak through other tool
}
SetEventScript(oPC, EVENT_SCRIPT_CREATURE_ON_HEARTBEAT, "pc_onheart");
if (!GetLocalInt(oPCItem, "_migrate_SETPICKPOCKETABLE"))
{
object oItem = GetFirstItemInInventory(oPC);
while (oItem != OBJECT_INVALID)
{
if (GetHasInventory(oItem))
{
object oItem2 = GetFirstItemInInventory(oItem);
while (oItem2 != OBJECT_INVALID)
{
SetPickpocketableFlag(oItem2, FALSE);
oItem2 = GetNextItemInInventory(oItem);
}
}
SetPickpocketableFlag(oItem, FALSE);
oItem = GetNextItemInInventory(oPC);
}
if (GetObjectType(oPC) == OBJECT_TYPE_CREATURE)
{
int i;
for (i = 0; i < NUM_INVENTORY_SLOTS; i++)
SetPickpocketableFlag(GetItemInSlot(i, oPC), FALSE);
}
SetLocalInt(oPCItem, "_migrate_SETPICKPOCKETABLE", 1);
}
NWNX_Creature_RemoveFeat(oPC, FEAT_PALADIN_SUMMON_MOUNT);
if (GetHasFeat(FEAT_DRAGON_IMMUNE_FIRE, oPC))
{
NWNX_Creature_RemoveFeat(oPC, FEAT_DRAGON_IMMUNE_FIRE);
NWNX_Creature_AddFeatByLevel(oPC, FEAT_EPIC_ENERGY_RESISTANCE_ELECTRICAL_10, util_GetLevel(oPC));
}
//ExportSingleCharacter(oPC);
}