| Code: |
function RecreateMyStorage()
var storage, inv_fs, inv_pb, inv_1c;
storage := FindStorageArea( "Merchant Storage" );
if (!storage)
syslog( "Unable to FindStorageArea Merchant Storage" );
exit;
endif
inv_fs := find_or_create_item( storage, me.serial + " FS", UOBJ_METALCHEST );
foreach item in inv_fs
destroyitem(item);
endforeach
var merchant_type := GetObjProperty( Self(), "MerchantType" );
RestockInventory( merchant_type, inv_fs );
endfunction
|