Hi,
i have a script which checks if the PC got 5 of the weak spidervenom, when he have them, it should start a conversation namend questsuccess. So i got a loop to search the storage, it works fine with self productet items, but when i use the original weak spidervenom, it dosen´t work. It´s the correct tag. Here is the not working part.
if (iRE == 4)
{
int iZiel = 5;
string sItem = “x2_it_poison007”;
oItem = GetFirstItemInInventory(oPC);
while ((OBJECT_INVALID !=oItem) && (iCount < iZiel))
{
string iSo = GetTag(oItem); // I just wat see if the
ActionSpeakString(iSo); // tag of the item was correct
if (GetTag(oItem) == sItem)
{
iCount++;
}
oItem = GetNextItemInInventory(oPC);
}
if (iCount == iZiel)
{
ActionStartConversation(oPC,"questsuccess");
}
if (iCount < iZiel)
{
ActionStartConversation(oPC,"questfail");
}
}
x2_it_poison007 ist both resref and tag, to be sure i insert the Actionspeakstring, so i can see it in the chat.
The count is initialiesed at the beginning of the hole script, like i said, the loop works for selfmade items, i´ve got the same loop with diffrent tags 4 times in this script. And the ActionSpeakString returns the same tag as i´ve gived to sItem.
thanks for your comments, i found my fault. I had 2 if (iRE == 4) in the script, the first should be if (iRE == 3),
that was my mistake, sorry.
But i´m sure, i´m coming back.