• Content Count

  • Joined

  • Last visited

  • Days Won


Sonitex last won the day on December 26 2018

Sonitex had the most liked content!

Community Reputation

140 Excellent


About Sonitex

  • Rank
  • Birthday April 19

Profile Information

  • Gender
    Something else
  • Location

Contact Methods

  • Skype

Recent Profile Visitors

2,210 profile views
  1. Sonitex

    [FIX]Target Info System (free release one)

    I am just curious but this would purge the items from memory, right? If added at the end of the function at input_main.cpp? for (auto const& item : s_vec_item) { M2_DESTROY_ITEM(item); }
  2. int percentage = 31; int iDamageSPPart = (dam / 100) * percentage; Is this what you are asking for?
  3. Sonitex

    open MonsterRank & MonsterType functions

    After four years you should be reading(at least) Metin2 code easily, this is not an excuse. Problem is, you do nothing on your own and always ask others to do it for you, literally. Not to brag or anything but I've started this p-server thing at the same year as you did and right now I am able to read, modify, add or remove code without any issues. That is because I wanted to learn and I eventually did. You should do the same. This is the truth, take it or leave it.
  4. Sonitex

    open Come back to dungeon after crash

    If I remember correctly, snow dungeon quest had this feature, you should check it out.
  5. int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes) { [...] //Disable linking items in shout chat std::string str = chatbuf_global; std::string str2("|Hitem:"); std::size_t found = str.find(str2); if (found!=std::string::npos) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SHOUT_CHAT_ITEM_HYPERLINK_MESSAGE")); return(iExtraLen); } [...] } Good enough for ya
  6. Sonitex

    open i need info of dark protection

    if (IsAffectFlag(AFF_MANASHIELD)) { int iDamageSPPart = dam / 3; int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100; int iSP = GetSP(); if (iDamageToSP <= iSP) { PointChange(POINT_SP, -iDamageToSP); dam -= iDamageSPPart; } else { PointChange(POINT_SP, -GetSP()); dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1); } } As you can see, dam is the received damage and it is reduced by one third. I have no idea why YMIR added scaling for this skill if it was always constant and description in client is wrong as well... You could modify it and get damage reduction from skill power by adding this. Please note that this was just a quick guess, it may not work or I even miss understood something... iDamageSPPart is an int type percentage of damage that should be reduced(I believe ). CSkillProto* pkSk = CSkillManager::instance().Get(SKILL_MANASHILED); if (NULL != pkSk) { pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_MANASHILED) / 100.0f); pkSk->SetPointVar("iq", GetPoint(POINT_IQ)); int iDamageSPPart = static_cast<int>(pkSk->kPointPoly.Eval()); } dam -= (dam / 100) * iDamageSPPart
  7. Sonitex

    open Official logout method

    You can call the function from input_main.cpp and other source files which handle received packets. Same goes for sent packets Like so: //input_main.cpp case HEADER_CG_PARTY_INVITE: PartyInvite(ch, c_pData); timed_event_cancel((ch); break;
  8. Sonitex

    open Special Item Group Error

    It's the Nine Tails Chest probably as that mob vnum is from Elite Nine Tails... Replace that name with an item vnum
  9. Sonitex

    open Special Item Group Error

    In item_manager_read_tables.cpp search for: bool ITEM_MANAGER::ReadSpecialDropItemFile(const char * c_pszFileName) Inside find this, it may not be same as yours: else { CSpecialItemGroup * pkGroup = M2_NEW CSpecialItemGroup(iVnum, type); for (int k = 1; k < 256; ++k) { char buf[4]; snprintf(buf, sizeof(buf), "%d", k); if (loader.GetTokenVector(buf, &pTok)) { const std::string& name = pTok->at(0); DWORD dwVnum = 0; if (!GetVnumByOriginalName(name.c_str(), dwVnum)) { if (name == "exp") { dwVnum = CSpecialItemGroup::EXP; } else if (name == "mob") { dwVnum = CSpecialItemGroup::MOB; } else if (name == "slow") { dwVnum = CSpecialItemGroup::SLOW; } else if (name == "drain_hp") { dwVnum = CSpecialItemGroup::DRAIN_HP; } else if (name == "poison") { dwVnum = CSpecialItemGroup::POISON; } else if (name == "bleed") { dwVnum = CSpecialItemGroup::BLEED; } else if (name == "group") { dwVnum = CSpecialItemGroup::MOB_GROUP; } else { str_to_number(dwVnum, name.c_str()); if (!ITEM_MANAGER::instance().GetTable(dwVnum)) { sys_err("ReadSpecialDropItemFile : there is no item %s : node %s", name.c_str(), stName.c_str()); M2_DELETE(pkGroup); return false; } } } And add this below <if (name == "exp")> else if (name == "yang") { dwVnum = CSpecialItemGroup::GOLD; } I just tested it so it should work fine :=)
  10. Sonitex

    open Special Item Group Error

    Replace those Chinese characters with 'exp'. if (name == "경험치" || name == "exp") { dwVnum = CSpecialItemGroup::EXP; }
  11. Sonitex

    [search]Quest teleport map1 when you die

    This is already public just search for 'metin2 death quest trigger' and to warp a player use warp_to_village().
  12. Sonitex

    [Bugfix]Dungeon music

    Actually I was wrong, there would have to be more than or equal to 10000 dungeons of same type because, (mapIndex * 10000 + 10000) / 10000 > mapIndex and we wouldn't get original mapIndex but mapIndex+1 or more, depends on dungeon instances. For some reason I thought it would round up the number, but it's type is integer so it is not possible so I just said 3500 just to give an idea. I apologise for that. Sure, I would love to see that happen. There isn't a server with more than 3000 unique players right now, but you would need more than 10000 unique players(as I corrected myself earlier), each one creating their own dungeon, good luck with that one. If you are referring to having more than 10000 dungeons, it is just not possible, if not I'd love to hear those 'new bugs' and will happily fix them.
  13. Sonitex

    [Bugfix]Dungeon music

    Hey community! When you specify which music you want to play in your dungeon map at settings.lua, it is always getting replaced with previous map's one(From which you were teleported to). This is happening because each dungeon has it's own unique map index and game cannot locate it from settings. Here is a simple fix to get original index of that map, it should work as long as you do not have like 10000 dungeon instances of same type, which isn't possible with current Metin2 player count I believe. In char.cpp search for: void CHARACTER::MainCharacterPacket() Replace this variable with the following: const unsigned mapIndex = GetMapIndex(); const unsigned mapIndex = GetMapIndex() < 10000 ? GetMapIndex() : GetMapIndex() / 10000; Greetings, Sonitex
  14. Sonitex

    Baseball cap

    Not the hero we deserve but the hero we need Amazing work!
  15. Sonitex

    solved take quest trigger

    Ugh sorry for not understanding you, I guess you have to list every single NPC in there, there is no way around it sadly unless you edit source...