I would like someone to make me a script for a conversation
Ugly_Duck
Member Posts: 182
It's for a quest. I want the script to take ALL of the particular items and pay the PC for each one. The item is VENOM_SAMPLE_001. The amount of gold for each item is 75gp. The quest is available all the time once you accept it.
I tried Lilac Soul's Script Generator - I got the script to take ALL of the items but they only made a payment of 75gp for one of the items. Here is what I have:
//Put this on action taken in the conversation editor
#include "nw_i0_tool"
void main()
{
object oPC = GetPCSpeaker();
object oItem;
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
if (GetTag(oItem)=="VENOM_SAMPLE_001") DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
RewardPartyGP(75, oPC, TRUE);
}
I tried Lilac Soul's Script Generator - I got the script to take ALL of the items but they only made a payment of 75gp for one of the items. Here is what I have:
//Put this on action taken in the conversation editor
#include "nw_i0_tool"
void main()
{
object oPC = GetPCSpeaker();
object oItem;
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
if (GetTag(oItem)=="VENOM_SAMPLE_001") DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
RewardPartyGP(75, oPC, TRUE);
}
0
Comments
You had "RewardPartyGP(75, oPC, TRUE);" outside of the loop, so it only rewarded the 75gp once it was done destroying all the items