Jump to content
metin2dev
  • 1
Sign in to follow this  
Chyu ^^

open Get experience from database

Question

Hello devs,

I need to get a current experience of a character to a value. I tried to use player.GetStatus("EXP");, but the problem is that I need to use this value in SelectCharacterWindow. So client don't know from which character it should get it, I guess?

Is it possible to get experience of each character by player module?

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Can you explain better???

LUA: pc.get_exp()

C++: ch->GetExp()

 

 

Python: 

PyObject * playerGetEXP(PyObject* poSelf, PyObject* poArgs)
{
    DWORD dwEXP = CPythonPlayer::Instance().GetStatus(POINT_EXP);
    return Py_BuildValue("l", dwEXP);
}

 

player.GetEXP()

Share this post


Link to post
Share on other sites
  • 0

Hey, I'm not sure how can I use it properly. I think I can't use player module because I don't have selected character in game. Am I right?


#UPDATED

Share this post


Link to post
Share on other sites
  • 0

lol you're explaing bad. You can use player module also in the select_char_interface wth you must do?

Share this post


Link to post
Share on other sites
  • 0
58 minutes ago, Chyu ^^ said:

But I need to know how to get that value for each character in character select.

You have to write a "player.SelectPlayer()" command, to get the actual exp of the character.

I am not sure, if this informationen is in the packets in SelectCharacterWindow already, that would be the alternative: Add the packets there.

 

If you can't do it yourself, leave me a message: cyber3611

 

King Regards

Cyber

Share this post


Link to post
Share on other sites
  • 0
On ‎04‎/‎04‎/‎2018 at 9:54 AM, Cyber36 said:

You have to write a "player.SelectPlayer()" command, to get the actual exp of the character.

I am not sure, if this informationen is in the packets in SelectCharacterWindow already, that would be the alternative: Add the packets there.

 

If you can't do it yourself, leave me a message: cyber3611

 

King Regards

Cyber

 

CInstanceBase* NEW_FindActorPtr(DWORD dwVID); // Needs to be public


PyObject * playerSelectPlayer(PyObject* poSelf, PyObject* poArgs)
{
	DWORD dwVID;
	CInstanceBase * pInstance = CPythonPlayer::Instance().NEW_GetMainActorPtr(dwVID);
	
	if (!pInstance)
		return Py_BuildValue("s", "You didn't select the player.");
	
	return Py_BuildValue("s", CPythonPlayer::Instance().GetName());
}


Usage:
player.SelectPlayer(player.GetVID())

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×