Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/19 in all areas

  1. Hi everyone. I'd like to share a small guide for the official .mss file. It is a new Token in the sound script files which is controlling the volume, if the Token has been set of course. Couple of sound scripts are using this option: 0.0.) Make a backup of your files. 0.1.) Copying the codes from the board brings some invisible white characters with it, paste first into notepad++ and remove all the "?" characters. 1.0.) Open MilesLib/Type.h. 1.1.) Add the following variable to the two structured types by name: TSoundData and TSoundInstance. float fSoundVolume; 2.0.) Open MilesLib/Type.cpp. 2.1.) In the function by name "NSound::LoadSoundInformationPiece" look for the following code: int iCount; if (!rkTextFileLoader.GetTokenInteger("sounddatacount", &iCount)) { SetResultString((strResult + " File format error, SoundDataCount Unable to find.").c_str()); return false; } 2.2.) Paste the following below of it: float fVolume = 0.0f; if (rkTextFileLoader.GetTokenFloat("soundpositionenable", &fVolume)) { SetResultString((strResult + " SoundPosition has checked.").c_str()); } else { SetResultString((strResult + " SoundPosition has not checked.").c_str()); } 2.3.) Bit scrolled down extend the for cycle like this: for (DWORD i = 0; i < rSoundDataVector.size(); ++i) { //Some random stuff //{} rSoundDataVector[i].fSoundVolume = fVolume; } 2.4.) At the bottom of the file you will find this function: "NSound::DataToInstance", extend the for cycle with this line: rSoundInstance.fSoundVolume = c_rSoundData.fSoundVolume; 3.0.) Open the MilesLib/SoundManager.h. 3.1.) Add a new argument to the definition of the "PlaySound2D" function: void PlaySound2D(const char * c_szFileName, float fVolume = 0.0f); 4.0.) Open the MilesLib/SoundManager.cpp. 4.1.) Replace the function "PlaySound2D" with this: void CSoundManager::PlaySound2D(const char * c_szFileName, float fVolume) { if (0.0f == GetSoundVolume()) return; ISoundInstance * pInstance; if (!GetSoundInstance2D(c_szFileName, &pInstance)) return; float fNewVolume = fVolume; if (fVolume == 0.0f) fNewVolume = GetSoundVolume(); pInstance->SetVolume(fNewVolume); pInstance->Play(1); } 4.2.) Replace this function "CSoundManager::UpdateSoundInstance" with this: <!> Attention: Of this function you will find two, be sure you will replace the correct one, check the arguments! I think the second one is not in used at all <!> void CSoundManager::UpdateSoundInstance(float fx, float fy, float fz, DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector, BOOL bCheckFrequency) { for (DWORD i = 0; i < c_pSoundInstanceVector->size(); ++i) { const NSound::TSoundInstance & c_rSoundInstance = c_pSoundInstanceVector->at(i); if (c_rSoundInstance.dwFrame == dwcurFrame) { if (0.0f == c_rSoundInstance.fSoundVolume) { //Tracenf("PLAY SOUND %s", c_rSoundInstance.strSoundFileName.c_str()); PlayCharacterSound3D(fx, fy, fz, c_rSoundInstance.strSoundFileName.c_str(), bCheckFrequency); } else { PlaySound2D(c_rSoundInstance.strSoundFileName.c_str(), c_rSoundInstance.fSoundVolume); } } } } Any problem occurs, post a comment below.
    6 points
  2. I hope i say the Title with the right words for it i found this on a Chinese Site that is related to "Ymir Entertainment Co. Ltd" There are maskes for Old Armors that never have been seen before. and the first one i realy like because i never seen it in a "Black Color" I love it
    3 points
  3. Thank you! Here is the same version of the game, in Turkish this time : [Hidden Content]
    2 points
  4. As promised, here's to you: 1 - NullPtr + NewCase on famous Item MYTHICAL_PEACH char_item.cpp Find for: case 71107: Add below of this line: quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetPlayerID()); This prevent: if (!pPC) return false; In your database there is an item like 71107, add the other case for it. case 71107: case 39032: 2 - Warp_all_to_village function was keeping also STAFF out. Replace the struct like this in questlua_global.cpp struct FWarpAllToVillage { FWarpAllToVillage() {}; void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { const LPCHARACTER ch = (LPCHARACTER) ent; if (ch) { if (ch->IsPC() && !ch->IsGM()) { const auto bEmpire = ch->GetEmpire(); if (!bEmpire) return; ch->WarpSet( g_start_position[bEmpire][0], g_start_position[bEmpire][1] ); } } } } }; 3 - Enable Syserr also in LUA. In file questlua_global.cpp find for int _syserr(lua_State* L) or ALUA(_syserr) If you don't have it or if you have, replace or insert this function . int _syserr(lua_State* L) { if (!lua_isstring(L, 1)) return 0; sys_err("From LUA: %s", lua_tostring(L, 1)); /* PC* pc = CQuestManager::instance().GetCurrentPC(); if (!pc) return 0; LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (!ch) return 0; ch->ChatPacket(CHAT_TYPE_INFO, "QUEST_SYSERR %s", lua_tostring(L, 1)); */ return 0; } OR int _syserr(lua_State* L) { if (!lua_isstring(L, 1)) return 0; sys_err("From LUA: %s", lua_tostring(L, 1)); PC* pc = CQuestManager::instance().GetCurrentPC(); if (!pc) return 0; LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch) ch->ChatPacket(CHAT_TYPE_INFO, "QUEST_SYSERR %s", lua_tostring(L, 1)); return 0; } As you can see I commented the char part, because I suggest to use without! For server_timer and automatic things without char entity etc. Don't forget to add the function in RegisterGlobalFunctionTable and quest_functions file. 4 - Fix of bonus application like Official on special mineral slots. File item.cpp find for: if (0 != accessoryGrade) replace the if statement with this for 2 bonus only: if (0 != accessoryGrade && i < ITEM_APPLY_MAX_NUM - 1) UPDATE: From 2020-21 in official site, the bonus are shown and apply x3. So if you want to have like official, just leave c++ default and fix in python the show of the 3rd bonus. 5 - item with remain time stay into a shop, time shows: "Remain time 0 Sec.". In file uitooltip.py replace these functions: def AppendUniqueItemLastTime(self, restMin): def AppendMallItemLastTime(self, endTime): Like this: def AppendUniqueItemLastTime(self, restMin): if restMin > 0: restSecond = restMin*60 self.AppendSpace(5) self.AppendTextLine(localeInfo.LEFT_TIME + " : " + localeInfo.SecondToHM(restSecond), self.NORMAL_COLOR) def AppendMallItemLastTime(self, endTime): if endTime > 0: leftSec = max(0, endTime - app.GetGlobalTimeStamp()) self.AppendSpace(5) self.AppendTextLine(localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftSec), self.NORMAL_COLOR)
    1 point
  5. M2 Download Center Download Here ( Internal ) Download: [Hidden Content]
    1 point
  6. dp.settings should be created when opening LzoModule.dll should also be in source, inside Libs folder Bellow i sent the core files just in case something is missing (without the defaut profile.xml) [Hidden Content]
    1 point
  7. Hi there, This are the core files, the ones needed for it to work (.pdb appeared in print by mistake): Inside AppData: And in profiles you will have the "Default Profile.xml" and others you create. And this the program GUI (version may differ, its an older print):
    1 point
  8. Take a look at EterManager. Its source was also published by the creator. (google) Way better then Eternexus.
    1 point
  9. UPDATE - SOLVED MY OWN FAULTS ! Old Text: I am Trying to Implantate the ACCE_SYSTEM (Shoulder-Band-System) after upgrading the Database Struct to new Eterpack Version 18.x So what is my Problem Today ? If im running the binary and standing on map1 for a while and Seeing Invisible mobs i getting a client crash with SYSERR. SYSERR: [Hidden Content] Picture of Debug Log so what i think the failure must be here under theese files (because i have problems with setting the position right actually it must be 14 for ACCE under Costume Hair.) If you think its somenthing else let me know and i post this File here instantly. - Remove Files from my Source. Solved by : I Solve my problem by copy the structur of my game source inside my Client ! thats how i solve this stupid problem.
    1 point
  10. I Think the rest i can solve by myself.. Thank you @flatik for helping me out you are awesome Edit: and by the way @martysama0134 sorry for that you see such a shitty problem from me.. ( i could have solve it if i think enough over my own faults and sorry for that i using systems that i dont have payd i dont have the money for it) (my english is not the best) but i love your work realy ! but i still have to learn so much things and i only getting better from day to day but maybe we meeting us some day again ! and im happy that i have so much people here that helping me alot everyday ! and i will keep pushing forward my C++ Knowledge and will still love to develop on Metin2.
    1 point
  11. 1 point
  12. Fix Dungeon count monsters: Dungeon.cpp struct FCountMonster { int n; FCountMonster() : n(0) {}; void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsMonster() || ch->IsStone())//FIX n++; } } }; (Function was keeping also NPC, it could make you ugly problems). Fix Dungeon memory usage: namespace { struct FNotice { FNotice(const char * psz) : m_psz(psz) { } void operator() (LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsPC()) //FIX ch->ChatPacket(CHAT_TYPE_NOTICE, "%s", m_psz); } } const char * m_psz; }; } Just 2 errors. I hope that it'll be useful
    1 point
  13. 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.