Jump to content

Official Inventory Expansion


Recommended Posts

  • 2 weeks later...
  • 4 weeks later...
  • Honorable Member

I added a new update for c++11(+) users. If you want to more than 4 inventory, you don't need to change variables etc. manually anymore. Only For ServerSide:

This is the hidden content, please

This is the hidden content, please

  • Metin2 Dev 53
  • Eyes 1
  • Dislove 1
  • Not Good 2
  • Good 12
  • Love 1
  • Love 25

 

Link to comment
Share on other sites

vor 23 Stunden schrieb Mali61:

I added a new update for c++11(+) users. If you want to more than 4 inventory, you don't need to change variables etc. manually anymore. Only For ServerSide:

This is the hidden content, please

This is the hidden content, please

Thank you Great work 

 

  • Metin2 Dev 2
  • Eyes 2
  • Love 1
Link to comment
Share on other sites

  • Honorable Member

# Big Update:

* 80% of Client-Side files have been converted from official root files.

* Deleted locale/xx/ui/inventorywindow.py codes(like official)

* Now If you want to more than 4 inventory, you don't need to change variables etc. manually anymore. (Client and Server) [Not Just for c++11(+) users]

* You can change Default Open/Locked Inventory Count

Settings:

Length.h;
	INVENTORY_OPEN_PAGE_COUNT = 2,
	INVENTORY_OPEN_KEY_VNUM = 72320,
uiinventory.py;
	self.default_open_inven = 2
	self.INVENTORY_OPEN_KEY_VNUM = 72320
	

 

  • Love 6

 

Link to comment
Share on other sites

  • Honorable Member

A guy asked me about second key. First key is tradable item second key is cannot be tradable.

* Now 2 key is activated. If you have both of them, delete is starting from tradable item. You can change from length.h;

INVENTORY_START_DELETE_VNUM = INVENTORY_OPEN_KEY_VNUM,

WillingArtisticBlacknorwegianelkhound.we

* Client settings added to gametype.h

Edited by Metin2 Dev
Core X - External 2 Internal
  • Eyes 1
  • Love 4

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I have a problem:

exchange.cpp:17:18: error: array: No such file or directory
desc_client.cpp: In member function 'void CLIENT_DESC::UpdateChannelStatus(DWORD, bool)':
desc_client.cpp:302: warning: comparison between signed and unsigned integer expressions
cmd_gm.cpp: In function 'void do_use_item(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:4357: warning: 'cell' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3977: warning: 'n' may be used uninitialized in this function
exchange.cpp: In member function 'bool CExchange::CheckSpace()':
exchange.cpp:308: error: 'array' is not a member of 'std'
exchange.cpp:308: error: 'unique_ptr' is not a member of 'std'
exchange.cpp:308: error: expected primary-expression before '>' token
exchange.cpp:308: error: expected primary-expression before ',' token
exchange.cpp:308: error: 's_grid' was not declared in this scope
exchange.cpp:316: error: 'make_unique' is not a member of 'std'
exchange.cpp:316: error: expected primary-expression before '>' token
exchange.cpp:316: warning: left-hand operand of comma has no effect
exchange.cpp:325: error: 'make_unique' is not a member of 'std'
exchange.cpp:325: error: expected primary-expression before '>' token
exchange.cpp:325: warning: left-hand operand of comma has no effect
exchange.cpp:330: error: ISO C++ forbids declaration of 'i' with no type
exchange.cpp:330: warning: comparison between signed and unsigned integer expressions
exchange.cpp:336: error: ISO C++ forbids declaration of 'i' with no type

how to fix it?

Link to comment
Share on other sites

  • 2 weeks later...
exchange.cpp:311:21: error: no member named 'make_unique' in namespace 'std'
                        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WI...
                                    ~~~~~^
exchange.cpp:311:33: error: 'CGrid' does not refer to a value
                        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WI...
                                                     ^
./exchange.h:3:7: note: declared here
class CGrid;
      ^
exchange.cpp:320:26: error: no member named 'make_unique' in namespace 'std'
        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WIDTH,new_size);
                    ~~~~~^
exchange.cpp:320:38: error: 'CGrid' does not refer to a value
        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WIDTH,new_size);
                                     ^
./exchange.h:3:7: note: declared here
class CGrid;
      ^

Any fix ? 

Link to comment
Share on other sites

  • Contributor
5 hours ago, Syntaax said:

exchange.cpp:311:21: error: no member named 'make_unique' in namespace 'std'
                        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WI...
                                    ~~~~~^
exchange.cpp:311:33: error: 'CGrid' does not refer to a value
                        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WI...
                                                     ^
./exchange.h:3:7: note: declared here
class CGrid;
      ^
exchange.cpp:320:26: error: no member named 'make_unique' in namespace 'std'
        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WIDTH,new_size);
                    ~~~~~^
exchange.cpp:320:38: error: 'CGrid' does not refer to a value
        s_grid[i] = std::make_unique<CGrid>(INVENTORY_WIDTH,new_size);
                                     ^
./exchange.h:3:7: note: declared here
class CGrid;
      ^

Any fix ? 

I think you need c++11 for this .

My only accounts are here and on M2D, Don't trust anyone else from other shitty sites.
266868740522639360.png

Link to comment
Share on other sites

  • 1 year later...

key do not work , this is my syerr client when i put keys to unlock inventory 

 

0109 20:37:00259 :: Traceback (most recent call last):

0109 20:37:00259 ::   File "ui.py", line 1874, in CallEvent

0109 20:37:00259 ::   File "ui.py", line 63, in __call__

0109 20:37:00259 ::   File "ui.py", line 54, in __call__

0109 20:37:00259 ::   File "uiInventory.py", line 737, in __ClickExtendInvenButton

0109 20:37:00259 :: AttributeError
0109 20:37:00259 :: : 
0109 20:37:00259 :: 'QuestionDialog' object has no attribute 'GetTextSize'

 

File "uiInventory.py", line 737:                w,h = self.ExInvenQuestionDlg.GetTextSize()

File "ui.py", line 1874:             apply(self.eventFunc, self.eventArgs)

 File "ui.py", line 63:       return self.call(*arg)

  File "ui.py", line 54          return self.func(self.obj, *arg)

i have 1 problem when i copile game source , i have c++11 and that 2 function is for c++14

s_grid = std::make_unique<CGrid>(INVENTORY_WIDTH,INVENTORY_HEIGHT);
s_grid = std::make_unique<CGrid>(INVENTORY_WIDTH,new_size);

i change that 2 function with that

s_grid = std::unique_ptr<CGrid>(new CGrid(INVENTORY_WIDTH,INVENTORY_HEIGHT));

s_grid = std::unique_ptr<CGrid>(new CGrid(INVENTORY_WIDTH,new_size));

and afther i change this game is copile without error 

Sorry for my english , i need help:D

Link to comment
Share on other sites

  • 8 months later...
  • 2 weeks later...
1001 02:53:03007 :: Traceback (most recent call last):

1001 02:53:03007 ::   File "introLogo.py", line 60, in OnUpdate

1001 02:53:03008 ::   File "networkModule.py", line 177, in SetLoginPhase

1001 02:53:03008 ::   File "system.py", line 130, in __pack_import

1001 02:53:03008 ::   File "system.py", line 110, in _process_result

1001 02:53:03008 ::   File "introLogin.py", line 14, in <module>

1001 02:53:03009 ::   File "system.py", line 130, in __pack_import

1001 02:53:03009 ::   File "system.py", line 110, in _process_result

1001 02:53:03009 ::   File "uiCommon.py", line 7, in <module>

1001 02:53:03010 ::   File "uiCommon.py", line 68, in PopupDialog

1001 02:53:03010 :: AttributeError
1001 02:53:03010 :: : 
1001 02:53:03010 :: 'module' object has no attribute 'ENABLE_EXTEND_INVEN_SYSTEM'
1001 02:53:03010 :: 

Any ideea what causes this problem? It s defined in Locale_inc.h! Thx.

EDIT: Fixed but I don t get 4 invetory pages only the normal 2. Do I need to modify anything else?

Edited by narcisxb
Link to comment
Share on other sites

  • 1 month later...

There is lag in the system.

The key opens the lock. But after 4 5 seconds it turns on. Or I have to open it with the key again for it to appear.

Someone else on another forum has the same problem. Add if you can fix the problem. I wouldn't recommend it if you can't fix the problem. Good Morning.

 

Lag starts when 3 keys are requested. But there is no problem with 2 keys. As I said, when it starts asking for 3 or 4 keys, there is lag. (Note: I didn't lock 3 4 inventory. I only locked my 4th inventory.

const DWORD c_Inventory_Open_Page_Count = 3;
 

spacer.png

continuation of the video

spacer.png

also doing this instead of make_unique.

s_grid[i] = std::unique_ptr <CGrid>(new CGrid(INVENTORY_WIDTH,INVENTORY_HEIGHT));
     

and

s_grid[i] = std::unique_ptr<CGrid>(new CGrid(INVENTORY_WIDTH,new_size));

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

  • 4 weeks later...
  • 2 months later...

Hi Mali! There might be an issue in the code. I'm using your latest source update "c++2b" and I can't compile "exchange.cpp"

spacer.png

 

Compile error in FreeBSD:

exchange.cpp:303:83: error: implicit instantiation of undefined template 'std::array<std::unique_ptr<CGrid>, 4>'
        std::array<std::unique_ptr<CGrid>, static_cast<const int>(INVENTORY_PAGE_COUNT)> s_grid;

        ^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;

 

P.s solution:

#include <array>

Thank you for all the care Mali ❤️❤️ 

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

  • 3 months later...
  • 5 months later...
29.05.2019 saat 00:47'de Mali şunları söyledi:

c++11(+) kullanıcıları için yeni bir güncelleme ekledim. 4'ten fazla envanter istiyorsanız, artık değişkenleri vs. manuel olarak değiştirmenize gerek yok. Yalnızca Sunucu Tarafı İçin:

This is the hidden content, please

This is the hidden content, please

Can you renew the links please 🙂 I get an error in make_unique I'm using C++11

  • Good 2
  • Love 1
Link to comment
Share on other sites

On 10/1/2021 at 1:59 AM, narcisxb said:
1001 02:53:03007 :: Traceback (most recent call last):

1001 02:53:03007 ::   File "introLogo.py", line 60, in OnUpdate

1001 02:53:03008 ::   File "networkModule.py", line 177, in SetLoginPhase

1001 02:53:03008 ::   File "system.py", line 130, in __pack_import

1001 02:53:03008 ::   File "system.py", line 110, in _process_result

1001 02:53:03008 ::   File "introLogin.py", line 14, in <module>

1001 02:53:03009 ::   File "system.py", line 130, in __pack_import

1001 02:53:03009 ::   File "system.py", line 110, in _process_result

1001 02:53:03009 ::   File "uiCommon.py", line 7, in <module>

1001 02:53:03010 ::   File "uiCommon.py", line 68, in PopupDialog

1001 02:53:03010 :: AttributeError
1001 02:53:03010 :: : 
1001 02:53:03010 :: 'module' object has no attribute 'ENABLE_EXTEND_INVEN_SYSTEM'
1001 02:53:03010 :: 

Any ideea what causes this problem? It s defined in Locale_inc.h! Thx.

EDIT: Fixed but I don t get 4 invetory pages only the normal 2. Do I need to modify anything else?

how did you fix it? someone else know how? i have the same error

Link to comment
Share on other sites

29 minutes ago, Stoorck said:

 

#ifdef ENABLE_EXTEND_INVEN_SYSTEM
	PyModule_AddIntConstant(poModule, "ENABLE_EXTEND_INVEN_SYSTEM",	1);
#else
	PyModule_AddIntConstant(poModule, "ENABLE_EXTEND_INVEN_SYSTEM",	0);
#endif

PythonApplicationModule.cpp  

does this function exist?

Edited by 123fbalp123fb
Link to comment
Share on other sites

33 minutes ago, 123fbalp123fb said:
#ifdef ENABLE_EXTEND_INVEN_SYSTEM
	PyModule_AddIntConstant(poModule, "ENABLE_EXTEND_INVEN_SYSTEM",	1);
#else
	PyModule_AddIntConstant(poModule, "ENABLE_EXTEND_INVEN_SYSTEM",	0);
#endif

PythonApplicationModule.cpp  

does this function exist?

yes it does! Already managed to fix it, now I have a bug that someone posted above. 

 

 

Link to comment
Share on other sites

Announcements



×
×
  • 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.