Rune_PRC8/_module/nss/wrap_mod_onaqu.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

37 lines
1.5 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Wrapper
// wrap_mod_onaqu
// by Don Anderson
//
////////////////////////////////////////////////////////////////////////////////
#include "nw_i0_plotwizard"
void main()
{
// PLOT WIZARD MANAGED CODE BEGINS
PWSetMinLocalIntAndJournalForItemAcquired("p000state", "", 2, "LibraryBookQuest", 0);
// PLOT WIZARD MANAGED CODE ENDS
ExecuteScript("x2_mod_def_aqu",OBJECT_SELF); //Default Bioware
ExecuteScript("prc_onaquire", OBJECT_SELF);
//ExecuteScript("tal_onacquire",OBJECT_SELF); // Talus Rest Menu
//ExecuteScript("doa_mod_itemgain",OBJECT_SELF); // DOA Gold Encumberance
//ExecuteScript("wdm_mod_onaqu",OBJECT_SELF); //Dead and Wild Magic System
object oItem = GetModuleItemAcquired();
itemproperty iProp = GetFirstItemProperty(oItem);
int nIsMonkItem = FALSE; int nIsShouItem = FALSE;
while (GetIsItemPropertyValid(iProp) == TRUE)
{
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == CLASS_TYPE_MONK)
nIsMonkItem = TRUE;
if (GetItemPropertyType(iProp) == ITEM_PROPERTY_USE_LIMITATION_CLASS && GetItemPropertySubType(iProp) == 164)
nIsShouItem = TRUE;
iProp = GetNextItemProperty(oItem);
}
if (nIsMonkItem == TRUE && nIsShouItem == FALSE)
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLimitUseByClass(164), oItem);
}