Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Add GamePoints and Item by GamerTag/Email

Joined
Apr 2, 2013
Messages
1,098
Reaction score
4,553


Basic useful querys I did a few years ago to add gamepoint and items to the user via email or gamertag.

Add GamePoints by GamerTag

PHP:
declare @in_CustomerID int;
declare @in_Gamertag nvarchar(64);
declare @in_GamePoints int;

SET @in_Gamertag = 'Yuri-BR'; -- Gamertag
SET @in_GamePoints = 1000;    -- GamePoints

SELECT @in_CustomerID = CustomerID FROM UsersChars WHERE Gamertag = @in_Gamertag;
UPDATE UsersData SET GamePoints = (GamePoints + @in_GamePoints) WHERE CustomerID = @in_CustomerID;

Add GamePoints by Email

PHP:
declare @in_CustomerID int;
declare @in_Email varchar(128);
declare @in_GamePoints int;

SET @in_Email = 'Yuri-BR@email.com'; -- Email
SET @in_GamePoints = 1000;           -- GamePoints

SELECT @in_CustomerID = CustomerID FROM Accounts WHERE email = @in_Email;
UPDATE UsersData SET GamePoints = (GamePoints + @in_GamePoints) WHERE CustomerID = @in_CustomerID;
[TR]
[TD]

Add Item by GamerTag
PHP:
declare @in_CustomerID int;
declare @in_Gamertag nvarchar(64);
declare @in_ItemID int;
declare @in_Quantity int;

SET @in_Gamertag = 'Yuri-BR'; -- Gamertag
SET @in_ItemID = 101088;      -- ItemID
SET @in_Quantity = 5;         -- Quantity

SELECT @in_CustomerID = CustomerID FROM UsersChars WHERE Gamertag = @in_Gamertag;

INSERT INTO UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity, Var1, Var2, Var3)
VALUES (@in_CustomerID, 0, 0, @in_ItemID, GETDATE(), @in_Quantity, -1, -1, 10000);
[/TD]
[/TR]
[TR]
[TD]

Add Item by Email
PHP:
declare @in_CustomerID int;
declare @in_Email varchar(128);
declare @in_ItemID int;
declare @in_Quantity int;

SET @in_Email = 'Yuri-BR@email.com'; -- Email
SET @in_ItemID = 101088;             -- ItemID
SET @in_Quantity = 5;                -- Quantity

SELECT @in_CustomerID = CustomerID FROM Accounts WHERE email = @in_Email;

INSERT INTO UsersInventory (CustomerID, CharID, BackpackSlot, ItemID, LeasedUntil, Quantity, Var1, Var2, Var3)
VALUES (@in_CustomerID, 0, 0, @in_ItemID, GETDATE(), @in_Quantity, -1, -1, 10000);
[/TD]
[/TR]


 
Last edited:
Back
Top