قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة [ قسم متخصص فى شروحات و البرامج في عمل السيرفرات الخاصة ] [ يرجى عدم وضع الأسئلة والاستفسارات في هذا القسم ] |
|
أدوات الموضوع | انواع عرض الموضوع |
12-12-2013, 04:24 AM | #1 | ||||||||||
|
Now :Auto EquipMent بسم الله الرحمن الرحيم بعد التحيه والسلام ...... حبيت اقدم حاجه كتير نفسو يعملها على السيرفر بتاعو بس المواضيع والاسئله اللى عليها كلها ناقصه الموضوع منقول ولكن انا ترجمتلكو الشرح كلو وحليت مشكلة فيه كده . المهم نبتدى الشرح ارجو ينول اعجابكم . النظام ده انا مجربو شغال من ديجرى 1 الى ديجرى 9 . بيعطى لكل اكونت Full Set +7 Full Blue . والنظام ده فيه طريقتين اللى انا مجربها ومتاكد منها ده اللى هشرحها . دلقتى نبتدى الشرح اول حاجه هنضيف الاكواد دى فى الميديا بس اعمل على SRO_VT_SHARD New Querry بعد كده اكتب الاكواد واحد واحد _RefObjCommon كود:
INSERT INTO _RefObjCommon VALUES (1,46030,'ITEM_EVENT_AUTOEQUIP_COUPON','???? ???? ??? (???)','xxx','SN_ITEM_EVENT_AUTOEQUIP_COUPON','SN_ITEM_GM_GEAR_COUPON_TT_DESC',1,0,3,3,3,1,180000,3,0,1,1,1,3,0,1,0,0,129,0,0,0,0,0,0,0,-1,0,-1,0,-1,0,-1,0,-1,0,0,0,0,0,0,0,100,0,0,0,'xxx','item\etc\drop_mall_scroll.bsr','item\etc\coupon_weapon.ddj','xxx','xxx',46030) كود:
INSERT INTO _RefObjItem VALUES (46030,1,2,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5000,'????',1,'??????',-1,'RESURRECT',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',0,0,0) SRO_VT_SHARD وهتعمل كليك لمين عليه وتختار New Querry وتحط الكود اللى فى الملف ده عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ] طب بردو علشان نبقى فاهمين الكود ده عمل ايه الكوده ده عملنا Procedure جديد فى ال Sro_VT_SHARD تمام بعد كده بقى هنروح على SRO_VT_SHARDLOG programmability Stored Procedure _AddLogItem ونزود الكود ده كود:
IF (@Operation = 41) -- scroll is used BEGIN IF (@ItemRefID = 46030) -- Auto-equipment Coupon BEGIN DECLARE @CharNameEQ VARCHAR(64) = (SELECT CharName16 from [SRO_VT_SHARD].[dbo].[_Char] WHERE CharID = @CharID) EXEC [SRO_VT_SHARD].[dbo].[_ADD_AUTOEQUIP_GEAR] @CharNameEQ, 7 END END SRO_VT_SHARDLOG programmability Stored Procedure _AddLogChar وبردو نزود الكود ده كود:
IF (@EventID = 22) -- Character level up BEGIN -- Character reached certain level IF (@Data2 = 13 OR @Data2 = 21 OR @Data2 = 29 OR @Data2 = 37 OR @Data2 = 47 OR @Data2 = 57 OR @Data2 = 69 OR @Data2 = 81) BEGIN DECLARE @CharNameEQ VARCHAR(64) = (SELECT CharName16 from [SRO_VT_SHARD].[dbo].[_Char] WHERE CharID = @CharID) -- Set Method (1 = inventory, 2 = auto) (CHANGE THIS IF YOU WANT) DECLARE @AEMethod INT = 2 -- ID in _RefObjCommon for this Auto-Equipment Coupon (CHANGE THIS IF YOU HAVE DIFFERENT ID) DECLARE @RefItemID INT = 46030 -- Method 1: deliver inventory IF (@AEMethod = 1) BEGIN -- Check if coupon exist -- (so character won't get multiple coupon) ;) DECLARE @isCouponExist INT = 0 DECLARE @TSlots INT = 0 DECLARE @CharSlot INT = 0 DECLARE @CouponItemID INT = 0 SELECT @TSlots = COUNT(Slot) from [SRO_VT_SHARD].[dbo].[_Inventory] WHERE CharID = @CharID WHILE @CharSlot <= @TSlots BEGIN IF (@CharSlot > 13) BEGIN SELECT @CouponItemID = ItemID FROM [SRO_VT_SHARD].[dbo].[_Inventory] WHERE CharID = @CharID AND Slot = @CharSlot IF EXISTS (SELECT RefItemID FROM [SRO_VT_SHARD].[dbo].[_Items] WHERE RefItemID = @RefItemID AND ID64 = @CouponItemID) BEGIN SET @isCouponExist = 1 SET @CharSlot = @TSlots END END SET @CharSlot = @CharSlot + 1 END -- If previous coupon not exist, deliver to inventory IF (@isCouponExist = 0) BEGIN EXEC [SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN] @CharNameEQ, 'ITEM_EVENT_AUTOEQUIP_COUPON', 1, 0 END END -- Method 2: automatic equip ELSE IF (@AEMethod = 2) BEGIN EXEC [SRO_VT_SHARD].[dbo].[_ADD_AUTOEQUIP_GEAR] @CharNameEQ, 7 END END END وبكده نكون خلصنا كل الاضافات فى الداتابيز وبكده نكون خلصنا الشرح بس علشان تشتغل معاكو النظام بدون مشاكل اول حاجه لازم تكون لابس 1 ايتم Sun d1 وكمان تكون معاك فى ايدك سلاح Sun dg1 . تانى حاجه النظام شغال على الصينى باللفل يعنى مثلا اول ما يجيب لفل 13 تعمل teleport او تضرب سكورلايه وبكده تشتغل تمام اما بالنسبه للاوربى ده لازم بال mastery level يعنى لازم تعلى فى Skills علشان الحوار يشتغل بدون مشاكل . ثالث حاجه فيه حتى فى Procedure اللى احنا عملناه فى Sro_vt+shard اللى هوه ده هيبقى اسمه _ADD_AUTOEQUIP_GEAR فى حته فيه لو النظام مشتغلشى يبقى لازم نغيرو بالايتم اللى بتوافق مع الداتابيز بتاعتنا كود:
-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- @@@ BEGIN: SETTINGS -- CHANGE THIS! -- CHANGE THIS! -- CHANGE THIS! (if needed) -- (Represent ITEM_CH_BOW_11_A_RARE), change as you need it DECLARE @GearSuffix VARCHAR(16) = 'A_RARE' -- @@@ END: SETTINGS -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ يبقى لازم تدخل على CFG بتاعو وتغير فى misc.ini تخليه كده disableLog = 0 ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@ وبكده اكون خلصت الشرح ارجو اكون ساعدت وان ينول الموضوع اعجابكم واى حد تقابلو مشكله يكتبها وانا هرد عليه . Update طبعا نظام ال AutoEquip علشان يشتغل لازم تكون لبسه حتى واحده وماسك سلاح بردو ويكونو صن علشان نظام الاوتو يشتغل فانا عملتلكو Addnewchar ينزل الاكونت لابس الكام حته دول ومتجربه من غير مشاكل بس قبل ما تجرب حاجه عندك خد BackUp من ال DB بتاعتك Procedure addnewchar كود:
USE [SRO_VT_SHARD] GO /****** Object: StoredProcedure [dbo].[_AddNewChar] Script Date: 01/28/2014 06:53:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[_AddNewChar] @UserJID INT, --@CharSlot INT, @RefCharID INT, @CharName varchar (64), @CharScale tinyINT, @StartRegionID INT, @StartPos_X real, @StartPos_Y real, @StartPos_Z real, @DefaultTeleport INT, @RefMailID INT, @RefPantsID INT, @RefBootsID INT, @RefWeaponID INT, @RefShield INT, @DurMail tinyINT, @DurPants tinyINT, @DurBoots tinyINT, @DurWeapon tinyINT, @DurShield tinyINT, @DefaultArrow INT AS SET NOCOUNT ON DECLARE @Slot INT DECLARE @temp INT DECLARE @NewCharID INT SET @NewCharID = 0 -- Initial Equip Edit by LemoniscooL DECLARE @RefHandID INT DECLARE @RefHatID INT DECLARE @RefShoulderID INT DECLARE @RefEarringID INT DECLARE @RefRingID INT DECLARE @RefNeckID INT DECLARE @DurHand INT DECLARE @DurHat INT DECLARE @DurShoulder INT DECLARE @DurEarring INT DECLARE @DurRing INT DECLARE @DurNeck INT --Male Clothes Chinese IF (@RefMailID = 3643) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Male Heavy Armor Chinese IF (@RefMailID = 3637) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Male Light Armor Chinese IF (@RefMailID = 3640) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Female Clothes Chinese IF (@RefMailID = 3652) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Female Heavy Armor Chinese IF (@RefMailID = 3646) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Female Light Armor Chinese IF (@RefMailID = 3649) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_C_RARE') END --Male Clothes Europe IF (@RefMailID = 11623) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Male Heavy Armor Europe IF (@RefMailID = 11617) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Male Light Armor Europe IF (@RefMailID = 11620) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Female Clothes Europe IF (@RefMailID = 11632) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Female Heavy Armor Europe IF (@RefMailID = 11626) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Female Light Armor Europe IF (@RefMailID = 11629) BEGIN SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_AA_C_RARE') SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_BA_C_RARE') SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_FA_C_RARE') SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_HA_C_RARE') SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_LA_C_RARE') SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_SA_C_RARE') SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_C_RARE') SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_C_RARE') SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_C_RARE') END --Shield Chinese IF (@RefShield = 10886) BEGIN SET @RefShield = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SHIELD_01_C_RARE') END --Shield Europe IF (@RefShield = 10896) BEGIN SET @RefShield = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_SHIELD_01_C_RARE') END --Blade Chinese IF (@RefWeaponID = 3633) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_BLADE_01_C_RARE') END --Bow Chinese IF (@RefWeaponID = 3636) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_BOW_01_C_RARE') END --Spear Chinese IF (@RefWeaponID = 3634) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SPEAR_01_C_RARE') END --Sword Chinese IF (@RefWeaponID = 3632) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SWORD_01_C_RARE') END --Glavie Chinese IF (@RefWeaponID = 3635) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_TBLADE_01_C_RARE') END --Axe Europe IF (@RefWeaponID = 10890) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_AXE_01_C_RARE') END --XBow Europe IF (@RefWeaponID = 10891) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_CROSSBOW_01_C_RARE') END --Dagger Europe IF (@RefWeaponID = 10887) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_DAGGER_01_C_RARE') END --Darkstaff Europe IF (@RefWeaponID = 10892) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_DARKSTAFF_01_C_RARE') END --Harp Europe IF (@RefWeaponID = 10894) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_HARP_01_C_RARE') END --Cleric Rod Europe IF (@RefWeaponID = 10895) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_STAFF_01_C_RARE') END --Sword Europe IF (@RefWeaponID = 10888) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_SWORD_01_C_RARE') END --Staff Europe IF (@RefWeaponID = 10893) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_TSTAFF_01_C_RARE') END --Twohand Sword Europe IF (@RefWeaponID = 10889) BEGIN SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_TSWORD_01_C_RARE') END --Select Durability SET @DurHand = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefHandID)) SET @DurMail = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefMailID)) SET @DurBoots = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefBootsID)) SET @DurHat = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefHatID)) SET @DurPants = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefPantsID)) SET @DurShoulder = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefShoulderID)) SET @DurWeapon = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefWeaponID)) SET @DurShield = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefShield)) SET @DurEarring = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefEarringID)) SET @DurRing = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefRingID)) SET @DurNeck = (Select Dur_L from _RefObjItem where ID in (Select Link from _RefObjCommon where ID = @RefNeckID)) -- Initial Equip Edit by LemoniscooL ----------------------------------------------------------------------------- -- 1. ؤ³¸¯إح ½½·ش ³ر¹ِ°، validار °حہخءِ, ±×¸®°ي ؛َ½½·شہج ¸آ´آءِ ¸صہْ أ¼إ©ار´ظ. ----------------------------------------------------------------------------- -- start by novice. SELECT @temp = count(CharID) FROM _User WITH (NOLOCK) WHERE UserJID = @UserJID IF (@temp >= 4) BEGIN -- ³ت¹« ¸¹ہع³ھ RETURN -2 END -- finish by novice. ----------------------------------------------------------------------------- -- 2. ؤ³¸¯إح أك°،اد±â ----------------------------------------------------------------------------- IF (@CharScale > 68) -- 0100 0100 --> 68 ہج´ظ! BEGIN -- ؤ³¸¯إح »¼؛ ½ائذ! ½؛ؤةہد °ھہج ہج»َاد´ظ! RETURN -3 END EXEC @temp = _IsExistingCharName @CharName IF (@temp <> 0) BEGIN -- ہج¹ج »ç؟ëءكہخ ہج¸§ہج¶َ´آµ¥? RETURN -4 END BEGIN TRANSACTION -- ہخ´ّ½أ½؛إغہج ہû؟ëµا¸é¼* ¸¶ءِ¸·؟، WorldID؟ح 1°ھہ» ´ُ ³ض¾î ءض¾ْ´ظ! INSERT INTO _Char (RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize, LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID) VALUES (@RefCharID, @CharName, @CharScale, 20, 20, 24252, 589, -14.655776, 468, 2094, 109, GetDate(), 1, 1, 0, 0,0, 200,200, 1, 1, 1, 1) SET @NewCharID = @@IDENTITY IF (@@ERROR <> 0 OR @@ROWCOUNT = 0) BEGIN -- ؤ³¸¯إح »¼؛ ½ائذ! ROLLBACK TRANSACTION RETURN -5 END -- start by novice. -- A??¦ Slot ¾E¾´´U.. ±×³E Insert ¸¸.. INSERT INTO _User VALUES (@UserJID, @NewCharID) -- finish by novice. ----------------------------------------------------------------------------- -- 3-1. ہه؛ٌ ½½·ش أ¤؟ى±â -- [ہخ؛¥إن¸® ½½·ش 96°³] + [ہه؛ٌ½½·ش 13°³] <- ہخ؛¥إن¸® ب®ہه ¼*؛ٌ½؛ بؤ 48°³؟،¼* 96°³·خ ءُ°،!!!(woos0) ----------------------------------------------------------------------------- --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! INSERT INTO _Inventory(CharID, Slot, ItemID) SELECT @NewCharID, cnt, 0 FROM _RefDummySlot with( nolock ) WHERE cnt < 109 IF (@@ERROR <> 0) BEGIN -- ہخ؛¥إن¸® »¼؛ ½ائذ! ROLLBACK TRANSACTION RETURN -7 END --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! -- µًئْئ®·خ ¼±إأار ¾ئہجإغہ» ´ظ½أ ³ض¾îءضہع... /* ؟ن·± ¼ّ¼*·خ ء¤ہاµا¾î ہض´ظ. 0: EQUIP_SLOT_HELM 1: EQUIP_SLOT_MAIL, 2: EQUIP_SLOT_SHOULDERGUARD, 3: EQUIP_SLOT_GAUNTLET, 4: EQUIP_SLOT_PANTS, 5: EQUIP_SLOT_BOOTS, 6: EQUIP_SLOT_WEAPON, 7: EQUIP_SLOT_SHIELD or ARROW, 8: EQUIP_SLOT_EARRING, 9: EQUIP_SLOT_NECKLACE, 10: EQUIP_SLOT_L_RING, 11: EQUIP_SLOT_R_RING, */ DECLARE @ItemID BIGINT SET @ItemID = 0 -- »َ°© IF (@RefMailID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 1, @RefMailID, @DurMail IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -8 END END -- ¹ظءِ IF (@RefPantsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 4, @RefPantsID, @DurPants IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -9 END END -- Boots IF (@RefBootsID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 5, @RefBootsID, @DurBoots IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -10 END END -- Weapon IF (@RefWeaponID <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 6, @RefWeaponID, @DurWeapon IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -11 END END -- ¹وئذ IF (@RefShield <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @RefShield, @DurShield IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -12 END END -- ب¤½أ default·خ ¼±إأار ¹«±â°، ب°ہج¶َ¸é ب*»ى 250°³µéہج ب°إëµµ اش²² ءط´ظ. ءزؤ،? IF (@DefaultArrow <> 0) BEGIN EXEC @ItemID = _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @DefaultArrow, 250 IF (@ItemID <= 0) BEGIN ROLLBACK TRANSACTION RETURN -13 END END ----------------------------------------------------------------------------- -- 3-2. ¾ئ¹ظإ¸ Inventory ½½·ش أ¤؟ى±â -- [¾ئ¹ظإ¸ ہخ؛¥إن¸® ½½·ش 5°³] -- APPLY_AVATAR_SYSTEMہج ہû؟ëµا¸é¼* أك°،µا´آ ؛خ؛ذ ----------------------------------------------------------------------------- --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! INSERT INTO _InventoryForAvatar(CharID, Slot, ItemID) SELECT @NewCharID, cnt, 0 FROM _RefDummySlot with( nolock ) WHERE cnt < 5 IF (@@ERROR <> 0) BEGIN -- ¾ئ¹ظإ¸ ہخ؛¥إن¸® »¼؛ ½ائذ! ROLLBACK TRANSACTION RETURN -14 END --PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!!PATCH WARNING!!! ----------------------------------------------------------------------------- -- default skill³ض¾îءض±â ----------------------------------------------------------------------------- DECLARE @country tinyINT EXEC @country = _GetObjCountry @RefCharID INSERT INTO _CharSkillMastery (CharID, MasteryID, Level) SELECT @NewCharID, MasteryID, 0 FROM _RefCharDefault_SkillMastery with(nolock) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -15 END INSERT INTO _CharSkill (CharID,SkillID,Enable) SELECT @NewCharID, SkillID, 1 FROM _RefCharDefault_Skill with(nolock) WHERE Race = @country or Race = 3 IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -16 END ----------------------------------------------------------------------------- -- ±â؛» ؤù½؛ئ® ³ض¾îءض±â ----------------------------------------------------------------------------- INSERT INTO _CharQuest (CharID, QuestID, Status, AchievementCount, StartTime, EndTime, QuestData1, QuestData2) SELECT @NewCharID, ID, 1, 0, getdate(), getdate(), 0, 0 FROM _RefQuest WHERE CodeName in (SELECT CodeName FROM _RefCharDefault_Quest with(nolock) WHERE (Race = @country or Race = 3) and RequiredLevel = 1 and Service = 1) IF (@@error <> 0) BEGIN ROLLBACK TRANSACTION RETURN -17 END ----------------------------------------------------------------------------- -- Static Avatar Initial Record ³ض±â ----------------------------------------------------------------------------- INSERT INTO _StaticAvatar(CharID) values(@NewCharID) IF (@@ERROR <> 0) BEGIN ROLLBACK TRANSACTION RETURN -18 END ----------------------------------------------------------------------------- -- Trijob أ¤؟ِ³ض±â!!!!! ----------------------------------------------------------------------------- INSERT INTO _CharTrijob VALUES (@NewCharID, 0, 1, 0, 0, 0) IF (@@ERROR <> 0) BEGIN -- ہخ؛¥إن¸® »¼؛ ½ائذ! ROLLBACK TRANSACTION RETURN -19 END ----------------------------------------------------------------------------- -- CharList؟، ID ³ض¾îءض±â ----------------------------------------------------------------------------- INSERT _CharNameList VALUES(@CharName, @NewCharID) BEGIN exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_COS_C_PEGASUS_SCROLL',5,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_HP_SUPERSET_5_BAG',8000,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_MP_SUPERSET_5_BAG',8000,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_ARCHEMY_POTION_SPEED_11',10,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RESURRECTION_100P_SCROLL',10,1 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_HWAN_POTION',10,1 END IF (@RefCharID >= 1907 AND @RefCharID <= 1919) -- MALE CH BEGIN exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_AVATAR_M_NASRUN',1,0 END ELSE IF (@RefCharID >= 14875 AND @RefCharID <= 14887) -- MALE EU BEGIN exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_AVATAR_M_NASRUN',1,0 END ELSE IF (@RefCharID >= 1920 AND @RefCharID <= 1931) -- FEMALE CH BEGIN exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_AVATAR_W_NASRUN',1,0 END ELSE IF (@RefCharID >= 14888 AND @RefCharID <= 14900) -- FEMALE EU BEGIN exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_AVATAR_W_NASRUN',1,0 END -- Quick Slot ء¤؛¸ ہْہه؟ë!!! exec _AddNewClientConfig @NewCharID -- by novice...... for saving client configurations... COMMIT TRANSACTION RETURN @NewCharID |
||||||||||
التعديل الأخير تم بواسطة McDiesel ; 23-10-2018 الساعة 08:02 PM
|
يتصفح الموضوع حالياً : 1 (0 عضو و 1 زائر) | |
|
|
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | الردود | آخر مشاركة |
Auto Equipment: NEW | Hamza FiGo | قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة | 12 | 28-07-2023 01:54 AM |
auto equipment | loaymoataz123 | قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة | 4 | 15-04-2017 10:21 PM |
Auto Equipment | loverslove | قسم المواضيع المكررة و المخالفة | 16 | 29-04-2016 10:40 PM |
auto equipment | loverslove | قسم المواضيع المكررة و المخالفة | 12 | 03-04-2016 07:27 PM |
Auto Equipment ! | ™XerK™ | قسم المواضيع المكررة و المخالفة | 20 | 09-07-2014 09:39 AM |