Hmm. Could try something like this:
void CopyItems(object oReciever, object oTarget)
{
object oItem;
oItem = GetFirstItemInInventory(oTarget);
while ( oItem != OBJECT_INVALID )
{
CopyItem(oItem, oReciever, TRUE);
DestroyObject(oItem);
oItem = GetNextItemInInventory(oTarget);
}
int nCount = NUM_INVENTORY_SLOTS;
while ( nCount-- > 0 )
{
oItem = GetItemInSlot(nCount, oTarget);
CopyItem(oItem, oReciever, TRUE);
DestroyObject(oItem);
}
}
void main()
{
object oPC = GetPCSpeaker();
object oGuardA = GetObjectByTag("GuardA");
object oGuardB = GetObjectByTag("GuardB");
object oGuardC = GetObjectByTag("GuardC");
object oPrisonerA = GetObjectByTag("PrisonerA");
object oPrisonerB = GetObjectByTag("PrisonerB");
CopyItems(oPC, oGuardA);
CopyItems(oPrisonerA, oGuardB);
CopyItems(oPrisonerB, oGuardC);
}
Warning. I am still half asleep and haven't had my morning coffee yet. I also have not tested this.
Modifié par GhostOfGod, 24 avril 2012 - 03:20 .