You need to be implement this code in:
PS_GameLog -> Programmability -> Store Procedures -> dbo.usp_Insert_Action_Log_E
There is an assembly script for stack the items from normal bags, but doesn't work with items that in ItemCreate.ini use 1001+ function.Quote:
IF @ActionType = '108'
BEGIN
-- Merge Consumable items
DECLARE @MyCursor CURSOR, @RowID INT, @RowID2 INT, @Count INT, @Count2 INT, @MaxCount INT, @ItemID INT
SET @MyCursor = CURSOR FOR select RowID from PS_GameData.dbo.CharItems where CharID = @CharID AND (Type = 25 OR Type = 44 OR Type = 100) ORDER BY Bag DESC, Slot DESC
OPEN @MyCursor
FETCH NEXT FROM @MyCursor INTO @RowID
WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @ItemID = ci.ItemID, @Count = ci.[Count], @MaxCount = i.[Count] FROM PS_GameData.dbo.CharItems ci JOIN PS_GameDefs.dbo.Items i ON ci.ItemID = i.ItemID WHERE ci.CharID = @CharID AND ci.RowID = @RowID
IF @ItemID IS NOT NULL
BEGIN
SELECT TOP 1 @RowID2 = RowID, @Count2 = [Count] FROM PS_GameData.dbo.CharItems WHERE CharID = @CharID AND ItemID = @ItemID AND RowID != @RowID ORDER BY Bag DESC, Slot DESC
IF @RowID2 IS NOT NULL
BEGIN
SET @Count = @Count + @Count2
IF @Count > @MaxCount
BEGIN
SET @Count2 = @Count - @MaxCount
SET @Count = @MaxCount
UPDATE PS_GameData.dbo.CharItems SET [Count] = @Count2 WHERE RowID = @RowID2
END
ELSE
BEGIN
DELETE FROM PS_GameData.dbo.CharItems WHERE RowID = @RowID2
END
UPDATE PS_GameData.dbo.CharItems SET [Count] = @Count WHERE RowID = @RowID
END
END
FETCH NEXT FROM @MyCursor INTO @RowID
CLOSE @MyCursor
DEALLOCATE @MyCursor
END
-- Merge Consumable items END
END






