Morphe 160 Posted January 8, 2015 Share Posted January 8, 2015 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 More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 BUMP Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted January 9, 2015 Share Posted January 9, 2015 Binary,python edited too ? Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 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 More sharing options...
fenixplayscz 16 Posted January 9, 2015 Share Posted January 9, 2015 money = 199999999 = 199.999.999 change to 19999999999 no? Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 Now yes but.. Still doesnt work Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted January 9, 2015 Share Posted January 9, 2015 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 More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 (edited) Now Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted January 9, 2015 Share Posted January 9, 2015 Ah try change LL to L or ULL or UL Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 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 More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 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. 1 Link to comment Share on other sites More sharing options...
Denis 1477 Posted January 9, 2015 Share Posted January 9, 2015 Use llu Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 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 More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 (edited) whit ILL Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 (edited) whit ILL Try only " L " Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 (edited) I already tried https://metin2.download/picture/Y5JUx1sdYqqxO03g06A3132k78Ru37Fx/.png Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 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? 1 3 Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 Now 20.000.000.000 Yang . (20kkk) But If change "i" (int) to long long or something.... Result is in screen Link to comment Share on other sites More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 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. 1 Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 Already I tried with this return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); but dont work Link to comment Share on other sites More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 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 2 Link to comment Share on other sites More sharing options...
Morphe 160 Posted January 9, 2015 Author Share Posted January 9, 2015 Thanks all. Solved. Link to comment Share on other sites More sharing options...
fenixplayscz 16 Posted January 9, 2015 Share Posted January 9, 2015 (edited) how to fix please .. i have in binary PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Reboot 772 Posted January 9, 2015 Share Posted January 9, 2015 (edited) how to fix please .. i have in binary PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } ))))))))))))))))))))))))))))))) Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Sherer 486 Posted January 9, 2015 Share Posted January 9, 2015 (edited) how to fix please .. 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 August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now