Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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

Skilled Illusionist
Joined
Feb 11, 2010
Messages
302
Reaction score
26
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;

    [B]extern BOOL        bENABLE_EXTREME;
    extern BOOL        bENABLE_SCIENCE;
    extern BOOL        bENABLE_ASSASSIN;[/B]
        
        ..........................
        ..........................
}


- 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;
    
     [B]BOOL        bENABLE_EXTREME        = TRUE;
     BOOL        bENABLE_SCIENCE        = TRUE;
     BOOL        bENABLE_ASSASSIN    = TRUE;[/B]
     .........................
     .........................
}


- 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 );

    [B]cFILE.getflag("bENABLE_EXTREME", 1, 1, bENABLE_EXTREME);
    cFILE.getflag("bENABLE_SCIENCE", 1, 1, bENABLE_SCIENCE);
    cFILE.getflag("bENABLE_ASSASSIN", 1, 1, bENABLE_ASSASSIN);[/B]

    ........................
    .......................
}

- 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;
        [B]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] );
        }[/B]
    }

     ...................
     ...................
}

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;
       [B] 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] );
        }[/B]
     ...................
     ...................
}


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;
       [B] 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] );
        }[/B]
    }
     ...................
     ...................
}

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;
       [B] 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] );
        }[/B]
     }
     ...................
     ...................
}

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;
        [B]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] );
        }[/B]
    }
     ...................
     ...................
}

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;
        [B]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] );
        }[/B]
    }
     ...................
     ...................
}
- 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:
Skilled Illusionist
Joined
Mar 10, 2007
Messages
319
Reaction score
9
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
 
Junior Spellweaver
Joined
Jan 2, 2014
Messages
166
Reaction score
29
btw where source about buy back (Repurchase), and why I can not be bought from NPC :?:
thanks for support
 
Experienced Elementalist
Joined
Mar 22, 2011
Messages
290
Reaction score
43
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.
 
Joined
Dec 3, 2009
Messages
489
Reaction score
31
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
 
Skilled Illusionist
Joined
Feb 11, 2010
Messages
302
Reaction score
26
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
 
Experienced Elementalist
Joined
Apr 25, 2014
Messages
208
Reaction score
9
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?
 
Newbie Spellweaver
Joined
Nov 6, 2014
Messages
47
Reaction score
0
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
 
Experienced Elementalist
Joined
Mar 22, 2011
Messages
290
Reaction score
43
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:
Junior Spellweaver
Joined
Jan 2, 2014
Messages
166
Reaction score
29
ok stil working now thanks :lol:

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

navirius - [Release] How to disable Extreme, Assassin, Science on character creation Source - RaGEZONE Forums
 
Last edited:
Joined
Dec 18, 2013
Messages
52
Reaction score
31
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?
 
Junior Spellweaver
Joined
Apr 18, 2014
Messages
164
Reaction score
13
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.


sir how about on the character creation? how to remove it on gui??
 
Newbie Spellweaver
Joined
Oct 24, 2018
Messages
9
Reaction score
0
How to add science,extreme and assasin class
help me im a newbie
 
Joined
Feb 4, 2014
Messages
962
Reaction score
36
doesn't work with EP9 source, cause EP9 has not specify exact class in source. (2012_NEW_CHAR_SELECT_CLASS_SET_IMAGE6", UI_FLAG_DEFAULT, SELECT_CLASS_SET_IMAGE6)
 
Newbie Spellweaver
Joined
Aug 10, 2022
Messages
24
Reaction score
0
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.


what is the charclass # of gunner?
 
Back
Top