Hmm i havent done anything item related yet so not sure - but generally i would approach it by running a DB query to search and update specific value.
Code:
USE db_name
DECLARE @x number=0
DECLARE @colname varchar(max) = 'invslot'
DECLARE @sql varchar(max)
While x <= 21
BEGIN
SET @colname = 'invslot'
SET @x=@x+1
SET @colname = @colname + @x
SELECT @sql ='UPDATE tablename SET'+@colname+' = NULL WHERE '+@colname+'="pet"
exec (@sql)
END
the NULL to 0 or what ever the default should be. x <= 21 - the number of inv slots. @colname is the column name for inv (without the leading number? like invslot1 invslot2 invslot3).
This is simple script - however no idea if it works - i dont know the db structure for cabal yet.
A dynamic sql that loops through tge table, synamically changing column name and only updates when x value is found.