انا عملت زي ما الاستاز حمزه كاتب في الموضوع دا
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
ودي نسخ من التاب و البروسيدر
_RefObjCommon
USE [SRO_VT_SHARDLOG] GO /****** Object: StoredProcedure [dbo].[_HamzaLockSystemD15] Script Date: 20/05/2016 02:31:09 م ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROCEDURE [dbo].[_HamzaLockSystemD15] @CharID Int As
-- Declare expression. Declare @CreaterName Varchar(60) = 'Spicoo' , -- Creater Name @Slot Int = '13' , -- char inventory slot 1. @ReqOptLevel Int = '0' , -- Requiared Opt Level to upgrade @OptDifference Int = '2' , -- Set the difference optlevel between old plus and new plus. @OldOptLevel Int , @NewOptLevel Int , @AdvValue Int , @ID64 Int , -------------------------
-- Set Old and New Item RefObjCommon ID below -- Use This Query to get each item ID by Codename128 -- Select ID From [SRO_VT_SHARD].[dbo].[_RefObjCommon] Where CodeName128 Like 'Item Code Name'
---> Old weapon ID's ---> New weapons ID's @Old_CH_SWORD_ID Int = 60362 , @New_CH_SWORD_ID Int = 60378 , --@New Chinese Sword @Old_CH_BLADE_ID Int = 60363 , @New_CH_BLADE_ID Int = 60379 , --@Chinese Blade @Old_CH_SPEAR_ID Int = 60364 , @New_CH_SPEAR_ID Int = 60380 , --@Chinese Spear @Old_CH_TBLADE_ID Int = 60365 , @New_CH_TBLADE_ID Int = 60381 , --@Chinese Glaive @Old_CH_BOW_ID Int = 60366 , @New_CH_BOW_ID Int = 60382 , --@Chinese Bow @Old_CH_SHIELD_ID Int = 60367 , @New_CH_SHIELD_ID Int = 60383 , --@Chinese Shield @Old_EU_DAGGER_ID Int = 60371 , @New_EU_DAGGER_ID Int = 60387 , --@European Dagger @Old_EU_XBOW_ID Int = 60372 , @New_EU_XBOW_ID Int = 60388 , --@European CrossBow @Old_EU_AXE_ID Int = 60370 , @New_EU_AXE_ID Int = 60386 , --@European Axe @Old_EU_SWORD_ID Int = 60368 , @New_EU_SWORD_ID Int = 60384 , --@European One Hand Sword @Old_EU_TSWORD_ID Int = 60369 , @New_EU_TSWORD_ID Int = 60385 , --@European Two Hand Sword @Old_EU_TSTAFF_ID Int = 60373 , @New_EU_TSTAFF_ID Int = 60389 , --@European Two Hand Staff @Old_EU_STAFF_ID Int = 60375 , @New_EU_STAFF_ID Int = 60391 , --@European Claric Rod @Old_EU_DSTAFF_ID Int = 60374 , @New_EU_DSTAFF_ID Int = 60390 , --@European Warlock Rod @Old_EU_HARP_ID Int = 60376 , @New_EU_HARP_ID Int = 60392 , --@European Harp @Old_EU_SHIELD_ID Int = 60377 , @New_EU_SHIELD_ID Int = 60393 --@European Shield -------------------------------------------------------------------------------------------- Set @ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = @Slot and ItemID > 0) Set @OldOptLevel = (Select OptLevel From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @ID64)
-- Start Lock system :
-- First Case : -- IF Item has not advanced elixir :
IF NOT EXISTS (Select * From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) Begin IF @OldOptLevel >= @ReqOptLevel Begin Set @NewOptLevel = @OldOptLevel - @OptDifference -- CH Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SWORD_ID and (OptLevel = @OldOptLevel) --@Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BLADE_ID and (OptLevel = @OldOptLevel) --@Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SPEAR_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SPEAR_ID and (OptLevel = @OldOptLevel) --@Spear Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_TBLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_TBLADE_ID and (OptLevel = @OldOptLevel) --@T-Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BOW_ID and (OptLevel = @OldOptLevel) --@Bow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield -- EU Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DAGGER_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DAGGER_ID and (OptLevel = @OldOptLevel) --@Dagger Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_XBOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_XBOW_ID and (OptLevel = @OldOptLevel) --@Crossbow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_AXE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_AXE_ID and (OptLevel = @OldOptLevel) --@Axe Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SWORD_ID and (OptLevel = @OldOptLevel) --@OneHand Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSWORD_ID and (OptLevel = @OldOptLevel) --@T-Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSTAFF_ID and (OptLevel = @OldOptLevel) --@T-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_STAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_STAFF_ID and (OptLevel = @OldOptLevel) --@Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DSTAFF_ID and (OptLevel = @OldOptLevel) --@Dark-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_HARP_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_HARP_ID and (OptLevel = @OldOptLevel) --@Harp Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield
End End
-- Second Case : -- IF Item has advanced elixir :
ELSE IF EXISTS (Select * From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) Begin Set @AdvValue = (Select nOptValue From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) IF @OldOptLevel >= @ReqOptLevel Begin Set @NewOptLevel = (@OldOptLevel - @OptDifference) + @AdvValue -- CH Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SWORD_ID and (OptLevel = @OldOptLevel) --@Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BLADE_ID and (OptLevel = @OldOptLevel) --@Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SPEAR_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SPEAR_ID and (OptLevel = @OldOptLevel) --@Spear Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_TBLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_TBLADE_ID and (OptLevel = @OldOptLevel) --@T-Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BOW_ID and (OptLevel = @OldOptLevel) --@Bow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield -- EU Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DAGGER_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DAGGER_ID and (OptLevel = @OldOptLevel) --@Dagger Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_XBOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_XBOW_ID and (OptLevel = @OldOptLevel) --@Crossbow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_AXE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_AXE_ID and (OptLevel = @OldOptLevel) --@Axe Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SWORD_ID and (OptLevel = @OldOptLevel) --@OneHand Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSWORD_ID and (OptLevel = @OldOptLevel) --@T-Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSTAFF_ID and (OptLevel = @OldOptLevel) --@T-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_STAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_STAFF_ID and (OptLevel = @OldOptLevel) --@Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DSTAFF_ID and (OptLevel = @OldOptLevel) --@Dark-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_HARP_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_HARP_ID and (OptLevel = @OldOptLevel) --@Harp Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield End End
USE [SRO_VT_SHARDLOG] GO /****** Object: StoredProcedure [dbo].[_HamzaLockSystemD15Unlock] Script Date: 20/05/2016 02:33:51 م ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROCEDURE [dbo].[_HamzaLockSystemD15Unlock] @CharID Int As
-- Declare expression. Declare @CreaterName Varchar(60) = 'Spicoo' , -- Creater Name @Slot Int = '13' , -- char inventory slot 1. @ReqOptLevel Int = '0' , -- Requiared Opt Level to upgrade @OptDifference Int = '2' , -- Set the difference optlevel between old plus and new plus. @OldOptLevel Int , @NewOptLevel Int , @AdvValue Int , @ID64 Int , -------------------------
-- Set Old and New Item RefObjCommon ID below -- Use This Query to get each item ID by Codename128 -- Select ID From [SRO_VT_SHARD].[dbo].[_RefObjCommon] Where CodeName128 Like 'Item Code Name'
---> Old weapon ID's ---> New weapons ID's @Old_CH_SWORD_ID Int = 60378 , @New_CH_SWORD_ID Int = 60362 , --@New Chinese Sword @Old_CH_BLADE_ID Int = 60379 , @New_CH_BLADE_ID Int = 60363 , --@Chinese Blade @Old_CH_SPEAR_ID Int = 60380 , @New_CH_SPEAR_ID Int = 60364 , --@Chinese Spear @Old_CH_TBLADE_ID Int = 60381 , @New_CH_TBLADE_ID Int = 60365 , --@Chinese Glaive @Old_CH_BOW_ID Int = 60382 , @New_CH_BOW_ID Int = 60366 , --@Chinese Bow @Old_CH_SHIELD_ID Int = 60383 , @New_CH_SHIELD_ID Int = 60367 , --@Chinese Shield @Old_EU_SWORD_ID Int = 60384 , @New_EU_SWORD_ID Int = 60368 , --@European One Hand Sword @Old_EU_TSWORD_ID Int = 60385 , @New_EU_TSWORD_ID Int = 60369 , --@European Two Hand Sword @Old_EU_AXE_ID Int = 60386 , @New_EU_AXE_ID Int = 60370 , --@European Axe @Old_EU_DAGGER_ID Int = 60387 , @New_EU_DAGGER_ID Int = 60371 , --@European Dagger @Old_EU_XBOW_ID Int = 60388 , @New_EU_XBOW_ID Int = 60372 , --@European CrossBow @Old_EU_TSTAFF_ID Int = 60389 , @New_EU_TSTAFF_ID Int = 60373 , --@European Two Hand Staff @Old_EU_DSTAFF_ID Int = 60390 , @New_EU_DSTAFF_ID Int = 60374 , --@European Warlock Rod @Old_EU_STAFF_ID Int = 60391 , @New_EU_STAFF_ID Int = 60375 , --@European Claric Rod @Old_EU_HARP_ID Int = 60392 , @New_EU_HARP_ID Int = 60376 , --@European Harp @Old_EU_SHIELD_ID Int = 60393 , @New_EU_SHIELD_ID Int = 60377 --@European Shield -------------------------------------------------------------------------------------------- Set @ID64 = (Select ItemID From [SRO_VT_SHARD].[dbo].[_Inventory] Where CharID = @CharID and Slot = @Slot and ItemID > 0) Set @OldOptLevel = (Select OptLevel From [SRO_VT_SHARD].[dbo].[_Items] Where ID64 = @ID64)
-- Start Lock system :
-- First Case : -- IF Item has not advanced elixir :
IF NOT EXISTS (Select * From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) Begin IF @OldOptLevel >= @ReqOptLevel Begin Set @NewOptLevel = @OldOptLevel - @OptDifference -- CH Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SWORD_ID and (OptLevel = @OldOptLevel) --@Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BLADE_ID and (OptLevel = @OldOptLevel) --@Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SPEAR_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SPEAR_ID and (OptLevel = @OldOptLevel) --@Spear Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_TBLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_TBLADE_ID and (OptLevel = @OldOptLevel) --@T-Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BOW_ID and (OptLevel = @OldOptLevel) --@Bow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield -- EU Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DAGGER_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DAGGER_ID and (OptLevel = @OldOptLevel) --@Dagger Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_XBOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_XBOW_ID and (OptLevel = @OldOptLevel) --@Crossbow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_AXE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_AXE_ID and (OptLevel = @OldOptLevel) --@Axe Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SWORD_ID and (OptLevel = @OldOptLevel) --@OneHand Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSWORD_ID and (OptLevel = @OldOptLevel) --@T-Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSTAFF_ID and (OptLevel = @OldOptLevel) --@T-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_STAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_STAFF_ID and (OptLevel = @OldOptLevel) --@Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DSTAFF_ID and (OptLevel = @OldOptLevel) --@Dark-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_HARP_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_HARP_ID and (OptLevel = @OldOptLevel) --@Harp Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield End End
-- Second Case : -- IF Item has advanced elixir :
ELSE IF EXISTS (Select * From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) Begin Set @AdvValue = (Select nOptValue From [SRO_VT_SHARD].[dbo].[_BindingOptionWithItem] Where bOptType = 2 and nItemDBID = @ID64) IF @OldOptLevel >= @ReqOptLevel Begin Set @NewOptLevel = (@OldOptLevel - @OptDifference) + @AdvValue -- CH Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SWORD_ID and (OptLevel = @OldOptLevel) --@Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BLADE_ID and (OptLevel = @OldOptLevel) --@Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SPEAR_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SPEAR_ID and (OptLevel = @OldOptLevel) --@Spear Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_TBLADE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_TBLADE_ID and (OptLevel = @OldOptLevel) --@T-Blade Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_BOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_BOW_ID and (OptLevel = @OldOptLevel) --@Bow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_CH_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_CH_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield -- EU Weapons Upgrade. Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DAGGER_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DAGGER_ID and (OptLevel = @OldOptLevel) --@Dagger Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_XBOW_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_XBOW_ID and (OptLevel = @OldOptLevel) --@Crossbow Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_AXE_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_AXE_ID and (OptLevel = @OldOptLevel) --@Axe Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SWORD_ID and (OptLevel = @OldOptLevel) --@OneHand Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSWORD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSWORD_ID and (OptLevel = @OldOptLevel) --@T-Sword Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_TSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_TSTAFF_ID and (OptLevel = @OldOptLevel) --@T-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_STAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_STAFF_ID and (OptLevel = @OldOptLevel) --@Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_DSTAFF_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_DSTAFF_ID and (OptLevel = @OldOptLevel) --@Dark-Staff Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_HARP_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_HARP_ID and (OptLevel = @OldOptLevel) --@Harp Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @New_EU_SHIELD_ID , OptLevel = @NewOptLevel Where ID64 = @ID64 and RefItemID = @Old_EU_SHIELD_ID and (OptLevel = @OldOptLevel) --@Shield End End
ودا ال AddLogItem
كود PHP:
USE [SRO_VT_SHARDLOG] GO /****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 24/05/2016 04:00:31 م ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
------------------------------------------------------------------------------------------------------------------- -- Step 2 -- ±âأپ¸ ¾أ†أ€أŒأ…أ› ·أژ±× أ€أ”·أ‚ Stored procedure ¼أ¶أپ¤ -- DataBase : Shard Log ALTER procedure [dbo].[_AddLogItem] @CharID int, @ItemRefID int, @ItemSerial bigint, @dwData int, @TargetStorage tinyint, @Operation tinyint, @Slot_From tinyint, @Slot_To tinyint, @EventPos varchar(64), @strDesc varchar(128), @Gold bigint -- #ifdef EXTEND_GOLD_TYPE »أ°أ€أ” as declare @len_pos int declare @len_desc int declare @strDesc_separado varchar(128) declare @len_desc1 int set @len_pos = len(@EventPos) set @len_desc = len(@strDesc) if (@len_pos > 0 and @len_desc > 0) begin insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, strDesc, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ end else if (@len_pos > 0 and @len_desc = 0) begin insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ end else if (@len_pos = 0 and @len_desc > 0) begin insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, strDesc, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ end else if (@len_pos = 0 and @len_desc = 0) begin insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³أƒ¼ end -- أ€¯·أ، ¾أ†أ€أŒأ…أ› ±¸أ€أ”أ€أŒ¸é! -- #define LOG_ITEMEVENT_BUY_CASHITEM (BYTE)35 if (@Operation = 35) begin insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64) values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial) end if (@Operation = 90 OR @Operation = 160) begin set @len_desc1 = CHARINDEX (']',@strDesc) if(@len_desc1 = 9) begin set @strDesc = SUBSTRING(@strDesc,0,9) set @strDesc_separado = SUBSTRING(@strDesc, 8, 1) end else if(@len_desc1 = 10) begin set @strDesc = SUBSTRING(@strDesc,0,10) set @strDesc_separado = SUBSTRING(@strDesc, 8, 2) end if(@strDesc_separado >= 8 and @strDesc_separado < 16) begin --set @strDesc_separado = @len_desc1 insert _LogItemPlus(CharID, Serial64, Plus, Data, Lido) values(@CharID, @ItemSerial, @strDesc_separado, GetDate(), '0') end end ------------------------------- IF (@operation = 41 and @ItemRefID = '60394') Begin Declare @ID64 Int , @RefItemID Int , @NewRefID Int Select Top 1 @ID64 = Inv.ItemID , @RefItemID = Items.RefItemID From [SRO_VT_SHARD].[dbo].[_Inventory] As Inv Inner Join [SRO_VT_SHARD].[dbo].[_Items] As Items ON Inv.ItemID = Items.ID64 Where Inv.CharID = @CharID and Inv.ItemID > 0 and Inv.Slot = 13 Select Top 1 @NewRefID = LockItemID From [dbo].[LockItemsID] Where ReqItemID = @RefItemID IF @NewRefID IS NOT NULL and @ID64 IS NOT NULL Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @NewRefID Where ID64 = @ID64 End End -- Unlock IF (@operation = 41 and @ItemRefID = '60395') Begin Select Top 1 @ID64 = Inv.ItemID , @RefItemID = Items.RefItemID From [SRO_VT_SHARD].[dbo].[_Inventory] As Inv Inner Join [SRO_VT_SHARD].[dbo].[_Items] As Items ON Inv.ItemID = Items.ID64 Where Inv.CharID = @CharID and Inv.ItemID > 0 and Inv.Slot = 13 Select Top 1 @NewRefID = ReqItemID From [dbo].[LockItemsID] Where LockItemID = @RefItemID IF @NewRefID IS NOT NULL and @ID64 IS NOT NULL Begin Update [SRO_VT_SHARD].[dbo].[_Items] Set RefItemID = @NewRefID Where ID64 = @ID64 End End
المشكله اما باجي ادرب الاسكرول بتيجي عامله تيلبوت علي طوا من غير متغير اي حاجه
التعديل الأخير تم بواسطة Spicoo ; 25-05-2016 الساعة 12:47 AM