-
[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
............
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
what effect about this :?:
-
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
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
cyucyu
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
what effect about this :?:
try to read what I write bro...
-
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
-
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.
-
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.
Quote:
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
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
ImMiremo
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
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
ImMiremo
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?
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
kudo03
Its only in Database?to remove the 3 class?
there are different method to disable/remove/hide other class
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
Ace17
there are different method to disable/remove/hide other class
How I can Hide the 2class bro gunner and assassin without using source?
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
ImMiremo
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
-
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
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
ok stil working now thanks :lol:
but test enable and disable, I still can not see class gunner :?:
https://scontent-a-sin.xx.fbcdn.net/...ac&oe=554206B6
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
ImMiremo
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?
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
Quote:
Originally Posted by
ImMiremo
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??
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
How to add science,extreme and assasin class
help me im a newbie
-
Re: [Release] How to disable Extreme, Assassin, Science on character creation Source
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)
-
how about scientist in creating char how to remove it without source?
-
Quote:
Originally Posted by
ImMiremo
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?