Honorable Member Mali 41865 Posted January 21, 2021 Honorable Member Share Posted January 21, 2021 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) Now you can open shops directly. There is no need to adjust the coordinates when adding a new shop. Automatically adjusted according to the shop names.(remote_shop_names.txt) For new shop: Spoiler locale/xx/remote_shop_names.txt Add npc vnums to input_main.cpp (_arrShopNpcVnum) npc vnum = player.shop(npc_vnum) Special thanks to @Tatsumaru for taskbar Icons : Edited February 7, 2021 by Mali61 192 2 1 1 1 1 3 1 40 10 125 Link to comment Share on other sites More sharing options...
Premium DemOnJR 564 Posted January 21, 2021 Premium Share Posted January 21, 2021 (edited) Working. If someone have the button .sub i need it idk why the tga is not working for me, thanks. Spoiler Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 3 2 Link to comment Share on other sites More sharing options...
TryHard 4 Posted January 22, 2021 Share Posted January 22, 2021 (edited) 4 hours ago, DemOnJR said: Working. If someone have the button .sub i need it idk why the tga is not working for me, thanks. Hide contents just rename tga files , change big letters to small like that : before : RemoteShop_Button_01.tga after : remoteshop_button_01.tga ( do that to all tga ) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium DemOnJR 564 Posted January 22, 2021 Premium Share Posted January 22, 2021 (edited) 10 hours ago, TryHard said: just rename tga files , change big letters to small like that : before : RemoteShop_Button_01.tga after : remoteshop_button_01.tga ( do that to all tga ) Thanks Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
edwardcrkz 20 Posted January 26, 2021 Share Posted January 26, 2021 Good job mali Link to comment Share on other sites More sharing options...
DevBlade 8 Posted February 6, 2021 Share Posted February 6, 2021 (edited) On 1/21/2021 at 7:38 PM, Mali61 said: M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) Now you can open shops directly. If the shop's npc is not on player's map, you cannot open that shop. There is no need to adjust the coordinates when adding a new shop. Automatically adjusted according to the shop names.(remote_shop_names.txt) For new shop: Reveal hidden contents locale/xx/remote_shop_names.txt Add npc vnums to input_main.cpp (_arrShopNpcVnum) npc vnum = player.shop(npc_vnum) Special thanks to @Tatsumaru for taskbar Icons : Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop. Edited February 6, 2021 by DevBlade 3 1 Link to comment Share on other sites More sharing options...
Kafa 153 Posted February 6, 2021 Share Posted February 6, 2021 (edited) 1 hour ago, DevBlade said: Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop. no its not possible, you will need to modify the source structure, its simply not made for changes like that. You know? P2P (core to core communication) something like this exist for npc too. Google for npcToNpc communication. You can learn a lot my friend Edited February 6, 2021 by Kafa 1 Link to comment Share on other sites More sharing options...
ilovegreendays 31 Posted February 7, 2021 Share Posted February 7, 2021 (edited) 2 hours ago, Kafa said: no its not possible, you will need to modify the source structure, its simply not made for changes like that. You know? P2P (core to core communication) something like this exist for npc too. Google for npcToNpc communication. You can learn a lot my friend i saw some servers with similar system that opens shop from any map. Idk if is the same system or not https://metin2.download/picture/IAvTPzOpZl46wNfqphJJ12H3FBhHaujN/.gif Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 2 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41865 Posted February 7, 2021 Author Honorable Member Share Posted February 7, 2021 9 hours ago, DevBlade said: Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop. #Updated use shop.vnum 2 Link to comment Share on other sites More sharing options...
deluxemetin2 14 Posted May 11, 2021 Share Posted May 11, 2021 i need help please look how it looks, how can i fix it? 1 1 2 2 Link to comment Share on other sites More sharing options...
EAkar 8 Posted November 3, 2021 Share Posted November 3, 2021 70, 75, 48, 107 Are there npc codes in mob_proto in these numbers 9001 9002 9003 these codes are not. 1 ???? 9001 2 ????? 9009 3 ???? 9003 4 ????? 9002 Link to comment Share on other sites More sharing options...
EAkar 8 Posted November 4, 2021 Share Posted November 4, 2021 (edited) Edit : Fixed. npc vnum = player.shop(npc_vnum) WRONGGGG player.shop open (vnum) true Example : 1 ???? 9001 2 ????? 9009 3 ???? 9003 4 ????? 9002 9001 wrong 1 true also The market name is not written. Market name : None Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Vaynz 1892 Posted November 4, 2021 Active Member Share Posted November 4, 2021 (edited) The tutorial is complete, for those who have problems with this "pack_open" not defined Search: ShopData = pack_open(REMOTE_FILE_NAME, "r").readlines() Change with: ShopData = open(REMOTE_FILE_NAME, "r").readlines() And if you have problem with buying items is from ENABLE_MULTISHOP, you have to adapt the system in localeinfo.py and uishop.py in function AskBuyItem. 70,75,48 is from your mysql player -> shop_item (Vnum where is opening the shop with items "doing what you want") Example: Like in my case ->shop item : Vnum (3 is to open the window with weapons and where you find items) In player -> shop you have (Shop vnum - (3), Name (bla bla), NPC - Npc vnum (9001) ) example In remote_shop_names.txt you have to put them like how in input_main.cpp vnum it is. Example (3, ) Locale- 3 go first and name in remote_shop_names.txt -> Weapons If we go for a new shop (Do same like weapons and go in input_main.cpp vnum in row 3, 4, 5) and in remote shop again do that 3 = Weapons 4 = Armors 5 = General. - How Input_main.cpp how looks How remote_shop_names looks. Sorry for bad english and bad "explain", i just woke up. I hope you understood the idea. 10 hours ago, EAkar said: 70, 75, 48, 107 Are there npc codes in mob_proto in these numbers 9001 9002 9003 these codes are not. 1 ???? 9001 2 ????? 9009 3 ???? 9003 4 ????? 9002 8 hours ago, EAkar said: Edit : Fixed. npc vnum = player.shop(npc_vnum) WRONGGGG player.shop open (vnum) true Example : 1 ???? 9001 2 ????? 9009 3 ???? 9003 4 ????? 9002 9001 wrong 1 true also The market name is not written. Market name : None "Market name is working" aswell, maybe u missed something from tutorial. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
EAkar 8 Posted November 4, 2021 Share Posted November 4, 2021 (edited) 11 hours ago, Vaynz said: The tutorial is complete, for those who have problems with this "pack_open" not defined Search: ShopData = pack_open(REMOTE_FILE_NAME, "r").readlines() Change with: ShopData = open(REMOTE_FILE_NAME, "r").readlines() And if you have problem with buying items is from ENABLE_MULTISHOP, you have to adapt the system in localeinfo.py and uishop.py in function AskBuyItem. 70,75,48 is from your mysql player -> shop_item (Vnum where is opening the shop with items "doing what you want") Example: Like in my case ->shop item : Vnum (3 is to open the window with weapons and where you find items) In player -> shop you have (Shop vnum - (3), Name (bla bla), NPC - Npc vnum (9001) ) example In remote_shop_names.txt you have to put them like how in input_main.cpp vnum it is. Example (3, ) Locale- 3 go first and name in remote_shop_names.txt -> Weapons If we go for a new shop (Do same like weapons and go in input_main.cpp vnum in row 3, 4, 5) and in remote shop again do that 3 = Weapons 4 = Armors 5 = General. - How Input_main.cpp how looks How remote_shop_names looks. Sorry for bad english and bad "explain", i just woke up. I hope you understood the idea. "Market name is working" aswell, maybe u missed something from tutorial. I installed the system without any problems. I guess it doesn't match. Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
raihan3 20 Posted August 7, 2022 Share Posted August 7, 2022 Quote error: cannot initialize a parameter of type 'DWORD' (aka 'unsigned int') with an rvalue of type 'std::nullptr_t' pkShop->AddGuest(ch, NULL, false); ^~~~ /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'compile input_udp.cpp #define NULL nullptr ^~~~~~~ ./shop.h:47:46: note: passing argument to parameter 'owner_vid' here virtual bool AddGuest(LPCHARACTER ch,DWORD owner_vid, bool bOtherEmpire); how i solve this ? Link to comment Share on other sites More sharing options...
MrxRoot 0 Posted March 20, 2023 Share Posted March 20, 2023 0320 15:26:18167 :: Traceback (most recent call last): 0320 15:26:18167 :: File "networkModule.py", line 285, in SetGamePhase 0320 15:26:18167 :: File "game.py", line 135, in __init__ 0320 15:26:18167 :: File "interfaceModule.py", line 778, in MakeInterface 0320 15:26:18167 :: File "interfaceModule.py", line 374, in __MakeTaskBar 0320 15:26:18167 :: File "uiTaskBar.py", line 740, in LoadWindow 0320 15:26:18167 :: File "ui.py", line 6253, in GetChild 0320 15:26:18167 :: KeyError 0320 15:26:18167 :: : 0320 15:26:18167 :: 'RemoteShop' 0320 15:26:18167 :: Link to comment Share on other sites More sharing options...
Hades ✔ 52 Posted April 22, 2023 Share Posted April 22, 2023 It's possible to use this to open a specific ShopEX tab? Link to comment Share on other sites More sharing options...
damzaffari 6 Posted February 25 Share Posted February 25 On 8/7/2022 at 6:29 PM, raihan3 said: Quote error: cannot initialize a parameter of type 'DWORD' (aka 'unsigned int') with an rvalue of type 'std::nullptr_t' pkShop->AddGuest(ch, NULL, false); ^~~~ /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'compile input_udp.cpp #define NULL nullptr ^~~~~~~ ./shop.h:47:46: note: passing argument to parameter 'owner_vid' here virtual bool AddGuest(LPCHARACTER ch,DWORD owner_vid, bool bOtherEmpire); how i solve this ? Change in input_main.cpp FROM pkShop->AddGuest(ch, null, false); TO pkShop->AddGuest(ch, ch->GetVID(), false); @raihan3 I get this problem and solve with this change, try this. Link to comment Share on other sites More sharing options...
damzaffari 6 Posted February 25 Share Posted February 25 (edited) @ Mali When i open the shop with the Remote Shop, the window cames with a close button "Fechar Loja"(Close Store), But it is the same button to close private shop, and the window don't close even doing the dialog process. The window still open, nothing happen Can you say, how i can remove this button or put the right "Cose" button there? Gif: Spoiler https://metin2.download/picture/8OPBYFosKgFQdJ6RX62kg48eVck6wPYa/.gif Thanks in advance Edited February 25 by damzaffari Link to comment Share on other sites More sharing options...
Jimmermania 27 Posted March 20 Share Posted March 20 (edited) I click at the first tab (for example the first shop has id: 300) and nothing happens: https://metin2.download/picture/eyF80d6hNK932bQblKrFx5NHOB16K81S/.gif Edited March 20 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Krynn 1 Posted May 12 Share Posted May 12 Hello, I want to add this system. Will this system open the market if you are on a different map? 1 Link to comment Share on other sites More sharing options...
Recommended Posts