Sr.Agente 24 Posted August 3, 2015 Share Posted August 3, 2015 Hello everyone, I've been trying to figure out, how it will be possible to do this:http://www.youtube.com/watch?v=aZcOarmeX14 I wonder where files would have to edit, how to achieve this result.Best regards Sr.Agente Thank InyaProduction by video 1 1 Link to comment Share on other sites More sharing options...
thespeedy 20 Posted September 8, 2015 Share Posted September 8, 2015 tut for max yang? Link to comment Share on other sites More sharing options...
leo2993 21 Posted September 11, 2015 Share Posted September 11, 2015 I have an bug with 4 invetory src The items with 2 space slot expand down and not put in second inventory Anywhere can help me? Link to comment Share on other sites More sharing options...
User404 0 Posted September 28, 2015 Share Posted September 28, 2015 (edited) Sorry for my English so that tou using the translator, I want to ask is if someone can help me with this error, tou are using vs 2008 with the SP1 patch Error: https://metin2.download/picture/D8vJH2R4q50X8m39xcsXlfcEIrOjFlUN/.png I thank those who help me Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
giorgosrodos1 37 Posted October 11, 2015 Share Posted October 11, 2015 hello i want to unlock fps limits but i dont found it. can you help me ? Link to comment Share on other sites More sharing options...
stevenmelis 30 Posted November 7, 2015 Share Posted November 7, 2015 (edited) Can u help me for remove green words in the top? https://metin2.download/picture/7xaGFSD502wb30u5jTNTQjkwM65klZPd/.png Edited August 31, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium iRETEMAG 137 Posted November 8, 2015 Premium Share Posted November 8, 2015 I would like to invert the function on the mob_drop_item Level_limit...It's possbile?Thanks Link to comment Share on other sites More sharing options...
VegaS 1086 Posted November 8, 2015 Share Posted November 8, 2015 I would like to invert the function on the mob_drop_item Level_limit...It's possbile?Thanks game/item_manager_read_tables.cpp if ( strType == "limit" ) { if ( !loader.GetTokenInteger("level_limit", &iLevelLimit) ) { sys_err("ReadmonsterDropItemGroup : Syntax error %s : no level_limit, node %s", c_pszFileName, stName.c_str()); loader.SetParentNode(); return false; } } else { iLevelLimit = 0; } bool ITEM_MANAGER::ReadMonsterDropItemGroup(const char * c_pszFileName) { CTextFileLoader loader; if (!loader.Load(c_pszFileName)) return false; for (DWORD i = 0; i < loader.GetChildNodeCount(); ++i) { std::string stName(""); loader.GetCurrentNodeName(&stName); if (strncmp (stName.c_str(), "kr_", 3) == 0) { if (LC_IsYMIR()) { stName.assign(stName, 3, stName.size() - 3); } else { continue; } } loader.SetChildNode(i); int iMobVnum = 0; int iKillDrop = 0; int iLevelLimit = 0; std::string strType(""); if (!loader.GetTokenString("type", &strType)) { sys_err("ReadMonsterDropItemGroup : Syntax error %s : no type (kill|drop), node %s", c_pszFileName, stName.c_str()); loader.SetParentNode(); return false; } if (!loader.GetTokenInteger("mob", &iMobVnum)) { sys_err("ReadMonsterDropItemGroup : Syntax error %s : no mob vnum, node %s", c_pszFileName, stName.c_str()); loader.SetParentNode(); return false; } if (strType == "kill") { if (!loader.GetTokenInteger("kill_drop", &iKillDrop)) { sys_err("ReadMonsterDropItemGroup : Syntax error %s : no kill drop count, node %s", c_pszFileName, stName.c_str()); loader.SetParentNode(); return false; } } else { iKillDrop = 1; } if ( strType == "limit" ) { if ( !loader.GetTokenInteger("level_limit", &iLevelLimit) ) { sys_err("ReadmonsterDropItemGroup : Syntax error %s : no level_limit, node %s", c_pszFileName, stName.c_str()); loader.SetParentNode(); return false; } } else { iLevelLimit = 0; } sys_log(0,"MOB_ITEM_GROUP %s [%s] %d %d", stName.c_str(), strType.c_str(), iMobVnum, iKillDrop); if (iKillDrop == 0) { loader.SetParentNode(); continue; } TTokenVector* pTok = NULL; if (strType == "kill") { CMobItemGroup * pkGroup = M2_NEW CMobItemGroup(iMobVnum, iKillDrop, stName); for (int k = 1; k < 256; ++k) { char buf[4]; snprintf(buf, sizeof(buf), "%d", k); if (loader.GetTokenVector(buf, &pTok)) { //sys_log(1, " %s %s", pTok->at(0).c_str(), pTok->at(1).c_str()); std::string& name = pTok->at(0); DWORD dwVnum = 0; if (!GetVnumByOriginalName(name.c_str(), dwVnum)) { str_to_number(dwVnum, name.c_str()); if (!ITEM_MANAGER::instance().GetTable(dwVnum)) { sys_err("ReadMonsterDropItemGroup : there is no item %s : node %s : vnum %d", name.c_str(), stName.c_str(), dwVnum); return false; } } int iCount = 0; str_to_number(iCount, pTok->at(1).c_str()); if (iCount<1) { sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s : vnum %d, count %d", name.c_str(), stName.c_str(), dwVnum, iCount); return false; } int iPartPct = 0; str_to_number(iPartPct, pTok->at(2).c_str()); if (iPartPct == 0) { sys_err("ReadMonsterDropItemGroup : there is no drop percent for item %s : node %s : vnum %d, count %d, pct %d", name.c_str(), stName.c_str(), iPartPct); return false; } int iRarePct = 0; str_to_number(iRarePct, pTok->at(3).c_str()); iRarePct = MINMAX(0, iRarePct, 100); sys_log(0," %s count %d rare %d", name.c_str(), iCount, iRarePct); pkGroup->AddItem(dwVnum, iCount, iPartPct, iRarePct); continue; } break; } m_map_pkMobItemGroup.insert(std::map<DWORD, CMobItemGroup*>::value_type(iMobVnum, pkGroup)); } else if (strType == "drop") { CDropItemGroup* pkGroup; bool bNew = true; itertype(m_map_pkDropItemGroup) it = m_map_pkDropItemGroup.find (iMobVnum); if (it == m_map_pkDropItemGroup.end()) { pkGroup = M2_NEW CDropItemGroup(0, iMobVnum, stName); } else { bNew = false; CDropItemGroup* pkGroup = it->second; } for (int k = 1; k < 256; ++k) { char buf[4]; snprintf(buf, sizeof(buf), "%d", k); if (loader.GetTokenVector(buf, &pTok)) { std::string& name = pTok->at(0); DWORD dwVnum = 0; if (!GetVnumByOriginalName(name.c_str(), dwVnum)) { str_to_number(dwVnum, name.c_str()); if (!ITEM_MANAGER::instance().GetTable(dwVnum)) { sys_err("ReadDropItemGroup : there is no item %s : node %s", name.c_str(), stName.c_str()); M2_DELETE(pkGroup); return false; } } int iCount = 0; str_to_number(iCount, pTok->at(1).c_str()); if (iCount < 1) { sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s", name.c_str(), stName.c_str()); M2_DELETE(pkGroup); return false; } float fPercent = atof(pTok->at(2).c_str()); DWORD dwPct = (DWORD)(10000.0f * fPercent); sys_log(0," name %s pct %d count %d", name.c_str(), dwPct, iCount); pkGroup->AddItem(dwVnum, dwPct, iCount); continue; } break; } if (bNew) m_map_pkDropItemGroup.insert(std::map<DWORD, CDropItemGroup*>::value_type(iMobVnum, pkGroup)); } else if ( strType == "limit" ) { CLevelItemGroup* pkLevelItemGroup = M2_NEW CLevelItemGroup(iLevelLimit); for ( int k=1; k < 256; k++ ) { char buf[4]; snprintf(buf, sizeof(buf), "%d", k); if ( loader.GetTokenVector(buf, &pTok) ) { std::string& name = pTok->at(0); DWORD dwItemVnum = 0; if (false == GetVnumByOriginalName(name.c_str(), dwItemVnum)) { str_to_number(dwItemVnum, name.c_str()); if ( !ITEM_MANAGER::instance().GetTable(dwItemVnum) ) { M2_DELETE(pkLevelItemGroup); return false; } } int iCount = 0; str_to_number(iCount, pTok->at(1).c_str()); if (iCount < 1) { M2_DELETE(pkLevelItemGroup); return false; } float fPct = atof(pTok->at(2).c_str()); DWORD dwPct = (DWORD)(10000.0f * fPct); pkLevelItemGroup->AddItem(dwItemVnum, dwPct, iCount); continue; } break; } m_map_pkLevelItemGroup.insert(std::map<DWORD, CLevelItemGroup*>::value_type(iMobVnum, pkLevelItemGroup)); } else if (strType == "thiefgloves") { CBuyerThiefGlovesItemGroup* pkGroup = M2_NEW CBuyerThiefGlovesItemGroup(0, iMobVnum, stName); for (int k = 1; k < 256; ++k) { char buf[4]; snprintf(buf, sizeof(buf), "%d", k); if (loader.GetTokenVector(buf, &pTok)) { std::string& name = pTok->at(0); DWORD dwVnum = 0; if (!GetVnumByOriginalName(name.c_str(), dwVnum)) { str_to_number(dwVnum, name.c_str()); if (!ITEM_MANAGER::instance().GetTable(dwVnum)) { sys_err("ReadDropItemGroup : there is no item %s : node %s", name.c_str(), stName.c_str()); M2_DELETE(pkGroup); return false; } } int iCount = 0; str_to_number(iCount, pTok->at(1).c_str()); if (iCount < 1) { sys_err("ReadMonsterDropItemGroup : there is no count for item %s : node %s", name.c_str(), stName.c_str()); M2_DELETE(pkGroup); return false; } float fPercent = atof(pTok->at(2).c_str()); DWORD dwPct = (DWORD)(10000.0f * fPercent); sys_log(0," name %s pct %d count %d", name.c_str(), dwPct, iCount); pkGroup->AddItem(dwVnum, dwPct, iCount); continue; } break; } m_map_pkGloveItemGroup.insert(std::map<DWORD, CBuyerThiefGlovesItemGroup*>::value_type(iMobVnum, pkGroup)); } else { sys_err("ReadMonsterDropItemGroup : Syntax error %s : invalid type %s (kill|drop), node %s", c_pszFileName, strType.c_str(), stName.c_str()); loader.SetParentNode(); return false; } loader.SetParentNode(); } return true; } Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 (edited) Can anyone help me solve this problem? Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted December 4, 2015 Former Staff Share Posted December 4, 2015 Do it again, carefuly this time. Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 46 minutes ago, Shisui said: Do it again, carefuly this time. Can you help me, I do not know much about c ++, I can send you my files? Please. Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted December 4, 2015 Former Staff Share Posted December 4, 2015 Send me that file. Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 21 minutes ago, Shisui said: Send me that file. input_main.cpp Ou This is the hidden content, please Sign In or Sign Up Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted December 4, 2015 Former Staff Share Posted December 4, 2015 Did you tried to add global chat? Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 51 minutes ago, Shisui said: Send me that file. Look before was working, I do not know what gave you are giving this mistake there, I just wanted to solve it to compile. Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted December 4, 2015 Former Staff Share Posted December 4, 2015 17 minutes ago, Shisui said: Did you tried to add global chat? Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 Yes, I tried. Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 19 minutes ago, Shisui said: Yes Link to comment Share on other sites More sharing options...
Former Staff Shisui 490 Posted December 4, 2015 Former Staff Share Posted December 4, 2015 8 hours ago, Metin2Taipan said: Yes You miss some step, redo it carefuly. Link to comment Share on other sites More sharing options...
Metin2Taipan 5 Posted December 4, 2015 Share Posted December 4, 2015 3 hours ago, Shisui said: You miss some step, redo it carefuly. As stated, I do not understand C ++ I have no idea what to do. Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted December 4, 2015 Premium Share Posted December 4, 2015 2 hours ago, Metin2Taipan said: As stated, I do not understand C ++ I have no idea what to do. I answered to you in other community you posted your issue. Go to your config.h and add this: extern int gSpecialShout; extern int MasterGhostChat; extern int MasterColorEmpire; extern int MasterLevelChat; extern int PlayerColorEmpire; extern int PlayerLevelChat; Go to your config.cpp and add this: int gSpecialShout = 0; int MasterGhostChat = 0; int MasterColorEmpire = 0; int MasterLevelChat = 0; int PlayerColorEmpire = 0; int PlayerLevelChat = 0; 0= deactivated 1= activated You can set it to 1 in config files of your cores, or just edit config.cpp variables to be = 1. "was not declared in this scope" means your using a variable that you didnt previously declared. Link to comment Share on other sites More sharing options...
alexandru1992 0 Posted January 4, 2016 Share Posted January 4, 2016 Hi guys ,i have a big problem with my game or client binary i don't know really what's the problem , i'm trying to figure it out for about 2 weeks and nothing, i searched on google ,other forums but my searches were in vain so i hope you will help me so let me tell you about my "bug" : so i created a server , i installed unix ,ports all stuffs on a pc portforwarded the ports i need through router all were good until someone tried to login ,he was kick out when he selected his character and i don't f**king know why this stupid thing drives me crayzi, if i login on my internal network even from external ip it works ,but when my friend tries to connect nothing, it kicks him to the login again and again, i saw that it's already a post related to that on this forum named, if i think well "40250 game problem" , i follow those steps with bind_ip and other stuff but when i bind the ip it says to me that "can't bind that adress " i don't know again why ,i tried all possible things even change the game with other and same ,of course it was same version 40k ,what do you recommend me to do guys?And i mentioned i have static ip .I don't know what to do please help me if you know of course ,many people avoid to answer at this question "how to resolve kick login" please don't avoid me too. Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted January 4, 2016 Premium Share Posted January 4, 2016 1 hour ago, alexandru1992 said: Hi guys ,i have a big problem with my game or client binary i don't know really what's the problem , i'm trying to figure it out for about 2 weeks and nothing, i searched on google ,other forums but my searches were in vain so i hope you will help me so let me tell you about my "bug" : so i created a server , i installed unix ,ports all stuffs on a pc portforwarded the ports i need through router all were good until someone tried to login ,he was kick out when he selected his character and i don't f**king know why this stupid thing drives me crayzi, if i login on my internal network even from external ip it works ,but when my friend tries to connect nothing, it kicks him to the login again and again, i saw that it's already a post related to that on this forum named, if i think well "40250 game problem" , i follow those steps with bind_ip and other stuff but when i bind the ip it says to me that "can't bind that adress " i don't know again why ,i tried all possible things even change the game with other and same ,of course it was same version 40k ,what do you recommend me to do guys?And i mentioned i have static ip .I don't know what to do please help me if you know of course ,many people avoid to answer at this question "how to resolve kick login" please don't avoid me too. Well, for me this usually works: Try to replace this in your desc_client.cpp: replace the g_szPublicIP to your ip adress (like memcpy(p.szIP, "69.69.69.69", 16) in this: if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, g_szPublicIP, 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } If it didn't solve the problem, then replace the same variable in this one too: strlcpy(p.szPublicIP, g_szPublicIP, sizeof(p.szPublicIP)); On windows, doing only the first part solves the problem for me, but on BSD, usually I have to do both. (Don't ask me why...) 2 The one and only UI programming guideline Link to comment Share on other sites More sharing options...
alexandru1992 0 Posted January 4, 2016 Share Posted January 4, 2016 Ok so if i get it right i should replace in this piece of code from my source g_szPublicIP with what you've told me ? but i see it is already as you told me (PS: i use gazer's game and files for the test server, i haven't tested a clean source to see what happends i will test and let you know if it work in case it doesn't works what should i do ? can you let me a skype adress in private or something to debug this thing please you would make my day better ) Spoiler void CLIENT_DESC::SetPhase(int iPhase) { switch (iPhase) { case PHASE_CLIENT_CONNECTING: sys_log(1, "PHASE_CLIENT_DESC::CONNECTING"); m_pInputProcessor = NULL; break; case PHASE_DBCLIENT: { sys_log(1, "PHASE_DBCLIENT"); if (!g_bAuthServer) { static bool bSentBoot = false; if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, g_szPublicIP, 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } } TEMP_BUFFER buf; TPacketGDSetup p; memset(&p, 0, sizeof(p)); strlcpy(p.szPublicIP, g_szPublicIP, sizeof(p.szPublicIP)); if (!g_bAuthServer) { p.bChannel = g_bChannel; p.wListenPort = mother_port; p.wP2PPort = p2p_port; p.bAuthServer = false; map_allow_copy(p.alMaps, 32); const DESC_MANAGER::DESC_SET & c_set = DESC_MANAGER::instance().GetClientSet(); DESC_MANAGER::DESC_SET::const_iterator it; for (it = c_set.begin(); it != c_set.end(); ++it) { LPDESC d = *it; if (d->GetAccountTable().id != 0) ++p.dwLoginCount; } buf.write(&p, sizeof(p)); if (p.dwLoginCount) { TPacketLoginOnSetup pck; for (it = c_set.begin(); it != c_set.end(); ++it) { LPDESC d = *it; TAccountTable & r = d->GetAccountTable(); if (r.id != 0) { pck.dwID = r.id; strlcpy(pck.szLogin, r.login, sizeof(pck.szLogin)); strlcpy(pck.szSocialID, r.social_id, sizeof(pck.szSocialID)); strlcpy(pck.szHost, d->GetHostName(), sizeof(pck.szHost)); pck.dwLoginKey = d->GetLoginKey(); #ifndef _IMPROVED_PACKET_ENCRYPTION_ thecore_memcpy(pck.adwClientKey, d->GetDecryptionKey(), 16); #endif buf.write(&pck, sizeof(TPacketLoginOnSetup)); } } } sys_log(0, "DB_SETUP current user %d size %d", p.dwLoginCount, buf.size()); // ĆÄĆĽ¸¦ Ăł¸®ÇŇ Ľö ŔÖ°Ô µĘ. CPartyManager::instance().EnablePCParty(); //CPartyManager::instance().SendPartyToDB(); } else { p.bAuthServer = true; buf.write(&p, sizeof(p)); } DBPacket(HEADER_GD_SETUP, 0, buf.read_peek(), buf.size()); m_pInputProcessor = &m_inputDB; } break; case PHASE_P2P: sys_log(1, "PHASE_P2P"); if (m_lpInputBuffer) buffer_reset(m_lpInputBuffer); if (m_lpOutputBuffer) buffer_reset(m_lpOutputBuffer); m_pInputProcessor = &m_inputP2P; break; case PHASE_CLOSE: m_pInputProcessor = NULL; break; case PHASE_TEEN: m_inputTeen.SetStep(0); m_pInputProcessor = &m_inputTeen; break; } m_iPhase = iPhase; } Link to comment Share on other sites More sharing options...
Premium masodikbela 1359 Posted January 4, 2016 Premium Share Posted January 4, 2016 So. Firstly, try to replace the g_szPublicIP variable, to your ip only in this part: Spoiler if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, g_szPublicIP, 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } An example: Spoiler if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, "write.your.ip.here", 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } IF it doesn't solve the problem, then you should replace the g_szPublicIP variable to your ip in this line too: Spoiler strlcpy(p.szPublicIP, g_szPublicIP, sizeof(p.szPublicIP)); 1 The one and only UI programming guideline 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