قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة[ قسم متخصص فى شروحات و البرامج في عمل السيرفرات الخاصة ] [ يرجى عدم وضع الأسئلة والاستفسارات في هذا القسم ]
سيستم القديم كان D14 بس انما سيستم الجديد من D1 الي D14
كمان لو عايز تغير Wpen او Set من صيني لاروبي او العكس كل اللي عليك
انت صيني وعايز تغير Bow ل 2Hand مثلا امسك السلاح و اضرب سكرولة 2hand ال Bow حيتغير ل 2hand
--- Weapon and Set Change IF (@ItemRefID Between 42099 and 42112) and (@Operation = 41)-- Weapon change System Begin Execute [SRO_VT_SHARDLOG].[dbo].[_NewChangeSystem] @CharID , @operation , @itemrefid END IF (@ItemRefID between 42113 and 42118) and (@Operation = 41)-- Set change System Begin Execute [SRO_VT_SHARDLOG].[dbo].[_NewChangeSystemSET] @CharID , @operation , @itemrefid END
4)Create Procedure
كود PHP:
USE [SRO_VT_SHARDLOG] GO /****** Object: StoredProcedure [dbo].[_NewChangeSystem] Script Date: 22/04/2016 06:36:50 ص ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO Create procedure [dbo].[_NewChangeSystem] @Charid int, @Operation tinyint, @ItemRefid int AS DECLARE @IID int,@RefID int,@Type varchar(50) = NULL,@ID int,@ID1 int ,@NID int ,@Gender varchar(8),@DG varchar(50),@ItemID int Select @Type = Case When @ItemRefID ='42099' THEN 'Sword' When @ItemRefID ='42100' THEN 'blade' When @ItemRefID ='42101' THEN 'Spear' When @ItemRefID ='42102' THEN 'TBALDE' When @ItemRefID ='42103' THEN 'Bow' When @ItemRefID ='42104' THEN 'Dagger' When @ItemRefID ='42105' THEN 'Xbow' When @ItemRefID ='42106' THEN 'Axe' When @ItemRefID ='42107' THEN '1Hand' When @ItemRefID ='42108' THEN '2Hand' When @ItemRefID ='42109' THEN 'Tstaff' When @ItemRefID ='42110' THEN 'Staff' When @ItemRefID ='42111' THEN 'DarkStaff' When @ItemRefID ='42112' THEN 'harp' Else Null End
--Get info About item in Slot 6 SELECT @ItemID=I.ID64 , @RefID = I.RefItemID FROM SRO_VT_SHARD.dbo._Items I INNER JOIN SRO_Vt_SHARD.dbo._Inventory Iv ON I.ID64 = Iv.ItemID WHERE Iv.Slot = '6' AND Iv.CharID = @CharID --Get Info about item in Table select @ID = ID ,@DG = DG , @Gender = Gender FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP WITH(NOLOCK) where ID = @RefID --Get Info about New item Select @NID = ID FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP WITH(NOLOCK) WHERE TYPE = @Type and Gender = @Gender AND DG = @DG
-- Start Updtae Item CH IF (@Operation = 41)and(@ItemRefID Between 42099 and 42112) Begin IF @RefID =@ID begin Update SRO_VT_SHARD.._Items Set RefItemID=@NID,CreaterName='HLP' Where ID64 = @ItemID END end --End Update Item CH
كود PHP:
USE [SRO_VT_SHARDLOG] GO /****** Object: StoredProcedure [dbo].[_NewChangeSystemSET] Script Date: 22/04/2016 07:46:30 ص ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO Create procedure [dbo].[_NewChangeSystemSET] @CharID int, @Operation tinyint, @ItemRefid int AS DECLARE @IID INT,@IID1 INT,@IID2 INT,@IID3 INT,@IID4 INT,@IID5 INT,@ID INT,@ID1 INT,@ID2 INT,@ID3 INT,@ID4 INT,@ID5 INT,@RefID int ,@RefID1 INT,@RefID2 INT,@RefID3 INT,@RefID4 INT,@RefID5 INT ,@Type varchar(50) = NULL,@DG INT,@DG1 INT,@DG2 INT ,@DG3 INT,@DG4 INT,@DG5 INT,@NID int ,@NID1 int ,@NID2 int ,@NID3 int ,@NID4 int ,@NID5 int ,@Gender varchar(50),@Gender1 varchar(50) ,@Gender2 varchar(50),@Gender3 varchar(50),@Gender4 varchar(50),@Gender5 varchar(50),@Set_Gender varchar(50),@Set_Gender1 varchar(50) ,@Set_Gender2 varchar(50),@Set_Gender3 varchar(50),@Set_Gender4 varchar(50),@Set_Gender5 varchar(50) Select @Type =Case When @ItemRefID = '42113' Then 'Armor' When @ItemRefID = '42114' Then 'Protector' When @ItemRefID = '42115' Then 'Garment' When @ItemRefID = '42116' Then 'Heavy' When @ItemRefID = '42117' Then 'Light' When @ItemRefID = '42118' Then 'Robe' ELSE Null END -- Item Slot 0 Select @IID = I.ID64 ,@RefID = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '0' and Iv.CharID = @CharID -- Item Slot 1 Select @IID1 = I.ID64 ,@RefID1 = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '1' and Iv.CharID = @CharID -- Item Slot 2 Select @IID2 = I.ID64 ,@RefID2 = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '2' and Iv.CharID = @CharID -- Item Slot 3 Select @IID3 = I.ID64 ,@RefID3 = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '3' and Iv.CharID = @CharID -- Item Slot 4 Select @IID4 = I.ID64 ,@RefID4 = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '4' and Iv.CharID = @CharID -- Item Slot 5 Select @IID5 = I.ID64 ,@RefID5 = I.RefItemID From SRO_VT_SHARD.._Items I inner join SRO_VT_SHARD.._Inventory IV On I.ID64 = Iv.ItemID where IV.Slot = '5' and Iv.CharID = @CharID --Get Info OF Select Items --Item on Slot 0 Select @ID= ID , @Gender = Gender , @Set_Gender = Set_Gender ,@DG = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID --Item on Slot 1 Select @ID1= ID , @Gender1 = Gender , @Set_Gender1 = Set_Gender ,@DG1 = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID1 --Item on Slot 2 Select @ID2= ID , @Gender2 = Gender , @Set_Gender2 = Set_Gender ,@DG2 = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID2 --Item on Slot 3 Select @ID3= ID , @Gender3 = Gender , @Set_Gender3 = Set_Gender ,@DG3 = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID3 --Item on Slot 4 Select @ID4= ID , @Gender4 = Gender , @Set_Gender4 = Set_Gender ,@DG4 = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID4 --Item on Slot 5 Select @ID5= ID , @Gender5 = Gender , @Set_Gender5 = Set_Gender ,@DG5 = DG FROM SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 WITH(NOLOCK) where ID = @RefID5 -- New Item on Slot 1 Select @NID = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender and Set_Gender = @Set_Gender and DG = @DG -- New Item on Slot 2 Select @NID1 = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender1 and Set_Gender = @Set_Gender1 and DG = @DG1 -- New Item on Slot 3 Select @NID2 = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender2 and Set_Gender = @Set_Gender2 and DG = @DG2 -- New Item on Slot 4 Select @NID3 = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender3 and Set_Gender = @Set_Gender3 and DG = @DG3 -- New Item on Slot 5 Select @NID4 = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender4 and Set_Gender = @Set_Gender4 and DG = @DG4 -- New Item on Slot 5 Select @NID5 = ID From SRO_VT_SHARDLOG.dbo._SystemChangeByHLP2 Where TYPE = @Type and Gender = @Gender5 and Set_Gender = @Set_Gender5 and DG = @DG4 --Start Update Items IF (@ItemRefID Between 42113 and 42118) and (@Operation = 41) begin Update SRO_VT_SHARD.._Items Set RefItemID = @NID,CreaterName='HLP' Where ID64 = @IID Update SRO_VT_SHARD.._Items Set RefItemID = @NID1,CreaterName='HLP' Where ID64 = @IID1 Update SRO_VT_SHARD.._Items Set RefItemID = @NID2,CreaterName='HLP' Where ID64 = @IID2 Update SRO_VT_SHARD.._Items Set RefItemID = @NID3,CreaterName='HLP' Where ID64 = @IID3 Update SRO_VT_SHARD.._Items Set RefItemID = @NID4,CreaterName='HLP' Where ID64 = @IID4 Update SRO_VT_SHARD.._Items Set RefItemID = @NID5,CreaterName='HLP' Where ID64 = @IID5 end -- End Update items
5) CREATE TABLE
كود PHP:
USE [SRO_VT_SHARDLOG] GO
/****** Object: Table [dbo].[_SystemChangeByHLP] Script Date: 20/04/2016 05:57:58 م ******/ SET ANSI_NULLS ON GO