Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

Page 1 of 9 123456789 LastLast
Results 1 to 15 of 124
  1. #1
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    config Alternative new [Auto Equipment] system (by coupon/scroll) :)

    Hello

    I'd like to share something that I made out of my previous release "GM gear coupon", it has no relation to other "auto-equipment system" released here, mine is simply an alternative, you may use it if you want or not. And do read my notes carefully.

    I call this "Auto-Equipment Coupon"

    • What it does? It will change your char equipment to next degree if the character level or mastery fits its requirement. (MAXIMUM 11D)
    • What equipment does it add? Weapon (auto Shield for 1H), gear, and accessory
    • Any requirements? Just one, your character must wear any weapon and 1 gear (no need full set)
    • Usage Method? scroll
    • How does it work? For chinese, the system will detect character level, for Euro, will detect mastery level, so be sure you have mastery level -1 level to next degree (for example, mastery level 56 to get 7 degree), especially if you set the usage method as "automatic equipment" and not coupon.
    • Anything else? BE SURE you change parameters in SETTINGS section part in the Stored procedure to match your database items. (Read about NEW SP below)

    Now the boring part:

    - Database:

    _RefObjCommon
    Code:
    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)
    _RefObjItem
    Code:
    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)
    - Stored procedure in [SRO_VT_SHARD] database (NEW): SRO_VT_SHARD - [SP] - _ADD_AUTOEQUIP_GEAR.sql.txt

    Stuff that NEEDED TO BE CHANGED in that NEW SP ("SETTINGS" section):
    Code:
        -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        -- @@@ 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
        -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    - Stored procedure in [SRO_VT_LOG] database: (ADD THIS IN YOUR EXISTING _AddLogItem and _AddLogChar procedure, you can put at the most bottom line if you want)

    _AddLogItem
    Spoiler:
    Code:
    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

    - Media:

    itemdata_45000.txt: itemdata_45000_AEcoupon.txt

    textdata_object.txt: textdata_object_AEcoupon.txt

    DDJ: (put it in Media\icon\item\etc\coupon_weapon.ddj)
    http://openclient.sroinfo.com/op/iSR...pon_weapon.ddj

    NOTES:
    • You need to make sure that your "_AddLogItem" procedure is working. So If you use Evangelion SR_GameServer, you should set "disableLog = 0" in misc.ini and restart the gameserver.
    • And also, you can always utilize the new SP directly from SQL query window if you want, simply by doing:
      • "EXEC [SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN] 'Charname', 'ITEM_EVENT_AUTOEQUIP_COUPON', 1, 0" (to deliver scroll to inventory)
      • "EXEC [SRO_VT_SHARD].[dbo].[_ADD_AUTOEQUIP_GEAR] 'Charname', <item_plus_here>" (to automatically equip the char)


    Video (Method 1: Deliver the coupon to inventory method):
    Spoiler:
    Video (Method 2: automatically equip the char):
    Spoiler:

    Good luck and have fun ;)
    Last edited by Witchy Moo; 03-08-15 at 01:14 PM.


  2. #2
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    _AddLogChar

    • Remember to change @AEMethod in _AddLogChar if you want. 1 means deliver to inventory, 2 means automatic equip
    • Watch @RefItemID CAREFULLY, if you have other code in your _RefObjCommon, CHANGE THIS to your code, otherwise it won't work or your char will get multiple coupons (bad huh?). (Mine have "46030", yours could be different)

    (_AddLogChar on first post updated)

    cheers ;)

  3. #3
    Proficient Member Nemo07Back is offline
    MemberRank
    Apr 2013 Join Date
    157Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    nice release keep on mate ..

  4. #4
    Enthusiast gotsha is offline
    MemberRank
    Apr 2013 Join Date
    31Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Good Job But I Don't UnderSand This System Work At CH And Eu And Work With All Set And Weapon Saff And Dager Etc

    I Don't uderstand this -- (Represent ITEM_CH_BOW_11_A_RARE), change as you need it DECLARE @GearSuffix VARCHAR(16) = 'A_RARE'

  5. #5
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    if my mastery level 57 in cleric and Wizard ?

  6. #6
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Works Perfect witchymoo, tho already found an issue ;)

    When using a chinese bow or euro rogue you will get your arrows/bolt's deleted when it clears your inventory, so you need to stop it from clearing the arrow/bolt slot ^_^

    Slot 7 = Shield/arrow/bolts

    But you will need to make it check that if you don't use a shield do you use a bow or crossbow. If so then do not delete slot 7.

  7. #7
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Witchy you Was Saw My Equip What is The Error in IT ? I think its No Error But Why its Not Work ?

    witchy i dont need give characters set lv 101 Nova ?! what i can do ?

  8. #8
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Quote Originally Posted by gotsha View Post
    Good Job But I Don't UnderSand This System Work At CH And Eu And Work With All Set And Weapon Saff And Dager Etc

    I Don't uderstand this -- (Represent ITEM_CH_BOW_11_A_RARE), change as you need it DECLARE @GearSuffix VARCHAR(16) = 'A_RARE'
    Doesn't matter, the SP will detect your equipment and weapon before putting new one, READ MY NOTES. "A_RARE" = means nova, B_RARE = moon, and so on so forth

    Quote Originally Posted by CoderWaxy View Post
    if my mastery level 57 in cleric and Wizard ?
    Doesn't matter, the SP will only detect what equipment you wear, if you wear robe you get robe, you wear light armor you get light armor, so on so forth...

    Quote Originally Posted by blacksheep25 View Post
    Works Perfect witchymoo, tho already found an issue ;)

    When using a chinese bow or euro rogue you will get your arrows/bolt's deleted when it clears your inventory, so you need to stop it from clearing the arrow/bolt slot ^_^

    Slot 7 = Shield/arrow/bolts

    But you will need to make it check that if you don't use a shield do you use a bow or crossbow. If so then do not delete slot 7.
    Nice idea, I'll see what i can do with it, I might add automatic premium arrow/bolt (10K to the slot instead), what do you think?

    Quote Originally Posted by CoderWaxy View Post
    Witchy you Was Saw My Equip What is The Error in IT ? I think its No Error But Why its Not Work ?

    witchy i dont need give characters set lv 101 Nova ?! what i can do ?
    I don't understand the question.

  9. #9
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Quote Originally Posted by witchymoo View Post
    Nice idea, I'll see what i can do with it, I might add automatic premium arrow/bolt (10K to the slot instead), what do you think?
    Yeah, or add a spot to choose normal arrows/bolts or prem 10k ones in the SETTINGS section :)

  10. #10
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    blackSheep add me
    Skype : Ma3lmkeber please i want help

  11. #11
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Quote Originally Posted by CoderWaxy View Post
    blackSheep add me
    Skype : Ma3lmkeber please i want help
    witchymoo's procedures still arent working for me either when doing 11D or higher even tho its set for A_RARE which should be 11D nova. So I can't help you with getting that working at the moment but witchymoo might when he isn't busy

  12. #12
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    blacksheep i cant Set This Auto Equipment Working ! please Help me

  13. #13
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Quote Originally Posted by blacksheep25 View Post
    witchymoo's procedures still arent working for me either when doing 11D or higher even tho its set for A_RARE which should be 11D nova. So I can't help you with getting that working at the moment but witchymoo might when he isn't busy
    If your char is above "101" and you still getting 9D equip, then you should add level condition in _AddLogChar, I put the max level to 81 (9D), you can change it if you want. This part:
    Code:
        -- 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)
    81 = 9D, add it for 10D etc. etc..

    Also in the _ADD_AUTOEQUIP_GEAR SP:
    Find this:
    Code:
            WHEN @CurLevel < 81 THEN '08'
            ELSE '09' END
    Change to something like this:
    Code:
            WHEN @CurLevel < 81 THEN '08'
            WHEN @CurLevel < 92 THEN '09'
            WHEN @CurLevel < 101 THEN '10'
            ELSE '11' END
    And so on so forth...

    Oh btw, I'm done with arrow/bolt thing, add this in the SP ONLY if you wanna use it, if not, leave the SP as it was. (Arrows/bolts are not big deal anyway)

    Find this:
    Spoiler:
    Code:
            -- Shield
            IF (@useShield = 1)
            BEGIN
                EXEC @ShieldItemID64 = [_FN_ADD_INITIAL_EQUIP] @CharID, 7, @RefShieldID, @DuraShield
                IF (@ShieldItemID64 <= 0)
                BEGIN
                    PRINT 'Problem when executing [_FN_ADD_INITIAL_EQUIP], canceling sequence and rolling back data...'
                    ROLLBACK TRANSACTION
                    RETURN -19
                END
                PRINT '- Shield equipped.'
            END

    Change to this:
    Spoiler:
    Code:
            -- Shield
            IF (@useShield = 1)
            BEGIN
                EXEC @ShieldItemID64 = [_FN_ADD_INITIAL_EQUIP] @CharID, 7, @RefShieldID, @DuraShield
                IF (@ShieldItemID64 <= 0)
                BEGIN
                    PRINT 'Problem when executing [_FN_ADD_INITIAL_EQUIP], canceling sequence and rolling back data...'
                    ROLLBACK TRANSACTION
                    RETURN -19
                END
                PRINT '- Shield equipped.'
            END
    
            -- Arrow/Bolt
            IF (@WPClass = 'BOW' OR @WPClass = 'CROSSBOW')
            BEGIN
                DECLARE @ArrowItemID64 BIGINT
                DECLARE @RefArrowID INT = CASE
                    WHEN @WPClass = 'BOW' THEN (SELECT ID FROM _RefObjCommon WHERE [Service] = 1 AND CodeName128 = 'ITEM_ETC_AMMO_ARROW_01')
                    WHEN @WPClass = 'CROSSBOW' THEN (SELECT ID FROM _RefObjCommon WHERE [Service] = 1 AND CodeName128 = 'ITEM_ETC_AMMO_BOLT_01')
                END
            
                EXEC @ArrowItemID64 = [_FN_ADD_INITIAL_EQUIP] @CharID, 7, @RefArrowID, 250
                IF (@ArrowItemID64 <= 0)
                BEGIN
                    PRINT 'Problem when executing [_FN_ADD_INITIAL_EQUIP] (Arrow), canceling sequence and rolling back data...'
                    ROLLBACK TRANSACTION
                    RETURN -19
                END
                PRINT '- Arrow/Bolt equipped.'
            END

    You'll get automatic arrow :), it's rough code, I put my db Item Code there: ITEM_ETC_AMMO_BOLT_01 and ITEM_ETC_AMMO_ARROW_01, if your arrow/bolt has different code you have to change those.

    good luck, have fun ;)
    Last edited by Witchy Moo; 29-11-13 at 10:09 PM.

  14. #14
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    witchy help me i cant set this System Work

  15. #15
    Don't touch my Nutella! Witchy Moo is offline
    MemberRank
    Aug 2013 Join Date
    SingaporeLocation
    208Posts

    Re: Alternative new [Auto Equipment] system (by coupon OR automatic, your choice) :)

    Post the error you got.



Page 1 of 9 123456789 LastLast

Advertisement