Jump to content
  • 0

[CHANGE] MAX GOLD


Morphe

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.

Link to comment
Share on other sites

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

  • Love 2
Link to comment
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))
Link to comment
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));
}
Link to comment
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 :: 
Link to comment
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.
  • Love 1
Link to comment
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

Link to comment
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?

  • Metin2 Dev 1
  • Love 3
Link to comment
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));
}
Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
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));
}

 

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

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • 0
  • Bronze

 

 

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?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
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


  • Activity

    1. 7

      Metin2 2003 Beta Client!!!!!

    2. 32

      Boss Effect Over Head

    3. 0

      Open Source API for Metin2 Server Management - Early Development

    4. 0

      Official Item Combination [18.4]

    5. 2

      Proper SIGNAL management for Windows

    6. 2

      Proper SIGNAL management for Windows

    7. 4

      syserr erorr ( not working OK button on client )

    8. 2

      Proper SIGNAL management for Windows

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.