Block del character with Level

Results 1 to 14 of 14
  1. #1
    xHTML/CSS/JS/Ruby LostSpirit is offline
    MemberRank
    Feb 2008 Join Date
    $ gem search -rLocation
    482Posts

    note Block del character with Level

    Hello RZ.


    This is SQL SP modd to block the deletion of the character per level.
    The procedure is configured to block char deletion of level 40+.

    Use GameDB


    cabal_sp_delchar :

    Spoiler:
    USE [GAMEDB]
    GO
    /****** Object: StoredProcedure [dbo].[cabal_sp_delchar] Script Date: 02/27/2011 23:54:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: LostSpirit
    -- Create date: 02/22/2011
    -- Description: StoreProcedure Delete Character
    -- =============================================
    ALTER PROCEDURE [dbo].[cabal_sp_delchar] (@characteridx int)
    AS
    begin
    SET NOCOUNT ON
    DECLARE @ROWCOUNT int

    BEGIN
    --Block del character with GuildMaster, return 0xB2
    SELECT @ROWCOUNT = COUNT(A.GroupIndex) FROM GUILDGROUP A
    INNER JOIN
    (
    SELECT GroupIndex FROM GUILDMEMBER WHERE CharacterIndex = @characteridx
    ) B
    ON A.GroupIndex = B.GroupIndex
    WHERE A.GroupPermission = 0

    IF( @ROWCOUNT > 0 )
    BEGIN
    SELECT CONVERT(INT, 0xB2)
    SET NOCOUNT OFF
    RETURN
    END
    END

    BEGIN
    --Block del character with Level, return 0xB1
    SELECT @ROWCOUNT = COUNT(A.LEV) FROM cabal_character_table A
    INNER JOIN
    (
    SELECT LEV FROM cabal_character_table WHERE characteridx = @characteridx
    ) B
    ON A.LEV = B.LEV
    WHERE A.LEV >= 40

    IF( @ROWCOUNT > 0 )
    BEGIN
    SELECT CONVERT(INT, 0xB1)
    SET NOCOUNT OFF
    RETURN
    END
    END


    begin tran
    INSERT INTO DELETED_CABAL_CHARACTER_TABLE(
    CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, EQUIPDATA, INVENDATA, SKILLDATA, QSLOTDATA, QDFLAGS, QSTDATA, QSTFLAGS, Level0, Level1, Level2, Level3, Level4, Exp0, Exp1, Exp2, Exp3, Exp4, CraftFlags, PKPenalty, Nation, BBeadData)
    SELECT
    A.CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, A.FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, B.DATA, C.DATA, D.DATA, E.DATA, F.FLAGS, G.DATA, G.FLAGS, H.Level0, H.Level1, H.Level2, H.Level3, H.Level4, H.Exp0, H.Exp1, H.Exp2, H.Exp3, H.Exp4, H.Flags, A.PKPenalty, A.Nation, I.DATA
    FROM CABAL_CHARACTER_TABLE A
    LEFT OUTER JOIN CABAL_EQUIPMENT_TABLE B ON A.CHARACTERIDX = B.CHARACTERIDX
    LEFT OUTER JOIN CABAL_INVENTORY_TABLE C ON A.CHARACTERIDX = C.CHARACTERIDX
    LEFT OUTER JOIN CABAL_SKILLLIST_TABLE D ON A.CHARACTERIDX = D.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QUICKSLOT_TABLE E ON A.CHARACTERIDX = E.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QDDATA_TABLE F ON A.CHARACTERIDX = F.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QUESTDATA_TABLE G ON A.CHARACTERIDX = G.CHARACTERIDX
    LEFT OUTER JOIN CABAL_CRAFT_TABLE H ON A.CHARACTERIDX = H.CHARACTERIDX
    LEFT OUTER JOIN CABAL_BBEAD_TABLE I ON A.CHARACTERIDX = I.CHARACTERIDX
    WHERE A.CHARACTERIDX = @characteridx

    delete from chat_buddy_table where (RegisterCharIdx = @characteridx) OR (RegisteeCharIdx = @characteridx)
    delete from chat_buddygroup_table where CharIdx = @characteridx
    delete from guildmember where characterindex = @characteridx
    delete from cabal_bbead_table where CharacterIdx=@characteridx
    delete from cabal_craft_table where Characteridx=@characteridx
    delete from cabal_equipment_table where CharacterIdx=@characteridx
    delete from cabal_inventory_table where CharacterIdx=@characteridx
    delete from cabal_skilllist_table where CharacterIdx=@characteridx
    delete from cabal_quickslot_table where CharacterIdx=@characteridx
    delete from cabal_questdata_table where CharacterIdx=@characteridx
    delete from cabal_qddata_table where CharacterIdx=@characteridx
    delete from cabal_character_table where CharacterIdx=@characteridx

    set @ROWCOUNT = @@ROWCOUNT
    commit tran
    IF( @ROWCOUNT > 0 )
    BEGIN
    -- update slot of characters
    DECLARE @USERNUM INT, @SERVERIDX INT
    SET @USERNUM = @CHARACTERIDX/8
    SET @SERVERIDX = DBO.GETSERVERIDX()
    EXEC ACCOUNT.dbo.CABAL_SP_UPDATE_CHARACTER_COUNT @USERNUM, @SERVERIDX, -1
    END

    SELECT CONVERT(INT, 0xA1)

    SET NOCOUNT OFF

    END

    Red : This block level, where if you want to change.


    Nex step:

    Open your msg.enc and find the line:

    Code:
            <msg    id="632"    cont="Possible to delete Character after 24 hours of creation."    />
    Edit according to your taste.
    Done!


    PS: Remember to edit your message to appear in an attempt to delete the char.


    Link sql procedure : cabal_sp_delchar.sql - by LostSpirit@TDP



    Regards <3
    Last edited by LostSpirit; 28-02-11 at 12:18 PM. Reason: add link


  2. #2
    Account Upgraded | Title Enabled! error0024 is offline
    MemberRank
    Jul 2005 Join Date
    MalaysiaLocation
    896Posts

    Re: Block del character with Level

    Useful piece of information bro =)
    Nice work! =D thanks

    Btw bro how does it eventually works?
    I mean 0xB1 or 0xB2
    These codes..how can we identify? Kinda interested =)
    Last edited by error0024; 28-02-11 at 06:13 PM.

  3. #3
    xHTML/CSS/JS/Ruby LostSpirit is offline
    MemberRank
    Feb 2008 Join Date
    $ gem search -rLocation
    482Posts

    Re: Block del character with Level

    @error0024
    This packets structures are sent a server-side/client.

    You can identify using packet logger/sniffer : http://forum.ragezone.com/f459/packet-logger-725874/

  4. #4
    Account Upgraded | Title Enabled! oOSpikeOo is offline
    MemberRank
    Dec 2010 Join Date
    460Posts

    Re: Block del character with Level

    lostspirit that script block delete character permanent or only for 24h after crations?????

  5. #5
    xHTML/CSS/JS/Ruby LostSpirit is offline
    MemberRank
    Feb 2008 Join Date
    $ gem search -rLocation
    482Posts

    Re: Block del character with Level

    Is permanent lol, block by characters level 40+. Read thread more attention.
    Last edited by LostSpirit; 28-02-11 at 08:08 PM.

  6. #6
    Account Upgraded | Title Enabled! oOSpikeOo is offline
    MemberRank
    Dec 2010 Join Date
    460Posts

    Re: Block del character with Level

    oki sry lost
    P/S:you are the best !

  7. #7
    Account Upgraded | Title Enabled! error0024 is offline
    MemberRank
    Jul 2005 Join Date
    MalaysiaLocation
    896Posts

    Re: Block del character with Level

    @Lost-Spirit
    Thanks for your information on that =)
    Cheers

  8. #8
    Account Upgraded | Title Enabled! Daman2009 is offline
    MemberRank
    Feb 2009 Join Date
    GreenDespairLocation
    343Posts

    Re: Block del character with Level

    As per usual!

    Great work from one of the many masters here! 8)

    (WE'RE NOT WORTHY, WE'RE NOT WORTHY!)

    Just wait now for ability to sort characters in order by preference instead of order of creation!

  9. #9
    Account Upgraded | Title Enabled! Alphakilo23 is offline
    MemberRank
    Jun 2010 Join Date
    Ze German ländLocation
    428Posts

    Re: Block del character with Level

    Quote Originally Posted by Daman2009 View Post
    Just wait now for ability to sort characters in order by preference instead of order of creation!
    They're sorted after their character_id, which is created by multiplying the account_id by a certain value and adding 1-8, after the slot you created them in. (Which is pure ballz, but hey, it works)

    I don't know exactly how the character list is fetched from the server and I don't have access to an running cabal server any more, and I cba to set one up at this moment.
    Perhaps you could poke around in the stored procedures a bit and use Ostara to get more insight of what the client actually requests from the server when polling the character list.

    The difficulty of this "project" could range from 2-clicks-wasEZkkthxbb to nearby impossible.
    Last edited by Alphakilo23; 10-04-11 at 02:52 PM.

  10. #10
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Block del character with Level

    Ep2 clients will never support rearranging characters.

  11. #11
    Account Upgraded | Title Enabled! Daman2009 is offline
    MemberRank
    Feb 2009 Join Date
    GreenDespairLocation
    343Posts

    Re: Block del character with Level

    Ok cool thanks Yamachi for the information.

    I was under the impression that if we could enable a 'del' character function, we could also re-arrange chars. I thought the process would be the same ( wishful thinking lol )!

  12. #12
    █║▌║▌║TheMerc iful║▌║▌║█ 4pLay is offline
    MemberRank
    Jan 2005 Join Date
    DXBLocation
    1,444Posts

    Re: Block del character with Level

    Quote Originally Posted by LostSpirit View Post
    Hello RZ.


    This is SQL SP modd to block the deletion of the character per level.
    The procedure is configured to block char deletion of level 40+.

    Use GameDB


    cabal_sp_delchar :

    Spoiler:
    USE [GAMEDB]
    GO
    /****** Object: StoredProcedure [dbo].[cabal_sp_delchar] Script Date: 02/27/2011 23:54:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: LostSpirit
    -- Create date: 02/22/2011
    -- Description: StoreProcedure Delete Character
    -- =============================================
    ALTER PROCEDURE [dbo].[cabal_sp_delchar] (@characteridx int)
    AS
    begin
    SET NOCOUNT ON
    DECLARE @ROWCOUNT int

    BEGIN
    --Block del character with GuildMaster, return 0xB2
    SELECT @ROWCOUNT = COUNT(A.GroupIndex) FROM GUILDGROUP A
    INNER JOIN
    (
    SELECT GroupIndex FROM GUILDMEMBER WHERE CharacterIndex = @characteridx
    ) B
    ON A.GroupIndex = B.GroupIndex
    WHERE A.GroupPermission = 0

    IF( @ROWCOUNT > 0 )
    BEGIN
    SELECT CONVERT(INT, 0xB2)
    SET NOCOUNT OFF
    RETURN
    END
    END

    BEGIN
    --Block del character with Level, return 0xB1
    SELECT @ROWCOUNT = COUNT(A.LEV) FROM cabal_character_table A
    INNER JOIN
    (
    SELECT LEV FROM cabal_character_table WHERE characteridx = @characteridx
    ) B
    ON A.LEV = B.LEV
    WHERE A.LEV >= 40

    IF( @ROWCOUNT > 0 )
    BEGIN
    SELECT CONVERT(INT, 0xB1)
    SET NOCOUNT OFF
    RETURN
    END
    END


    begin tran
    INSERT INTO DELETED_CABAL_CHARACTER_TABLE(
    CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, EQUIPDATA, INVENDATA, SKILLDATA, QSLOTDATA, QDFLAGS, QSTDATA, QSTFLAGS, Level0, Level1, Level2, Level3, Level4, Exp0, Exp1, Exp2, Exp3, Exp4, CraftFlags, PKPenalty, Nation, BBeadData)
    SELECT
    A.CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, A.FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, B.DATA, C.DATA, D.DATA, E.DATA, F.FLAGS, G.DATA, G.FLAGS, H.Level0, H.Level1, H.Level2, H.Level3, H.Level4, H.Exp0, H.Exp1, H.Exp2, H.Exp3, H.Exp4, H.Flags, A.PKPenalty, A.Nation, I.DATA
    FROM CABAL_CHARACTER_TABLE A
    LEFT OUTER JOIN CABAL_EQUIPMENT_TABLE B ON A.CHARACTERIDX = B.CHARACTERIDX
    LEFT OUTER JOIN CABAL_INVENTORY_TABLE C ON A.CHARACTERIDX = C.CHARACTERIDX
    LEFT OUTER JOIN CABAL_SKILLLIST_TABLE D ON A.CHARACTERIDX = D.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QUICKSLOT_TABLE E ON A.CHARACTERIDX = E.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QDDATA_TABLE F ON A.CHARACTERIDX = F.CHARACTERIDX
    LEFT OUTER JOIN CABAL_QUESTDATA_TABLE G ON A.CHARACTERIDX = G.CHARACTERIDX
    LEFT OUTER JOIN CABAL_CRAFT_TABLE H ON A.CHARACTERIDX = H.CHARACTERIDX
    LEFT OUTER JOIN CABAL_BBEAD_TABLE I ON A.CHARACTERIDX = I.CHARACTERIDX
    WHERE A.CHARACTERIDX = @characteridx

    delete from chat_buddy_table where (RegisterCharIdx = @characteridx) OR (RegisteeCharIdx = @characteridx)
    delete from chat_buddygroup_table where CharIdx = @characteridx
    delete from guildmember where characterindex = @characteridx
    delete from cabal_bbead_table where CharacterIdx=@characteridx
    delete from cabal_craft_table where Characteridx=@characteridx
    delete from cabal_equipment_table where CharacterIdx=@characteridx
    delete from cabal_inventory_table where CharacterIdx=@characteridx
    delete from cabal_skilllist_table where CharacterIdx=@characteridx
    delete from cabal_quickslot_table where CharacterIdx=@characteridx
    delete from cabal_questdata_table where CharacterIdx=@characteridx
    delete from cabal_qddata_table where CharacterIdx=@characteridx
    delete from cabal_character_table where CharacterIdx=@characteridx

    set @ROWCOUNT = @@ROWCOUNT
    commit tran
    IF( @ROWCOUNT > 0 )
    BEGIN
    -- update slot of characters
    DECLARE @USERNUM INT, @SERVERIDX INT
    SET @USERNUM = @CHARACTERIDX/8
    SET @SERVERIDX = DBO.GETSERVERIDX()
    EXEC ACCOUNT.dbo.CABAL_SP_UPDATE_CHARACTER_COUNT @USERNUM, @SERVERIDX, -1
    END

    SELECT CONVERT(INT, 0xA1)

    SET NOCOUNT OFF

    END

    Red : This block level, where if you want to change.


    Nex step:

    Open your msg.enc and find the line:

    Code:
            <msg    id="632"    cont="Possible to delete Character after 24 hours of creation."    />
    Edit according to your taste.
    Done!


    PS: Remember to edit your message to appear in an attempt to delete the char.


    Link sql procedure : cabal_sp_delchar.sql - by LostSpirit@TDP



    Regards <3
    Does Anybody Have An Updated SQL Script Like This One For EP8 DB?

    Thanks!!!

  13. #13
    RaGEZONER toast2250 is offline
    MemberRank
    Sep 2009 Join Date
    CabalLocation
    638Posts

    Re: Block del character with Level


  14. #14
    █║▌║▌║TheMerc iful║▌║▌║█ 4pLay is offline
    MemberRank
    Jan 2005 Join Date
    DXBLocation
    1,444Posts

    Re: Block del character with Level

    CharacterDeleteLimitLevel={lvl}

    I Think I Have Tried This And Adjusted It To 100 And Still Can Delete Newly Created Character.



Advertisement