Jump to content

Sonitex

Premium
  • Posts

    521
  • Joined

  • Days Won

    12
  • Feedback

    100%

Everything posted by Sonitex

  1. We can just use the default setup that is used in normal chat packet for displaying notices. UserInterface/PythonNetworkStreamPhaseGame.cpp - CPythonNetworkStream::RecvLocaleChatPacket() // Search: if(!localeString.empty()) CPythonChat::Instance().AppendChat(kChat.type, localeString.c_str()); // Replace: if(localeString.empty()) return true; if (CHAT_TYPE_NOTICE == kChat.type) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetTipMessage", Py_BuildValue("(s)", localeString.c_str())); } else if (CHAT_TYPE_BIG_NOTICE == kChat.type) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetBigMessage", Py_BuildValue("(s)", localeString.c_str())); } else CPythonChat::Instance().AppendChat(kChat.type, localeString.c_str());
  2. I wish I read this post back in 2015 and bought some BTC
  3. Not really familiar with GitHub as I mostly use GitLab and it works perfectly fine there. Add gitignore and exclude every unimportant file such as build files & log files and I am sure you will be able to upload there.
  4. Well done. Just a small tip if you wish to make updates on the files, add them to a git repository for better clarity and easier update management.
  5. Here is also a topic about why the std::iterator has been marked deprecated in C++17 and how to replace it [Hidden Content]
  6. This is the original code from the source, its up to you how you want to edit it. I found no reference about player level limit so I am not sure what you are talking about. Any player that has PK_MODE_PROTECT as his mode and is inside his Empire's map will take no damage from other Empire's players no matter the level.
  7. bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) { [...] { BYTE bMapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(pkChr->GetMapIndex()); if ( pkChr->GetPKMode() == PK_MODE_PROTECT && pkChr->GetEmpire() == bMapEmpire || pkVictim->GetPKMode() == PK_MODE_PROTECT && pkVictim->GetEmpire() == bMapEmpire ) { return false; } } }
  8. Python is really slow compared to C++ so you should do the filtering part inside the binary and forward the data to Python and do the visual parts there.
  9. If the game can handle such large data go for it I guess. Much better than sending a fixed amount of items to the user.
  10. Sending a request for every 10 items to the game core does not sound very practical. I cannot imagine how it would even look like as you would meet unnecessary issues like which items have been sent, which items have been removed/changed but not sent yet etc. and with monkeys on the other side of the client it would result in numerous for loops. I would recommend sending a large packet containing every item that meets the search criteria and then categorize them as you want on the client-side.
  11. By default your query function should return a value based on its result, should be a NULL value in case of failure.
  12. Error will be displayed in your server error logs.
  13. You must increase the parent's window height. If I had to guess, most likely "BeltInventoryLayer" window.
  14. Specular texture is just a white texture applied to the original texture with opacity level equal to specular level. That means even if you increase the specular level it will be the same (Those 100 points in Specular column mean 100% opacity). The correct way to tackle this issue would be editing alpha channel of the texture which impacts area of the shine and it's brightness.
  15. [Hidden Content] Just so you know, I took drop files from a different archive. Here they seem to be incomplete but everything else is fine.
  16. Its probability for that particular group to spawn. If you do not define it, it will be set to 1. Pretty much the same concept as in special_item_group.
  17. It is actually done through item_attr table. First you need to update apply enum and make sure bonuses are in the same order as in enum EApplyTypes in lenght.h. Then you can go and add a new row in the table and edit bonus' properties.
  18. Hey, its pretty easy to set a timer for quests, here is how: when enter begin pc.setqf("time_limit", get_time() + 30 * 60) -- Set a time limit for this quest (30 Minutes) end when letter begin q.set_clock("Time left", pc.getqf("time_limit") - get_time()) -- Set remaining time text on client's Quest window end -- Check time limit under certain actions and update the quest's state (kill, login, enter, chat, button or info) -- if the time has passed. -- Example: when kill begin if pc.getf("quest_name","limit_time") >= get_time() set_state(failure) end end Also, you only need to set the time limit once (at the start of the quest), but you should update remaining time on the client on every quest state.
  19. case USE_ADD_ATTRIBUTE: case USE_CHANGE_ATTRIBUTE: Search for these two in char_item.cpp, they will lead you to item functions that are responsible for adding/changing bonuses.
  20. PythonPlayerInputMouse.cpp void CPythonPlayer::NEW_RefreshMouseWalkingDirection() { CInstanceBase* pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return; switch (m_eReservedMode) { case MODE_CLICK_ITEM: { CPythonItem& rkIT=CPythonItem::Instance(); TPixelPosition kPPosPickedItem; if (rkIT.GetGroundItemPosition(m_dwIIDReserved, &kPPosPickedItem)) { if (pkInstMain->NEW_GetDistanceFromDestPixelPosition(kPPosPickedItem)<20.0f) { CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance(); TPixelPosition kPPosCur; pkInstMain->NEW_GetPixelPosition(&kPPosCur); float fCurRot=pkInstMain->GetRotation(); rkNetStream.SendCharacterStatePacket(kPPosCur, fCurRot, CInstanceBase::FUNC_WAIT, 0); SendClickItemPacket(m_dwIIDReserved); pkInstMain->NEW_Stop(); __ClearReservedAction(); } else { pkInstMain->NEW_MoveToDestPixelPositionDirection(kPPosPickedItem); } } else { __ClearReservedAction(); } break; } Try this
  21. Yeah double drop bonus is not used by default, you must add its functionality by yourself. I couldn't believe it either, been playing this game for 10 years in a lie haha.
  22. Official Metin stones have their models and textures saved there. Unless you are looking for some custom made ones, they are in metinstone folders at monster/monster2.
×
×
  • 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.