Tag Based Scripting - Add Bonus Feat to player?
Buddywarrior
Member Posts: 62
Able to add effects just fine, but how can we add a feat, FEAT_WEAPON_PROFICIENCY_MARTIAL for example to the OnAquire aspect of a Tag Based Script? Or does it have to be gear based only (or player skin?
0
Comments
#include "x2_inc_itemprop" void OnAcquire(object oEventItem, object oAcquiredBy, object oTakenFrom, int nStackSize) { object oItem; itemproperty ipAdd; object oPC = oAcquiredBy; // Only fire for PCs. if ( !GetIsPC(oPC) ) return; // Alter the skin item equipped by the PC. oItem = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC); ipAdd = ItemPropertyBonusFeat(IP_CONST_FEAT_WEAPON_PROF_MARTIAL); IPSafeAddItemProperty(oItem, ipAdd); }