Premium DemOnJR 564 Posted June 14, 2021 Premium Share Posted June 14, 2021 (edited) 23 minutes ago, TysonDMG said: Now instead of item, yang displays exp the first is with yang and second with item https://metin2.download/picture/EZivzdZ2Z4zhRCIHkldcWhfVaR9ukQtX/.gif price_type select gold if you want yang ('GOLD','SECONDCOIN','ITEM','EXP') Example: INSERT INTO `shopex_item` VALUES (63, 19, 1, 13, 0, 'GOLD', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 6 1 1 1 1 3 Link to comment Share on other sites More sharing options...
TysonDMG 6 Posted June 14, 2021 Share Posted June 14, 2021 (edited) 8 minutes ago, DemOnJR said: price_type select gold if you want yang ('GOLD','SECONDCOIN','ITEM','EXP') price_type is ITEM Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium DemOnJR 564 Posted June 14, 2021 Premium Share Posted June 14, 2021 (edited) 2 minutes ago, TysonDMG said: price_type is ITEM Change it with GOLD Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 2 1 1 Link to comment Share on other sites More sharing options...
TysonDMG 6 Posted June 15, 2021 Share Posted June 15, 2021 (edited) GCC9 update ch1/db/auth/ch99 syserr empty when i select empire i get this 0615 20:46:07676 :: Unknown packet header: 176, last: 253 32 HEADER_DG_ACK_HORSE_NAME = 176, tables.h #FIXED Edited June 15, 2021 by TysonDMG Link to comment Share on other sites More sharing options...
ReDx 0 Posted July 26, 2021 Share Posted July 26, 2021 <3 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 17, 2021 Share Posted August 17, 2021 With which command does the reload start? /reload p? Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 17, 2021 Active Member Share Posted August 17, 2021 /reload x ? Look at src 1 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 18, 2021 Share Posted August 18, 2021 It is precisely because I cannot see in the src that I ask Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 18, 2021 Active Member Share Posted August 18, 2021 (edited) On 4/12/2020 at 8:11 PM, Owsap said: Not sure where I could share this but here is a way to simply reload the ShopTableEx in-game. In reply to @Chief, @CHMarvin, @thespeedy and a contribution to @masodikbela's & @Mali61 post. Reload ShopTableEx game/src/cmd_gm.cpp Hide contents /// 1. // Add #include "shop_manager.h" /// 2. // Search switch (LOWER(*arg1)) // Add above if (strstr(arg1, "shop_ex")) { char szShopTableExFileName[256]; snprintf(szShopTableExFileName, sizeof(szShopTableExFileName), "%s/shop_table_ex.txt", LocaleService_GetBasePath().c_str()); if (CShopManager::instance().ReloadShopTableEx(szShopTableExFileName)) ch->ChatPacket(CHAT_TYPE_INFO, "Reloading ShopTableEx."); else ch->ChatPacket(CHAT_TYPE_INFO, "Failed to reload ShopTableEx."); return; } game/src/shop_manager.cpp Hide contents /// 1. // Search bool CShopManager::ReadShopTableEx(const char* stFileName) // Add above bool CShopManager::ReloadShopTableEx(const char* stFileName) { return ReadShopTableEx(stFileName, true); } /// 2. // Search bool CShopManager::ReadShopTableEx(const char* stFileName) // Replace with bool CShopManager::ReadShopTableEx(const char* stFileName, bool bReload) /// 3. // Search typedef std::multimap <DWORD, TShopTableEx> TMapNPCshop; TMapNPCshop map_npcShop; // Add below if (bReload) { sys_log(0, "RELOADING ShopTableEx"); map_npcShop.clear(); m_map_pkShopByNPCVnum.clear(); m_map_pkShop.clear(); } game/src/shop_manager.h Hide contents /// 1. // Search void Destroy(); // Add below bool ReloadShopTableEx(const char* stFileName); /// 2. // Search bool ReadShopTableEx(const char* stFileName); // Replace with bool ReadShopTableEx(const char* stFileName, bool bReload = false); Result https://metin2.download/picture/o46OU9SVu96fNAANCWZ2lTT1krtmT0r0/.gif Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 18, 2021 Share Posted August 18, 2021 On 4/13/2020 at 9:37 AM, Mali said: thank you but those containers are using by normal shops too But this is shopex Update: *Added reload command Here it says it updated the code but there is no trace of any reload commands. I had seen the code you quoted. Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 18, 2021 Active Member Share Posted August 18, 2021 You have to know, whats in your source. Otherwise we cant help you Link to comment Share on other sites More sharing options...
Hik 108 Posted August 18, 2021 Share Posted August 18, 2021 I believe there is a problem with this code. The shop_table_ex.txt file is reload but Mali's shop_ex_renewal uses a sql table. Link to comment Share on other sites More sharing options...
Honorable Member Mali 41806 Posted August 18, 2021 Author Honorable Member Share Posted August 18, 2021 i forgot to say. I removed the reload with sql update. 1 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 19, 2021 Share Posted August 19, 2021 Why? In the comments someone wrote a code to do it, I'll try that. 1 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41806 Posted August 19, 2021 Author Honorable Member Share Posted August 19, 2021 4 minutes ago, Hik said: Why? In the comments someone wrote a code to do it, I'll try that. 2 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 22, 2021 Share Posted August 22, 2021 (edited) So, I was able to put the reload in and it seems to work perfectly. Unfortunately, however, when I try to buy an item that costs another item, it tells me that I don't have enough yang. UP:FIXED Edited August 22, 2021 by Hik Link to comment Share on other sites More sharing options...
metser 0 Posted September 8, 2021 Share Posted September 8, 2021 SHOP_INVALID_POS This Item cannot be used here. i get this error any item i am trying to buy, what could be the cause of the error? Link to comment Share on other sites More sharing options...
Maze 8 Posted September 13, 2021 Share Posted September 13, 2021 @Mali When I exchange a certain item for a costume and receive the costume in inventory it has no bonus. Link to comment Share on other sites More sharing options...
lucaluca 14 Posted September 13, 2021 Share Posted September 13, 2021 @Maze you have to specify the costume's bonuses in 'shopex_item' (do it like in 'item_proto') 1 Link to comment Share on other sites More sharing options...
Maze 8 Posted September 13, 2021 Share Posted September 13, 2021 1 hour ago, lucaluca said: @Maze you have to specify the costume's bonuses in 'shopex_item' (do it like in 'item_proto') basically i can't put out random bonuses is that it? Link to comment Share on other sites More sharing options...
Maze 8 Posted October 9, 2021 Share Posted October 9, 2021 @Mali would it be possible to put bonuses to come out random when the specified item has 100 in item_proto? Link to comment Share on other sites More sharing options...
zsoltiabeka10 17 Posted October 19, 2021 Share Posted October 19, 2021 Hey, When opening an extended shop my game dies: 0x0824093b in CShopEx::AddGuest (this=<optimized out>, ch=<optimized out>, owner_vid=<optimized out>, bOtherEmpire=<optimized out>) at shopEx.cpp:128 pack = {header = 38 '&', size = 22428, subheader = 10 '\n'} pack2 = {owner_vid = 35740, shop_tab_count = 3 '\003'} temp = "ARMOR", '\000' <repeats 15 times>, ">\000\000\000\000\000\000\000\004\000\000\000\000\363.\000\000\372", '\000' <repeats 15 times>, "\001", '\000' <repeats 25 times>, "\001\320\a", '\000' <repeats 39 times>, "\001\000\000\000\000\375.\000\000\250a", '\000' <repeats 14 times>, "\001", '\000' <repeats 67 times>... buf = <optimized out> size = <optimized out> Any ideas why? Thanks in advance! Link to comment Share on other sites More sharing options...
redscoutyt2 3 Posted October 28, 2021 Share Posted October 28, 2021 Hi, i have 3 pages on 1 npc, i want to open them with quest, like: local select = select("First window", "Second window", "Third window") if select == 1 then npc.open_shop(5) setskin(NOWINDOW) if select == 2 then npc.open_shop(6) setskin(NOWINDOW) if select == 3 then npc.open_shop(7) setskin(NOWINDOW) But it always opens the first window, any solution? Link to comment Share on other sites More sharing options...
Active Member ReFresh 2339 Posted October 28, 2021 Active Member Share Posted October 28, 2021 @redscoutyt2 You should learn at least some basics about lua coding, then you won't have problem with solving things like you posted. This should work correctly: Spoiler local select = select("First window", "Second window", "Third window") if select == 1 then npc.open_shop(5) setskin(NOWINDOW) elseif select == 2 then npc.open_shop(6) setskin(NOWINDOW) elseif select == 3 then npc.open_shop(7) setskin(NOWINDOW) Enjoy! I'll be always helpful! Link to comment Share on other sites More sharing options...
redscoutyt2 3 Posted October 28, 2021 Share Posted October 28, 2021 @ ReFreshThank you, it was just an example. I wrote the quest like this, even before commenting here. I tried yours(even its the same as mine), its not working. Link to comment Share on other sites More sharing options...
Recommended Posts