Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/23/19 in all areas

  1. M2 Download Center Download Here ( Internal ) Download
    2 points
  2. Hello everyone, A lot of people might already know the issue. If you choose Arial as Font for Metin2, texts will be displayed in a weird way and with dots. There are a few reasons for this to happen and increasing font size fixes it, but no one wants huge texts everywhere and obviously, we wannt a nice font. Not a trial and error. So here's a partial fix for it. If you choose very small font sizes (e. g. font size 9px) in locale_game.txt it'll still look a bit off but it's definitely readable. With these changes, you'll have no problem with font sizes 14px and higher. Maybe someone wants to share different approaches or ideas. I think with these changes the problem is almost entirely fixed, no one needs size 9 especially with Arial.. First open your Binary source and search for "LOGFONT" (without "" of course). You'll find two matches where it's being used for initialization of new fonts: One in TextBar.cpp(CTextBar::__SetFont) and one in GrpFontTexture(CGraphicFontTexture::GetFont). And these are the two functions where we need to make some changes first. Under the line where LOGFONT is used, you're gonna add the following code: HDC hDC = m_dib.GetDCHandle(); if (hDC) { auto px = fontSize * 72 / 96; fontSize = -MulDiv(px, GetDeviceCaps(hDC, LOGPIXELSY), 72); } This code segment does two things: First it converst px -> pt, since LOGFONT expects pt. And on second, it calculates the correct displaying size according to the ppi and the cell height. This leads to the variable we need: The point size. Note that there's a minus, which means that we'll automatically choose the nearest possible size according to the specified font size. So everything's good here. Als note that you need add this segment to BOTH places where LOGFONT is being used for initialization. You have to change the name fontSize according to the files you edit. In TextBar.cpp the example above fits, for GrpFontTexture you just need to change fontSize to m_fontSize. Now change the following parts in both functions: logFont.lfOutPrecision = OUT_TT_ONLY_PRECIS; logFont.lfClipPrecision = CLIP_DEFAULT_PRECIS; logFont.lfQuality = NONANTIALIASED_QUALITY; logFont.lfPitchAndFamily = VARIABLE_PITCH; Note: You can also change logFont.lfWeight from FONT_NORMAL to FONT_MEDIUM or any other font weight if you wanna add up a mit more strength to your fonts. I just left it to FONT_NORMAL, which is fine. Also note that I chose NONANTIALIASED_QUALITY since anti-aliasing didn't make any change (not sure if Arial is even compatible, at least not those small font sized that I tested it with..). You can also change them to something like ClearType to do the job, that's up to you. I wanted to display the fonts just like they are, no mangling with them. But depending on your needs you can tweak a bit here. that's almost it! Last but not least, we have to change the way our adapter hDC does it's job. Especially since the above calculation for point size is only 100% true for MapMode MM_TEXT. And that's what we're gonna establish now. If you are in CGraphicFontTexture::GetFont, you can just scroll a bit higher. You'll see the initialization of hdC (function CGraphicFontTexture::Create). just below SetBkColor(hDC, 0); you can add these two lines: SetGraphicsMode(hDC, GM_ADVANCED); SetMapMode(hDC, MM_TEXT); Aaand you're done! That's it! Compile and enjoy! Best Regards Vanilla
    2 points
  3. M2 Download Center Download Here ( Internal ) Some time ago took me to some creativity and thought to myself that I would try to make HD texture for metin. And here are the effects. Download: [Hidden Content]
    1 point
  4. M2 Download Center Download Here ( Internal ) I know is not a big deal but i just started the work with this pixelated images. I was just bored. I was thinking to add some more info to this skill icon. Regards, Cara
    1 point
  5. Just #include <cryptopp/cryptoppLibLink.h> not all..
    1 point
  6. You can remove the include .
    1 point
  7. You should't use d.new_jump_party and d.notice in the same timer. Rather move d.notice to login state because it might happen you will not see it since you are still in client's login phase.
    1 point
  8. 1 point
  9. 1 - when 8129.kill with pc.get_map_index() == 4 begin 2 - d.notice("") or notice_all("") 3 - char timer for a dungeon? Use server_timer 4 - end of the when? 5 - indentation u know? 6 - much more to say... Post the quest
    1 point
  10. Just CryptoPP::byte no copy paste paste paste fail..
    1 point
  11. I don't see any reason for his posting either. So let's just keep him talk. Would be sad if anyone buys it and we have a fix that's about to be published. If anyone still buys his "easy fix" for money, then this person might not be the smartest one out there considering the fact that we're gonna fix this. As I said, on my client it works perfectly fine without any dots. So I only have to find the stuff I did on it and didn't mention.. Then we're good to go.
    1 point
  12. good job bro. lets share it ?
    1 point
  13. 1) I'm concerned about this in particular. INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 10002, 954319, 261200, 0, 'LOGIN', '192.168.1.8 1997735000 1 41 200000', '192.168.1.8') Because: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 2) SYSERR: Jun 20 19:21:35.356706 :: ItemLoad: cannot create item by vnum 49000 (name Display id 10000001) You have a valid item by vnum 49000?(and others with the same error pattern) 3) 0620 18:23:14559 :: CDungeonBlock::Load(filename=d:/ymir work/zone/dungeon/resources picking zon/mushroom01.gr2) - model count is 0 Replace the file with another from another server file or client.See if it's working.This should be first step.
    1 point
  14. Not tested: Replace the void CHARACTER::Reward(bool bItemDrop) function. (char_battle.cpp) void CHARACTER::Reward(bool bItemDrop) { if (GetRaceNum() == 5001) { PIXEL_POSITION pos; if (!SECTREE_MANAGER::instance().GetMovablePosition(GetMapIndex(), GetX(), GetY(), pos)) return; LPITEM item; int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax); iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(NULL) / 100; iGold *= GetGoldMultipler(); int iSplitCount = number(25, 35); sys_log(0, "WAEGU Dead gold %d split %d", iGold, iSplitCount); for (int i = 1; i <= iSplitCount; ++i) { if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold / iSplitCount))) { if (i != 0) { pos.x = number(-7, 7) * 20; pos.y = number(-7, 7) * 20; pos.x += GetX(); pos.y += GetY(); } item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); } } return; } LPCHARACTER pkAttacker = DistributeExp(); if (!pkAttacker) return; if (pkAttacker->IsPC()) { if (GetLevel() - pkAttacker->GetLevel() >= -10) if (pkAttacker->GetRealAlignment() < 0) { if (pkAttacker->IsEquipUniqueItem(UNIQUE_ITEM_FASTER_ALIGNMENT_UP_BY_KILL)) pkAttacker->UpdateAlignment(14); else pkAttacker->UpdateAlignment(7); } else pkAttacker->UpdateAlignment(2); pkAttacker->SetQuestNPCID(GetVID()); quest::CQuestManager::instance().Kill(pkAttacker->GetPlayerID(), GetRaceNum()); CHARACTER_MANAGER::instance().KillLog(GetRaceNum()); if (!number(0, 9)) { if (pkAttacker->GetPoint(POINT_KILL_HP_RECOVERY)) { int iHP = pkAttacker->GetMaxHP() * pkAttacker->GetPoint(POINT_KILL_HP_RECOVERY) / 100; pkAttacker->PointChange(POINT_HP, iHP); CreateFly(FLY_HP_SMALL, pkAttacker); } if (pkAttacker->GetPoint(POINT_KILL_SP_RECOVER)) { int iSP = pkAttacker->GetMaxSP() * pkAttacker->GetPoint(POINT_KILL_SP_RECOVER) / 100; pkAttacker->PointChange(POINT_SP, iSP); CreateFly(FLY_SP_SMALL, pkAttacker); } } } if (!bItemDrop) return; PIXEL_POSITION pos = GetXYZ(); if (!SECTREE_MANAGER::instance().GetMovablePosition(GetMapIndex(), pos.x, pos.y, pos)) return; if (test_server) sys_log(0, "Drop money : Attacker %s", pkAttacker->GetName()); RewardGold(pkAttacker); LPITEM item; static std::vector<LPITEM> s_vec_item; s_vec_item.clear(); if (ITEM_MANAGER::instance().CreateDropItem(this, pkAttacker, s_vec_item)) { if (s_vec_item.size() == 0); else if (s_vec_item.size() == 1) { item = s_vec_item[0]; if (pkAttacker->GetEmptyInventory(item->GetSize()) != -1) { pkAttacker->AutoGiveItem(item->GetVnum(), item->GetCount()); } } pos.x = number(-7, 7) * 20; pos.y = number(-7, 7) * 20; pos.x += GetX(); pos.y += GetY(); sys_log(0, "DROP_ITEM: %s %d %d from %s", item->GetName(), pos.x, pos.y, GetName()); } else { int iItemIdx = s_vec_item.size() - 1; std::priority_queue<std::pair<int, LPCHARACTER> > pq; int total_dam = 0; for (auto it = m_map_kDamage.begin(); it != m_map_kDamage.end(); ++it) { int iDamage = it->second.iTotalDamage; if (iDamage > 0) { LPCHARACTER ch = CHARACTER_MANAGER::instance().Find(it->first); if (ch) { pq.push(std::make_pair(iDamage, ch)); total_dam += iDamage; } } } std::vector<LPCHARACTER> v; while (!pq.empty() && pq.top().first * 10 >= total_dam) { v.push_back(pq.top().second); pq.pop(); } if (v.empty()) { while (iItemIdx >= 0) { item = s_vec_item[iItemIdx--]; if (!item) { sys_err("item null in vector idx %d", iItemIdx + 1); continue; } item->AddToGround(GetMapIndex(), pos); item->StartDestroyEvent(); pos.x = number(-7, 7) * 20; pos.y = number(-7, 7) * 20; pos.x += GetX(); pos.y += GetY(); sys_log(0, "DROP_ITEM: %s %d %d by %s", item->GetName(), pos.x, pos.y, GetName()); } } else { auto it = v.begin(); while (iItemIdx >= 0) { item = s_vec_item[iItemIdx--]; if (!item) { sys_err("item null in vector idx %d", iItemIdx + 1); continue; } item->AddToGround(GetMapIndex(), pos); LPCHARACTER ch = *it; if (ch->GetParty()) ch = ch->GetParty()->GetNextOwnership(ch, GetX(), GetY()); if (ch->GetEmptyInventory(item->GetSize()) != -1) { ch->AutoGiveItem(item->GetVnum(), item->GetCount()); } } pos.x = number(-7, 7) * 20; pos.y = number(-7, 7) * 20; pos.x += GetX(); pos.y += GetY(); sys_log(0, "DROP_ITEM: %s %d %d by %s", item->GetName(), pos.x, pos.y, GetName()); } } } } m_map_kDamage.clear(); }
    1 point
  15. Patch v19.3.9 Contains: New costumes with hairstyles New weapon set New armor set New shining for the weapons and armors at level +15 Locales(de,en,hu), with new login and loading backgrounds Map copys via 'ParentMapName' A new pet Redesigned monsters "Awakened" Download locale_ae locale_tr Metin2 Download PS.: I am not able to unpack the proto files, sorry.
    1 point
  16. A gift from Italy. Only Weapon Models (includes 19.3 weapons) and Item Icons (includes new weapons and armors). Someone will release the rest I'm sure. [Hidden Content] [Hidden Content] [Hidden Content]
    1 point
×
×
  • 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.