Auto Equip

Results 1 to 9 of 9
  1. #1
    Apprentice spnz0x is offline
    MemberRank
    Jun 2012 Join Date
    18Posts

    Auto Equip

    So far I've tested the coupon one, SP works fine but its no triggering when leveling up.
    Its seems that his 'guide' is missing some stuff, anyone with a working Auto Equip 1 - 8 dg?


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

    Re: Auto Equip

    Would help if you link what auto equip your talking about, there's many versions of auto equip from different people that do it different ways.

  3. #3
    Retired blapanda is offline
    MemberRank
    Oct 2013 Join Date
    LocalhostLocation
    536Posts

    Re: Auto Equip

    Might be an obvious part, but did you teleported once after using that coupon?

    It is not like Joymax coded in some real-case exceptions as a class "when player reaches X start equiping UVWXYZ on slot 123456". Every auto equip, which has been made by some users are actually requiring players to teleport once, refreshing the current visible client data with the already set/updated data at the database.

  4. #4
    Apprentice spnz0x is offline
    MemberRank
    Jun 2012 Join Date
    18Posts

    Re: Auto Equip

    Quote Originally Posted by Blacksheep25 View Post
    Would help if you link what auto equip your talking about, there's many versions of auto equip from different people that do it different ways.
    http://forum.ragezone.com/f722/alter...coupon-972194/
    btw sorry for not posting it here, it was like 3am my time and I was hell exhausted trying to figure this out.

    Quote Originally Posted by blapanda View Post
    Might be an obvious part, but did you teleported once after using that coupon?

    It is not like Joymax coded in some real-case exceptions as a class "when player reaches X start equiping UVWXYZ on slot 123456". Every auto equip, which has been made by some users are actually requiring players to teleport once, refreshing the current visible client data with the already set/updated data at the database.

    I know that, the SP worked (I've manually tested the line where you can execute it*I had to use return anyway*) but like I said its not triggering at level up.
    Last edited by spnz0x; 09-05-16 at 01:59 PM.

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

    Re: Auto Equip

    Ah, now this one i can help with as this is the one myself and witchy worked on together for Eastern.

    The auto equip is based off your character level for chinese and mastery level for euro. Make sure you have set the required variable for having it work for autoequip. If that wasn't the case check your "_AddLogChar" procedure in your LOG database to see if you are logging the level up event ID.

    Like this:
    Spoiler:

    SRO_VT_LOG > _AddLogChar
    -- Default sequence
    IF( @EventID Between 23 and 27 and
    @EventID Between 200 and 202 and
    @EventID Between 204 and 206 and
    @EventID in (9,210,214,244, 21)
    )
    BEGIN
    return -1
    END

    declare @len_pos int
    declare @len_desc int
    set @len_pos = len(@strPos)
    set @len_desc = len(@Desc)
    if (@len_pos > 0 and @len_desc > 0)
    begin
    insert _LogEventChar values(@CharID, GetDate(), @EventID, @Data1, @Data2, @strPos, @Desc)
    end
    else if (@len_pos > 0 and @len_desc = 0)
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values(@CharID, GetDate(), @EventID, @Data1, @Data2, @strPos)
    end
    else if (@len_pos = 0 and @len_desc > 0)
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values(@CharID, GetDate(), @EventID, @Data1, @Data2, @Desc)
    end
    else
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values(@CharID, GetDate(), @EventID, @Data1, @Data2)
    end

    * Not the full procedure, just showing the section you need to check. You can however replace this part of your procedure with this.

    The reason i'm getting you to check your "AddLogChar" is because if that isnt logging your leveling up Event ID then the auto equip will not work.

    Also as witchy says here, http://forum.ragezone.com/f722/alter...4/#post7883414

    You need to check you have "@AEMethod = 2" to enable Auto equip and not coupon only.
    Last edited by Blacksheep25; 09-05-16 at 02:38 PM.

  6. #6
    Apprentice spnz0x is offline
    MemberRank
    Jun 2012 Join Date
    18Posts

    Re: Auto Equip

    Quote Originally Posted by Blacksheep25 View Post
    Ah, now this one i can help with as this is the one myself and witchy worked on together for Eastern.

    The auto equip is based off your character level for chinese and mastery level for euro. Make sure you have set the required variable for having it work for autoequip. If that wasn't the case check your "_AddLogChar" procedure in your LOG database to see if you are logging the level up event ID.

    Like this:
    Spoiler:

    SRO_VT_LOG > _AddLogChar

    * Not the full procedure, just showing the section you need to check. You can however replace this part of your procedure with this.

    The reason i'm getting you to check your "AddLogChar" is because if that isnt logging your leveling up Event ID then the auto equip will not work.
    Probably not. My full SP.
    Spoiler:
    USE [SRO_VT_LOG]
    GO
    /****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 05/09/2016 13:35:00 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO


    ALTER procedure [dbo].[_AddLogChar]
    @CharID int,
    @eventID tinyint,
    @DaTa1 int,
    @DaTa2 int,
    @strPos varchar(64),
    @desc varchar(128)
    as
    declare @Len_pos int
    declare @Len_desc int
    set @Len_pos = len(@strPos)
    set @Len_desc = len @desc)
    if @Len_pos > 0 and @Len_desc > 0)
    begin
    insert _LogEventChar values @CharID, GetDate(), @eventID, @DaTa1, @DaTa2, @strPos, @desc)
    end
    else if @Len_pos > 0 and @Len_desc = 0)
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values @CharID, GetDate(), @eventID, @DaTa1, @DaTa2, @strPos)
    end
    else if @Len_pos = 0 and @Len_desc > 0)
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values @CharID, GetDate(), @eventID, @DaTa1, @DaTa2, @desc)
    end
    else
    begin
    insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values @CharID, GetDate(), @eventID, @DaTa1, @DaTa2)
    end




    Spoiler:
    USE [SRO_VT_LOG]
    GO
    /****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 05/09/2016 13:35:09 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO


    -------------------------------------------------------------------------------------------------------------------
    -- Step 2
    -- ±âÁ¸ ¾ÆÀÌÅÛ ·Î±× ÀÔ·Â Stored procedure ¼öÁ¤
    -- DataBase : Shard Log
    ALTER procedure [dbo].[_AddLogItem]
    @CharID int,
    @ItemRefID int,
    @ItemSerial bigint,
    @dwData int,
    @TargetStorage tinyint,
    @operation tinyint,
    @slot_From tinyint,
    @slot_To tinyint,
    @eventPos varchar(64),
    @strDesc varchar(128),
    @Gold bigint -- #ifdef EXTEND_GOLD_TYPE »ðÀÔ
    as
    declare @Len_pos int
    declare @Len_desc int
    set @Len_pos = len @eventPos)
    set @Len_desc = len(@strDesc)
    if @Len_pos > 0 and @Len_desc > 0)
    begin
    insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, strDesc, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @eventPos, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    end
    else if @Len_pos > 0 and @Len_desc = 0)
    begin
    insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @eventPos, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    end
    else if @Len_pos = 0 and @Len_desc > 0)
    begin
    insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, strDesc, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    end
    else if @Len_pos = 0 and @Len_desc = 0)
    begin
    insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, Serial64, Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
    end
    -- À¯·á ¾ÆÀÌÅÛ ±¸ÀÔÀ̸é!
    -- #define LOG_ITEMEVENT_BUY_CASHITEM (BYTE)35
    if @operation = 35)
    begin
    insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64)
    values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial)
    end
    IF @operation = 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].[_AUTOEQUIP_GEAR] @CharNameEQ, 7
    END
    END

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

    Re: Auto Equip

    Alright, use this as your _AddLogChar. Your "_AddLogItem" should be fine if you followed the guide correctly, but that doesn't really matter atm since you want Auto equip based on level not coupon. Tho the coupon should work as long as you added it and set the correct ID's.

    _AddLogChar Procedure
    Spoiler:
    Code:
    USE [SRO_VT_LOG]
    GO
    /****** Object:  StoredProcedure [dbo].[_AddLogChar]    Script Date: 05/09/2016 22:24:35 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER   procedure [dbo].[_AddLogChar] 
      @CharID		int,
      @eventID		tinyint,
      @DaTa1		int,
      @DaTa2		int,
    @strPos		varchar(64),
      @desc		varchar(128)
    as
    
    -- Delete log older than 2 weeks
    DELETE FROM [_LogEventChar] WHERE EventTime < DATEADD(WEEK, -2, GETDATE())
    
    -- Default sequence
    IF(  @eventID Between 23 and 27 and
      @eventID Between 200 and 202 and
      @eventID Between 204 and 206 and
      @eventID in (9,210,214,244, 21)
    )
    BEGIN 
    	return -1
    END
    
    declare  @Len_pos 	int
    declare  @Len_desc	int
    set  @Len_pos = len(@strPos)
    set  @Len_desc = len  @desc)
    if   @Len_pos > 0 and  @Len_desc > 0)
    begin	
    	insert _LogEventChar values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2, @strPos,  @desc)	
    end
    else if   @Len_pos > 0 and  @Len_desc = 0)
    begin 	
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2, @strPos)
    end
    else if   @Len_pos = 0 and  @Len_desc > 0)
    begin 	
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2,  @desc)
    end
    else
    begin
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2)
    end


    This should log your "EventID = 22" which is leveling up in your "_LogEventChar" table. If after replacing this and its not working post back here.

  8. #8
    Apprentice spnz0x is offline
    MemberRank
    Jun 2012 Join Date
    18Posts

    Re: Auto Equip

    Quote Originally Posted by Blacksheep25 View Post
    Alright, use this as your _AddLogChar. Your "_AddLogItem" should be fine if you followed the guide correctly, but that doesn't really matter atm since you want Auto equip based on level not coupon. Tho the coupon should work as long as you added it and set the correct ID's.

    _AddLogChar Procedure
    Spoiler:
    Code:
    USE [SRO_VT_LOG]
    GO
    /****** Object:  StoredProcedure [dbo].[_AddLogChar]    Script Date: 05/09/2016 22:24:35 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER   procedure [dbo].[_AddLogChar] 
      @CharID		int,
      @eventID		tinyint,
      @DaTa1		int,
      @DaTa2		int,
    @strPos		varchar(64),
      @desc		varchar(128)
    as
    
    -- Delete log older than 2 weeks
    DELETE FROM [_LogEventChar] WHERE EventTime < DATEADD(WEEK, -2, GETDATE())
    
    -- Default sequence
    IF(  @eventID Between 23 and 27 and
      @eventID Between 200 and 202 and
      @eventID Between 204 and 206 and
      @eventID in (9,210,214,244, 21)
    )
    BEGIN 
    	return -1
    END
    
    declare  @Len_pos 	int
    declare  @Len_desc	int
    set  @Len_pos = len(@strPos)
    set  @Len_desc = len  @desc)
    if   @Len_pos > 0 and  @Len_desc > 0)
    begin	
    	insert _LogEventChar values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2, @strPos,  @desc)	
    end
    else if   @Len_pos > 0 and  @Len_desc = 0)
    begin 	
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2, @strPos)
    end
    else if   @Len_pos = 0 and  @Len_desc > 0)
    begin 	
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2,  @desc)
    end
    else
    begin
    	insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values  @CharID, GetDate(),  @eventID,  @DaTa1,  @DaTa2)
    end


    This should log your "EventID = 22" which is leveling up in your "_LogEventChar" table. If after replacing this and its not working post back here.
    Spoiler:
    Code:
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 27
    Incorrect syntax near '@desc'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 28
    Incorrect syntax near ')'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 30
    Incorrect syntax near '@CharID'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 32
    Incorrect syntax near ')'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 34
    Incorrect syntax near '@CharID'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 36
    Incorrect syntax near ')'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 38
    Incorrect syntax near '@CharID'.
    Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 42
    Incorrect syntax near '@CharID'.

    *EDIT*Nvm got the SP to execute now. But ammm I should still declare @aemethod 2 at _addlogchar right?
    Last edited by spnz0x; 09-05-16 at 03:17 PM.

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

    Re: Auto Equip

    Just follow the instructions from that thread about setting the autoequip, its all there.



Advertisement