Jump to content

Valki

Active Member
  • Posts

    41
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Valki

  1. You're 100% right, it's not necessary because miles is doing it's job more than perfectly. But I'd like to mention that if you want to go further than metin2 in the future (so if you're really interested in the programming part of it) it's better to know alternatives, other options too and if you can do it properly it also won't hurt since for example "FMOD" is also a great library to handle sounds in m2's source. But I'm really agreeing with you, because if you're not interested in these kind of stuffs then it's not necessary, even if other sound engines has better support than mss
  2. Amazing! I also think that if anyone really wants to upgrade the sound system they should look at fmod.
  3. Sad to hear this and I really understand, when I talked with friends I even said maybe 3 years was mostly learning shaders and rendering in dx9, great to hear that it was really because of that, because the server itself doesnt provide anything new except your shaders and graphics. Also, glad to hear that the code is complex enough so we won't see 15 """"full hd metin""""", except if they open servers from the zenaris files itself.
  4. Honestly? I don't know what was 3 years in it. As far as I know N2 was made in 5 years and if you look at it's source code it really looks like that. Looking at Zenaris's source and I only see the shader which is interesting in it, nothing else.
  5. I’m more than glad that you’ll be our next administrator!
  6. Cherno is just amazing, I fully recommend his videos
  7. Hello! So I just noticed that if you want to join to the ship defense after the leader started AND the cooldown is enabled the other characters cannot connect (idk if it's fixed already or not, sorry if it is.) because the cooldown is put on the characters on creating the instance and when you're trying to join it's already on cooldown. Here's a fix for it: /// In ShipDefense.h add after: bool IsRunning(const LPCHARACTER c_lpChar); /// This: bool CanJoin(const LPCHARACTER c_lpChar); /// In ShipDefense.cpp add after: bool CShipDefenseManager::IsRunning(const LPCHARACTER c_lpChar) { [...] } /// This: bool CShipDefenseManager::CanJoin(const LPCHARACTER c_lpChar) { if (c_lpChar == nullptr) return false; const LPPARTY c_lpParty = c_lpChar->GetParty(); if (c_lpParty == nullptr) return false; if (m_mapShipDefense.empty()) return false; ShipDefenseMap::const_iterator f = m_mapShipDefense.find(c_lpParty->GetLeaderPID()); if (f != m_mapShipDefense.end()) return true; return false; } /// In questlua_shipdefense_mgr.cpp /// Add before: void RegisterShipDefenseManagerFunctionTable() { [...] } /// This: int ship_defense_mgr_can_join(lua_State* L) { const LPCHARACTER c_lpChar = CQuestManager::instance().GetCurrentCharacterPtr(); if (c_lpChar == nullptr) { lua_pushboolean(L, false); return 1; } CShipDefenseManager& rkShipDefenseMgr = CShipDefenseManager::instance(); lua_pushboolean(L, rkShipDefenseMgr.CanJoin(c_lpChar)); return 1; } /// Add after: { "set_alliance_hp_pct", ship_defense_mgr_set_alliance_hp_pct }, /// This: { "can_join", ship_defense_mgr_can_join}, -- In quest_functions add: ship_defense_mgr.can_join -- In shipdefense.quest change this: if pc.getqf("cooldown") > get_time() then -- To this: if pc.getqf("cooldown") > get_time() and not ship_defense_mgr.can_join() then
  8. I don't think it's needed, iirc I had one, but I did not touch any of it's code.
  9. Hi! Added what I forgot, also made a small video of what it actually does.
  10. Hi! Today I'm sharing small changes about changing equipments. I experienced that in metin2 basically it can't replace for example a two handed weapon (which is equipped) with a simple sword if there's an item in the next row under our item that we want to equip. Video of the result: Small explanation: So, if we want to make it work like we want we will need to check if basically it couldn't replace the inventory item with our equipped item then is there any space for that item, and if there is it can unequip it to that slot. So, let's get to the work. We will work in 2 files, char.h and char.cpp [Hidden Content]
  11. If we're talking about the same thing, just add the needed header files in extern/include.
  12. @ DDC Search for: #ifdef ENABLE_EMOJI_SYSTEM if (m_emojiVector.empty() == false) { for(auto& rEmo : m_emojiVector) { if (rEmo.pInstance) { rEmo.pInstance->SetPosition(fStanX + rEmo.x, (fStanY + 7.0) - (rEmo.pInstance->GetHeight() / 2)); rEmo.pInstance->Render(); } } } #endif in GrpTextInstance.cpp's ::Render function and change it like that: #ifdef ENABLE_EMOJI_SYSTEM if (m_emojiVector.empty() == false) { for(auto& rEmo : m_emojiVector) { if (rEmo.pInstance) { rEmo.pInstance->SetPosition(fStanX + rEmo.x, (fStanY + 7.0) - (rEmo.pInstance->GetHeight() / 2)); #if defined(__BL_CLIP_MASK__) if (pClipRect) rEmo.pInstance->Render(pClipRect); else rEmo.pInstance->Render(); #else rEmo.pInstance->Render(); #endif } } } #endif
  13. Hello! Links: [Hidden Content] [Hidden Content]
  14. Well, I did not know that.
  15. Hello! I was testing something on my server and I had to use /i a tons, so I just extended it instead. With this extension you can get as many items as you want (of course with limitation of your max inventory space.) For this we will working in only one file, called "cmd_gm.cpp". So, in cmd_gm.cpp fine ACMD(do_item) and edit the following things in the function. Be careful, because there's a chance that you don't use "g_bItemCountLimit" but "MAX_ITEM_COUNT" (or something like that) instead. //Find this: if (*arg2) { str_to_number(iCount, arg2); iCount = MINMAX(1, iCount, g_bItemCountLimit); } //And comment out iCount limitations like this: if (*arg2) { str_to_number(iCount, arg2); //iCount = MINMAX(1, iCount, g_bItemCountLimit); } //Find this: if (item->IsDragonSoul()) { [...] } //and after that add this: else if (!item->IsStackable()) { M2_DESTROY_ITEM(item); for (int i = 0; i < iCount; i++) { LPITEM newItem = ITEM_MANAGER::instance().CreateItem(dwVnum, 1); int iEmptyPos = ch->GetEmptyInventory(newItem->GetSize()); if (iEmptyPos != -1) { newItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos)); LogManager::instance().ItemLog(ch, newItem, "GM", item->GetName()); } else { M2_DESTROY_ITEM(item); ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space."); break; } } } else if (item->IsStackable() && iCount > g_bItemCountLimit) { M2_DESTROY_ITEM(item); while (iCount != 0) { LPITEM newItem; if (iCount >= g_bItemCountLimit) { newItem = ITEM_MANAGER::instance().CreateItem(dwVnum, g_bItemCountLimit); iCount -= g_bItemCountLimit; } else { newItem = ITEM_MANAGER::instance().CreateItem(dwVnum, iCount); iCount -= iCount; } int iEmptyPos = ch->GetEmptyInventory(newItem->GetSize()); if (iEmptyPos != -1) { newItem->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos)); LogManager::instance().ItemLog(ch, newItem, "GM", item->GetName()); } else { M2_DESTROY_ITEM(newItem); ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space."); break; } } }
  16. Bought some custom stuff from him and he did an amazing job, also was very helpful! Obviously recommending him!
  17. Download Metin2 Download Welcome folks! I brought you a small "system" (would call it modification instead), which will instantly pick up 45 (you can increase or decrease its size). My goal was not to send packets each time we're trying to pick up items. I did not test it for hours, so I wouldn't recommend using it on a live server without proper tests. So let's get started! First, we will start on the client side, and there we will work in the UserInterface project. Locale_inc.h: Packet.h: PythonItem.h: PythonItem.cpp PythonNetworkStream.h PythonNetworkStreamPhaseGameItem.cpp PythonPlayerInput.cpp: StdAfx.h And now the server side. common/serivice.h or common/CommonDefines.h common/length.h packet.h packet_info.cpp input.h input_main.cpp Good look with the system and please if there's any bug leave a comment so I can fix it. Have a good day!
  18. Download Metin2 Download Hello everyone! Today I saw a basic item system on metin2.download and I was wondering why not to make it with JSON. There are better ways to do this, but it can be a great start to learn some JSON for people (also, it's my first work with JSON file(s)) Almost everything in the .rar, you just have to download and put the dependencies in the right folder, or if you change it don't forget to rewrite the AutoGiveItems.cpp's include. Links: Spoiler Virus Total: [Hidden Content] Git repository: [Hidden Content] AutoGiveItems: [Hidden Content]
  19. Hello everyone! Welcome to my marketplace page. My system(s) are small projects that easy to edit, extend. There's no need to edit too much in basic source, since they're all written in new files, just need some include and maybe small edits in basic files, of course it depends on the system, but will be easy to install with the tutorial I provide. Updates and support for my system(s) will be (obviously) free in the future. ***Coupon Code/Giftscode System: 25€***
  20. Is there any public style or something like that for this cms? Cuz some other private servers has the same design, just some recolor/logo change.
×
×
  • 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.