USE w00_Character;
DECLARE @

nvarchar(40)
set @

= 'CharName' /** <--- write the name of the Character**/
DECLARE @

Reward int
set @

Reward = 'ItemInx' /** <--- write the ID of the ItemInfo.shn**/
DECLARE @

er int
set @

er = NULL
set @

er = (Select nCharNo FROM tCharacter where sID = @

)
DECLARE @

mkey bigint
set @

mkey = (convert(numeric(17,0),rand() * 89999999999999999) + 10000000000000000)
INSERT INTO tItem (nItemKey, nStorageType, nOwner, nStorage, nItemID, nFlags, dDate)
VALUES @

mkey, 2, @

er, 1, @

Reward, 0, CURRENT_TIMESTAMP);