Okay, I am not a scripter so I make heavy use of LilacSoul's Script Generator (before anyone complains about me not learning scripting...cut me some slack, please...I work and go to school fullt time, plus I am married and have a 2 year old, and have a social life).
I cannot, for the life of me figure out why the below script won't work. It is supposed to check and see if the PC has any of the items in his inventory and if he/she does, make a conversation node appear. The node is a PC node, not an NPC one.
Here's the script (apologies, I don't recall how to post in a window):
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.c...=4683&id=625   */
int StartingConditional()
{
object oPC = GetPCSpeaker();
if (GetNumItems(oPC, "NW_IT_TRAP033") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP013") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP021") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP017") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP029") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP025") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP001") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP009") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP034") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP014") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP022") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP018") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP030") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP026") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP002") < 1) return FALSE;
if (GetNumItems(oPC, "NW_IT_TRAP010") < 1) return FALSE;
return TRUE;
}
Thanks for any help you can provide!