Jump to content

VegaS™

Forum Moderator
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    187
  • Feedback

    100%

Everything posted by VegaS™

  1. Doesn't have relevance, just add it where you want in that file, following the code syntax from other functions. As an example, instead of searching for wndMgrIsDisableCoverButton, search for wndMgrHideSlotBaseImage and HideSlotBaseImage. I updated the first post, check it.
  2. [Hidden Content] Do not ask for any help if you are using leaks, we will not help you, it's forbidden, you must contact the owner of the system, source, serverfile...
  3. The bug is caused by self.RefreshQuickSlot() which is called in OnUpdate() at each 0.5 seconds. It also affects the emotion slots, not just the skills. Inside of RefreshQuickSlot is the following snippet: elif player.SLOT_TYPE_SKILL == Type: [...] slot.SetCoverButton(slotNumber) elif player.SLOT_TYPE_EMOTION == Type: [...] slot.SetCoverButton(slotNumber) That part of the code resets the cover button for each slot and resets the up/over/down states. How-To-Fix: root/uiTaskBar.py # Search for: (x2 times) slot.SetCoverButton(slotNumber) # Replace it with: if not slot.HasCoverButton(slotNumber): slot.SetCoverButton(slotNumber) root/ui.py # Search for: def EnableCoverButton(self, slotIndex): wndMgr.EnableCoverButton(self.hWnd, slotIndex) # Add after: def HasCoverButton(self, slot_index): return wndMgr.HasCoverButton(self.hWnd, slot_index) Src/Client/EterPythonLib/PythonSlotWindow.h // Search for: void HideSlotBaseImage(DWORD dwIndex); // Add after: bool HasCoverButton(const DWORD slot_index) { TSlot * slot; if (!GetSlotPointer(slot_index, &slot)) return false; return slot->pCoverButton != nullptr; } Src/Client/EterPythonLib/PythonWindowManagerModule.cpp // Search for: PyObject * wndMgrHideSlotBaseImage(PyObject * poSelf, PyObject * poArgs) { [...] } // Add after: PyObject* wndMgrHasCoverButton(PyObject*, PyObject* poArgs) { UI::CWindow* window; PyTuple_GetWindow(poArgs, 0, &window); int slot_index; PyTuple_GetInteger(poArgs, 1, &slot_index); auto* const slot = dynamic_cast<UI::CSlotWindow*>(window); return Py_BuildValue("b", slot->HasCoverButton(slot_index)); } // Search for: { "HideSlotBaseImage", wndMgrHideSlotBaseImage, METH_VARARGS }, // Add after: { "HasCoverButton", wndMgrHasCoverButton, METH_VARARGS },
  4. Available for sale! For more information: https://www.vegas-projects.com/product/chat-settings/ Related to selling, it's a limited sale, contact me here! Follow this topic for better notifications - Click here!
  5. @xXIntelXx@saralgo123Yes, this system is fully leaked from Aeldra source, the author is @masodikbela. There were many people who sold the system in different forms/designs, so they made the code much worse. We don't support leaks here, topic closed.
  6. You can try something like this: // priv_manager.h time_t GetPrivRemainedTimeByEmpire(BYTE bEmpire, BYTE type); // priv_manager.cpp time_t CPrivManager::GetPrivRemainedTimeByEmpire(BYTE bEmpire, BYTE type) { const auto* pkPrivEmpireData = GetPrivByEmpireEx(bEmpire, type); if (pkPrivEmpireData && pkPrivEmpireData->m_end_time_sec) return pkPrivEmpireData->m_end_time_sec - get_global_time(); return 0; } // How-To-Use // PRIV_ITEM_DROP, PRIV_GOLD_DROP, PRIV_GOLD10_DROP, PRIV_EXP_PCT static auto& priv_manager = CPrivManager::instance(); const auto item_drop_time = priv_manager.GetPrivRemainedTimeByEmpire(ch->GetEmpire(), PRIV_ITEM_DROP); const auto item_drop_bonus = priv_manager.GetPriv(ch, PRIV_ITEM_DROP); if (item_drop_bonus) { const auto hours = item_drop_time / 3600; const auto minutes = (item_drop_time % 3600) / 60; ch->ChatPacket(CHAT_TYPE_NOTICE, "Drop rate: %d%%, active for: %ld hours and %ld minutes!", item_drop_bonus, hours, minutes); } If it works, then you can extend _send_bonus_info function based on my example. UPDATE: I tested it in game, this is the result. Ignore the previous part of tutorial. Srcs/Server/game/src/input_login.cpp Search for: static void _send_bonus_info(LPCHARACTER ch) { int item_drop_bonus = 0; int gold_drop_bonus = 0; int gold10_drop_bonus = 0; int exp_bonus = 0; item_drop_bonus = CPrivManager::instance().GetPriv(ch, PRIV_ITEM_DROP); gold_drop_bonus = CPrivManager::instance().GetPriv(ch, PRIV_GOLD_DROP); gold10_drop_bonus = CPrivManager::instance().GetPriv(ch, PRIV_GOLD10_DROP); exp_bonus = CPrivManager::instance().GetPriv(ch, PRIV_EXP_PCT); if (item_drop_bonus) { ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("¾ÆÀÌÅÛ µå·Ó·ü %d%% Ãß°¡ À̺¥Æ® ÁßÀÔ´Ï´Ù."), item_drop_bonus); } if (gold_drop_bonus) { ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("°ñµå µå·Ó·ü %d%% Ãß°¡ À̺¥Æ® ÁßÀÔ´Ï´Ù."), gold_drop_bonus); } if (gold10_drop_bonus) { ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("´ë¹Ú°ñµå µå·Ó·ü %d%% Ãß°¡ À̺¥Æ® ÁßÀÔ´Ï´Ù."), gold10_drop_bonus); } if (exp_bonus) { ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("°æÇèÄ¡ %d%% Ãß°¡ ȹµæ À̺¥Æ® ÁßÀÔ´Ï´Ù."), exp_bonus); } } Replace it with the following function: [Hidden Content]
  7. @Abel(Tiger)That's right, it's useless to re-declare the lambda function since we can call it from the default method, I really forgot it.
  8. I didn't test it, let me know if it works. There are other solutions as well, with resurrection vnum, but you need a custom function since you want it with a spawn chance. Srcs/Server/game/src/char_battle.cpp [Hidden Content]
  9. The website was closed for 2 months, I was absent in this period. Now is back with a new design, new features, and new products as well. Vegas Projects – Development (vegas-projects.com) Client optimization item Reputation Gaya Badge notification manager [Updated] Messenger renew Pickup option Quick slots Multilanguage Mailbox + other new systems which are mostly finished will be added ASAP
  10. Hi, please read this: [Hidden Content] Links to competing forums are only tolerated if the content of the link is related to the latest posts, for example: a response to a request for help if Metin2 Dev does not have the information, during a public debate... Keep in mind that this is tolerated, if you abuse it for no good reason you can be penalized. Take advantage of missing content to improve Metin2 Dev by creating a new tutorial. No hidden advertising will be approved. Also, I invite all of the people who will see their posts deleted to read all rules, then flame the staff. Your post it had included a link to a competitive forum. You made a post that has nothing related to the subject, just talking about that you did it first back in 2015 but it's a different implementation and how it works here. I was talking in my first reply that this guy copied 1/1 of my tutorial from other forums, not even changing a variable name or the implementation. (see it here) I didn't give you a warning, I have just hidden your post because I thought you didn't do it intentionally and we forgive you, somehow. But from your reactions and how you treat the staff now, I think you would have deserved it. Thanks.
  11. Replace: (default function) void CPetActor::SetName(const char* name) { std::string petName = m_pkOwner->GetName(); if (0 != m_pkOwner && 0 == name && 0 != m_pkOwner->GetName()) { petName += "'s Pet"; } else petName += name; if (true == IsSummoned()) m_pkChar->SetName(petName); m_name = petName; } With: [Hidden Content]
  12. Using touch file.cpp it's updating the file timestamp, you don't have to delete .o and .d files from .obj directory, it's useless. [Hidden Content]
  13. def __init__(self): [...] self.toolTip = uiToolTip.ToolTip() self.toolTip.Hide() self.__Initialize() [...] def __Initialize(self): [...] self.toolTip = None [...] You declared the tooltip variable in the __init__ method, then you set it as None in __Initialize method. You should remove the second declaration, line 110. Also, you've to replace the Close method with this: def Close(self): if self.toolTipSkill: self.toolTipSkill.Hide() if self.toolTip: self.toolTip.Hide() self.Hide()
  14. Thanks for the release, but this is a totally bad solution and useless code. Already there's a function that checking if the application is active or not in CMSWindow class. The variable m_isActive is set when WM_ACTIVATEAPP it's called, basically when a window belonging to a different application than the active window is about to be activated. If you read a little bit the documentation of Win32 Api, you can find those. WA_ACTIVE Activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window) WA_CLICKACTIVE Activated by a mouse click. So, all what you've to use, it's just 2 lines: [Hidden Content] This method doesn't make sense for the metin2 gameplay anyway. Also, this is something that made my day:
×
×
  • 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.