Jump to content

Fernando

Inactive Member
  • Posts

    63
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by Fernando

  1. Hello devs, i want to ask you something.. Im running my root server in my freebsd 9.3 and my serverfiles are running good, so my question is if i get freebsd 10.3 does i need to change something or etc?
  2. Guys does someone fixed the offline shop by ken? with this system i have almost same errors...
  3. Hello devs, i have problem with my client, when i select character my game window is exitting and i have the following syserr:(i got the path and the image what says it's missing what could be the problem?) 0810 12:41:14148 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR 0810 12:41:23425 :: CreateFromMemoryFile: Cannot create texture 0810 12:41:23426 :: ui:3436: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 0810 12:41:23428 :: uiDragonSoul.py(line:61) __LoadWindow ui.py(line:3091) LoadScriptFile ui.py(line:3291) LoadChildren ui.py(line:3157) LoadChildren ui.py(line:3436) LoadElementExpandedImage dragonsoulwindow.LoadWindow.LoadObject - <type 'exceptions.RuntimeError'>:Failed to load image (filename: d:/ymir work/ui/dragonsoul/dragon_soul_bg.tga) 0810 12:41:23428 :: ============================================================================================================ 0810 12:41:23428 :: Abort!!!!
  4. can you reupload metin2_patch_ds.eix / epk download please.
  5. Thanks for your reply, also i needed this code just to notice some cheatings some proof's and etc, but in other side it's bad for players, yes you are right.
  6. Hello Devs, i'm interested how do i create new file who will save my logs example: in input_main.cpp i changed whisper logs to be stored in sys_log or syslog file in ch1 folder in serverfiles. So my idea is how to create new logfile for example whisperlog file who will store my logs?
  7. yes, i have the image in the path but it was another problem, i solved it by myself
  8. Hello Devs, i have problem with my client.. I tryed to install okey card event and i installed almost all is working fine but when i open client i got this error:(but i have the image in the path) What can be the problem could someone help me? 0710 14:52:04562 :: uiCards.py(line:159) LoadWindow ui.py(line:3061) LoadScriptFile ui.py(line:3261) LoadChildren ui.py(line:3127) LoadChildren ui.py(line:3406) LoadElementExpandedImage minigamerumigamepage.LoadDialog.LoadScript - <type 'exceptions.RuntimeError'>:Failed to load image (filename: d:/ymir work/ui/minigame/rumi/rumi_bg.tga) 0710 14:52:04562 :: ============================================================================================================ 0710 14:52:04562 :: Abort!!!!
  9. Hello devs, i tryed to edit max gold in server i edited by tutorial of T4UMP almost all works fine what i edited by his tutoria, but offline shop doesnt work, in some reply he said that i need to edit some files of offline shop could someone help me the same problem i got like this guy
  10. I have the same problem how do i fix this? Did you fixed both problems?
  11. Hello Developers, Today i tryed to install gaya system on my server and after i installed the gaya taskbar in my client i got error while client is loading window to enter in game. here is the syserr: Plese help me to fix this error.. 0211 21:48:12364 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR 0211 21:48:21189 :: Traceback (most recent call last): 0211 21:48:21189 :: File "networkModule.py", line 240, in SetGamePhase 0211 21:48:21189 :: File "game.py", line 127, in __init__ 0211 21:48:21189 :: File "interfaceModule.py", line 449, in MakeInterface 0211 21:48:21189 :: File "interfaceModule.py", line 259, in __MakeTaskBar 0211 21:48:21190 :: File "uiTaskBar.py", line 518, in LoadWindow 0211 21:48:21190 :: File "ui.py", line 2942, in GetChild 0211 21:48:21190 :: KeyError 0211 21:48:21190 :: : 0211 21:48:21190 :: 'ExpandMoneyButton' 0211 21:48:21190 ::
  12. Thanks for your reply, could you help me to fix this?
  13. Hello Devs! I tryed to change gold limit in my server and i've got problem while im compiling shop_manager.cpp i can show you error and the file. Help me plase #include "stdafx.h" #include "../../libgame/include/grid.h" #include "constants.h" #include "utils.h" #include "config.h" #include "shop.h" #include "desc.h" #include "desc_manager.h" #include "char.h" #include "char_manager.h" #include "item.h" #include "item_manager.h" #include "buffer_manager.h" #include "packet.h" #include "log.h" #include "db.h" #include "questmanager.h" #include "monarch.h" #include "mob_manager.h" #include "locale_service.h" #include "desc_client.h" #include "shop_manager.h" #include "group_text_parse_tree.h" #include "shopEx.h" #include <boost/algorithm/string/predicate.hpp> #include "shop_manager.h" #include <cctype> CShopManager::CShopManager() { } CShopManager::~CShopManager() { Destroy(); } bool CShopManager::Initialize(TShopTable * table, int size) { if (!m_map_pkShop.empty()) return false; int i; for (i = 0; i < size; ++i, ++table) { LPSHOP shop = M2_NEW CShop; if (!shop->Create(table->dwVnum, table->dwNPCVnum, table->items)) { M2_DELETE(shop); continue; } m_map_pkShop.insert(TShopMap::value_type(table->dwVnum, shop)); m_map_pkShopByNPCVnum.insert(TShopMap::value_type(table->dwNPCVnum, shop)); } char szShopTableExFileName[256]; snprintf(szShopTableExFileName, sizeof(szShopTableExFileName), "%s/shop_table_ex.txt", LocaleService_GetBasePath().c_str()); return ReadShopTableEx(szShopTableExFileName); } void CShopManager::Destroy() { TShopMap::iterator it = m_map_pkShop.begin(); while (it != m_map_pkShop.end()) { M2_DELETE(it->second); ++it; } m_map_pkShop.clear(); } LPSHOP CShopManager::Get(DWORD dwVnum) { TShopMap::const_iterator it = m_map_pkShop.find(dwVnum); if (it == m_map_pkShop.end()) return NULL; return (it->second); } LPSHOP CShopManager::GetByNPCVnum(DWORD dwVnum) { TShopMap::const_iterator it = m_map_pkShopByNPCVnum.find(dwVnum); if (it == m_map_pkShopByNPCVnum.end()) return NULL; return (it->second); } /* * ÀÎÅÍÆäÀ̽º ÇÔ¼öµé */ // »óÁ¡ °Å·¡¸¦ ½ÃÀÛ bool CShopManager::StartShopping(LPCHARACTER pkChr, LPCHARACTER pkChrShopKeeper, int iShopVnum) { if (pkChr->GetShopOwner() == pkChrShopKeeper) return false; // this method is only for NPC if (pkChrShopKeeper->IsPC()) return false; //PREVENT_TRADE_WINDOW if (pkChr->IsOpenSafebox() || pkChr->GetExchange() || pkChr->GetMyShop() || pkChr->IsCubeOpen()) { pkChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´Ù¸¥ °Å·¡Ã¢ÀÌ ¿­¸°»óÅ¿¡¼­´Â »óÁ¡°Å·¡¸¦ ÇÒ¼ö °¡ ¾ø½À´Ï´Ù.")); return false; } //END_PREVENT_TRADE_WINDOW long distance = DISTANCE_APPROX(pkChr->GetX() - pkChrShopKeeper->GetX(), pkChr->GetY() - pkChrShopKeeper->GetY()); if (distance >= SHOP_MAX_DISTANCE) { sys_log(1, "SHOP: TOO_FAR: %s distance %d", pkChr->GetName(), distance); return false; } LPSHOP pkShop; if (iShopVnum) pkShop = Get(iShopVnum); else pkShop = GetByNPCVnum(pkChrShopKeeper->GetRaceNum()); if (!pkShop) { sys_log(1, "SHOP: NO SHOP"); return false; } bool bOtherEmpire = false; if (pkChr->GetEmpire() != pkChrShopKeeper->GetEmpire()) bOtherEmpire = true; pkShop->AddGuest(pkChr, pkChrShopKeeper->GetVID(), bOtherEmpire); pkChr->SetShopOwner(pkChrShopKeeper); sys_log(0, "SHOP: START: %s", pkChr->GetName()); return true; } LPSHOP CShopManager::FindPCShop(DWORD dwVID) { TShopMap::iterator it = m_map_pkShopByPC.find(dwVID); if (it == m_map_pkShopByPC.end()) return NULL; return it->second; } LPSHOP CShopManager::CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, BYTE bItemCount) { if (FindPCShop(ch->GetVID())) return NULL; LPSHOP pkShop = M2_NEW CShop; pkShop->SetPCShop(ch); pkShop->SetShopItems(pTable, bItemCount); m_map_pkShopByPC.insert(TShopMap::value_type(ch->GetVID(), pkShop)); return pkShop; } void CShopManager::DestroyPCShop(LPCHARACTER ch) { LPSHOP pkShop = FindPCShop(ch->GetVID()); if (!pkShop) return; //PREVENT_ITEM_COPY; ch->SetMyShopTime(); //END_PREVENT_ITEM_COPY m_map_pkShopByPC.erase(ch->GetVID()); M2_DELETE(pkShop); } // »óÁ¡ °Å·¡¸¦ Á¾·á void CShopManager::StopShopping(LPCHARACTER ch) { LPSHOP shop; if (!(shop = ch->GetShop())) return; //PREVENT_ITEM_COPY; ch->SetMyShopTime(); //END_PREVENT_ITEM_COPY shop->RemoveGuest(ch); sys_log(0, "SHOP: END: %s", ch->GetName()); } // ¾ÆÀÌÅÛ ±¸ÀÔ void CShopManager::Buy(LPCHARACTER ch, BYTE pos) { if (!ch->GetShop()) return; if (!ch->GetShopOwner()) return; if (DISTANCE_APPROX(ch->GetX() - ch->GetShopOwner()->GetX(), ch->GetY() - ch->GetShopOwner()->GetY()) > 2000) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óÁ¡°úÀÇ °Å¸®°¡ ³Ê¹« ¸Ö¾î ¹°°ÇÀ» »ì ¼ö ¾ø½À´Ï´Ù.")); return; } CShop* pkShop = ch->GetShop(); if (!pkShop->IsPCShop()) { //if (pkShop->GetVnum() == 0) // return; //const CMob* pkMob = CMobManager::instance().Get(pkShop->GetNPCVnum()); //if (!pkMob) // return; //if (pkMob->m_table.bType != CHAR_TYPE_NPC) //{ // return; //} } else { } //PREVENT_ITEM_COPY ch->SetMyShopTime(); //END_PREVENT_ITEM_COPY int ret = pkShop->Buy(ch, pos); if (SHOP_SUBHEADER_GC_OK != ret) // ¹®Á¦°¡ ÀÖ¾úÀ¸¸é º¸³½´Ù. { TPacketGCShop pack; pack.header = HEADER_GC_SHOP; pack.subheader = ret; pack.size = sizeof(TPacketGCShop); ch->GetDesc()->Packet(&pack, sizeof(pack)); } } void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) { if (!ch->GetShop()) return; if (!ch->GetShopOwner()) return; if (!ch->CanHandleItem()) return; if (ch->GetShop()->IsPCShop()) return; if (DISTANCE_APPROX(ch->GetX()-ch->GetShopOwner()->GetX(), ch->GetY()-ch->GetShopOwner()->GetY())>2000) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»óÁ¡°úÀÇ °Å¸®°¡ ³Ê¹« ¸Ö¾î ¹°°ÇÀ» ÆÈ ¼ö ¾ø½À´Ï´Ù.")); return; } LPITEM item = ch->GetInventoryItem(bCell); if (!item) return; if (item->IsEquipped() == true) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Âø¿ë ÁßÀÎ ¾ÆÀÌÅÛÀº ÆǸÅÇÒ ¼ö ¾ø½À´Ï´Ù.")); return; } if (true == item->isLocked()) { return; } if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_SELL)) return; DWORD dwPrice; if (bCount == 0 || bCount > item->GetCount()) bCount = item->GetCount(); dwPrice = item->GetShopBuyPrice(); if (IS_SET(item->GetFlag(), ITEM_FLAG_COUNT_PER_1GOLD)) { if (dwPrice == 0) dwPrice = bCount; else dwPrice = bCount / dwPrice; } else dwPrice *= bCount; dwPrice /= 5; //¼¼±Ý °è»ê DWORD dwTax = 0; int iVal = 0; if (LC_IsYMIR() || LC_IsKorea()) { dwTax = dwPrice * iVal / 100; dwPrice -= dwTax; } else { dwTax = dwPrice * iVal/100; dwPrice -= dwTax; } if (test_server) sys_log(0, "Sell Item price id %d %s itemid %d", ch->GetPlayerID(), ch->GetName(), item->GetID()); const long long nTotalMoney = static_cast<long long>(ch->GetGold()) + static_cast<long long>(dwPrice); if (g_llMaxGold < nTotalMoney) { sys_err("[OVERFLOW_GOLD] id %u name %s gold %lld", ch->GetPlayerID(), ch->GetName(), ch->GetGold()); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20ľďłÉŔĚ ĂĘ°úÇĎż© ą°Ç°Ŕ» ĆČĽö ľř˝Ŕ´Ď´Ů.")); return; } // 20050802.myevan.»óÁ¡ ÆǸŠ·Î±×¿¡ ¾ÆÀÌÅÛ ID Ãß°¡ sys_log(0, "SHOP: SELL: %s item name: %s(x%d):%u price: %u", ch->GetName(), item->GetName(), bCount, item->GetID(), dwPrice); if (iVal > 0) ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÆǸűݾ×ÀÇ %d %% °¡ ¼¼±ÝÀ¸·Î ³ª°¡°ÔµË´Ï´Ù"), iVal); DBManager::instance().SendMoneyLog(MONEY_LOG_SHOP, item->GetVnum(), dwPrice); if (bCount == item->GetCount()) { // Çѱ¹¿¡´Â ¾ÆÀÌÅÛÀ» ¹ö¸®°í º¹±¸ÇØ´Þ¶ó´Â Áø»óÀ¯ÀúµéÀÌ ¸¹¾Æ¼­ // »óÁ¡ ÆǸŽà ¼Ó¼º·Î±×¸¦ ³²±ä´Ù. if (LC_IsYMIR()) item->AttrLog(); ITEM_MANAGER::instance().RemoveItem(item, "SELL"); } else item->SetCount(item->GetCount() - bCount); //±ºÁÖ ½Ã½ºÅÛ : ¼¼±Ý ¡¼ö CMonarch::instance().SendtoDBAddMoney(dwTax, ch->GetEmpire(), ch); ch->PointChange(POINT_GOLD, dwPrice, false); } bool CompareShopItemName(const SShopItemTable& lhs, const SShopItemTable& rhs) { TItemTable* lItem = ITEM_MANAGER::instance().GetTable(lhs.vnum); TItemTable* rItem = ITEM_MANAGER::instance().GetTable(rhs.vnum); if (lItem && rItem) return strcmp(lItem->szLocaleName, rItem->szLocaleName) < 0; else return true; } bool ConvertToShopItemTable(IN CGroupNode* pNode, OUT TShopTableEx& shopTable) { if (!pNode->GetValue("vnum", 0, shopTable.dwVnum)) { sys_err("Group %s does not have vnum.", pNode->GetNodeName().c_str()); return false; } if (!pNode->GetValue("name", 0, shopTable.name)) { sys_err("Group %s does not have name.", pNode->GetNodeName().c_str()); return false; } if (shopTable.name.length() >= SHOP_TAB_NAME_MAX) { sys_err("Shop name length must be less than %d. Error in Group %s, name %s", SHOP_TAB_NAME_MAX, pNode->GetNodeName().c_str(), shopTable.name.c_str()); return false; } std::string stCoinType; if (!pNode->GetValue("cointype", 0, stCoinType)) { stCoinType = "Gold"; } if (boost::iequals(stCoinType, "Gold")) { shopTable.coinType = SHOP_COIN_TYPE_GOLD; } else if (boost::iequals(stCoinType, "SecondaryCoin")) { shopTable.coinType = SHOP_COIN_TYPE_SECONDARY_COIN; } else { sys_err("Group %s has undefine cointype(%s).", pNode->GetNodeName().c_str(), stCoinType.c_str()); return false; } CGroupNode* pItemGroup = pNode->GetChildNode("items"); if (!pItemGroup) { sys_err("Group %s does not have 'group items'.", pNode->GetNodeName().c_str()); return false; } int itemGroupSize = pItemGroup->GetRowCount(); std::vector <TShopItemTable> shopItems(itemGroupSize); if (itemGroupSize >= SHOP_HOST_ITEM_MAX_NUM) { sys_err("count(%d) of rows of group items of group %s must be smaller than %d", itemGroupSize, pNode->GetNodeName().c_str(), SHOP_HOST_ITEM_MAX_NUM); return false; } for (int i = 0; i < itemGroupSize; i++) { if (!pItemGroup->GetValue(i, "vnum", shopItems[i].vnum)) { sys_err("row(%d) of group items of group %s does not have vnum column", i, pNode->GetNodeName().c_str()); return false; } if (!pItemGroup->GetValue(i, "count", shopItems[i].count)) { sys_err("row(%d) of group items of group %s does not have count column", i, pNode->GetNodeName().c_str()); return false; } if (!pItemGroup->GetValue(i, "price", shopItems[i].price)) { sys_err("row(%d) of group items of group %s does not have price column", i, pNode->GetNodeName().c_str()); return false; } } std::string stSort; if (!pNode->GetValue("sort", 0, stSort)) { stSort = "None"; } if (boost::iequals(stSort, "Asc")) { std::sort(shopItems.begin(), shopItems.end(), CompareShopItemName); } else if(boost::iequals(stSort, "Desc")) { std::sort(shopItems.rbegin(), shopItems.rend(), CompareShopItemName); } CGrid grid = CGrid(5, 9); int iPos; memset(&shopTable.items[0], 0, sizeof(shopTable.items)); for (int i = 0; i < shopItems.size(); i++) { TItemTable * item_table = ITEM_MANAGER::instance().GetTable(shopItems[i].vnum); if (!item_table) { sys_err("vnum(%d) of group items of group %s does not exist", shopItems[i].vnum, pNode->GetNodeName().c_str()); return false; } iPos = grid.FindBlank(1, item_table->bSize); grid.Put(iPos, 1, item_table->bSize); shopTable.items[iPos] = shopItems[i]; } shopTable.byItemCount = shopItems.size(); return true; } bool CShopManager::ReadShopTableEx(const char* stFileName) { // file À¯¹« üũ. // ¾ø´Â °æ¿ì´Â ¿¡·¯·Î ó¸®ÇÏÁö ¾Ê´Â´Ù. FILE* fp = fopen(stFileName, "rb"); if (NULL == fp) return true; fclose(fp); CGroupTextParseTreeLoader loader; if (!loader.Load(stFileName)) { sys_err("%s Load fail.", stFileName); return false; } CGroupNode* pShopNPCGroup = loader.GetGroup("shopnpc"); if (NULL == pShopNPCGroup) { sys_err("Group ShopNPC is not exist."); return false; } typedef std::multimap <DWORD, TShopTableEx> TMapNPCshop; TMapNPCshop map_npcShop; for (int i = 0; i < pShopNPCGroup->GetRowCount(); i++) { DWORD npcVnum; std::string shopName; if (!pShopNPCGroup->GetValue(i, "npc", npcVnum) || !pShopNPCGroup->GetValue(i, "group", shopName)) { sys_err("Invalid row(%d). Group ShopNPC rows must have 'npc', 'group' columns", i); return false; } std::transform(shopName.begin(), shopName.end(), shopName.begin(), (int(*)(int))std::tolower); CGroupNode* pShopGroup = loader.GetGroup(shopName.c_str()); if (!pShopGroup) { sys_err("Group %s is not exist.", shopName.c_str()); return false; } TShopTableEx table; if (!ConvertToShopItemTable(pShopGroup, table)) { sys_err("Cannot read Group %s.", shopName.c_str()); return false; } if (m_map_pkShopByNPCVnum.find(npcVnum) != m_map_pkShopByNPCVnum.end()) { sys_err("%d cannot have both original shop and extended shop", npcVnum); return false; } map_npcShop.insert(TMapNPCshop::value_type(npcVnum, table)); } for (TMapNPCshop::iterator it = map_npcShop.begin(); it != map_npcShop.end(); ++it) { DWORD npcVnum = it->first; TShopTableEx& table = it->second; if (m_map_pkShop.find(table.dwVnum) != m_map_pkShop.end()) { sys_err("Shop vnum(%d) already exists", table.dwVnum); return false; } TShopMap::iterator shop_it = m_map_pkShopByNPCVnum.find(npcVnum); LPSHOPEX pkShopEx = NULL; if (m_map_pkShopByNPCVnum.end() == shop_it) { pkShopEx = M2_NEW CShopEx; pkShopEx->Create(0, npcVnum); m_map_pkShopByNPCVnum.insert(TShopMap::value_type(npcVnum, pkShopEx)); } else { pkShopEx = dynamic_cast <CShopEx*> (shop_it->second); if (NULL == pkShopEx) { sys_err("WTF!!! It can't be happend. NPC(%d) Shop is not extended version.", shop_it->first); return false; } } if (pkShopEx->GetTabCount() >= SHOP_TAB_COUNT_MAX) { sys_err("ShopEx cannot have tab more than %d", SHOP_TAB_COUNT_MAX); return false; } if (pkShopEx->GetVnum() != 0 && m_map_pkShop.find(pkShopEx->GetVnum()) != m_map_pkShop.end()) { sys_err("Shop vnum(%d) already exist.", pkShopEx->GetVnum()); return false; } m_map_pkShop.insert(TShopMap::value_type (pkShopEx->GetVnum(), pkShopEx)); pkShopEx->AddShopTable(table); } return true; }
  14. all configurations i tryed distribute & release too but same issue. + my old bin is 3MB the new bin is 12.6MB too much difference...
  15. Hey, i'm back... i successfully compiled now but when i get the client in bin folder and put in my metin2 folder and i try to open game i see this error:
×
×
  • 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.