Jump to content

Home

Remove all Items


brwarner

Recommended Posts

No I meant can I build a script to do something like that. I want to make a sidequest were all your items are stolen.

 

It is possible and not too difficult. I believe a script like this one should do the trick, theoretically:

 

// ST: Strip all items from the player party's possession 
//     and put them in  a container.
void main() {
   object oContainer = GetObjectByTag("FootlockerTag");
   object oPC = GetFirstPC();

   object oItem = GetFirstItemInInventory(oPC);

   while (GetIsObjectValid(oItem)) {
       if (GetPlotFlag(oItem)) {
           oItem = GetNextItemInInventory(oPC);
       }
       else {
           GiveItem(oItem, oContainer);
           oItem = GetFirstItemInInventory(oPC);   
       }   
   }

   int i;
   for (i = NUM_INVENTORY_SLOTS-1; i >= INVENTORY_SLOT_HEAD; i--) {
       if (GetIsObjectValid(GetPartyMemberByIndex(0)))
           GiveItem(GetItemInSlot(i, GetPartyMemberByIndex(0)), oContainer);   

       if (GetIsObjectValid(GetPartyMemberByIndex(1)))
           GiveItem(GetItemInSlot(i, GetPartyMemberByIndex(1)), oContainer);

       if (GetIsObjectValid(GetPartyMemberByIndex(2)))
           GiveItem(GetItemInSlot(i, GetPartyMemberByIndex(2)), oContainer);       
   }   
}

 

If you want to use it, don't forget to put the tag of the footlocker you wish to contain the items where it says FootlockerTag.

 

The only problem with this is that it will only strip the members of your group that are in the active (3 person) party, since you can't access the inventory of the non-active party members without spawning them first.

 

If this happens in an area where you can't switch your party around that shouldn't be a problem. But If you really must strip them all, I think I can add a workaround for that to the script.

 

(Obsidian didn't have that problem on Citadel Station since you only have the Exile, Kreia and Atton at your disposal there, and they were all in the active party when you were arrested.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...