Jump to content
metin2dev
  • 0
Morphe

[CHANGE] MAX GOLD

Question

Hy dev's !

 

I'm trying to change max gold in game.

 

I modified packet's, command's, and all int to long long.

In lenght.h  GOLD_MAX = 20000000000ULL,

And I modified POINT_GOLD with long long.

 

But in game gold max is 2.147.000.000

 

I don't know, maybe I forgot to change something.

Share this post


Link to post
Share on other sites

79 answers to this question

Recommended Posts

  • 0

Already I tried with this 

return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));

but dont work

Check my post dude, not LongLong   ( UnsignedLongLong)

And in  PythonPlayerModule.cpp  ULL

 

ULL = UnsignedLongLong

 

If you want to use LongLong have to put in  PythonPlayerModule.cpp    LL

  • Like 2

Share this post


Link to post
Share on other sites
  • 0

Binary,python edited too ?

 

binary

 

PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
        return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}
 
uicommon.py
 
def __OnValueUpdate(self):
ui.EditLine.OnIMEUpdate(self.inputValue)


text = self.inputValue.GetText()


money = 0
if text and text.isdigit():
try:
money = long(text)
except ValueError:
money = 199999999


self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))

Share this post


Link to post
Share on other sites
  • 0

PythonPlayerModule.cpp try this

 

 

PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
return Py_BuildValue("i", CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}
 
to
 
PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
return Py_BuildValue("LL", CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}

Share this post


Link to post
Share on other sites
  • 0

Dont work 

Syserr

I changed to ULL

 
0109 19:29:00748 ::   File "networkModule.py", line 239, in SetGamePhase


0109 19:29:00748 ::   File "game.py", line 106, in __init__


0109 19:29:00748 ::   File "interfaceModule.py", line 287, in MakeInterface


0109 19:29:00749 ::   File "interfaceModule.py", line 171, in __MakeWindows


0109 19:29:00749 ::   File "uiInventory.py", line 253, in __init__


0109 19:29:00749 ::   File "uiInventory.py", line 389, in __LoadWindow


0109 19:29:00749 ::   File "uiInventory.py", line 599, in RefreshStatus


0109 19:29:00749 :: SystemError
0109 19:29:00766 :: : 
0109 19:29:00766 :: bad format char passed to Py_BuildValue
0109 19:29:00766 :: 

Share this post


Link to post
Share on other sites
  • 0

 

Dont work 

Syserr

I changed to ULL

 
0109 19:29:00748 ::   File "networkModule.py", line 239, in SetGamePhase


0109 19:29:00748 ::   File "game.py", line 106, in __init__


0109 19:29:00748 ::   File "interfaceModule.py", line 287, in MakeInterface


0109 19:29:00749 ::   File "interfaceModule.py", line 171, in __MakeWindows


0109 19:29:00749 ::   File "uiInventory.py", line 253, in __init__


0109 19:29:00749 ::   File "uiInventory.py", line 389, in __LoadWindow


0109 19:29:00749 ::   File "uiInventory.py", line 599, in RefreshStatus


0109 19:29:00749 :: SystemError
0109 19:29:00766 :: : 
0109 19:29:00766 :: bad format char passed to Py_BuildValue
0109 19:29:00766 :: 

 

You can not use ULL as inventory does not support ULL /
 
Try IL or ILL all game and binary.
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

With llu

 

 
0109 20:01:28485 ::   File "networkModule.py", line 239, in SetGamePhase


0109 20:01:28485 ::   File "game.py", line 106, in __init__


0109 20:01:28486 ::   File "interfaceModule.py", line 287, in MakeInterface


0109 20:01:28486 ::   File "interfaceModule.py", line 171, in __MakeWindows


0109 20:01:28486 ::   File "uiInventory.py", line 253, in __init__


0109 20:01:28486 ::   File "uiInventory.py", line 389, in __LoadWindow


0109 20:01:28486 ::   File "uiInventory.py", line 599, in RefreshStatus


0109 20:01:28487 :: SystemError
0109 20:01:28487 :: : 
0109 20:01:28487 :: bad format char passed to Py_BuildValue
0109 20:01:28487 :: 

Now try saying reboot

Share this post


Link to post
Share on other sites
  • 0
UL =unsingned long   ( UL = uLong)

ULL = unsigned long long

IL = int long

Resut iti dai seama singur.

Maximum value for a variable of type long.   2147483647
Minimum value for a variable of type long.  –2147483648
 
Maximum value for a variable of type unsigned long. 4294967295 (uLong )

Try to user this in binary:


PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
        return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));
} 

And in  PythonPlayerModule.cpp

 

Use  ULL .

 

Now I think they are all made for ULL,

 

 

http://msdn.microsoft.com/en-us/library/296az74e.aspx

The maximum value of yang want?

 

The rest of you realize and lonely, I suppose?

  • Like 2

Share this post


Link to post
Share on other sites
  • 0

Now 20.000.000.000 Yang . (20kkk)

 

But If change "i" (int) to long long or something....

 

Result is in screen

Share this post


Link to post
Share on other sites
  • 0

Now 20.000.000.000 Yang . (20kkk)

 

But If change "i" (int) to long long or something....

 

Result is in screen

Chech my above post , edited.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Already I tried with this 

return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));

but dont work

Share this post


Link to post
Share on other sites
  • 0

how to fix please .. 

 

p5Zkg.png

 

 i have in binary 

 

PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
        return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}

Share this post


Link to post
Share on other sites
  • 0

 

how to fix please .. 

 

p5Zkg.png

 

 i have in binary 

 

PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
        return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}

 

:))))))))))))))))))))))))))))))))

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

 

 

how to fix please .. 

 

p5Zkg.png

 

 i have in binary 

 

PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs)
{
        return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD));
}

 

:))))))))))))))))))))))))))))))))

 

Which changes are necessery?

I`ve already changed the value of GOLD_MAX, made a few changes (including long long value and amount in packet_point_change) but it still doesn`t work properly. Someone?

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×