Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Remove Item Script

Page: 1 of 1
 harIII
11-13-2009, 7:48 PM
#1
As in the name of this thread, I need a script to remove a specific item from the pc's inventory.
 Star Admiral
11-13-2009, 8:32 PM
#2
Try this. Replace tagtodestroy with the tag of the item you wish removed.

void main() {
object oDestroy = GetFirstItemInInventory( GetFirstPC() );
while( GetIsObjectValid( oDestroy ) ) {
if( GetTag( oDestroy ) == "tagtodestroy" )
DestroyObject( oDestroy, 0.00, FALSE, 0.00 );
oDestroy = GetNextItemInInventory( GetFirstPC() );
}
}

- Star Admiral
Page: 1 of 1