[STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    How to use:

    Copy paste the table structure and execute it. Copy paste the stored procedure and execute it. Fill up the config table with the possible items.. the blues params and the white params.
    I'm not going to share the part where I auto-calculate the blue and white params... You guys aren't worth it. Therefore, you gotta search & put them into the config table directly.
    If you have problems setting this up then too bad. I'm not gonna provide support to idiots.

    Code:
    CREATE procedure [dbo].[_AutoEquipment] @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;
        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.RefItemID    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 FROM SRO_VT_SHARD.._RefObjCommon WHERE    ID = @ReFObjID
                                SELECT @optLvl = CASE WHEN @optLvl >= 3 THEN @optLvl ELSE 3 END
                                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_ROYAL.._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 
                                SET @Flag += 1 END

    Config table:
    Spoiler:

    Code:
    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]


    Proper Formatting:
    Spoiler:

    Code:
    ALTER 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;
        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     DATABASE_SRO.._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        DATABASE_SRO.._Inventory I WITH (NOLOCK)
                        INNER JOIN    DATABASE_SRO.._Items IT WITH (NOLOCK) ON I.ItemID = IT.ID64
                        WHERE        I.Slot = @Flag 
                        AND            I.CharID @CharID
                        AND            IT.RefItemID    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 
                                FROM    DATABASE_SRO.._RefObjCommon 
                                WHERE    ID = @ReFObjID                        
                                
                                SELECT @optLvl =
                                    CASE WHEN @optLvl >= 3
                                            THEN @optLvl
                                        ELSE 3
                                    END
                                
                                UPDATE    DATABASE_SRO.._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_ROYAL.._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
                SET @Flag += 1
            END
    Last edited by DaRkAnGeL; 21-03-14 at 02:22 AM.


  2. #2
    Account Upgraded | Title Enabled! saxz is offline
    MemberRank
    Jul 2010 Join Date
    1,293Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    there's no better auto equipment then overlimit - olsta - arcane

  3. #3
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Oh there is. Look above.

  4. #4
    Account Upgraded | Title Enabled! OutOfMemory is offline
    MemberRank
    Aug 2013 Join Date
    272Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better &amp; NO Egy/Turq Shiz

    WTB love :D

    I help you and you love me ok?
    All roads lead to rome and many of members have it.

    Release something not released before :D
    When you will quit sro community you will fuck it before you leave by released your stuff :D

    Who waiting this day like my post please ^^

    - - - Updated - - -

    Quote Originally Posted by saxz View Post
    there's no better auto equipment then overlimit - olsta - arcane
    Overlimit i think coded by Cipi and he is a good sql coder.

    About RoyalBlade he is a good one too.

  5. #5
    (⌐■_■) NourAyman is offline
    MemberRank
    Feb 2012 Join Date
    Behind you :PLocation
    683Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Teleporter Program ? :P

    or shardmanager will freeze due to adding items on the same slot in the inventory .

  6. #6
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Quote Originally Posted by NourAyman View Post
    Teleporter Program ? :P

    or shardmanager will freeze due to adding items on the same slot in the inventory .
    Why would i release a teleporter program?

    Also... it looks like you can't even READ sql. Where do you see a INSERT statement? Blind much?

    Quote Originally Posted by OutOfMemory View Post
    WTB love :D
    I help you and you love me ok?
    All roads lead to rome and many of members have it.
    Sorry, just cause your parent's didn't provide love, it doesn't mean you'll get it from somewhere else. Take a nap in somebodies womb, might make ya feel better.

    Last sentence => Makes no sense.

    Quote Originally Posted by OutOfMemory View Post
    Release something not released before :D
    Which part of that query was released? Oh wait... you mean the 500 lines queries? You should know the difference in performance.... Oh wait.. you cant since you don't know shit and your always just talking.

    Quote Originally Posted by OutOfMemory View Post
    When you will quit sro community you will fuck it before you leave by released your stuff :D
    To be honest. When I leave, I'll fuck it up differently... not by publicizing my work.... OTherwise you'd be seeing 150 new threads here for each lil thing.
    Last edited by Royalblade; 18-03-14 at 05:30 PM.

  7. #7
    Account Upgraded | Title Enabled! OutOfMemory is offline
    MemberRank
    Aug 2013 Join Date
    272Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Which part of that query was released? Oh wait... you mean the 500 lines queries? You should know the difference in performance.... Oh wait.. you cant since you don't know shit and your always just talking.

    Sorry but i don't use public stuff . I wrote mine because it's not just an simple auto
    equipment system like yours :D







  8. #8
    (⌐■_■) NourAyman is offline
    MemberRank
    Feb 2012 Join Date
    Behind you :PLocation
    683Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Quote Originally Posted by Royalblade View Post
    Why would i release a teleporter program?

    Also... it looks like you can't even READ sql. Where do you see a INSERT statement? Blind much?
    1st _ iam not talking to give ' me ' that program just for ' Who you released that thread for '

    2nd _ because that program will avoid the shardmanager freeze

    3rd _ ' Where do you see a INSERT statement ' Iam talking about ' Complete that PROC ' With ' Teleporting players side to make that system 100 % wokring or move it to Development section .' --"

  9. #9
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    wasnt even going to read through this sql first but then i read the comments here and had to do it anyways ...

    Quote Originally Posted by NourAyman View Post
    Teleporter Program ? :P

    or shardmanager will freeze due to adding items on the same slot in the inventory .
    wont happen, you dont even need to teleport basicly .. teleport would just be for the client to show it correctly but server side the new items will be used immediately (also with new stats etc etc)
    aside of that if you really want to teleport ... just sit down on your ass and write it yourself i mean .. you have a fully working clientless for auto notice already in here with full source .. i think there are even 2 different sources
    just add teleport stuff to it and youre done .. not that hard

    Quote Originally Posted by OutOfMemory View Post
    Release something not released before :D
    seriously? none of the other auto equipment crap was hardly as performant as this one is ... it cant get any better from what i read

    Quote Originally Posted by OutOfMemory View Post
    When you will quit sro community you will fuck it before you leave by released your stuff :D

    Who waiting this day like my post please ^^
    noone will like your post as its never going to happen, i mean him releasing all his stuff

  10. #10
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Arigato Lemon :)

    Back to Nour. First of all, you are still blind. The shardmanager won't freeze. I don't know which kind of crap you've been using... However, this works completely WITHOUT auto-teleportation. You can even move the items BEFORE teleporting, you won't crash. You can keep leveling up and do w/e you want. However, if you teleport at some point, your items which you are currently wearing will get updated.

    Again... the shardmanger will NOT freeze.

    If you still don't understand it pick one of the many suicide options from here: http://www.douban.com/group/topic/2787032/

    Trust me they work! I've recommended them to several egyptian 'friends' before. Somehow they never told me if it works, but I guess that's just part of how its meant to be.

  11. #11
    Mahna Mahna...m MuP is offline
    MemberRank
    Aug 2008 Join Date
    344Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    This can be useful, thank you. :D
    BTW, the persons who appreciate quality will prefer to do it themselves and learn something from "coding" it.

  12. #12
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Quote Originally Posted by MuP View Post
    This can be useful, thank you. :D
    BTW, the persons who appreciate quality will prefer to do it themselves and learn something from "coding" it.

    Then you are probably one out of... uhm.. five? The rest will give up after "ALTER".

  13. #13
    Member hos00 is offline
    MemberRank
    Mar 2012 Join Date
    X:-8910 Y:-110Location
    57Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    @ topic
    that's one of the best auto-eq i've seen so far , and i've seen most of them .
    @ comments
    WTF u guys talking about , u may save the time of that non sense argument and try to understand how simple is the idea and learn the difference , it's fkin like reading a 500 pages book and reading a name on business card, if u don't get what he did there u should not be posting here.

  14. #14
    Mahna Mahna...m MuP is offline
    MemberRank
    Aug 2008 Join Date
    344Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    Quote Originally Posted by Royalblade View Post
    Then you are probably one out of... uhm.. five? The rest will give up after "ALTER".
    They won't make progress then.
    Anyway, we're going off-topic here.
    Last edited by MuP; 19-03-14 at 04:10 PM.

  15. #15
    In the Emperor name Caosfox is offline
    MemberRank
    Jun 2011 Join Date
    Balcora GateLocation
    1,608Posts

    Re: [STORED PROC] Royal Auto Equipment | 13 Lines | Faster, Better & NO Egy/Turq Shiz

    nice sql coding.. i want to code like you when i grow up (nah, forget it, im a dmn old and ugly guy, and totaly dislike sql. But indeed impressive coding and performance)



Page 1 of 3 123 LastLast

Advertisement