It works!!! Thanks guys Shame that the 2 prims are now linked and they need not to be. Both prims allready contain a script that asks link permissions to rez and link other items, so all in all I will not be able to use it like this.
default
{
state_entry()
{
llAllowInventoryDrop(TRUE);
}
changed(integer change)
{
if (change & CHANGED_INVENTORY)
{
llRezObject("prim", llGetPos() + <0.0,0.0,0.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
}
}
object_rez(key id)
{
llGiveInventory("id", "Object");
}
}