Here, that should do it for all feats applied as item properties on the PC hide.
#include "nwnx_funcs" void main() { object oPC = OBJECT_SELF; object oHide = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC); itemproperty ip = GetFirstItemProperty(oHide); int nFeat; while(GetIsItemPropertyValid(ip)) { if(GetItemPropertyType(ip) == ITEM_PROPERTY_BONUS_FEAT) { nFeat = StringToInt(Get2DAString("IPRP_FEATS", "FeatIndex", GetItemPropertySubType(ip))); if(!NWNXFuncs_GetFeatKnown(oPC, nFeat)) NWNXFuncs_AddFeat(oPC, nFeat); } ip = GetNextItemProperty(oHide); } }Kato
So this goes into that onplayerleaving script or is it for the mod_onexit script?
I'm also a little fuzzy on the nFeat = StringToInt(Get2DAString("IPRP_FEATS", "FeatIndex", GetItemPropertySubType(ip))); part. How do I tell it which feats are ok to give and which to skip? Cause I dont want the actual spell feats being given to the pc permanently only the seeds and the research feats.





Retour en haut







