Active Member Ulas 172 Posted January 7, 2023 Active Member Share Posted January 7, 2023 3 hours ago, TMP4 said: The close.sh what calls the shut.shs in the cores what reads pid files for checking the needed pid to kill is original code. I think Ymir made this because they run multiple metin2 servers in one machine and killall game db would kill every server. Only problem with the original way if someone runs a clean.sh that deletes the pid file.. So close.sh will not work and they have to stop the server in another way (like killall game db in console). Excluding pid files from clean.sh can solve this problem. While yes if you have 1 server on the machine killall game db works fine, but I keep it original. or add mysql user 127.0.0.1 and try again or change makefile in 127.0.0.1 -> localhost 1 Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 11, 2023 Author Contributor Share Posted January 11, 2023 Mega archive updated. 2023.01.11: - DevIL's libs are now statically linked to the game file by default, so you don't need to install any libs on your vps. Also cleaned libdevil and libmysql and some Makefiles. Modified files and folders to grab if you want to update manually: /usr/metin2/server/src/etc/libmysql /usr/metin2/server/src/etc/libdevil /usr/metin2/server/src/game/src/Makefile /usr/metin2/server/src/db/src/Makefile /usr/metin2/server/src/libsql/src/Makefile /usr/metin2/server/src/Makefile If you want to use shared objects (.so) again for DevIL, there's a switch for it in the game's Makefile: ENABLE_STATIC_DEVIL = 1, set it to 0. - Libs.txt and Libs.zip deleted since you don't need them anymore. - FAQ.txt updated with "What packages are needed to compile the source?" - Installed a fix about player change name item duplication exploit: https://metin2.dev/topic/30075-player-change-name-item-duplication-exploit-fix/#comment-153815 I compiled the DevIL myself from the ports, only modification is in cmake to make static lib instead of shared, so there should be no problem, but if you experience anything unusual with images (guild logo) please let me know. I wanted to make this change at least a year ago since people always had trouble with dependencies, and other serverfiles especially paid serverfiles doing the same to make it easier for customers. Well better to do it now than never 1 4 Link to comment Share on other sites More sharing options...
4peppe 98 Posted January 11, 2023 Share Posted January 11, 2023 (edited) 7 hours ago, TMP4 said: Mega archive updated. 2023.01.11: - DevIL's libs are now statically linked to the game file by default, so you don't need to install any libs on your vps. Also cleaned libdevil and libmysql and some Makefiles. Modified files and folders to grab if you want to update manually: /usr/metin2/server/src/etc/libmysql /usr/metin2/server/src/etc/libdevil /usr/metin2/server/src/game/src/Makefile /usr/metin2/server/src/db/src/Makefile /usr/metin2/server/src/libsql/src/Makefile /usr/metin2/server/src/Makefile If you want to use shared objects (.so) again for DevIL, there's a switch for it in the game's Makefile: ENABLE_STATIC_DEVIL = 1, set it to 0. - Libs.txt and Libs.zip deleted since you don't need them anymore. - FAQ.txt updated with "What packages are needed to compile the source?" - Installed a fix about player change name item duplication exploit: https://metin2.dev/topic/30075-player-change-name-item-duplication-exploit-fix/#comment-153815 I compiled the DevIL myself from the ports, only modification is in cmake to make static lib instead of shared, so there should be no problem, but if you experience anything unusual with images (guild logo) please let me know. I wanted to make this change at least a year ago since people always had trouble with dependencies, and other serverfiles especially paid serverfiles doing the same to make it easier for customers. Well better to do it now than never Hello, first of all thanks for the updates to the file servers, I see you are working so hard! Is martysama's pc.change_name fix server side or client side? In which file should it be applied? ok, i think i found where to put it: game->src->questlua_pc.cpp Edited January 12, 2023 by 4peppe 1 Link to comment Share on other sites More sharing options...
Nuzzo 49 Posted January 14, 2023 Share Posted January 14, 2023 On 11/1/2023 at 18:18, TMP4 said: Mega archivio aggiornato. Ho compilato io stesso il DevIL dai port, l'unica modifica è in cmake per rendere la lib statica invece che condivisa, quindi non dovrebbero esserci problemi, ma se riscontri qualcosa di insolito con le immagini (logo della gilda), per favore fammelo sapere. Volevo apportare questa modifica almeno un anno fa poiché le persone avevano sempre problemi con le dipendenze e altri file server, in particolare file server a pagamento, facevano lo stesso per rendere più facile per i clienti. Beh, meglio farlo ora che mai Is it necessary to delete previously installed libs? Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 14, 2023 Author Contributor Share Posted January 14, 2023 8 minutes ago, Nuzzo said: Is it necessary to delete previously installed libs? You can leave them there, but they're completly unused unless other application not using DevIL. 1 Link to comment Share on other sites More sharing options...
garofolo 12 Posted January 14, 2023 Share Posted January 14, 2023 (edited) Update about effect when active pet in inventory like AUTO_POTION you will need to add this system first Spoiler search def RefreshBagSlotWindow(self): and find if constInfo.IS_AUTO_POTION(itemVnum): # metinSocket - [0] : È°¼ºÈ ¿©ºÎ, [1] : »ç¿ëÇÑ ¾ç, [2] : ÃÖ´ë ¿ë·® metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] and change all if too if constInfo.IS_AUTO_POTION(itemVnum): # metinSocket - [0] : È°¼ºÈ ¿©ºÎ, [1] : »ç¿ëÇÑ ¾ç, [2] : ÃÖ´ë ¿ë·® metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if slotNumber >= player.INVENTORY_PAGE_SIZE: slotNumber -= player.INVENTORY_PAGE_SIZE isActivated = 0 != metinSocket[0] if isActivated: self.wndItem.ActivateSlot(slotNumber) potionType = 0; if constInfo.IS_AUTO_POTION_HP(itemVnum): potionType = player.AUTO_POTION_TYPE_HP elif constInfo.IS_AUTO_POTION_SP(itemVnum): potionType = player.AUTO_POTION_TYPE_SP usedAmount = int(metinSocket[1]) totalAmount = int(metinSocket[2]) player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i)) else: self.wndItem.DeactivateSlot(slotNumber) elif itemVnum >= 53001 and itemVnum <= 53256: metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]# <!> globalSlotNumber may be different <!> isActivated = 0 != metinSocket[1] if isActivated: self.wndItem.ActivateSlot(i) else: self.wndItem.DeactivateSlot(i) proof Spoiler and a small update about percentage refine item Spoiler root/uiRefine.py search in class RefineDialogNew: self.successPercentage.Hide() and change with: You gonna find 2X self.successPercentage.Show() open refinedialog.py in uiscript change { "name" : "SuccessPercentage", "type" : "text", "text" : uiScriptLocale.REFINE_INFO, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 70, }, { "name" : "Cost", "type" : "text", "text" : uiScriptLocale.REFINE_COST, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 54, }, to { "name" : "SuccessPercentage", "type" : "text", "text" : uiScriptLocale.REFINE_INFO, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 63, }, { "name" : "Cost", "type" : "text", "text" : uiScriptLocale.REFINE_COST, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 51, }, Spoiler { "name" : "SuccessPercentage", "type" : "text", "text" : uiScriptLocale.REFINE_INFO, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 63, }, { "name" : "Cost", "type" : "text", "text" : uiScriptLocale.REFINE_COST, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 51, }, Spoiler Edited January 14, 2023 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Nuzzo 49 Posted January 14, 2023 Share Posted January 14, 2023 (edited) https://metin2.download/picture/Q477jQKx82svCATZ1V5P2zk3o9WOEDg1/.png Have I forgotten something? Edited January 14, 2023 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 14, 2023 Author Contributor Share Posted January 14, 2023 (edited) 17 minutes ago, Nuzzo said: https://metin2.download/picture/Q477jQKx82svCATZ1V5P2zk3o9WOEDg1/.png Have I forgotten something? gamedep (cd /usr/metin2/src/game/src && gmake dep) And same for db (dbdep or cd /usr/metin2/src/db/src && gmake dep) Edited January 14, 2023 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Nuzzo 49 Posted January 14, 2023 Share Posted January 14, 2023 (edited) 18 minutes ago, Nuzzo said: https://metin2.download/picture/Q477jQKx82svCATZ1V5P2zk3o9WOEDg1/.png Ho dimenticato qualcosa? Ok the gamedep command was needed 16 minutes ago, TMP4 said: gamedep (cd /usr/metin2/src/game/src && gmake dep) E lo stesso per db (dbdep o cd /usr/metin2/src/db/src && gmake dep) Thank you Edited January 14, 2023 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Jamie 12 Posted January 22, 2023 Share Posted January 22, 2023 if you give a friend request to someone, only you appear in the list, they have to log in again to appear 1 Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 22, 2023 Author Contributor Share Posted January 22, 2023 11 minutes ago, Jamie said: if you give a friend request to someone, only you appear in the list, they have to log in again to appear I know about this but it's always been like that since 2004. I don't know if it's a bug or a missing feature (=Ymir did not code it) but it's out of my scope for sure. I may have a look when I'll have time. 4 1 Link to comment Share on other sites More sharing options...
RedforeCzSK 0 Posted January 23, 2023 Share Posted January 23, 2023 I will try these files Link to comment Share on other sites More sharing options...
Barnahizi 0 Posted January 23, 2023 Share Posted January 23, 2023 good Link to comment Share on other sites More sharing options...
garofolo 12 Posted January 24, 2023 Share Posted January 24, 2023 Fix about friends list update Server Source Spoiler common/service.h open add: #define ENABLE_DELETE_FRIEND_REFRESH_FIX game/src/messenger_manager.cpp open Find: MessengerManager::MessengerManager() Add : static char __account[CHARACTER_NAME_MAX_LEN*2+1]; static char __companion[CHARACTER_NAME_MAX_LEN*2+1]; Find: DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&MessengerManager::LoadList) Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); if (account.compare(__account)) return; Find: if (m_Relation[account].find(companion) != m_Relation[account].end()) Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); DBManager::instance().EscapeString(__companion, sizeof(__companion), companion.c_str(), companion.size()); if (account.compare(__account) || companion.compare(__companion)) return; Find: sys_log(1, "Messenger Remove %s %s", account.c_str(), companion.c_str()); Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); DBManager::instance().EscapeString(__companion, sizeof(__companion), companion.c_str(), companion.size()); if (account.compare(__account) || companion.compare(__companion)) return; Find: std::set<keyT> company(m_Relation[account]); Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); if (account.compare(__account)) return; Find: m_InverseRelation[companion].erase(account); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX m_Relation[companion].erase(account); m_InverseRelation[account].erase(companion); #endif Find: ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Messenger> You deleted %s off the list."), companion.c_str()); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX LPCHARACTER tch = CHARACTER_MANAGER::Instance().FindPC(companion.c_str()); if (tch && tch->GetDesc()) { TPacketGCMessenger p; p.header = HEADER_GC_MESSENGER; p.subheader = MESSENGER_SUBHEADER_GC_REMOVE_FRIEND; p.size = sizeof(TPacketGCMessenger) + sizeof(BYTE) + account.size(); BYTE bLen = account.size(); tch->GetDesc()->BufferedPacket(&p, sizeof(p)); tch->GetDesc()->BufferedPacket(&bLen, sizeof(BYTE)); tch->GetDesc()->Packet(account.c_str(), account.size()); } #endif Client Source Spoiler Userinterface/packet.h open: Find: MESSENGER_SUBHEADER_GC_INVITE, Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX MESSENGER_SUBHEADER_GC_REMOVE_FRIEND, #endif Userinterface/PythonMessenger.cpp open Find: m_FriendNameMap.erase(c_szKey); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX if (m_poMessengerHandler) PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey)); #endif The result should be like this: void CPythonMessenger::RemoveFriend(const char * c_szKey) { m_FriendNameMap.erase(c_szKey); #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX if (m_poMessengerHandler) PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey)); #endif } Find: case MESSENGER_SUBHEADER_GC_LOGOUT: Add in the of the block: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX case MESSENGER_SUBHEADER_GC_REMOVE_FRIEND: { BYTE bLength; if (!Recv(sizeof(bLength), &bLength)) return false; if (!Recv(bLength, char_name)) return false; char_name[bLength] = 0; CPythonMessenger::Instance().RemoveFriend(char_name); break; } #endif Have fun 2 2 Link to comment Share on other sites More sharing options...
Nuzzo 49 Posted January 24, 2023 Share Posted January 24, 2023 On 22/1/2023 at 21:11, Jamie said: se dai una richiesta di amicizia a qualcuno, solo tu compari nell'elenco, deve effettuare nuovamente l'accesso per apparire I don't know if I understood correctly, but I don't think I have this problem. If I ask for friendship, I immediately see the other in the list, both from one and from the other Link to comment Share on other sites More sharing options...
Jamie 12 Posted January 24, 2023 Share Posted January 24, 2023 (edited) 6 hours ago, garofolo said: Fix about friends list update Server Source Hide contents common/service.h open add: #define ENABLE_DELETE_FRIEND_REFRESH_FIX game/src/messenger_manager.cpp open Find: MessengerManager::MessengerManager() Add : static char __account[CHARACTER_NAME_MAX_LEN*2+1]; static char __companion[CHARACTER_NAME_MAX_LEN*2+1]; Find: DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&MessengerManager::LoadList) Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); if (account.compare(__account)) return; Find: if (m_Relation[account].find(companion) != m_Relation[account].end()) Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); DBManager::instance().EscapeString(__companion, sizeof(__companion), companion.c_str(), companion.size()); if (account.compare(__account) || companion.compare(__companion)) return; Find: sys_log(1, "Messenger Remove %s %s", account.c_str(), companion.c_str()); Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); DBManager::instance().EscapeString(__companion, sizeof(__companion), companion.c_str(), companion.size()); if (account.compare(__account) || companion.compare(__companion)) return; Find: std::set<keyT> company(m_Relation[account]); Add: DBManager::instance().EscapeString(__account, sizeof(__account), account.c_str(), account.size()); if (account.compare(__account)) return; Find: m_InverseRelation[companion].erase(account); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX m_Relation[companion].erase(account); m_InverseRelation[account].erase(companion); #endif Find: ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Messenger> You deleted %s off the list."), companion.c_str()); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX LPCHARACTER tch = CHARACTER_MANAGER::Instance().FindPC(companion.c_str()); if (tch && tch->GetDesc()) { TPacketGCMessenger p; p.header = HEADER_GC_MESSENGER; p.subheader = MESSENGER_SUBHEADER_GC_REMOVE_FRIEND; p.size = sizeof(TPacketGCMessenger) + sizeof(BYTE) + account.size(); BYTE bLen = account.size(); tch->GetDesc()->BufferedPacket(&p, sizeof(p)); tch->GetDesc()->BufferedPacket(&bLen, sizeof(BYTE)); tch->GetDesc()->Packet(account.c_str(), account.size()); } #endif Client Source Reveal hidden contents Userinterface/packet.h open: Find: MESSENGER_SUBHEADER_GC_INVITE, Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX MESSENGER_SUBHEADER_GC_REMOVE_FRIEND, #endif Userinterface/PythonMessenger.cpp open Find: m_FriendNameMap.erase(c_szKey); Add: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX if (m_poMessengerHandler) PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey)); #endif The result should be like this: void CPythonMessenger::RemoveFriend(const char * c_szKey) { m_FriendNameMap.erase(c_szKey); #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX if (m_poMessengerHandler) PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey)); #endif } Find: case MESSENGER_SUBHEADER_GC_LOGOUT: Add in the of the block: #ifdef ENABLE_DELETE_FRIEND_REFRESH_FIX case MESSENGER_SUBHEADER_GC_REMOVE_FRIEND: { BYTE bLength; if (!Recv(sizeof(bLength), &bLength)) return false; if (!Recv(bLength, char_name)) return false; char_name[bLength] = 0; CPythonMessenger::Instance().RemoveFriend(char_name); break; } #endif Have fun no work in localhost. Edit: No work add friends refresh Edited January 24, 2023 by Jamie Link to comment Share on other sites More sharing options...
БlyatMAN 13 Posted January 25, 2023 Share Posted January 25, 2023 5 hours ago, Nuzzo said: I don't know if I understood correctly, but I don't think I have this problem. If I ask for friendship, I immediately see the other in the list, both from one and from the other Same Link to comment Share on other sites More sharing options...
Premium mihnea 38 Posted January 25, 2023 Premium Share Posted January 25, 2023 (edited) Hello, I dont know why I my channels appear to be offline. I will pay any1 that could help me fix this with teamviewer. I have my portforwarding done. Thanks for all the help. I managed to fix it. Edited January 25, 2023 by mihnea problem solved Link to comment Share on other sites More sharing options...
Karl 3 Posted January 25, 2023 Share Posted January 25, 2023 Will Lycan be added? Link to comment Share on other sites More sharing options...
Pseudabo 32 Posted January 25, 2023 Share Posted January 25, 2023 (edited) On 1/24/2023 at 8:06 PM, Nuzzo said: I don't know if I understood correctly, but I don't think I have this problem. If I ask for friendship, I immediately see the other in the list, both from one and from the other You yes, but he only after manually refresh (relog, teleport, etc..) not in real time Btw. This problem exist in all games.. Maybe here is problem only with core communication.. IDK I dont study it.. Edited January 25, 2023 by Pseudabo Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 26, 2023 Author Contributor Share Posted January 26, 2023 (edited) 23 hours ago, Karl said: Will Lycan be added? No. Quote My goal was to make a reference r40250 serverfile as official as possible compared to what GF had back when their files got leaked in early 2014. Edited January 26, 2023 by TMP4 2 Link to comment Share on other sites More sharing options...
TheGamer 10 Posted January 30, 2023 Share Posted January 30, 2023 @ TMP4 my game99 crash and syserr show nothing Quote syserr: SYSERR: Jan 30 03:17:19 :: pid_init: Start of pid: 1135 Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted January 30, 2023 Author Contributor Share Posted January 30, 2023 8 hours ago, TheGamer said: @ TMP4 my game99 crash and syserr show nothing Sorry but what do you expect from me in this situation with this little information? I just warped to the OX map (game99) and even started an event, did not crash for me. Warped to another game99 map (gm_guild_build), did not crash. I don't know when it crash for you, what do you do when it crash, or is it crash because of a modification you made. To find out or at least to have a clue why it crashed for you, do a gdb and copy the output of bt and / or bt full here. cd /usr/metin2/server/game99 gdb file game core game.core bt bt full quit But if you see it's coming from a new system then please kindly open a new topic in q&a. Link to comment Share on other sites More sharing options...
garofolo 12 Posted January 30, 2023 Share Posted January 30, 2023 (edited) Hello everyone after makes some tests and put server online with beta i found a serius bug in the game is CRASH CORE! I really recommend nobody to use these files as base for some server. Proves? this is related when player use teleport and is random. Edited January 30, 2023 by garofolo Core X - External 2 Internal Link to comment Share on other sites More sharing options...
БlyatMAN 13 Posted January 30, 2023 Share Posted January 30, 2023 (edited) 1 hour ago, garofolo said: Hello everyone after makes some tests and put server online with beta i found a serius bug in the game is CRASH CORE! I really recommend nobody to use these files as base for some server. Proves? this is related when player use teleport and is random. I dont have this problems.Runs nice.But i go deeper with some tests.Thanks for post Edited January 30, 2023 by БlyatMAN 1 Link to comment Share on other sites More sharing options...
Recommended Posts