you just need 2 objects (oPC and 1 other) for the script you posted not 3 total objects
henesua wrote...
Based on what you wrote the following should work:
[color="#00ff00"]object oPC = GetPCSpeaker();
CreateItemOnObject("nw_it_contain006", oPC);
object oPackage = GetObjectByTag("NW_IT_CONTAIN006");
object oGoblinBox = CreateItemOnObject("goblinbox", oPackage);[/color]
It does not. There is nothing magical happening with GetObjectByTag that enables a container to receive another from CreateItemOnObject.
[EDIT]
I just realized that I did not specify that both containers are items. I think this is a hard coded limitation of NWN which forbids nestinf of container items.
this script wont work exactly for your needs but it will work closely to them. it creates the would be gift in a placeable in the area the player is in. the player would then have to go open the placable to get the item....
void main()
{
object oPC = GetPCSpeaker();
object oArea = GetArea(oPC);
object oTarget = GetItemPossessedBy(oArea, "tag of the recieving placable in the area");
CreateItemOnObject("resresf of item to go in the placable", oTarget);
}
Modifié par Ryuhi2000, 05 avril 2011 - 12:47 .