PDA

View Full Version : Remove Item Script


harIII
11-13-2009, 08:48 PM
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, 09:32 PM
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