36 lines
684 B
Plaintext
36 lines
684 B
Plaintext
int GetNumItems(object oTarget,string sItem)
|
|
{
|
|
int nNumItems = 0;
|
|
object oItem = GetFirstItemInInventory(oTarget);
|
|
while (GetIsObjectValid(oItem) == TRUE)
|
|
{
|
|
if (GetTag(oItem) == sItem)
|
|
{
|
|
nNumItems = nNumItems + GetNumStackedItems(oItem);
|
|
}
|
|
oItem = GetNextItemInInventory(oTarget);
|
|
}
|
|
return nNumItems;
|
|
}
|
|
|
|
/* Script generated by
|
|
Lilac Soul's NWN Script Generator, v. 2.3
|
|
|
|
For download info, please visit:
|
|
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
|
|
|
int StartingConditional()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
|
|
if (GetNumItems(oPC, "Foodfungi") < 10) return FALSE;
|
|
|
|
if (GetItemPossessedBy(oPC, "MN_REBORN") == OBJECT_INVALID) return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
|
|
|