good evening everyone , mainly. Anyone know if you can put some query or something to Sql 2008 R2 where a panda duration of one day automatically when creating an account ? Is this possible?
From already thank you very much to all!
good evening everyone , mainly. Anyone know if you can put some query or something to Sql 2008 R2 where a panda duration of one day automatically when creating an account ? Is this possible?
From already thank you very much to all!
I am not totally understand what you want. You want add Panda for the users, after they create a character?
Can you describe more? Or add some pictures about what you want?
Credits to Neo6USE [MuOnline]
GO
/****** Object: Trigger [dbo].[StarterPackage_By_neo6] Script Date: 8/12/2016 11:43:36 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[StarterPackage_By_neo6] ON [dbo].[Character]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON
DECLARE @AccountID VARCHAR(10);
DECLARE @memb_guid INT;
DECLARE @Name VARCHAR(10);
DECLARE @UsedTime BIGINT;
DECLARE @LeftTime BIGINT;
DECLARE @ExpireDate datetime;
SELECT @AccountID = AccountID, @Name = Name FROM inserted;
SELECT @memb_guid = memb_guid FROM MuOnline.dbo.MEMB_INFO WHERE memb___id = @AccountID;
SET @UsedTime = 0;
SET @LeftTime = 360;
SET @ExpireDate = DATEADD(hh, 6, GETDATE());
BEGIN
INSERT INTO T_PeriodItem_Data (memb_guid,memb__char,ItemCode,ItemOption,ItemEffect1,ItemEffect2,UsedTime,LeftTime,ExpireDate) VALUES
(@memb_guid, @Name, 6699, 2, 6, 0, @UsedTime, @LeftTime, @ExpireDate)
--UPDATE T_PeriodItem_Data SET @memb_guid, @Name, 6699, 2, 6, 0, @UsedTime, @LeftTime, @ExpireDate
END
SET NOCOUNT OFF
END
Here you set you willing item, code and such stuff according to your xshop.
P.S.
Works for Zteam files, you must set your tables and database according to files you are using.
- - - Updated - - -
It will create trigger on character table. He only take info id from memb info and put info in game shop table. It works once player create character without crating any cron or agent jobs