Ken

Developer
  • Content count

    800
  • Joined

  • Last visited

Everything posted by Ken

  1. A small fix about a query of messenger system. When you remove any person on your list, the companion will continue to see your name on his list (when the companion relog in the game again). This query will remove both of them's contact in the database. Best Regards Ken
  2. Hi, I'd like to share a small fix about the messenger system. what exactly are we fixing? The main problem is when you remove any person from your list, the companion's messenger list is not refreshing until relog in. Webzen has fixed this situation with a small packet. That packet will provide to remove the name from the list. There is no part of Python because it's already done by Ymir. For serverside For client side Best Regards Ken
  3. I've updated the codes again. Good luck
  4. open

    @Johnny69 I have looked at the binary file. The only way that you must need to have a Brazil IP Address. I have thought they're blocking it with block country feature of metin2 but when I look at a bit deeper, I saw it wasn't. They're blocking the whole IP addresses on their firewall. About Xigncode - Most people are saying that it's just joke. Also, I'm thinking about why Xigncode is forcing binary to close itself. (Could be incompatible because when I watch the process on Process Hacker 2, the operating system is only running WerFault.exe) When logininfo.py (I'm not talking about loginInfo.xml) is running, it's reading locale.cfg to change something inside. (Including IP Addresses)
  5. open

    I tried to ping the ip addresses but it looks like it's dead. (Including many countries). I think, there is no way to login the server without brazil ip address. Did you try to login the server with a brazil ip address?
  6. open

    After @Johnny69's file, the client is working fine. The only problem is why the server is not respond to client about '..' Did you figure out or still same?
  7. open

    I have the same problem at the moment. Xigncode is forcing binary to close for one reason. I have thought that they have blocked the ip addresses. However, it looks like xigncode is blocking us If I find any way, I'll let you know about it. PS1: It looks like Xigncode is incompatible with Windows 10. (That's the reason why you can't open it - I guess) The operating system is trying to stop it (Werfault.exe) when you try to open metin2client.bin. I will test the server on the other operating system.
  8. open

    Can you post the brazil server's ip address and ports? I'd like to test something on it, then I can tell you. Best Regards Ken
  9. You might right about tetris game
  10. This release is just information about fish event. I just made the class from their binary files. Some functions are not still accessible yet because of define flags. class FishEventGridSlotWindow(Window): def __init__(self): Window.__init__(self) self.startIndex = 0 def __del__(self): Window.__del__(self) def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterFishEventGridSlotWindow(self, layer) def ArrangeSlot(self, startIndex, xCount, yCount, xSize, ySize, xBlank, yBlank): self.startIndex = startIndex wndMgr.ArrangeSlot(self.hWnd, startIndex, xCount, yCount, xSize, ySize, xBlank, yBlank) def GetStartIndex(self): return self.startIndex # The newest compiled binary file is not contain this function yet. (ENABLE_FISH_EVENT) def SetPickedAreaRender(self, unkArg1): pass Best Regards Ken
  11. open

    I agree with you about that. You don't have to follow what exactly ymir did until now. (Except a few things). About code's readability, you can use comment line for that. About naming variables, you're right. It still depends on you. You can use it or not. Best Regards Ken
  12. open

    It depends on you. In my case, pkItem is useless if you're just using that for a condition. if (ch->GetItem(p->ItemPos) && ch->GetItem(p->ItemPos)->IsEquipped()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Storage> You can't store an equiped item.")); return; } I think, it's much better now Best Regards Ken
  13. open

    LPITEM pkItem = ch->GetItem(p->ItemPos); // Make sure pkItem is not null pointer. Without that condition, the channel might down. if (pkItem && true == pkItem->IsEquipped()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<Storage> You can't store an equiped item.")); return; } Best Regards Ken
  14. open

    It looks like it's still NPC. Try this 20338 ???????? Soccer 1 0 3 250 0 STUN,SLOW,CURSE,TERROR 0 bkarcher 0 0 0 0 0 0 0 1000000 10 100 0 0 10 999 100 100 0 100 5000 0 0 0 0 0 0 0 0 100 100 100 100 100 100 100 100 100 100 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Also, I looked Metin2.SG's football event. A game master send a duel for each them and starting. (I know it's manual) Best Regards Ken
  15. You need to a trigger for that to start timer in that map. It could be a login or logout or kill or pick up and so on for trigger. when login with pc.get_map_index() == xx begin server_timer("WhatEverYouCall", Number) end when WhatEverYouCall.server_timer begin regen_in_map(mapindex, path) end I just wanted to give a basic simple for you to understand. Best Regards Ken
  16. open

    Metin2.SG made the football as a mob not a npc. You just need to change type of the football. Then you can attack it Best Regards Ken
  17. solved

    You just have to search the function name in the files. You just need to include it in the cpp file when you found. Best Regards Ken
  18. solved

    It's probably missing the library in liblua folder (liblua.a). You just have to recompile liblua again. Best Regards Ken
  19. Second fix - Description (Totally fix) Even If you don't use escape string for the companion, the function will search companion and account in the maps. If the result is not positive, the function will stop itself and write a log in syserr. Search this in messenger_manager.cpp void MessengerManager::RemoveFromList(MessengerManager::keyA account, MessengerManager::keyA companion) Replace with this void MessengerManager::RemoveFromList(MessengerManager::keyA account, MessengerManager::keyA companion) { if (companion.empty()) return; // Second fix if (m_Relation[account].find(companion) == m_Relation[account].end() || m_InverseRelation[companion].find(account) == m_InverseRelation[companion].end()) { LPCHARACTER ch = CHARACTER_MANAGER::Instance().FindPC(account.c_str()); if (ch) { sys_err("MessengerManager::RemoveFromList: %s tries to use messenger sql injection", ch->GetName()); if (ch->GetDesc()) ch->GetDesc()->DelayedDisconnect(3); } else sys_err("MessengerManager::RemoveFromList: Omg! The ghost tried to use this function!"); return; } sys_log(1, "MessengerManager::RemoveFromList: Remove %s %s", account.c_str(), companion.c_str()); DBManager::instance().Query("DELETE FROM messenger_list%s WHERE account='%s' AND companion = '%s'", get_table_postfix(), account.c_str(), companion.c_str()); __RemoveFromList(account, companion); TPacketGGMessenger p2ppck; p2ppck.bHeader = HEADER_GG_MESSENGER_REMOVE; strlcpy(p2ppck.szAccount, account.c_str(), sizeof(p2ppck.szAccount)); strlcpy(p2ppck.szCompanion, companion.c_str(), sizeof(p2ppck.szCompanion));; P2P_MANAGER::instance().Send(&p2ppck, sizeof(TPacketGGMessenger)); } If you want to ban who tries to use this SQL injection, here is a code for you. void MessengerManager::RemoveFromList(MessengerManager::keyA account, MessengerManager::keyA companion) { if (companion.empty()) return; // Second fix if (m_Relation[account].find(companion) == m_Relation[account].end() || m_InverseRelation[companion].find(account) == m_InverseRelation[companion].end()) { LPCHARACTER ch = CHARACTER_MANAGER::Instance().FindPC(account.c_str()); if (ch) { sys_err("MessengerManager::RemoveFromList: %s tries to use messenger sql injection", ch->GetName()); DBManager::Instance().DirectQuery("UPDATE account.account SET status = 'BAN' WHERE id = %u", ch->GetAID()); if (ch->GetDesc()) ch->GetDesc()->DelayedDisconnect(3); } else sys_err("MessengerManager::RemoveFromList: Omg! The ghost tried to use this function!"); return; } sys_log(1, "MessengerManager::RemoveFromList: Remove %s %s", account.c_str(), companion.c_str()); DBManager::instance().Query("DELETE FROM messenger_list%s WHERE account='%s' AND companion = '%s'", get_table_postfix(), account.c_str(), companion.c_str()); __RemoveFromList(account, companion); TPacketGGMessenger p2ppck; p2ppck.bHeader = HEADER_GG_MESSENGER_REMOVE; strlcpy(p2ppck.szAccount, account.c_str(), sizeof(p2ppck.szAccount)); strlcpy(p2ppck.szCompanion, companion.c_str(), sizeof(p2ppck.szCompanion));; P2P_MANAGER::instance().Send(&p2ppck, sizeof(TPacketGGMessenger)); }
  20. With new changes, webzen is added new things in item proto. The newest item proto has two new bytes and vnum range. Here is the newest item proto struct typedef struct { DWORD dwVnum; DWORD dwVnumRange; char szName[ITEM_NAME_MAX_LEN + 1]; char szLocaleName[ITEM_NAME_MAX_LEN + 1]; BYTE bType; BYTE bSubType; BYTE bWeight; BYTE bSize; DWORD dwAntiFlags; DWORD dwFlags; DWORD dwWearFlags; DWORD dwImmuneFlag; DWORD dwGold; DWORD dwShopBuyPrice; TItemLimit aLimits[ITEM_LIMIT_MAX_NUM]; TItemApply aApplies[ITEM_APPLY_MAX_NUM]; long alValues[ITEM_VALUES_MAX_NUM]; long alSockets[ITEM_SOCKET_MAX_NUM]; DWORD dwRefinedVnum; WORD wRefineSet; BYTE bAlterToMagicItemPct; BYTE bSpecular; BYTE bGainSocketPct; BYTE bMaskType; BYTE bMaskSubType; } TClientItemTable; ItemData.cpp BYTE CItemData::GetMaskType() const { return m_ItemTable.bMaskType; } BYTE CItemData::GetMaskSubType() const { return m_ItemTable.bMaskSubType; } PythonItemModule.cpp PyObject * itemGetMaskType(PyObject * poSelf, PyObject * poArgs) { CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer(); if (!pItemData) return Py_BuildException("no selected item data"); return Py_BuildValue("i", pItemData->GetMaskType()); } PyObject * itemGetMaskSubType(PyObject * poSelf, PyObject * poArgs) { CItemData * pItemData = CItemManager::Instance().GetSelectedItemDataPointer(); if (!pItemData) return Py_BuildException("no selected item data"); return Py_BuildValue("i", pItemData->GetMaskSubType()); } Here are the newest item proto text files. http://www.speedyshare.com/G4W3M/ItemProto.rar Best Regards Ken
  21. I think someone still haven't seen this error in game source file or someone fix it but not share on metin2dev.org. What's ever Open your cmd_general.cpp and search this ACMD(do_shutdown) change with this ; ACMD(do_shutdown) { if (!ch->IsGM()) return; if (NULL == ch) { sys_err("Accept shutdown command from %s.", ch->GetName()); } TPacketGGShutdown p; p.bHeader = HEADER_GG_SHUTDOWN; P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShutdown)); Shutdown(10); } Best Regards Ellie
  22. Metin2 Proto Reader 1.0.4View File SubmitterKenSubmitted07/25/15CategoryTools
  23. At first the people can say "what i do if i have loss my phone." You can't loss your phone if you are doing this. What ever Everyone know this system as Google Authenticatior. This is not only for this. GoogleLastPassFacebookDropbox & SpideroakMicrosoftYahoo! MailAmazon Web Services (AWS)A few mmorpg is use this system for theirself games.Step 1 : - Install libqrencode. This lib provide see QR Code in your SSH terminal. cd /usr/ports/graphics/libqrencode make && make install Step 2 : - Install Google Authenticator. cd /usr/ports/security/pam_google_authenticator make && make install Step 3 : - Download Google Authenticator from Google Play and install that. Step 4 : Write this command in your ssh terminal. Write "y" for each question. You will see QR code. Take that QR Code via your android phone. Google Authenticator is show you that program in google play if you don't have Bardcode scanner. google-authenticator Step 5 : Write this command in your ssh terminal. ee /etc/ssh/sshd_config after find this : #ChallengeResponseAuthentication yes Change via this : ChallengeResponseAuthentication yes Step 6 : Write this command in your ssh terminal again. ee /etc/pam.d/sshd file after add this : auth optional /usr/local/lib/pam_google_authenticator.so ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Step 6.5 : Follow this If you are not sure to loss your phone Write this command in your ssh terminal again. ee /etc/pam.d/sshd file after add this auth requisite /usr/local/lib/pam_google_authenticator.so - What is change? Google authenticator give a few password (Step 2 end). Save them When you are trying to log in again, you should write the code from what google authenticator give for pwd. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Step 7 : Write this command in your ssh terminal. service sshd reload - How is work this system ? Google authenticator is create new password in 5-10 seconds. They must know this if someone know your password. Screen from my server. €dit 2: If someone want to apply this theirself webpage, here a link for you ASP.NetPHPKind RegardsZerelth ~ Ellie
  24. Mask Type and mask subtype will use for private shop search. (It's for list the items order by Type and Subtypes) Best Regards Ken