Atualização!
DECLARE @StorageType int, @StorageNumber int, @ItemGroup int, @ItemID int, @ItemFinalIndex int;
DECLARE @ItemLevel int, @ItemDurability int, @ItemOption1 int, @ItemOption2 int, @ItemOption3 int;
DECLARE @ItemNewOption int, @ItemSetOption int, @ItemJoHOption int, @ItemOptionEx int;
DECLARE @ItemSocket1 int, @ItemSocket2 int, @ItemSocket3 int, @ItemSocket4 int, @ItemSocket5 int;
DECLARE @ItemDuration int, @DaysToUse int , @ItemSocketBonus int;
-- Parâmetros de configuração
SET @StorageType = 2; -- 1: Storage Server, 2: Storage Character
SET @StorageNumber = 1; -- Check CustomMessageGremory.txt (MAIN_INFO)
SET @ItemGroup = 7; -- Item.txt Group
SET @ItemID = 4; -- Item.txt Index
SET @ItemLevel = 15; -- Item Level
SET @ItemDurability = 0; -- Item durability
SET @ItemOption1 = 1; -- Item skill (0-1)
SET @ItemOption2 = 1; -- Item luck (0-1)
SET @ItemOption3 = 7; -- Item life option (0-7)
SET @ItemNewOption = 4; -- Item Excellent option (0-63)
SET @ItemSetOption = 0; -- Item Ancient option (5-6 ou 9-10)
SET @ItemJoHOption = 0; -- Item jewel of harmony
SET @ItemOptionEx = 0; -- Item 380 option
SET @ItemSocketBonus = 0;
SET @ItemSocket1 = 255; -- Item socket 1 option (254 = empty slot, 255 = no slot)
SET @ItemSocket2 = 255;
SET @ItemSocket3 = 255;
SET @ItemSocket4 = 255;
SET @ItemSocket5 = 255;
SET @ItemDuration = 0; -- Item socket duration
SET @DaysToUse = 20; -- Dias de uso do item
-- Calculando índice final
SET @ItemFinalIndex = (@ItemGroup * 512) + @ItemID;
-- Calculando datas
DECLARE @v_time datetime = '1970-01-01 00:00:00';
DECLARE @v_date1 datetime = GETDATE();
DECLARE @v_date2 datetime = DATEADD(DAY, @DaysToUse, GETDATE());
DECLARE @ReceiveDate bigint;
DECLARE @ExpireDate bigint;
SELECT @ReceiveDate = DATEDIFF(SECOND, @v_time, @v_date1);
SELECT @ExpireDate = DATEDIFF(SECOND, @v_time, @v_date2);
-- Executando a stored procedure
EXEC WZ_GremoryCase_AddItem
'louismk',
'LuisADM',
@StorageType,
@StorageNumber,
@ItemFinalIndex,
@ItemLevel,
@ItemDurability,
@ItemOption1,
@ItemOption2,
@ItemOption3,
@ItemNewOption,
@ItemSetOption,
@ItemJoHOption,
@ItemOptionEx,
@ItemSocket1,
@ItemSocket2,
@ItemSocket3,
@ItemSocket4,
@ItemSocket5,
@ItemSocketBonus,
@ItemDuration,
@ReceiveDate,
@ExpireDate
------------------------------------------
SET @ItemJoHOption = 0; -- Item jewel of hamony
seria o valor do do index do arquivo KewelOfHarmonyOption.txt *16 + level