[Release] How to disable Extreme, Assassin, Science on character creation Source

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Account Upgraded | Title Enabled! navirius is offline
    MemberRank
    Feb 2010 Join Date
    310Posts

    [Release] How to disable Extreme, Assassin, Science on character creation Source

    This my first time to share source, if I make mistake, or my bad english, I am sorry

    Main idea is to give configuration on default.charclass to disable or enable extreme, assassin and science character selection on create new character page

    I use RanNewWorld Source code from this thread, but this idea can implemented almost on all source code, if you have programming knowledge and editing

    I try to explain this step as simple as I can,
    this can be achieve with few step
    - add configuration variable on header file
    - set configuration variable default value
    - load configuration variable value from default.charclass
    - set UI behavior base on configuration
    - add configuration to default.charclass

    lets begin the explanation

    - add configuration variable on header file, try to find this code on GLogicData.h
    Code:
    namespace GLCONST_CHAR
    {
          ..................
    }
    add this code below bCLUB_2OTHERSCHOOL or anywhere else as long as inside that namespace
    Code:
    namespace GLCONST_CHAR
    {
            .......................
            .......................
            extern BOOL        bPARTY_2OTHERSCHOOL;
        extern BOOL        bCLUB_2OTHERSCHOOL;
    
        extern BOOL        bENABLE_EXTREME;
        extern BOOL        bENABLE_SCIENCE;
        extern BOOL        bENABLE_ASSASSIN;
            
            ..........................
            ..........................
    }

    - set configuration variable default value, because we already add on header file, then we need to give default value on GLogicData.cpp

    try find this namespace and add bold code
    Code:
    namespace GLCONST_CHAR
    {
         .........................
         .........................
    
         BOOL        bPARTY_2OTHERSCHOOL = TRUE;
         BOOL        bCLUB_2OTHERSCHOOL   = TRUE;
        
         BOOL        bENABLE_EXTREME        = TRUE;
         BOOL        bENABLE_SCIENCE        = TRUE;
         BOOL        bENABLE_ASSASSIN    = TRUE;
         .........................
         .........................
    }

    - load configuration variable value from default.charclass, we already have variable to receive our configuration, then we need to load that value from default.charclass

    try find this code on GLogicDataLoad.cpp, then add bold code
    Code:
    namespace GLCONST_CHAR
    {
        ...................
        ..................
    
        cFILE.getflag( "bPARTY_2OTHERSCHOOL", 1, 1, bPARTY_2OTHERSCHOOL );
        cFILE.getflag( "bCLUB_2OTHERSCHOOL", 1, 1, bCLUB_2OTHERSCHOOL );
    
        cFILE.getflag("bENABLE_EXTREME", 1, 1, bENABLE_EXTREME);
        cFILE.getflag("bENABLE_SCIENCE", 1, 1, bENABLE_SCIENCE);
        cFILE.getflag("bENABLE_ASSASSIN", 1, 1, bENABLE_ASSASSIN);
    
        ........................
        .......................
    }
    - set UI behavior base on configuration, we already load configuration value, then we need to set UI behavior based on our configuration

    try find this code on CreateCharacterNew.cpp and edit like below

    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
            {        
            m_pSelectClassImg[0] = new CUIControl;
            m_pSelectClassImg[0]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE0", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE0);    
            m_pSelectClassImg[0]->SetVisibleSingle ( TRUE );
            m_pSelectClassImg[0]->SetTransparentOption( TRUE );
            RegisterControl ( m_pSelectClassImg[0] );
        }
    
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
            {        
            m_pSelectClassImg[0] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_EXTREME )
            {
                    m_pSelectClassImg[0]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE0", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE0);    
                    m_pSelectClassImg[0]->SetVisibleSingle ( TRUE );
                    m_pSelectClassImg[0]->SetTransparentOption( TRUE );
                     RegisterControl ( m_pSelectClassImg[0] );
            }
        }
    
         ...................
         ...................
    }
    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
                m_pSelectClassSetImg[0] = new CUIControl;
                m_pSelectClassSetImg[0]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE0", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE0);    
                m_pSelectClassSetImg[0]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[0]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[0] );
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
            m_pSelectClassSetImg[0] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_EXTREME )
            {
                 m_pSelectClassSetImg[0]->CreateSub ( this,  "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE0", UI_FLAG_DEFAULT,  SELECT_CLASS_SET_IMAGE0);    
                m_pSelectClassSetImg[0]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[0]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[0] );
            }
         ...................
         ...................
    }

    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
           {
            m_pSelectClassImg[5] = new CUIControl;
            m_pSelectClassImg[5]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE5", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE5);    
            m_pSelectClassImg[5]->SetVisibleSingle ( TRUE );
            m_pSelectClassImg[5]->SetTransparentOption( TRUE );
            RegisterControl ( m_pSelectClassImg[5] );
        }
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
        {
            m_pSelectClassImg[5] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_SCIENCE )
            {
                m_pSelectClassImg[5]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE5", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE5);    
                m_pSelectClassImg[5]->SetVisibleSingle ( FALSE );
                m_pSelectClassImg[5]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassImg[5] );
            }
        }
         ...................
         ...................
    }
    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
           {
            m_pSelectClassSetImg[5] = new CUIControl;
                m_pSelectClassSetImg[5]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE5", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE5);    
                m_pSelectClassSetImg[5]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[5]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[5] );
        }
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
         {
            m_pSelectClassSetImg[5] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_SCIENCE )
            {
                m_pSelectClassSetImg[5]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE5", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE5);    
                m_pSelectClassSetImg[5]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[5]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[5] );
            }
         }
         ...................
         ...................
    }
    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
           {
            m_pSelectClassImg[6] = new CUIControl;
            m_pSelectClassImg[6]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE6", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE6);    
            m_pSelectClassImg[6]->SetVisibleSingle ( TRUE );
            m_pSelectClassImg[6]->SetTransparentOption( TRUE );
            RegisterControl ( m_pSelectClassImg[6] );
        }
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
         {
            m_pSelectClassImg[6] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_ASSASSIN )
            {
                m_pSelectClassImg[6]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_IMAGE6", UI_FLAG_DEFAULT, SELECT_CLASS_IMAGE6);    
                m_pSelectClassImg[6]->SetVisibleSingle ( TRUE );
                m_pSelectClassImg[6]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassImg[6] );
            }
        }
         ...................
         ...................
    }
    original
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
        {
                m_pSelectClassSetImg[6] = new CUIControl;       
                m_pSelectClassSetImg[6]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE6", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE6);    
                m_pSelectClassSetImg[6]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[6]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[6] );
        }
         ...................
         ...................
    }
    edited
    Code:
    void CCreateCharacterNew::CreateSubControl()
    {
        ...................
        ...................
        {
            m_pSelectClassSetImg[6] = new CUIControl;
            if( GLCONST_CHAR::bENABLE_ASSASSIN )
            {
                m_pSelectClassSetImg[6]->CreateSub ( this, "2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE6", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE6);    
                m_pSelectClassSetImg[6]->SetVisibleSingle ( FALSE );
                m_pSelectClassSetImg[6]->SetTransparentOption( TRUE );
                RegisterControl ( m_pSelectClassSetImg[6] );
            }
        }
         ...................
         ...................
    }
    - add configuration to default.charclass,

    dont forget to add this configuration at default.charclass

    Code:
    .............
    bENABLE_EXTREME            1
    bENABLE_SCIENCE        1
    bENABLE_ASSASSIN    1
    ............
    Last edited by navirius; 20-11-14 at 05:55 PM. Reason: Typo on science class


  2. #2
    Proficient Member raman91 is offline
    MemberRank
    Jan 2014 Join Date
    IndonesiaLocation
    166Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    what effect about this

  3. #3
    Account Upgraded | Title Enabled! cyucyu is online now
    MemberRank
    Mar 2007 Join Date
    298Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    There is a BUG, create a character after the success, do not enter the game, then re-create a character, then you can create Extreme Class, Assassin Class, Science Class

  4. #4
    Account Upgraded | Title Enabled! navirius is offline
    MemberRank
    Feb 2010 Join Date
    310Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by cyucyu View Post
    There is a BUG, create a character after the success, do not enter the game, then re-create a character, then you can create Extreme Class, Assassin Class, Science Class
    thx for feedback, first post updated

    - - - Updated - - -

    Quote Originally Posted by raman91 View Post
    what effect about this
    try to read what I write bro...

  5. #5
    Proficient Member raman91 is offline
    MemberRank
    Jan 2014 Join Date
    IndonesiaLocation
    166Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    btw where source about buy back (Repurchase), and why I can not be bought from NPC
    thanks for support

  6. #6
    Account Upgraded | Title Enabled! TheKiller95 is offline
    MemberRank
    Mar 2011 Join Date
    MalaysiaLocation
    297Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Thank you for this, I've been thinking about this just a moment ago , wishing someone could teach how to disable those classes in character creation... then i checked ragezone and wallaaa,, here it is... clicked like button.

  7. #7
    ( -_-) ImMiremo is offline
    MemberRank
    Dec 2009 Join Date
    127.0.0.1Location
    557Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    No need to edit source. Just execute this on database. to remove extreme class. if you want to remove gunner and assassin too, just put the chaclass number below. Just explore the query.
    NOTE: It only removes extreme, if you want to remove gunner and assassin ready my first sentence :D.

    USE [RanGame1]
    GO
    /****** Object: StoredProcedure [dbo].[sp_Extreme] Script Date: 11/21/2014 03:23:05 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- 必碍何 巢/咯 积己 肮荐甫 馆券茄促.
    ALTER PROCEDURE [dbo].[sp_Extreme]
    @nUserNum int

    AS
    DECLARE
    @error_var int,
    @rowcount_var int

    SET NOCOUNT ON
    Select (MSum-MS) As M, (FSum-FS) As F
    From
    (
    Select isnull(Sum(M),0) As MSum, isnull(Sum(F),0) As FSum, isnull(Sum(MS),0) As MS, isnull(Sum(FS),0) As FS
    From
    (
    Select ChaClass
    ,
    Case ChaClass
    When 1 Then 0
    When 2 Then 0
    When 256 Then 0
    When 512 Then 0
    Else 0
    End As M
    ,
    Case ChaClass
    When 4 Then 0
    When 8 Then 0
    When 64 Then 0
    When 128 Then 0
    Else 0
    End As F
    ,
    Case ChaClass
    When 16 Then
    Case ChaDeleted
    When 4 Then 0
    Else 1
    End
    Else 0
    End As MS
    ,
    Case ChaClass
    When 32 Then
    Case ChaDeleted
    When 4 Then 0
    Else 1
    End
    Else 0
    End As FS
    From ChaInfo
    ) As t
    ) As tt

  8. #8
    Account Upgraded | Title Enabled! navirius is offline
    MemberRank
    Feb 2010 Join Date
    310Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by ImMiremo View Post
    No need to edit source. Just execute this on database. to remove extreme class. if you want to remove gunner and assassin too, just put the chaclass number below. Just explore the query.
    NOTE: It only removes extreme, if you want to remove gunner and assassin ready my first sentence :D.
    I dont know others, but that sp in my first place to know its working or not, and for me its not working, so I need another method

  9. #9
    Account Upgraded | Title Enabled! kudo03 is offline
    MemberRank
    Apr 2014 Join Date
    Manila, PhilippLocation
    208Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by ImMiremo View Post
    No need to edit source. Just execute this on database. to remove extreme class. if you want to remove gunner and assassin too, just put the chaclass number below. Just explore the query.
    NOTE: It only removes extreme, if you want to remove gunner and assassin ready my first sentence :D.
    Its only in Database?to remove the 3 class?

  10. #10
    -=GameOver=- Ace17 is offline
    MemberRank
    Jun 2013 Join Date
    598Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by kudo03 View Post
    Its only in Database?to remove the 3 class?
    there are different method to disable/remove/hide other class

  11. #11
    Account Upgraded | Title Enabled! kudo03 is offline
    MemberRank
    Apr 2014 Join Date
    Manila, PhilippLocation
    208Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by Ace17 View Post
    there are different method to disable/remove/hide other class
    How I can Hide the 2class bro gunner and assassin without using source?

  12. #12
    Enthusiast eStImAtInG 28 is offline
    MemberRank
    Nov 2014 Join Date
    47Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by ImMiremo View Post
    No need to edit source. Just execute this on database. to remove extreme class. if you want to remove gunner and assassin too, just put the chaclass number below. Just explore the query.
    NOTE: It only removes extreme, if you want to remove gunner and assassin ready my first sentence :D.
    This is correct no need source :) HAHAHA

  13. #13
    Account Upgraded | Title Enabled! TheKiller95 is offline
    MemberRank
    Mar 2011 Join Date
    MalaysiaLocation
    297Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Sir i got this problem when I insert these code to All classes , and i disable all class but. as the result all 4 normal class still can be created... any clues ?

    Update:
    I got it sir , somethings wrong with code i inserted.. silly me..

    cFILE.getflag("bENABLE_EXTREME", 1, 1, bENABLE_EXTREME);
    cFILE.getflag("bENABLE_SCIENCE", 1, 1, bENABLE_SCIENCE);
    cFILE.getflag("bENABLE_ASSASSIN", 1, 1, bENABLE_ASSASSIN);
    cFILE.getflag("bENABLE_SWORDMAN", 1, 1, bENABLE_ASSASSIN); <---- wrong
    cFILE.getflag("bENABLE_ARCHER", 1, 1, bENABLE_ASSASSIN); <---- wrong
    cFILE.getflag("bENABLE_SHAMAN", 1, 1, bENABLE_ASSASSIN); <---- wrong
    cFILE.getflag("bENABLE_BRAWLER", 1, 1, bENABLE_ASSASSIN); <---- wrong
    Last edited by TheKiller95; 26-11-14 at 05:09 PM. Reason: update problem solved

  14. #14
    Proficient Member raman91 is offline
    MemberRank
    Jan 2014 Join Date
    IndonesiaLocation
    166Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    ok stil working now thanks

    but test enable and disable, I still can not see class gunner

    Last edited by raman91; 11-12-14 at 08:39 PM.

  15. #15
    Enthusiast Mharlon112 is offline
    MemberRank
    Dec 2013 Join Date
    C:\Win\System32Location
    39Posts

    Re: [Release] How to disable Extreme, Assassin, Science on character creation Source

    Quote Originally Posted by ImMiremo View Post
    No need to edit source. Just execute this on database. to remove extreme class. if you want to remove gunner and assassin too, just put the chaclass number below. Just explore the query.
    NOTE: It only removes extreme, if you want to remove gunner and assassin ready my first sentence :D.
    How about Asassin and gunner what code should i insert here?



Page 1 of 2 12 LastLast

Advertisement