• 《 اي شخص هيعمل تعليقات بحروف عشوائية او تعليقات غير مفهومة في المواضيع هيتعملك حظر نهائي من استخدام الموقعツ 》

FREE

PREMUIM

PREMUIM

PREMUIM

PREMUIM

PREMUIM

PREMUIM

ازاى تعمل Auto Equipment

إنضم
14 يناير 2020
المشاركات
124
مستوى التفاعل
587
النقاط
93
العمر
34
الإقامة
مصر
السلام عليكم
انا جيبلكم سيستم Auto Equipment
وللى مش عارف ده ايه ده بيدى للاكونت سلاح ولبس ويعلا معاه يعنى كل لما تعلا فى اللفل دجرى السلاح واللبس بيعلا معاك بس لازم تعمل تليبورت
نبدأ بسم الله


شرح فيديو
يجب أن يكون لديك حساب لمشاهدة الوسائط

الموضوع كلو كويرى
اول حاجه تعمل New QUERY
ده علشان الايتم ينزل لابس sun

كود:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddNewChar]    Script Date: 7/2/2016 8:22:40 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
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_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_CLOTHES_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Male Heavy Armor Chinese
 IF (@RefMailID = 3637) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_HEAVY_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Male Light Armor Chinese
 IF (@RefMailID = 3640) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_M_LIGHT_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Female Clothes Chinese
 IF (@RefMailID = 3652) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_CLOTHES_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Female Heavy Armor Chinese
 IF (@RefMailID = 3646) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_HEAVY_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Female Light Armor Chinese
 IF (@RefMailID = 3649) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_W_LIGHT_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_RING_01_A_RARE')
 END
 
 --Male Clothes Europe
 IF (@RefMailID = 11623) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_CLOTHES_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Male Heavy Armor Europe
 IF (@RefMailID = 11617) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_HEAVY_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Male Light Armor Europe
 IF (@RefMailID = 11620) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_M_LIGHT_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Female Clothes Europe
 IF (@RefMailID = 11632) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_CLOTHES_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Female Heavy Armor Europe
 IF (@RefMailID = 11626) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_HEAVY_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Female Light Armor Europe
 IF (@RefMailID = 11629) BEGIN
    SET @RefHandID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_01_AA_A_RARE')
    SET @RefMailID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_06_BA_A_RARE')
    SET @RefBootsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_06_FA_A_RARE')
    SET @RefHatID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_06_HA_A_RARE')
    SET @RefPantsID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_06_LA_A_RARE')
    SET @RefShoulderID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_W_LIGHT_06_SA_A_RARE')
    SET @RefEarringID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_EARRING_01_A_RARE')
    SET @RefNeckID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_NECKLACE_01_A_RARE')
    SET @RefRingID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_RING_01_A_RARE')
 END
 
 --Shield Chinese
 IF (@RefShield = 10886) BEGIN
    SET @RefShield = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SHIELD_01_A_RARE')
 END
 
 --Shield Europe
 IF (@RefShield = 10896) BEGIN
    SET @RefShield = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_SHIELD_01_A_RARE')
 END
 
 --Blade Chinese
 IF (@RefWeaponID = 3633) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_BLADE_01_A_RARE')
 END
 
 --Bow Chinese
 IF (@RefWeaponID = 3636) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_BOW_01_A_RARE')
 END
 
 --Spear Chinese
 IF (@RefWeaponID = 3634) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SPEAR_01_A_RARE')
 END
 
 --Sword Chinese
 IF (@RefWeaponID = 3632) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_SWORD_01_A_RARE')
 END
 
 --Glavie Chinese
 IF (@RefWeaponID = 3635) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_CH_TBLADE_01_A_RARE')
 END
 
 --Axe Europe
 IF (@RefWeaponID = 10890) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_AXE_01_A_RARE')
 END
 
 --XBow Europe
 IF (@RefWeaponID = 10891) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_CROSSBOW_01_A_RARE')
 END
 
 --Dagger Europe
 IF (@RefWeaponID = 10887) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_DAGGER_01_A_RARE')
 END
 
 --Darkstaff Europe
 IF (@RefWeaponID = 10892) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_DARKSTAFF_01_A_RARE')
 END
 
 --Harp Europe
 IF (@RefWeaponID = 10894) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_HARP_01_A_RARE')
 END
 
 --Cleric Rod Europe
 IF (@RefWeaponID = 10895) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_STAFF_01_A_RARE')
 END
 
 --Sword Europe
 IF (@RefWeaponID = 10888) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_SWORD_01_A_RARE')
 END
 
 --Staff Europe
 IF (@RefWeaponID = 10893) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_TSTAFF_01_A_RARE')
 END
 
 --Twohand Sword Europe
 IF (@RefWeaponID = 10889) BEGIN
    SET @RefWeaponID = (SELECT ID FROM _RefObjCommon WHERE CodeName128='ITEM_EU_TSWORD_01_A_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
 
 --set @StartRegionID=25000
 -----------------------------------------------------------------------------
 -- 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. ij���� �߰��ϱ�    
    -----------------------------------------------------------------------------    
    IF (@CharScale > 68) -- 0100 0100 --> 68 �̴�!    
    BEGIN    
        -- ij���� ���� ����! ������ ���� �̻��ϴ�!      
        RETURN -3    
    END
     
    EXEC @temp = _IsExistingCharName @CharName    
    IF (@temp <> 0)    
    BEGIN    
        -- &#65533;̹� ������� �̸��̶�µ�?    
        RETURN -4    
    END    
 
BEGIN TRANSACTION
 

    -- &#65533;δ��ý����� ����Ǹ鼭 �������� 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, @StartRegionID, @StartPos_X, @StartPos_Y, @StartPos_Z, @DefaultTeleport, 45,  
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)

    SET @NewCharID = @@IDENTITY    
    IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)    
    BEGIN    
        -- &#307;���� ���� ����!    
        ROLLBACK TRANSACTION    
        RETURN -5    
    END    
    -- start by novice.    
    -- &#65533;��� Slot �Ⱦ���.. �׳� Insert ��..    
    INSERT INTO _User VALUES (@UserJID, @NewCharID)    
    -- finish by novice.    
 
 
     -----------------------------------------------------------------------------    
     -- 3-1. &#65533;�� ���� ��    
     -- [&#65533;κ��丮 ���� 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    
        -- &#65533;κ��丮 ���� ����!    
        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,
 */

 -- Initial Equip Edit by LemoniscooL
 DECLARE @ItemID BIGINT
 SET @ItemID = 0
 -- Chest
 IF (@RefMailID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 1, @RefMailID, @DurMail
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Hand
 IF (@RefHandID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 3, @RefHandID, @DurHand
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Hat
 IF (@RefHatID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 0, @RefHatID, @DurHat
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Shoulder
 IF (@RefShoulderID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 2, @RefShoulderID, @DurShoulder
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Pants
 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
 -- Shield
 IF (@RefShield <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @RefShield, @DurShield
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -12
    END
 END
 -- Arror/Bolt
 IF (@DefaultArrow <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 7, @DefaultArrow, 250
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -13
    END
 END
 -- Earring
 IF (@RefEarringID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 9, @RefEarringID, @DurEarring
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Ring 1
 IF (@RefRingID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 11, @RefRingID, @DurRing
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Ring 2
 IF (@RefRingID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 12, @RefRingID, @DurRing
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Necklace
 IF (@RefNeckID <> 0) BEGIN
    EXEC @ItemID =  _FN_ADD_INITIAL_EQUIP @NewCharID, 10, @RefNeckID, @DurNeck
    IF (@ItemID <= 0) BEGIN
        ROLLBACK TRANSACTION
        RETURN -8
    END
 END
 -- Initial Equip Edit by LemoniscooL
 
     -----------------------------------------------------------------------------    
     -- 3-2. &#65533;ƹ�Ÿ Inventory ���� ä���    
     -- [&#65533;ƹ�Ÿ �κ��丮 ���� 5��]
     -- APPLY_AVATAR_SYSTEM&#65533;� ����Ǹ鼭 �߰��Ǵ� �κ�
     -----------------------------------------------------------------------------    
     --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    
        -- &#65533;ƹ�Ÿ �κ��丮 ���� ����!    
        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&#65533;־��ֱ�    
    -----------------------------------------------------------------------------    
    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    
    -----------------------------------------------------------------------------    
    -- &#65533;⺻ ����Ʈ �־��ֱ�
    -----------------------------------------------------------------------------    
    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 &#65533;ֱ�    
    -----------------------------------------------------------------------------    
    INSERT INTO _StaticAvatar(CharID) values(@NewCharID)    
    IF (@@ERROR <> 0)    
    BEGIN    
        ROLLBACK TRANSACTION    
        RETURN -18    
    END      
       
    -----------------------------------------------------------------------------    
    -- Trijob &#228;���ֱ�!!!!!    
    -----------------------------------------------------------------------------    
    INSERT INTO _CharTrijob VALUES (@NewCharID, 0, 1, 0, 0, 0)    
    IF (@@ERROR <> 0)    
    BEGIN    
        -- &#65533;κ��丮 ���� ����!    
        ROLLBACK TRANSACTION    
        RETURN -19    
    END      
       
    -----------------------------------------------------------------------------    
    -- CharList&#65533;� ID �־��ֱ�    
    -----------------------------------------------------------------------------    
    INSERT _CharNameList VALUES(@CharName, @NewCharID)    
    UPDATE _Items SET OptLevel=3 WHERE ID64 IN (SELECT ItemID FROM _Inventory WHERE Slot BETWEEN 0 AND 12 AND Slot Not LIKE '8' AND CharID=@NewCharID)
     EXEC SRO_VT_SHARDLOG.dbo._AutoEquipmentTEST @NewCharID,1


 
    exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RETURN_SCROLL_HIGH_SPEED',25,1
 exec _ADD_ITEM_EXTERN @CharName,'ITEM_EVENT_RENT_REVERSE_RETURN_SCROLL',25,1
 exec _ADD_ITEM_EXTERN @CharName,'ITEM_COS_P_CAT_SCROLL',1,0
 exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_SPEED_UP_BASIC',20,0
  exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_HP_POTION_05',1000,0
 exec _ADD_ITEM_EXTERN @CharName,'ITEM_ETC_MP_POTION_05',1000,0
   
         
    -- Quick Slot &#65533;��� �����!!!    
    exec _AddNewClientConfig @NewCharID  -- by novice...... for saving client configurations...    

COMMIT TRANSACTION    
       
RETURN @NewCharID


اعمل QUERY ده بتاع السيستم
كود:
USE [SRO_VT_SHARDLOG]
GO

/****** Object:  Table [dbo].[_RoyalItemPoolAutoEquipment]    Script Date: 7/2/2016 8:27:19 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[_RoyalItemPoolAutoEquipment](
    [service] [int] NOT NULL,
    [ID] [int] NOT NULL,
    [CodeName128] [varchar](129) NOT NULL,
    [TypeID1] [tinyint] NOT NULL,
    [TypeID2] [tinyint] NOT NULL,
    [TypeID3] [tinyint] NOT NULL,
    [TypeID4] [tinyint] NOT NULL,
    [ReqLevel1] [tinyint] NOT NULL,
    [Gender] [tinyint] NULL,
    [P1] [bigint] NULL,
    [P2] [bigint] NULL,
    [P3] [bigint] NULL,
    [P4] [bigint] NULL,
    [P5] [bigint] NULL,
    [P6] [bigint] NULL,
    [P7] [bigint] NULL,
    [P8] [bigint] NULL,
    [P9] [bigint] NULL,
    [MagParamNum] [tinyint] NULL,
    [Va] [bigint] NULL,
    [Race] [bit] NULL,
 CONSTRAINT [PK__RoyalItemPoolAutoEquipment] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO



وده كمان
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object:  StoredProcedure [dbo].[_AutoEquipmentTEST]    Script Date: 2/7/2016 8:26:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[_AutoEquipmentTEST]
    @CharID INT,
    @data2 INT
AS
  



    DECLARE @Flag INT = 0,    @ID64 INT, @ReFObjID INT, @ReFItemID INT, @T1 TINYINT, @T2 TINYINT, @T3 TINYINT, @T4 TINYINT, @optLvl TINYINT, @race BIT, @Gen TINYINT, @REQLVL INT;
    SELECT @Gen = CASE WHEN RefObjID BETWEEN 1920 AND 1932 THEN 2 WHEN RefObjID <= 1919 THEN 1 WHEN RefObjID BETWEEN 14875 AND 14887 THEN 3 WHEN RefObjID BETWEEN 14888 AND 14900 THEN 4 ELSE 0 END FROM SRO_VT_SHARD.._Char WITH (NOLOCK) WHERE CharID = @CharID
    SELECT @race = CASE WHEN @Gen IN (1,2) THEN 0 WHEN @Gen IN (3,4) THEN 1 ELSE NULL END
    IF  (@race IS NULL) RETURN;
    WHILE @Flag <13    BEGIN
            SELECT @ID64 = 0, @ReFItemID = 0, @ReFObjID = 0, @T1 = 0, @T2 =0, @T3 = 0, @T4 = 0
            IF @Flag != 8 BEGIN
                    SELECT @ID64 = I.ItemID, @ReFObjID = IT.RefItemID, @optLvl = IT.OptLevel FROM SRO_VT_SHARD.._Inventory I WITH (NOLOCK) INNER JOIN SRO_VT_SHARD.._Items IT WITH (NOLOCK) ON I.ItemID = IT.ID64 WHERE I.Slot = @Flag AND I.CharID = @CharID AND IT.ID64    NOT IN (62,3655, 3823, 24459, 38345, 10383, 10885,19644, 24460, 38346) -- Arrows & Bolts...
                    IF @ID64  != 0  AND @ReFObjID IS NOT NULL BEGIN
                            SELECT @T1 = TypeID1,@T2 = TypeID2, @T3 = TypeID3, @T4 = TypeID4, @REQLVL = ReqLevel1 FROM SRO_VT_SHARD.._RefObjCommon WHERE    ID = @ReFObjID
                            SELECT @optLvl = CASE WHEN @optLvl >= 3 THEN @optLvl ELSE 3 END
                            if (@REQLVL <= 82 )
                            BEGIN
                            UPDATE    SRO_VT_SHARD.._Items SET RefItemID = Q.ID, Variance  = ISNULL(Q.Va, 0),    MagParam1 = Q.P1, MagParam2 = Q.P2, MagParam3 = Q.P3, MagParam4 = Q.P4, MagParam5 = Q.P5, MagParam6 = Q.P6, MagParam7 = Q.P7, MagParam8 = Q.P8, MagParam9 = Q.P9, MagParamNum = Q.MagParamNum, OptLevel = @optLvl FROM    (SELECT TOP 1 ID, P1, P2, P3, P4, P5, P6, P7, P8, P9, Va, CASE WHEN P1 = 0 THEN 0 WHEN P5 = 0 THEN 4 WHEN P6 = 0 THEN 5 WHEN P7 = 0 THEN 6 WHEN P8 = 0 THEN 7 ELSE 0 END AS MagParamNum FROM        SRO_VT_SHARDLOG.._royalitempoolautoequipment P WITH (NOLOCK) WHERE typeid1 = @T1 AND typeid2 = @T2 AND typeid3 = @T3 AND typeid4 = @T4 AND (Gender = @Gen OR Gender = 0) AND Race = @race AND ReqLevel1 <= @data2 ORDER  BY reqlevel1 DESC) AS Q WHERE ID64 = @ID64 AND ID64 != 0 AND Q.ID != 0 END END
                           END
                            SET @Flag += 1 END



وبعد كده تروح على SRO_VT_SHARDLOG تختار Programmability وتختار _AddLogChar
وتضيف الكلام ده بعد كلمه as
كود:
        IF (@EventID = 22) -- Character level up
               BEGIN
                EXEC SRO_VT_SHARDLOG.dbo._AutoEquipmentTEST  @CharID,@Data2
               END

هنيجي للتابل اللي احنا عملناه فوق
هنقفل ال SQL ونفحته الاول
ونروح علي التابل _RoyalItemPoolAutoEquipment اللي عملناه في اللوج
ونضيف السطور دي
هنختار السيستم بتاعنا عايزه يدي ايتم اية..يعني كل ما يعلي ياخد ايتم نورمال ولا صن ولا سوس










وبكده نكون خلصنا والف مبروك(y)😉
 
التعديل الأخير:

المواضيع المتشابهة

0المواضيع
0المشاركات
0الأعضاء
آخر عضو مسجل
أعلى