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!

Get Gold / Vote P / Premium P Command

Experienced Elementalist
Joined
Jun 24, 2011
Messages
263
Reaction score
75
I know i tried this ingame, leave a comment if this works :) Thanks...

s_NetGlobal.h
Code:
        //Get Money by NjD
	NET_MSG_GCTRL_REQ_MONEY							= (NET_MSG_GCTRL + 1619),
	NET_MSG_GCTRL_REQ_MONEY_FB						= (NET_MSG_GCTRL + 1620),

GLCharDefine.h
Code:
enum EMMONEY_TYPE //Get Money by NjD
{
	EMMONEY_NONE	= 0,
	EMMONEY_GOLD	= 1,
	EMMONEY_VOTEP	= 2,
	EMMONEY_PREMP	= 3,
	EMMONEY_SIZE	= 4
};

GLogixExPC.cpp
Code:
void GLCHARLOGIC::REQ_MONEY ( EMMONEY_TYPE emType, DWORD dwValue ) //Get Money by NjD
{
	switch ( emType )
	{
	case EMMONEY_GOLD:
		{
			m_lnMoney += dwValue;
		}
		break;
	case EMMONEY_VOTEP:
		{
			m_lnVoteP += dwValue;
		}
		break;
	case EMMONEY_PREMP:
		{
			m_lnPremP += dwValue;
		}
		break;
	};
	
	INIT_DATA(FALSE, FALSE);
}

GLCharacter.h
Code:
	void ReqMoney ( EMMONEY_TYPE emType, DWORD dwValue ); //Get Money by NjD

GLCharacterMsg.cpp
Code:
case NET_MSG_GCTRL_REQ_MONEY_FB: //Get Money by NjD
		{
			GLMSG::SNETPC_REQ_MONEY_FB *pNetMsg = (GLMSG::SNETPC_REQ_MONEY_FB *)nmg;
			REQ_MONEY(pNetMsg->emType, pNetMsg->dwValue);
		}
		break;

GLCharactorReq.cpp
Code:
void GLCharacter::ReqMoney ( EMMONEY_TYPE emType, DWORD dwValue ) //Get Money by NjD
{
	GLMSG::SNETPC_REQ_MONEY NetMsg;
	NetMsg.emType = emType;
	NetMsg.dwValue = dwValue;
	NETSENDTOFIELD ( &NetMsg );
}

GLGaeaClient.cpp
Code:
	case NET_MSG_GCTRL_REQ_MONEY_FB: //Get Money by NjD

GLGaeaServerMsg.cpp
Code:
	case NET_MSG_GCTRL_REQ_MONEY: //Get Money by NjD

GLChar.h
Code:
	HRESULT MsgReqMoney ( NET_MSG_GENERIC* nmg ); //Get Money by NjD

GLCharMsg.cpp
Code:
inline HRESULT GLChar::MsgReqMoney ( NET_MSG_GENERIC* nmg ) //Get Money by NjD
{
//      i don't think if this works...
//      if ( m_dwUserLvl < USER_GM3 ) return S_FALSE;
	GLMSG::SNETPC_REQ_MONEY *pNetMsg = (GLMSG::SNETPC_REQ_MONEY *) nmg;

	REQ_MONEY(pNetMsg->emType, pNetMsg->dwValue);

	GLMSG::SNETPC_REQ_MONEY_FB NetMsg;
	NetMsg.emType = pNetMsg->emType;
	NetMsg.dwValue = pNetMsg->dwValue;
	GLGaeaServer::GetInstance().SENDTOCLIENT(m_dwClientID,&NetMsg);

	MsgSendUpdateState();

	return S_OK;
}

GLCharMsg.cpp
Code:
	case NET_MSG_GCTRL_REQ_MONEY:			MsgReqMoney(nmg);				break; //Get Money by NjD

GLContrlPCMsg.h
Code:
struct SNETPC_REQ_MONEY //Get Money by NjD
	{
		NET_MSG_GENERIC		nmg;
		EMMONEY_TYPE		emType;
		DWORD				dwValue;

		SNETPC_REQ_MONEY () :
			emType(EMMONEY_NONE),
			dwValue(0)
		{
			nmg.dwSize = sizeof(*this);
			nmg.nType = NET_MSG_GCTRL_REQ_MONEY;
		}
	};

	struct SNETPC_REQ_MONEY_FB //Get Money by NjD
	{
		NET_MSG_GENERIC		nmg;

		EMMONEY_TYPE		emType;
		DWORD				dwValue;

		SNETPC_REQ_MONEY_FB () :
			emType(EMMONEY_NONE),
			dwValue(0)
		{
			nmg.dwSize = sizeof(*this);
			nmg.nType = NET_MSG_GCTRL_REQ_MONEY_FB;
		}
	};

DxGlobalStage.cpp
Code:
	case NET_MSG_GCTRL_REQ_MONEY_FB: //Get Money by NjD

Last

Dxincommand.cpp
Note: place this below(i think) o_O
Code:
DWORD dwUSERLVL = GLGaeaClient::GetInstance().GetCharacter()->m_dwUserLvl;
		if ( dwUSERLVL < USER_SPECIAL )						return true;
Code:
if( strCOMMAND =="/gold") //Get Money by NjD
		{
			if(strArray.GetSize() != 3)		return true;
			CString strPARAM_01 = strArray.GetAt(1);
			CString strPARAM_02 = strArray.GetAt(2);

			DWORD value = ( DWORD ) atoi( strPARAM_01.GetString() );
			DWORD value1 = ( DWORD ) atoi( strPARAM_02.GetString() );

			if ( value > 3 ) return false;

			EMMONEY_TYPE emType;
			CString strType;

			if ( value == 1 )
			{ 
				emType = EMMONEY_GOLD; 
				strType = "Successfully Inserted Gold.";
			}
			else if ( value == 2 )
			{ 
				emType = EMMONEY_VOTEP;
				strType = "Successfully Inserted Vote Points.";
			}
			else if ( value == 3 )
			{
				emType = EMMONEY_PREMP;
				strType = "Successfully Inserted Premium Points.";
			}

			GLGaeaClient::GetInstance().GetCharacter()->ReqMoney( emType, value1 );

			return true;
		}

No screenshots, sorry :v

GLogicEx.h
Code:
void REQ_MONEY ( EMMONEY_TYPE emType, DWORD dwValue );
 
Last edited:
Newbie Spellweaver
Joined
Mar 19, 2013
Messages
39
Reaction score
2
Nice Share.. One Question Is This Only For GM Command? Thanks
 
Junior Spellweaver
Joined
May 22, 2013
Messages
106
Reaction score
22
any feedback on this? too lazy to try sarry :3
 
Joined
Dec 7, 2011
Messages
499
Reaction score
176
Hmm , this is working.. Just seing the codes , nice share TS .. /gold 2,9999 = This gives WP/VP , then /gold 3,999 = this gives PP
 
Newbie Spellweaver
Joined
May 10, 2015
Messages
20
Reaction score
0
help me !!
janmaru5555 - Get Gold / Vote P / Premium P Command - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Skilled Illusionist
Joined
May 25, 2014
Messages
354
Reaction score
29
Cant make this work
I built this Successfully but the command doesnt WOrk
what i experience is...
like im typing a non-existent command
it doesnt show anything
even an error message
.
this is all the command i tried
/gold 1 9999
/gold 1,9999 <- like Quiirex COmmented
.
I hope this thread will be updated
 
Newbie Spellweaver
Joined
May 10, 2015
Messages
20
Reaction score
0
/gold 1,999 gold
/gold 2,999 war point
/gold 3,999 pre point
 
Back
Top