Hello Epvpers,
I've downloaded a new database some days ago.
This Database supported Serial IDs.
The system works as follow, when you PMed a specific char, the database created a serial number for an item to prevent scamming. Now i got the procudure here, but i cannot get it to work.
Which char do i need to PM to get this message system work?
Can someone help me, and maybe explain this stored procedure?
I am learning SQL at this moment, so every learnmoment i will take with open arms.
ALTER procedure [dbo].[_ItemSerials]
@charname varchar(256)
as
DECLARE @D int = (SELECT CharID FROM _Char WITH (NOLOCK) where CharName16 = @charname)
DECLARE @ bigint
DECLARE @emID int
DECLARE @ame varchar(256)
SELECT @ = Serial64 , @emID = RefItemID
FROM _Items I inner join _Inventory V
WITH (NOLOCK) ON I.ID64 = V.ItemID
WHERE v.CharID = @D AND v.Slot = 13
SELECT @ame = Name FROM _ItemName Z inner join _RefObjCommon K WITH (NOLOCK) ON Z.CodeName128 = K.CodeName128 WHERE K.ID = @emID
IF @ != '1170654428139618305'
BEGIN
IF @ame IS NULL
BEGIN
INSERT INTO _ELYSON_EXT.dbo._Chat (send,sendto,Message,date)
VALUES ('1' @CharName,'Your Item Serial is: ['+ CAST @ AS VARCHAR(256))+'] please remember to save this number, it can help in tough times.',GETDATE())
END
ELSE IF @ame IS NOT NULL
BEGIN
DECLARE @ Varchar(256) = (SELECT Name FROM _ItemName WHERE Name = @ame)
INSERT INTO _ELYSON_EXT.dbo._Chat (send,sendto,Message,date)
VALUES ('1' @CharName,'Your [' @+'] Serial is: ['+ CAST @ AS VARCHAR(256))+'] please remember to save this number, it can help in tough times.',GETDATE())
END
END
ELSE IF @ = '1170654428139618305'
BEGIN
INSERT INTO _ELYSON_EXT.dbo._Chat (send,sendto,Message,date)
VALUES ('1' @CharName,'Please put something on the frist slot then use the service.' ,GETDATE())
END
Thanks!
Greetings,
Killerflood